From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3CBC0A00BE; Mon, 30 May 2022 03:56:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14EE740A89; Mon, 30 May 2022 03:56:55 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 06E9440A82 for ; Mon, 30 May 2022 03:56:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653875813; x=1685411813; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=BBNjXIJ+nL2/0UFpa//aUPVl/BZSJbSUdfFyC/ULJPM=; b=PoOIALGBfQR1vgojSz+sThPGF8DYRWE6Ibru7TwUeAQjz4zsdPnyfcA5 uzfYssG2J0cKr/rEDpFqUhhLjYRKu+NCNtNeUPdg64JxMfWdsj594Qoa7 ikjlBepZH6an/MI6nUcl2w7FzZMLOqYs6F9TapHGoG9m7rBX7VI62c8Nl oxeWJcmMAEE1ZomSKAc0zBx9AfwuYCo7MTRv6kRKCCOYCD2xpNFW7uGS/ l5vYWaA0FmwiW5aLZ9gUCtdOhaY0vONSGADtc3sM9BDHOyHfQNJurKiBM f9q/ZMtTV+gP+thoJtSf60MGu8HhybPOt6k8too0XFjtvXHUoqBGvE6qf Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10362"; a="335517135" X-IronPort-AV: E=Sophos;i="5.91,261,1647327600"; d="scan'208";a="335517135" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2022 18:56:51 -0700 X-IronPort-AV: E=Sophos;i="5.91,261,1647327600"; d="scan'208";a="575717411" Received: from unknown (HELO daily-regression-131.intel.com) ([10.239.251.131]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2022 18:56:50 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core Date: Mon, 30 May 2022 09:56:46 +0800 Message-Id: <20220530015647.285450-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org 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 --- tests/TestSuite_short_live.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_short_live.py b/tests/TestSuite_short_live.py index a3a17edc..518d168c 100644 --- a/tests/TestSuite_short_live.py +++ b/tests/TestSuite_short_live.py @@ -39,6 +39,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): @@ -158,10 +159,12 @@ 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) @@ -221,12 +224,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