From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F3BFFA0530; Wed, 12 Feb 2020 08:37:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8F5602629; Wed, 12 Feb 2020 08:37:42 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 0CEC71F28 for ; Wed, 12 Feb 2020 08:37:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2020 23:37:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,428,1574150400"; d="scan'208";a="347466340" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 11 Feb 2020 23:37:38 -0800 From: malihong To: dts@dpdk.org Cc: malihong Date: Wed, 12 Feb 2020 15:43:08 +0800 Message-Id: <1581493388-86904-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/unit_tests_pmd_perf: modify app cmd according to dpdk change X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dts" Signed-off-by: malihong --- tests/TestSuite_unit_tests_pmd_perf.py | 29 +++++++------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py index 6ecd993..2c932bb 100644 --- a/tests/TestSuite_unit_tests_pmd_perf.py +++ b/tests/TestSuite_unit_tests_pmd_perf.py @@ -85,29 +85,14 @@ class TestUnitTestsPmdPerf(TestCase): """ pass - def get_core_from_socket(self): - """ - select the port and lcores from same socket. - """ - - out = self.dut.send_expect("./usertools/cpu_layout.py", "#", 10) - k = re.search("Core 0 (.*)", out) - socket_id = self.dut.ports_info[0]['port'].socket - if socket_id == 0 or socket_id == -1: - result = re.findall("(\d+)", k.group()) - return int(result[0]) - else: - result = re.findall("(\d+),", k.group()) - return int(result[1]) - def test_pmd_burst(self): """ Run pmd stream control mode burst test case. """ - self.core = self.get_core_from_socket() - eal_params = self.dut.create_eal_parameters() - self.dut.send_expect("./app/test/test %s --lcores='%d-%d'" % (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60) + socket_id = self.dut.ports_info[0]['port'].socket + eal_params = self.dut.create_eal_parameters(socket=socket_id) + self.dut.send_expect("./app/test/test %s" % (eal_params), "R.*T.*E.*>.*>", 60) for mode in self.burst_ctlmodes: self.dut.send_expect("set_rxtx_sc %s" % mode, "RTE>>", 10) out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120) @@ -124,18 +109,18 @@ class TestUnitTestsPmdPerf(TestCase): Run pmd stream control mode continues test case. """ - self.core = self.get_core_from_socket() self.table_header = ['Mode'] self.table_header += self.anchors self.result_table_create(self.table_header) - eal_params = self.dut.create_eal_parameters() + socket_id = self.dut.ports_info[0]['port'].socket + eal_params = self.dut.create_eal_parameters(socket=socket_id) print((self.table_header)) for mode in self.rxtx_modes: if mode is "scalar": - self.dut.send_expect("./app/test/test_scalar %s --lcores='%d-%d'" % (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test_scalar %s " % (eal_params), "R.*T.*E.*>.*>", 60) else: - self.dut.send_expect("./app/test/test %s --lcores='%d-%d'" % (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test %s " % (eal_params), "R.*T.*E.*>.*>", 60) table_row = [mode] self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10) -- 2.17.2