test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jiale Song <songx.jiale@intel.com>
To: dts@dpdk.org
Cc: Jiale Song <songx.jiale@intel.com>
Subject: [dts] [PATCH V1] short_live: fix script
Date: Fri, 27 May 2022 13:53:03 +0800	[thread overview]
Message-ID: <20220527055304.179776-1-songx.jiale@intel.com> (raw)

fix 2 issue:
  1.make the core in the eal parameter consistent with the core configured by 
the config parameter.
  2.the output format of '/usr/bin/time' of FreeBSD is different from that of 
conventional Linux. add the '-p' parameter to make it output in posix format.

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 tests/TestSuite_short_live.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_short_live.py b/tests/TestSuite_short_live.py
index e50c99a3..2be73481 100644
--- a/tests/TestSuite_short_live.py
+++ b/tests/TestSuite_short_live.py
@@ -67,6 +67,7 @@ class TestShortLiveApp(TestCase):
         self.app_l2fwd_path = self.dut.apps_name["l2fwd"]
         self.app_l3fwd_path = self.dut.apps_name["l3fwd"]
         self.app_testpmd = self.dut.apps_name["test-pmd"]
+        self.core_config = '1S/2C/1T'
         self.eal_para = self.dut.create_eal_parameters
 
     def set_up(self):
@@ -186,10 +187,10 @@ class TestShortLiveApp(TestCase):
         Using linux time to get start up time
         """
         time = []
-        regex = re.compile(".* (\d+:\d{2}\.\d{2}).*")
+        regex = re.compile(".*real (\d+\.\d{2}).*")
         eal_para = self.dut.create_eal_parameters(no_pci=True)
         out = self.dut.send_expect(
-            "echo quit | time ./%s %s -- -i" % (self.app_testpmd, eal_para), "# ", 120
+            "echo quit | time -p ./%s %s -- -i" % (self.app_testpmd, eal_para), "# ", 120
         )
         time = regex.findall(out)
 
@@ -249,12 +250,15 @@ class TestShortLiveApp(TestCase):
     def test_clean_up_with_signal_l3fwd(self):
         repeat_time = 5
         self.compile_examples("l3fwd")
+        core_list = self.dut.get_core_list(self.core_config)
+        eal_parmas = self.eal_para(cores=core_list)
+
         for i in range(repeat_time):
             # dpdk start
             print("clean_up_with_signal_l3fwd round %d" % (i + 1))
             self.dut.send_expect(
-                "%s %s -- -p 0x3 --config='(0,0,1),(1,0,2)' &"
-                % (self.app_l3fwd_path, self.eal_para()),
+                "%s %s -- -p 0x3 --config='(0,0,%s),(1,0,%s)' &"
+                % (self.app_l3fwd_path, eal_parmas, core_list[0], core_list[1]),
                 "L3FWD: entering main loop",
                 120,
             )
-- 
2.17.1


             reply	other threads:[~2022-05-27  5:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  5:53 Jiale Song [this message]
2022-05-27  5:53 ` [dts] [PATCH V1] tests/userspace_ethtool: " Jiale Song

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=20220527055304.179776-1-songx.jiale@intel.com \
    --to=songx.jiale@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).