test suite reviews and discussions
 help / color / mirror / Atom feed
From: Wenjie Li <wenjiex.a.li@intel.com>
To: dts@dpdk.org
Cc: Wenjie Li <wenjiex.a.li@intel.com>
Subject: [dts] [PATCH V1] tests/dynamic_config and tx_preparation:ensure port is up before send pkt
Date: Tue, 29 Oct 2019 18:16:41 +0000	[thread overview]
Message-ID: <1572373001-15731-1-git-send-email-wenjiex.a.li@intel.com> (raw)

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


             reply	other threads:[~2019-10-29  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 18:16 Wenjie Li [this message]
2019-10-29  9:28 ` Zhu, ShuaiX
2019-11-22  3:15 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1572373001-15731-1-git-send-email-wenjiex.a.li@intel.com \
    --to=wenjiex.a.li@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).