[dts] [PATCH V1]tests/TestSuite_vhost_pmd_xstats: fix lost case result when teardown fail

Xiao Qimai qimaix.xiao at intel.com
Thu Mar 12 12:15:46 CET 2020


*. fix lost case result when teardown fail

Signed-off-by: Xiao Qimai <qimaix.xiao at intel.com>
---
 tests/TestSuite_vhost_pmd_xstats.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vhost_pmd_xstats.py b/tests/TestSuite_vhost_pmd_xstats.py
index 0ebbe1c..e9f79ed 100755
--- a/tests/TestSuite_vhost_pmd_xstats.py
+++ b/tests/TestSuite_vhost_pmd_xstats.py
@@ -229,7 +229,8 @@ class TestVhostPmdXstats(TestCase):
         """
         Run after each test case.
         """
-        self.vm._stop_vm()
+        if hasattr(self, "vm"):
+            self.vm._stop_vm()
         self.dut.kill_all()
         time.sleep(2)
 
-- 
1.8.3.1



More information about the dts mailing list