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 C5140A0093; Thu, 21 May 2020 11:34:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C5CA1D679; Thu, 21 May 2020 11:34:16 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5CCE51D669 for ; Thu, 21 May 2020 11:34:14 +0200 (CEST) IronPort-SDR: NkKQcAeEoltIaH61H6H602chYK44AfuWrPJDmxKgEOXcTRCC+Ad3gMx9ITUtgCCwF3uaMHqdMr Z0ShQckccO+Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2020 02:34:14 -0700 IronPort-SDR: i0jHabvYx6fuS7lQJC7Hgj4sSTLQu/n46CIle88Z7gTpWF013ErS64V2WziiwnpIMsc27WECmS iENQz3IlvFlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,417,1583222400"; d="scan'208";a="282991152" Received: from unknown (HELO cb-dts.sh.intel.com) ([10.240.183.58]) by orsmga002.jf.intel.com with ESMTP; 21 May 2020 02:34:12 -0700 From: ChenBo To: dts@dpdk.org Cc: ChenBo Date: Thu, 21 May 2020 17:31:39 +0800 Message-Id: <20200521093139.24881-1-box.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] Add steps to clean environment 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" If the test result is failed, the IP set previously will be reserved, need del IP Signed-off-by: ChenBo --- tests/TestSuite_kni.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index 2b2281d..d518f3e 100644 --- a/tests/TestSuite_kni.py +++ b/tests/TestSuite_kni.py @@ -1210,7 +1210,11 @@ class TestKni(TestCase): """ Run after each test case. """ - pass + if self._suite_result.test_case == "test_ping": + for port in self.config['ports']: + tx_port = self.tester.get_local_port(port) + tx_interface = self.tester.get_interface(tx_port) + self.tester.send_expect("ip addr flush %s" % tx_interface, "# ") def tear_down_all(self): """ -- 2.17.1