From patchwork Wed May 24 03:33:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiang X-Patchwork-Id: 127274 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ADA7742B87; 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 6FD4642D35; 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 6E9B140ED8 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=1684899220; x=1716435220; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JW+fJs91UwcsLeSU8eH9n7dSkt0BHJ1+Mk7J5btkIS8=; b=eBWdC8AuSPhjsB1q9kNomhPYM6qoTFmgfEspqH79HESf21h+jPfzv9+K /6FhnZCenzB52rUMexFhtZBtNCB/TAx1Qu3ampuhtgUi1NfRWiUbRyWCx NxfvO27kFEbOKF2YdIQEYdle+nVrp/NdzvPoMqSGmxJE1T71B9CG/f9SM O/fLqlZpUjqZkijmFF2uT31z7knzn1keW2H13C6mJhqugrslS29osdPyk k7ryfuCKHenxDyXg+ycFYEQLk+wTJaIsu+R9wcyBR3CWZ2tWE8eL6Oq0f AYxp+dU0rHFL85Enlgy6DiPEEZnQ0FJwfKT57KbRZRmBWpfCG2zu8P74a w==; X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="416902750" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="416902750" 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:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="681688921" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="681688921" 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:36 -0700 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1 3/4] tests/external_mempool_handler: support eal_param -a to avoid running containers conflict Date: Wed, 24 May 2023 11:33:27 +0800 Message-Id: <20230524033328.2146223-4-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 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_external_mempool_handler.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_external_mempool_handler.py b/tests/TestSuite_external_mempool_handler.py index 58971e31..c214aae6 100644 --- a/tests/TestSuite_external_mempool_handler.py +++ b/tests/TestSuite_external_mempool_handler.py @@ -12,7 +12,7 @@ from framework.pmd_output import PmdOutput from framework.test_case import TestCase -class TestExternalMempool(TestCase): +class TestExternalMempoolHandler(TestCase): def set_up_all(self): """ Run at the start of each test suite. @@ -20,7 +20,9 @@ class TestExternalMempool(TestCase): self.dut_ports = self.dut.get_ports() self.verify(len(self.dut_ports) >= 2, "Not enough ports") - + self.eal_param_a = "" + for i in self.dut_ports: + self.eal_param_a += " -a {}".format(self.dut.ports_info[i]["pci"]) self.pmdout = PmdOutput(self.dut) self.app_test_path = self.dut.apps_name["test"] @@ -33,7 +35,8 @@ class TestExternalMempool(TestCase): def verify_unit_func(self, ops=""): self.dut.send_expect( - "./%s -n 4 -c f --mbuf-pool-ops-name %s" % (self.app_test_path, ops), + "./%s%s -n 4 -c f --mbuf-pool-ops-name %s" + % (self.app_test_path, self.eal_param_a, ops), "R.*T.*E.*>.*>", 60, ) @@ -42,7 +45,11 @@ class TestExternalMempool(TestCase): self.verify("Test OK" in out, "Mempool autotest failed") def verify_unit_perf(self): - self.dut.send_expect("./%s -n 4 -c f" % self.app_test_path, "R.*T.*E.*>.*>", 60) + self.dut.send_expect( + "./%s%s -n 4 -c f" % (self.app_test_path, self.eal_param_a), + "R.*T.*E.*>.*>", + 60, + ) out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 1200) self.dut.send_expect("quit", "# ") # may need to compare performance