From patchwork Thu Dec 10 11:30:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhou, JunX W" X-Patchwork-Id: 84938 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1DDB3A04DB; Thu, 10 Dec 2020 12:27:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 12AD1BE75; Thu, 10 Dec 2020 12:27:56 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id E9B6CBC8A for ; Thu, 10 Dec 2020 12:27:53 +0100 (CET) IronPort-SDR: yOHfdq51FtgLf2S9jNWWjNwLmSVOH4R16sG+5PK/V3CaenNJt2uboywQK2VIm9081oVnjkMajD PI4rfat04QRg== X-IronPort-AV: E=McAfee;i="6000,8403,9830"; a="153473251" X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208";a="153473251" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 03:27:52 -0800 IronPort-SDR: Yfk8Co/ioDrXJitXuiI6hu8JT0aLrZbuaX7kvFN6yRBqqKE7xl4tnE5lY9x1sr86DGoQUqFPAR fD3lMURVjWdQ== X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208";a="542805806" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 03:27:50 -0800 From: Zhou Jun To: dts@dpdk.org Cc: Zhou Jun Date: Thu, 10 Dec 2020 19:30:41 +0800 Message-Id: <20201210113041.22140-1-junx.w.zhou@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/TestSuite_external_memory:Modify the hard coded appparameter 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" Modify the hard coded app parameter to call the platform interface Signed-off-by: Zhou Jun --- tests/TestSuite_external_memory.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/TestSuite_external_memory.py b/tests/TestSuite_external_memory.py index f899ae74..53522a79 100644 --- a/tests/TestSuite_external_memory.py +++ b/tests/TestSuite_external_memory.py @@ -46,11 +46,9 @@ class TestExternalMemory(TestCase): """ Run at the start of each test suite. """ - self.dut_ports = self.dut.get_ports(self.nic) self.verify(len(self.dut_ports) >= 2, "Insufficient ports") - cores = self.dut.get_core_list("1S/4C/1T") - self.coremask = utils.create_mask(cores) + self.app_testpmd_path = self.dut.apps_name['test-pmd'] def set_up(self): @@ -93,8 +91,9 @@ class TestExternalMemory(TestCase): Verifier IGB_UIO and anonymous memory allocation """ self.insmod_modprobe(modename="igb_uio") - - cmd = "./%s -c %s -n 4 -- --mp-alloc=xmem -i" % (self.app_testpmd_path, self.coremask) + self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T") + self.dut.send_expect(r'./%s %s -- --mp-alloc=xmem -i' + % (self.app_testpmd_path, self.eal_para), "link state change event", 60) self.dut.send_expect(cmd,"testpmd>",60) self.verifier_result() @@ -104,9 +103,9 @@ class TestExternalMemory(TestCase): Verifier IGB_UIO and anonymous hugepage memory allocation """ self.insmod_modprobe(modename="igb_uio") - cmd = "./%s -c %s -n 4 -- --mp-alloc=xmemhuge -i" % (self.app_testpmd_path, self.coremask) - - self.dut.send_expect(cmd,"testpmd>",60) + self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T") + self.dut.send_expect(r'./%s %s -- --mp-alloc=xmemhuge -i' + % (self.app_testpmd_path, self.eal_para), "link state change event", 60) self.verifier_result() def test_VFIO_PCI_xmem(self): @@ -114,8 +113,10 @@ class TestExternalMemory(TestCase): Verifier VFIO_PCI and anonymous memory allocation """ self.insmod_modprobe(modename="vfio-pci") - cmd = "./%s -c %s -n 4 -- --mp-alloc=xmem -i" % (self.app_testpmd_path, self.coremask) - self.dut.send_expect(cmd,"testpmd>",60) + + self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T") + self.dut.send_expect(r'./%s %s -- --mp-alloc=xmem -i' + % (self.app_testpmd_path, self.eal_para),"testpmd>",60) self.verifier_result() @@ -124,8 +125,10 @@ class TestExternalMemory(TestCase): Verifier VFIO and anonymous hugepage memory allocation """ self.insmod_modprobe(modename="vfio-pci") - cmd = "./%s -c %s -n 4 -- --mp-alloc=xmemhuge -i" % (self.app_testpmd_path, self.coremask) - self.dut.send_expect(cmd,"testpmd>",60) + + self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T") + self.dut.send_expect(r'./%s %s -- --mp-alloc=xmemhuge -i' + % (self.app_testpmd_path, self.eal_para),"testpmd>",60) self.verifier_result()