test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] TestSuite_vhost_event_idx_interrupt/kernelpf_iavf: get the app name to kill
@ 2020-09-29  9:26 JiangYuX
  2020-09-29  9:26 ` [dts] [PATCH V1] tests/TestSuite_pvp_virtio_bonding: add RTE_LIBRTE_PMD_BOND for meson build JiangYuX
  2020-10-12  8:54 ` [dts] [PATCH V1] TestSuite_vhost_event_idx_interrupt/kernelpf_iavf: get the app name to kill Tu, Lijuan
  0 siblings, 2 replies; 5+ messages in thread
From: JiangYuX @ 2020-09-29  9:26 UTC (permalink / raw)
  To: dts; +Cc: JiangYu

From: JiangYu <yux.jiang@intel.com>

Get app name to kill or call from conf/app_name.cfg file

Signed-off-by: JiangYu <yux.jiang@intel.com>
---
 tests/TestSuite_kernelpf_iavf.py             |  5 +++--
 tests/TestSuite_vhost_event_idx_interrupt.py | 10 +++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 66389a2..c47d0b9 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -92,6 +92,7 @@ class TestKernelpfIavf(TestCase):
 
         tester_port1 = self.tester.get_local_port(self.dut_ports[1])
         self.tester_intf1 = self.tester.get_interface(tester_port1)
+        self.l3fwdpower_name = self.dut.apps_name['l3fwd-power'].strip().split('/')[-1]
 
     def set_up(self):
 
@@ -887,7 +888,7 @@ class TestKernelpfIavf(TestCase):
         out = self.dut.get_session_output()
         self.verify('L3FWD_POWER: lcore 6 is waked up from rx interrupt' in out, 'lcore 6 is not waked up')
         self.verify('L3FWD_POWER: lcore 7 is waked up from rx interrupt' in out, 'lcore 7 is not waked up')
-        self.dut.send_expect("killall l3fwd-power", "# ", 60, alt_session=True)
+        self.dut.send_expect("killall %s" % self.l3fwdpower_name, "# ", 60, alt_session=True)
 
     def test_vf_unicast(self):
         self.vm_testpmd.start_testpmd("all")
@@ -979,7 +980,7 @@ class TestKernelpfIavf(TestCase):
         Run after each test case.
         """
         if self.running_case == "test_vf_rx_interrupt":
-            self.dut.send_expect("killall %s" % self.dut.apps_name['l3fwd-power'].strip().split('/')[-1], "# ", 60, alt_session=True)
+            self.dut.send_expect("killall %s" % self.l3fwdpower_name, "# ", 60, alt_session=True)
             self.destroy_2vf_in_2pf()
         else:
             self.vm_testpmd.execute_cmd("quit", "#")
diff --git a/tests/TestSuite_vhost_event_idx_interrupt.py b/tests/TestSuite_vhost_event_idx_interrupt.py
index 9baa626..af3528d 100644
--- a/tests/TestSuite_vhost_event_idx_interrupt.py
+++ b/tests/TestSuite_vhost_event_idx_interrupt.py
@@ -55,7 +55,7 @@ class TestVhostEventIdxInterrupt(TestCase):
         self.pci_info = self.dut.ports_info[0]['pci']
         self.base_dir = self.dut.base_dir.replace('~', '/root')
         self.app_l3fwd_power_path = self.dut.apps_name['l3fwd-power']
-        self.app_name=self.app_l3fwd_power_path.split('/')[-1]
+        self.l3fwdpower_name=self.app_l3fwd_power_path.split('/')[-1]
         self.dut_ports = self.dut.get_ports()
         self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
         self.cbdma_dev_infos=[]
@@ -67,7 +67,7 @@ class TestVhostEventIdxInterrupt(TestCase):
         """
         # Clean the execution ENV
         self.verify_info = []
-        self.dut.send_expect(f"killall {self.app_name}", "#")
+        self.dut.send_expect(f"killall {self.l3fwdpower_name}", "#")
         self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
         self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
         self.vhost = self.dut.new_session(suite="vhost-l3fwd")
@@ -158,7 +158,7 @@ class TestVhostEventIdxInterrupt(TestCase):
         """
         relauch l3fwd-power sample for port up
         """
-        self.dut.send_expect("killall -s INT l3fwd-power", "#")
+        self.dut.send_expect("killall -s INT %s" % self.l3fwdpower_name, "#")
         # make sure l3fwd-power be killed
         pid = self.dut.send_expect("ps -ef |grep l3|grep -v grep |awk '{print $2}'", "#")
         if pid:
@@ -285,7 +285,7 @@ class TestVhostEventIdxInterrupt(TestCase):
         """
         for i in range(len(self.vm)):
             self.vm[i].stop()
-        self.dut.send_expect("killall l3fwd-power", "#", timeout=2)
+        self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#", timeout=2)
 
     def test_wake_up_split_ring_vhost_user_core_with_event_idx_interrupt(self):
         """
@@ -442,7 +442,7 @@ class TestVhostEventIdxInterrupt(TestCase):
         Run after each test case.
         """
         self.dut.close_session(self.vhost)
-        self.dut.send_expect(f"killall {self.app_name}", "#")
+        self.dut.send_expect(f"killall {self.l3fwdpower_name}", "#")
         self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
         self.bind_cbdma_device_to_kernel()
         self.bind_nic_driver(self.dut_ports, self.drivername)
-- 
2.7.4


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

end of thread, other threads:[~2020-10-12  8:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  9:26 [dts] [PATCH V1] TestSuite_vhost_event_idx_interrupt/kernelpf_iavf: get the app name to kill JiangYuX
2020-09-29  9:26 ` [dts] [PATCH V1] tests/TestSuite_pvp_virtio_bonding: add RTE_LIBRTE_PMD_BOND for meson build JiangYuX
2020-09-29  9:28   ` Jiang, YuX
2020-10-12  8:55   ` Tu, Lijuan
2020-10-12  8:54 ` [dts] [PATCH V1] TestSuite_vhost_event_idx_interrupt/kernelpf_iavf: get the app name to kill Tu, Lijuan

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).