test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/dynamic_config and tx_preparation:ensure port is up before send pkt
@ 2019-10-29 18:16 Wenjie Li
  2019-10-29  9:28 ` Zhu, ShuaiX
  2019-11-22  3:15 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Wenjie Li @ 2019-10-29 18:16 UTC (permalink / raw)
  To: dts; +Cc: Wenjie Li

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-22  3:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 18:16 [dts] [PATCH V1] tests/dynamic_config and tx_preparation:ensure port is up before send pkt Wenjie Li
2019-10-29  9:28 ` Zhu, ShuaiX
2019-11-22  3:15 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).