From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F9C8A056B; Thu, 12 Mar 2020 12:21:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA4671C067; Thu, 12 Mar 2020 12:21:24 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 13DBD1C021 for ; Thu, 12 Mar 2020 12:21:23 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2020 04:21:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,544,1574150400"; d="scan'208";a="322440963" Received: from unknown (HELO dpdk-xiaoqimai-dut.sh.intel.com) ([10.240.179.33]) by orsmga001.jf.intel.com with ESMTP; 12 Mar 2020 04:21:21 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Thu, 12 Mar 2020 19:15:46 +0800 Message-Id: <1584011747-198122-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1]tests/TestSuite_vhost_pmd_xstats: fix lost case result when teardown fail X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *. fix lost case result when teardown fail Signed-off-by: Xiao Qimai --- 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