[-- Attachment #1: Type: text/plain, Size: 2112 bytes --] Tested-by: Zhu, ShuaiX <shuaix.zhu@intel.com> > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li > Sent: Wednesday, October 30, 2019 2:17 AM > To: dts@dpdk.org > Cc: Li, WenjieX A <wenjiex.a.li@intel.com> > Subject: [dts] [PATCH V1] tests/dynamic_config and tx_preparation:ensure port > is up before send pkt > > ensure port is up before send packets. > > Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com> > --- > tests/TestSuite_dynamic_config.py | 5 +++++ > tests/TestSuite_tx_preparation.py | 4 ++++ > 2 files changed, 9 insertions(+) > > diff --git a/tests/TestSuite_dynamic_config.py > b/tests/TestSuite_dynamic_config.py > index 301f5b7..5e55b57 100644 > --- a/tests/TestSuite_dynamic_config.py > +++ b/tests/TestSuite_dynamic_config.py > @@ -40,6 +40,8 @@ import utils > import time > > from test_case import TestCase > +from pmd_output import PmdOutput > + > > # > # > @@ -100,6 +102,9 @@ class TestDynamicConfig(TestCase): > """ > Send 1 packet to portid > """ > + self.pmd_output = PmdOutput(self.dut) > + res = self.pmd_output.wait_link_status_up("all", 30) > + self.verify(res is True, "there have port link is down") > > itf = self.tester.get_interface(self.tester.get_local_port(portid)) > > diff --git a/tests/TestSuite_tx_preparation.py > b/tests/TestSuite_tx_preparation.py > index 366a547..215e961 100644 > --- a/tests/TestSuite_tx_preparation.py > +++ b/tests/TestSuite_tx_preparation.py > @@ -116,6 +116,10 @@ class TestTX_preparation(TestCase): > """ > Send packet to portid and output > """ > + self.pmd_output = PmdOutput(self.dut) > + res = self.pmd_output.wait_link_status_up("all", 30) > + self.verify(res is True, "there have port link is down") > + > LrgLength = random.randint(Normal_mtu, Max_mtu-100) > pkts = {'IPv4/cksum TCP': 'Ether(dst="%s")/IP()/TCP(flags=0x10)\ > /Raw(RandString(50))' % self.dmac, > -- > 2.17.1 [-- Attachment #2: TestTX_preparation.log --] [-- Type: application/octet-stream, Size: 108881 bytes --] [-- Attachment #3: TestDynamicConfig.log --] [-- Type: application/octet-stream, Size: 82017 bytes --]
ensure port is up before send packets. Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com> --- tests/TestSuite_dynamic_config.py | 5 +++++ tests/TestSuite_tx_preparation.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/tests/TestSuite_dynamic_config.py b/tests/TestSuite_dynamic_config.py index 301f5b7..5e55b57 100644 --- a/tests/TestSuite_dynamic_config.py +++ b/tests/TestSuite_dynamic_config.py @@ -40,6 +40,8 @@ import utils import time from test_case import TestCase +from pmd_output import PmdOutput + # # @@ -100,6 +102,9 @@ class TestDynamicConfig(TestCase): """ Send 1 packet to portid """ + self.pmd_output = PmdOutput(self.dut) + res = self.pmd_output.wait_link_status_up("all", 30) + self.verify(res is True, "there have port link is down") itf = self.tester.get_interface(self.tester.get_local_port(portid)) diff --git a/tests/TestSuite_tx_preparation.py b/tests/TestSuite_tx_preparation.py index 366a547..215e961 100644 --- a/tests/TestSuite_tx_preparation.py +++ b/tests/TestSuite_tx_preparation.py @@ -116,6 +116,10 @@ class TestTX_preparation(TestCase): """ Send packet to portid and output """ + self.pmd_output = PmdOutput(self.dut) + res = self.pmd_output.wait_link_status_up("all", 30) + self.verify(res is True, "there have port link is down") + LrgLength = random.randint(Normal_mtu, Max_mtu-100) pkts = {'IPv4/cksum TCP': 'Ether(dst="%s")/IP()/TCP(flags=0x10)\ /Raw(RandString(50))' % self.dmac, -- 2.17.1
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
> Sent: Wednesday, October 30, 2019 2:17 AM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts] [PATCH V1] tests/dynamic_config and tx_preparation:ensure
> port is up before send pkt
>
> ensure port is up before send packets.
>
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> tests/TestSuite_dynamic_config.py | 5 +++++
> tests/TestSuite_tx_preparation.py | 4 ++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/tests/TestSuite_dynamic_config.py
> b/tests/TestSuite_dynamic_config.py
> index 301f5b7..5e55b57 100644
> --- a/tests/TestSuite_dynamic_config.py
> +++ b/tests/TestSuite_dynamic_config.py
> @@ -40,6 +40,8 @@ import utils
> import time
>
> from test_case import TestCase
> +from pmd_output import PmdOutput
> +
>
> #
> #
> @@ -100,6 +102,9 @@ class TestDynamicConfig(TestCase):
> """
> Send 1 packet to portid
> """
> + self.pmd_output = PmdOutput(self.dut)
> + res = self.pmd_output.wait_link_status_up("all", 30)
> + self.verify(res is True, "there have port link is down")
>
> itf = self.tester.get_interface(self.tester.get_local_port(portid))
>
> diff --git a/tests/TestSuite_tx_preparation.py
> b/tests/TestSuite_tx_preparation.py
> index 366a547..215e961 100644
> --- a/tests/TestSuite_tx_preparation.py
> +++ b/tests/TestSuite_tx_preparation.py
> @@ -116,6 +116,10 @@ class TestTX_preparation(TestCase):
> """
> Send packet to portid and output
> """
> + self.pmd_output = PmdOutput(self.dut)
> + res = self.pmd_output.wait_link_status_up("all", 30)
> + self.verify(res is True, "there have port link is down")
> +
> LrgLength = random.randint(Normal_mtu, Max_mtu-100)
> pkts = {'IPv4/cksum TCP': 'Ether(dst="%s")/IP()/TCP(flags=0x10)\
> /Raw(RandString(50))' % self.dmac,
> --
> 2.17.1