test suite reviews and discussions
 help / color / mirror / Atom feed
From: Yu Jiang <yux.jiang@intel.com>
To: lijuan.tu@intel.com, dts@dpdk.org
Cc: Yu Jiang <yux.jiang@intel.com>
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	[thread overview]
Message-ID: <20230524031724.2140597-1-yux.jiang@intel.com> (raw)

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


             reply	other threads:[~2023-05-24  3:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24  3:17 Yu Jiang [this message]
2023-05-25  2:38 ` lijuan.tu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230524031724.2140597-1-yux.jiang@intel.com \
    --to=yux.jiang@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).