test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests: change match words of TestSuite_unit_tests_loopback.py
@ 2019-02-23  2:15 Peng Yuan
  2019-02-25  2:57 ` Zhu, WenhuiX
  2019-02-25  9:16 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Peng Yuan @ 2019-02-23  2:15 UTC (permalink / raw)
  To: dts; +Cc: Peng Yuan

Change match words of TestSuite_unit_tests_loopback.py

Signed-off-by: Peng Yuan <yuan.peng@intel.com>

diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py
index 721335e..9355bf8 100644
--- a/tests/TestSuite_unit_tests_loopback.py
+++ b/tests/TestSuite_unit_tests_loopback.py
@@ -64,6 +64,8 @@ class TestUnitTestsLoopback(TestCase):
         self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
         localPort = self.tester.get_local_port(self.dut_ports[0])
         self.tester_itf = self.tester.get_interface(localPort)
+        cores = self.dut.get_core_list("all")
+        self.coremask = utils.create_mask(cores)
 
         [self.arch, machine, env, toolchain] = self.target.split('-')
         self.verify(self.arch in ["x86_64", "arm64"], "pmd perf request running in x86_64 or arm64")
@@ -95,7 +97,7 @@ class TestUnitTestsLoopback(TestCase):
 
         self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
         self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
-        self.dut.send_expect("./test/test/test -n 1 -c f", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./test/test/test -n 1 -c %s" % self.coremask, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120)
         print out
         self.dut.send_expect("quit", "# ")
@@ -116,14 +118,14 @@ class TestUnitTestsLoopback(TestCase):
 
         self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
         self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
-        self.dut.send_expect("./test/test/test -n 1 -c f", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./test/test/test -n 1 -c %s" % self.coremask, "R.*T.*E.*>.*>", 60)
         self.dut.send_command("pmd_perf_autotest", 30)
         # There is no packet loopback, so the test is hung.
         # It needs to kill the process manually.
         self.dut.kill_all()
         self.tester.send_expect("killall tcpdump", "#")
         tester_out = self.tester.send_expect("tcpdump -nn -e -v -r ./getPackageByTcpdump.cap", "#")
-        self.verify("ethertype" in tester_out, "Test failed")
+        self.verify("ethertype IPv4" in tester_out, "Test failed")
 
     def tear_down(self):
         """
-- 
2.5.0

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

end of thread, other threads:[~2019-02-25  9:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-23  2:15 [dts] [PATCH] tests: change match words of TestSuite_unit_tests_loopback.py Peng Yuan
2019-02-25  2:57 ` Zhu, WenhuiX
2019-02-25  9:16 ` 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).