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 F276542B88; Wed, 24 May 2023 05:33:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DB5342D3A; Wed, 24 May 2023 05:33:42 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id E33374067E for ; Wed, 24 May 2023 05:33:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684899221; x=1716435221; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KtrJXYtXPDVqs1R4ndZVgT/mGzbkTzSMOj+BpIrAdmA=; b=lEyq6YhMYEhHqu+imlagiookWClkXAoMsVHqQoVZ7VxWFXcDENBtaeIE bAQsI17mPEzS8flo629+Vh/QOI90jaCOTW87zxmca5qJrULO5FSw0ohCy Kpc4v18Q3UBLzuBwXsgADUiCfK5DPOOqQO/OG0uj3HAQT02Ctg3IWZxSb fqWNdStEDM7s5hJYXwpTmDKD0R1vZYeEQsiJCrd9hK44C5ZMWv2AoR/em 8GyunJDCXkb9zKsnFpu46moMrA1Z6OLvpu4t44nZvwQqCNDYWp+kAUDMF 54v1RetAI24J/XlO5OXjV8ZFhjDPsgtG+LuLWUYSDxVcujNVvVrazMRIQ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="416902752" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="416902752" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 20:33:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="681688942" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="681688942" Received: from unknown (HELO localhost.localdomain) ([10.239.252.196]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 20:33:38 -0700 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1 4/4] tests/multiple_pthread: support eal_param -a to avoid running containers conflict Date: Wed, 24 May 2023 11:33:28 +0800 Message-Id: <20230524033328.2146223-5-yux.jiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230524033328.2146223-1-yux.jiang@intel.com> References: <20230524033328.2146223-1-yux.jiang@intel.com> 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 Support eal_param -a to avoid running containers conflict Signed-off-by: Yu Jiang --- tests/TestSuite_multiple_pthread.py | 46 +++++++++++++++++------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/tests/TestSuite_multiple_pthread.py b/tests/TestSuite_multiple_pthread.py index 253d6a4a..6c15077f 100644 --- a/tests/TestSuite_multiple_pthread.py +++ b/tests/TestSuite_multiple_pthread.py @@ -23,6 +23,9 @@ class TestMultiplePthread(TestCase): "Test suite currently only supports Linux platforms", ) self.dut_ports = self.dut.get_ports(self.nic) + self.eal_param_a = "" + for i in self.dut_ports: + self.eal_param_a += " -a {}".format(self.dut.ports_info[i]["pci"]) global valports valports = [_ for _ in self.dut_ports if self.tester.get_local_port(_) != -1] # Verify that enough ports are available @@ -110,14 +113,19 @@ class TestMultiplePthread(TestCase): # Allocate enough streams based on the number of CPUs if len(cpu_list) > 2: queue_num = len(cpu_list) - cmdline = './%s --lcores="%s" -n 4 -- -i --txq=%d --rxq=%d' % ( + cmdline = './%s%s --lcores="%s" -n 4 -- -i --txq=%d --rxq=%d' % ( self.path, + self.eal_param_a, lcores, queue_num, queue_num, ) else: - cmdline = './%s --lcores="%s" -n 4 -- -i' % (self.path, lcores) + cmdline = './%s%s --lcores="%s" -n 4 -- -i' % ( + self.path, + self.eal_param_a, + lcores, + ) # start application self.dut.send_expect(cmdline, "testpmd", 60) @@ -229,26 +237,26 @@ class TestMultiplePthread(TestCase): Test an random parameter from an defined table which has a couple of invalid lcore parameters. """ cmdline_list = [ - "./%s --lcores='(0-,4-7)@(4,5)' -n 4 -- -i", - "./%s --lcores='(-1,4-7)@(4,5)' -n 4 -- -i", - "./%s --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i", - "./%s --lcores='(0,abcd)@(4,5)' -n 4 -- -i", - "./%s --lcores='(0,4-7)@(1-,5)' -n 4 -- -i", - "./%s --lcores='(0,4-7)@(-1,5)' -n 4 -- -i", - "./%s --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i", - "./%s --lcores='(0,4-7)@(abc,5)' -n 4 -- -i", - "./%s --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i", - "./%s --lcores='(0,4-7)=(8,9)' -n 4 -- -i", - "./%s --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i", - "./%s --lcores='[0-,4-7]@(4,5)' -n 4 -- -i", - "./%s --lcores='(0-,4-7)@[4,5]' -n 4 -- -i", - "./%s --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i", - "./%s --lcores='2,,3''2--3' -n 4 -- -i", - "./%s --lcores='2,,,3''2--3' -n 4 -- -i", + "./%s%s --lcores='(0-,4-7)@(4,5)' -n 4 -- -i", + "./%s%s --lcores='(-1,4-7)@(4,5)' -n 4 -- -i", + "./%s%s --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i", + "./%s%s --lcores='(0,abcd)@(4,5)' -n 4 -- -i", + "./%s%s --lcores='(0,4-7)@(1-,5)' -n 4 -- -i", + "./%s%s --lcores='(0,4-7)@(-1,5)' -n 4 -- -i", + "./%s%s --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i", + "./%s%s --lcores='(0,4-7)@(abc,5)' -n 4 -- -i", + "./%s%s --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i", + "./%s%s --lcores='(0,4-7)=(8,9)' -n 4 -- -i", + "./%s%s --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i", + "./%s%s --lcores='[0-,4-7]@(4,5)' -n 4 -- -i", + "./%s%s --lcores='(0-,4-7)@[4,5]' -n 4 -- -i", + "./%s%s --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i", + "./%s%s --lcores='2,,3''2--3' -n 4 -- -i", + "./%s%s --lcores='2,,,3''2--3' -n 4 -- -i", ] cmdline = random.sample(cmdline_list, 1) - out = self.dut.send_expect(cmdline[0] % self.path, "#", 60) + out = self.dut.send_expect(cmdline[0] % (self.path, self.eal_param_a), "#", 60) self.verify("invalid parameter" in out, "it's a valid parameter") def tear_down(self): -- 2.25.1