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 6D62F42B87; Wed, 24 May 2023 05:33:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26BEC4282D; Wed, 24 May 2023 05:33:41 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id BA1954067E for ; Wed, 24 May 2023 05:33:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684899219; x=1716435219; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BzGU8JdLG4qSsx7lFo3sBtKi0IGVCtCwtrt4axEnxHQ=; b=F2Tbu4SkF6IZBmW5GOlI+JwLzkOdefzAHw991OAQey5ekAVWfwGhIrDg H7Gh3Og3TjvtdaKq7O6pRaUc3BtXN7kfG4awO4moRs7TfrNkAKF9Z6GuA tYRw5w8wrEw1f1ezyrM7SSZ1XQr1culVJjm4MGtIDD1kT5ohKeL84i70Q 5HNibrlYu1xvNXy0TANWbh6jtQ3G1Nm9B1CbG+aPu8ewOCJ5fKqBX6dqO U1bbcMfbRddK8D70fNGWWfXW8vtbZC+LbeymjqnOx55SO+xDBuSqms6eE +56cp2Byo1CUrkY7fC3705XVPx+1tl5MvbAftutFKPKn0+G9cVARb6xrN Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="416902734" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="416902734" 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:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="681688879" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="681688879" 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:33 -0700 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1 1/4] tests/coremask: support eal_param -a to avoid running containers conflict Date: Wed, 24 May 2023 11:33:25 +0800 Message-Id: <20230524033328.2146223-2-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_coremask.py | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py index 8e95e998..210cd1f7 100644 --- a/tests/TestSuite_coremask.py +++ b/tests/TestSuite_coremask.py @@ -18,7 +18,7 @@ from framework.test_case import TestCase # Test class. # -command_line = """./%s -c %s -n %d --log-level="lib.eal,8" """ +command_line = """./%s %s -c %s -n %d --log-level="lib.eal,8" """ class TestCoremask(TestCase): @@ -43,6 +43,10 @@ class TestCoremask(TestCase): self.all_cores = self.dut.get_core_list("all", socket=0) else: self.all_cores = self.dut.get_core_list("all") + 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"]) def set_up(self): """ @@ -58,8 +62,12 @@ class TestCoremask(TestCase): for core in self.all_cores: core_mask = utils.create_mask([core]) - - command = command_line % (self.app_test_path, core_mask, self.mem_channel) + command = command_line % ( + self.app_test_path, + self.eal_param_a, + core_mask, + self.mem_channel, + ) out = self.dut.send_expect(command, "RTE>>", 10) self.verify( @@ -82,7 +90,12 @@ class TestCoremask(TestCase): first_core = self.all_cores[0] - command = command_line % (self.app_test_path, core_mask, self.mem_channel) + command = command_line % ( + self.app_test_path, + self.eal_param_a, + core_mask, + self.mem_channel, + ) out = self.dut.send_expect(command, "RTE>>", 10) self.verify( @@ -111,13 +124,18 @@ class TestCoremask(TestCase): """ Check coremask parsing for more cores than available. """ - command_line = """./%s -c %s -n %d --log-level="lib.eal,8" 2>&1 |tee out""" + command_line = """./%s %s -c %s -n %d --log-level="lib.eal,8" 2>&1 |tee out""" # Create a extremely big coremask big_coremask = "0x" for _ in range(0, len(self.all_cores) + 1, 4): big_coremask += "f" - command = command_line % (self.app_test_path, big_coremask, self.mem_channel) + command = command_line % ( + self.app_test_path, + self.eal_param_a, + big_coremask, + self.mem_channel, + ) try: out = self.dut.send_expect(command, "RTE>>", 10) except: @@ -165,7 +183,12 @@ class TestCoremask(TestCase): for coremask in wrong_coremasks: - command = command_line % (self.app_test_path, coremask, self.mem_channel) + command = command_line % ( + self.app_test_path, + self.eal_param_a, + coremask, + self.mem_channel, + ) try: out = self.dut.send_expect(command, "# ", 5) self.verify( -- 2.25.1