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 8415942B86; Wed, 24 May 2023 05:18:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53E9640ED8; Wed, 24 May 2023 05:18:55 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 563DB4067E for ; Wed, 24 May 2023 05:18:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684898333; x=1716434333; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FNo0vS/QQ7l4ngbdJgQZMr7Tv2aL/SxZCAXQ62Lk6UY=; b=LB0Uw5WeF6U1U3vUfOl6U2XkUTAc8VJ2WMmDFf8J+8oJVrGDCbhtt7MY UF4BTQ9MrdxTN79o+kkD+qWJ3Ou8jpkI/W7RJLBzggJX9XcpaOCHbOcB4 Eq7VOlMheGINBCCbcE5egyGuHkCOhSXtlVfuTiLD8Ft4h4mCRBzFvwCvw N2EGQyuUwN/wKwJbK6QGv6ErXbnZFckSQrg1ejK+hdMOipLNhjhT0XN62 +89OfAi7TFg0UdjTr8KzUVd527j0doOleSzpgidr6SHZa2N/759yyx0Kh x3iUXpT6V6ITucxq9KcazSXiTazgvAAyewKEgTbMJKToc0YAsFhlT8YmU Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="416899344" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="416899344" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 20:17:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="734988522" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="734988522" Received: from unknown (HELO localhost.localdomain) ([10.239.252.196]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 20:17:33 -0700 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1] tests/external_memory: remove unless insmod_modprobe code to avoid running containers conflict Date: Wed, 24 May 2023 11:17:24 +0800 Message-Id: <20230524031724.2140597-1-yux.jiang@intel.com> X-Mailer: git-send-email 2.25.1 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 insmod_modprobe can be decided by DTS framework execution.cfg's drivername. To avoid running containers conflict, so remove insmod_modprobe which rmmod vfio-pci driver. Signed-off-by: Yu Jiang --- tests/TestSuite_external_memory.py | 39 ------------------------------ 1 file changed, 39 deletions(-) diff --git a/tests/TestSuite_external_memory.py b/tests/TestSuite_external_memory.py index c565eba8..627e9600 100644 --- a/tests/TestSuite_external_memory.py +++ b/tests/TestSuite_external_memory.py @@ -31,43 +31,11 @@ class TestExternalMemory(TestCase): """ pass - def insmod_modprobe(self, modename=""): - """ - Insmod modProbe before run test case - """ - if modename == "igb_uio": - self.dut.send_expect("modprobe uio", "#", 10) - out = self.dut.send_expect("lsmod | grep igb_uio", "#") - if "igb_uio" in out: - self.dut.send_expect("rmmod -f igb_uio", "#", 10) - self.dut.send_expect( - "insmod ./" + self.target + "/kmod/igb_uio.ko", "#", 10 - ) - - out = self.dut.send_expect("lsmod | grep igb_uio", "#") - assert "igb_uio" in out, "Failed to insmod igb_uio" - - self.dut.bind_interfaces_linux(driver="igb_uio") - - if modename == "vfio-pci": - self.dut.send_expect("rmmod vfio_pci", "#", 10) - self.dut.send_expect("rmmod vfio_iommu_type1", "#", 10) - self.dut.send_expect("rmmod vfio", "#", 10) - self.dut.send_expect("modprobe vfio", "#", 10) - self.dut.send_expect("modprobe vfio_pci", "#", 10) - out = self.dut.send_expect("lsmod | grep vfio_iommu_type1", "#") - if not out: - out = self.dut.send_expect("ls /sys/module |grep vfio_pci", "#") - assert "vfio_pci" in out, "Failed to insmod vfio_pci" - - self.dut.bind_interfaces_linux(driver="vfio-pci") - @skip_unsupported_host_driver(["vfio-pci"]) def test_IGB_UIO_xmem(self): """ Verifier IGB_UIO and anonymous memory allocation """ - self.insmod_modprobe(modename="igb_uio") 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), @@ -81,7 +49,6 @@ class TestExternalMemory(TestCase): """ Verifier IGB_UIO and anonymous hugepage memory allocation """ - self.insmod_modprobe(modename="igb_uio") self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T") self.dut.send_expect( r"./%s %s -- --mp-alloc=xmemhuge -i" @@ -95,7 +62,6 @@ class TestExternalMemory(TestCase): """ Verifier VFIO_PCI and anonymous memory allocation """ - self.insmod_modprobe(modename="vfio-pci") self.dut.send_expect( "echo 655359 > /sys/module/vfio_iommu_type1/parameters/dma_entry_limit", "#", @@ -115,8 +81,6 @@ class TestExternalMemory(TestCase): """ Verifier VFIO and anonymous hugepage memory allocation """ - self.insmod_modprobe(modename="vfio-pci") - self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T") self.dut.send_expect( r"./%s %s -- --mp-alloc=xmemhuge -i" @@ -140,8 +104,6 @@ class TestExternalMemory(TestCase): self.dut.send_expect("quit", "#", 10) - self.dut.unbind_interfaces_linux(self.dut_ports) - def scapy_send_packet(self, nu): """ Send a packet to port @@ -168,5 +130,4 @@ class TestExternalMemory(TestCase): """ Run after each test suite. """ - self.dut.bind_interfaces_linux(driver=self.drivername) pass -- 2.25.1