test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] tests/external_memory: remove unless insmod_modprobe code to avoid running containers conflict
@ 2023-05-24  3:17 Yu Jiang
  2023-05-25  2:38 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Jiang @ 2023-05-24  3:17 UTC (permalink / raw)
  To: lijuan.tu, dts; +Cc: Yu Jiang

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 <yux.jiang@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts][PATCH V1] tests/external_memory: remove unless insmod_modprobe code to avoid running containers conflict
  2023-05-24  3:17 [dts][PATCH V1] tests/external_memory: remove unless insmod_modprobe code to avoid running containers conflict Yu Jiang
@ 2023-05-25  2:38 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2023-05-25  2:38 UTC (permalink / raw)
  To: lijuan.tu, dts, Yu Jiang; +Cc: Yu Jiang

On Wed, 24 May 2023 11:17:24 +0800, Yu Jiang <yux.jiang@intel.com> wrote:
> 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 <yux.jiang@intel.com>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-25  2:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24  3:17 [dts][PATCH V1] tests/external_memory: remove unless insmod_modprobe code to avoid running containers conflict Yu Jiang
2023-05-25  2:38 ` lijuan.tu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).