[dts] [PATCH V1] tests/dynamic_config and tx_preparation:ensure port is up before send pkt

Tu, Lijuan lijuan.tu at intel.com
Fri Nov 22 04:15:43 CET 2019


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Wenjie Li
> Sent: Wednesday, October 30, 2019 2:17 AM
> To: dts at dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li at 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 at 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



More information about the dts mailing list