[V2] tests/dpdk_hugetlbfs_mount_size: fix verify failed can't umount huge page

Message ID 20220215062644.2136279-1-weix.ling@intel.com (mailing list archive)
State Superseded
Headers
Series [V2] tests/dpdk_hugetlbfs_mount_size: fix verify failed can't umount huge page |

Checks

Context Check Description
ci/Intel-dts-suite-test warning SKIPPED

Commit Message

Ling, WeiX Feb. 15, 2022, 6:26 a.m. UTC
  1.Add kill testpmd step in set_up.
2.Add kill testpmd before umount hege page in tear_down.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_dpdk_hugetlbfs_mount_size.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

Tu, Lijuan Feb. 16, 2022, 1:41 a.m. UTC | #1
> Subject: [dts][PATCH V2] tests/dpdk_hugetlbfs_mount_size: fix verify failed can't
> umount huge page
> 
> 1.Add kill testpmd step in set_up.

Could you explain why it is reasonable to kill  testpmd in set_up. It has done this in tear_down, it is enough to handle the exception that testpmd not quit.

> 2.Add kill testpmd before umount hege page in tear_down.
> 
> Signed-off-by: Wei Ling <weix.ling@intel.com>
  
Ling, WeiX Feb. 16, 2022, 1:52 a.m. UTC | #2
> -----Original Message-----
> From: Tu, Lijuan <lijuan.tu@intel.com>
> Sent: Wednesday, February 16, 2022 9:42 AM
> To: Ling, WeiX <weix.ling@intel.com>; dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: RE: [dts][PATCH V2] tests/dpdk_hugetlbfs_mount_size: fix verify
> failed can't umount huge page
> 
> > Subject: [dts][PATCH V2] tests/dpdk_hugetlbfs_mount_size: fix verify
> > failed can't umount huge page
> >
> > 1.Add kill testpmd step in set_up.
> 
> Could you explain why it is reasonable to kill  testpmd in set_up. It has done
> this in tear_down, it is enough to handle the exception that testpmd not quit.
> 
> > 2.Add kill testpmd before umount hege page in tear_down.
> >
> > Signed-off-by: Wei Ling <weix.ling@intel.com>
> 
When other suite executed done, but have not quit testpmd, kill testpmd in set_up will go into effect.
  
Tu, Lijuan Feb. 16, 2022, 2:28 a.m. UTC | #3
> > > Subject: [dts][PATCH V2] tests/dpdk_hugetlbfs_mount_size: fix verify
> > > failed can't umount huge page
> > >
> > > 1.Add kill testpmd step in set_up.
> >
> > Could you explain why it is reasonable to kill  testpmd in set_up. It
> > has done this in tear_down, it is enough to handle the exception that testpmd
> not quit.
> >
> > > 2.Add kill testpmd before umount hege page in tear_down.
> > >
> > > Signed-off-by: Wei Ling <weix.ling@intel.com>
> >
> When other suite executed done, but have not quit testpmd, kill testpmd in
> set_up will go into effect.

It's better to figure out which have this issue and fix it.
  

Patch

diff --git a/tests/TestSuite_dpdk_hugetlbfs_mount_size.py b/tests/TestSuite_dpdk_hugetlbfs_mount_size.py
index c7da7b9e..d116810d 100644
--- a/tests/TestSuite_dpdk_hugetlbfs_mount_size.py
+++ b/tests/TestSuite_dpdk_hugetlbfs_mount_size.py
@@ -72,13 +72,13 @@  class DpdkHugetlbfsMountSize(TestCase):
             self.socket_mem2 = "0,2048"
         self.umount_huge([DEFAULT_MNT])
         self.app_path = self.dut.apps_name['test-pmd']
-
+        self.testpmd_name = self.app_path.split("/")[-1]
 
     def set_up(self):
         """
         Run before each test case.
         """
-        pass
+        self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#")
 
     def close_session(self):
         self.dut.close_session(self.session_first)
@@ -265,6 +265,7 @@  class DpdkHugetlbfsMountSize(TestCase):
         Run after each test case.
         """
         # If case fails, the mount should be cancelled to avoid affecting next cases
+        self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#")
         self.umount_huge([MNT_PATH[0], MNT_PATH[1], MNT_PATH[2]])
         self.dut.kill_all()
         time.sleep(2)