From: Chen Linglix <linglix.chen@intel.com>
To: dts@dpdk.org
Cc: Chen Linglix <linglix.chen@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_link_flowctrl:add set_up
Date: Tue, 29 Sep 2020 16:27:49 +0800 [thread overview]
Message-ID: <20200929082749.15332-1-linglix.chen@intel.com> (raw)
add set_up,tear_down:Avoid the influence between cases
Signed-off-by: Chen Linglix <linglix.chen@intel.com>
---
tests/TestSuite_link_flowctrl.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flowctrl.py
index 9e608bab..326f8b98 100644
--- a/tests/TestSuite_link_flowctrl.py
+++ b/tests/TestSuite_link_flowctrl.py
@@ -76,8 +76,6 @@ class TestLinkFlowctrl(TestCase):
self.portMask = utils.create_mask([self.rx_port, self.tx_port])
- self.pmdout = PmdOutput(self.dut)
- self.pmdout.start_testpmd("all", "--portmask=%s" % self.portMask)
# get dts output path
if self.logger.log_path.startswith(os.sep):
self.output_path = self.logger.log_path
@@ -88,6 +86,10 @@ class TestLinkFlowctrl(TestCase):
# create an instance to set stream field setting
self.pktgen_helper = PacketGeneratorHelper()
+ def set_up(self):
+ self.pmdout = PmdOutput(self.dut)
+ self.pmdout.start_testpmd("all", "--portmask=%s" % self.portMask)
+
def get_tgen_input(self):
"""
create streams for ports.
@@ -563,9 +565,15 @@ class TestLinkFlowctrl(TestCase):
"Link flow control fail, the loss percent is less than 50%")
self.dut.send_expect("stop", "testpmd> ")
- def tear_down_all(self):
+ def tear_down(self):
"""
Run after each test case.
"""
- self.dut.kill_all()
self.dut.send_expect("quit", "# ")
+ self.dut.kill_all()
+
+ def tear_down_all(self):
+ """
+ Run after each test suite.
+ """
+ pass
--
2.17.1
next reply other threads:[~2020-09-29 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 8:27 Chen Linglix [this message]
2020-09-29 8:47 ` Chen, LingliX
2020-10-13 2: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=20200929082749.15332-1-linglix.chen@intel.com \
--to=linglix.chen@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).