From patchwork Fri Dec 18 11:36:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 85386 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC71DA09F6; Fri, 18 Dec 2020 04:41:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F5E3CA2C; Fri, 18 Dec 2020 04:41:08 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id DBE43CA2A for ; Fri, 18 Dec 2020 04:41:06 +0100 (CET) IronPort-SDR: SssZinfVR4mT/8UWaK6iMx5bbkFKBeEzD5YIlpyYot8wpSl5nVEzF2hI46SFJqf1FSKyHny0hK k5m3sjm9YMmw== X-IronPort-AV: E=McAfee;i="6000,8403,9838"; a="175475784" X-IronPort-AV: E=Sophos;i="5.78,428,1599548400"; d="scan'208";a="175475784" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 19:41:04 -0800 IronPort-SDR: 6259FUuPpiDqEvWkzVfp73mrnyueAi7AoRaFYuI8kmzEGh345G2LCSwrlbbfd+i2LIgv9CtQTW ke12CyTIrUow== X-IronPort-AV: E=Sophos;i="5.78,428,1599548400"; d="scan'208";a="560958171" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 19:41:03 -0800 From: Ling Wei To: dts@dpdk.org Cc: Ling Wei Date: Fri, 18 Dec 2020 11:36:32 +0000 Message-Id: <20201218113632.367094-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1] tests/unit_tests_loopback:rm exists file before cp 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" rm exists file before cp Signed-off-by: Ling Wei Tested-by: Wei Ling Acked-by: Haiyang Zhao --- tests/TestSuite_unit_tests_loopback.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py index 6babc2a1..0198a913 100644 --- a/tests/TestSuite_unit_tests_loopback.py +++ b/tests/TestSuite_unit_tests_loopback.py @@ -71,6 +71,7 @@ class TestUnitTestsLoopback(TestCase): self.max_traffic_burst = self.get_max_traffic_burst() self.dut.send_expect("sed -i -e 's/#define MAX_TRAFFIC_BURST %s/#define MAX_TRAFFIC_BURST 32/' app/test/test_pmd_perf.c" % self.max_traffic_burst, "# ", 30) self.tmp_path = '/tmp/test_pmd_perf.c' + self.dut.send_expect("rm -fr %s" % self.tmp_path, "# ") self.dut.send_expect("cp app/test/test_pmd_perf.c %s" % self.tmp_path, "# ") def set_up(self): @@ -133,6 +134,7 @@ class TestUnitTestsLoopback(TestCase): """ Run after each test case. """ + self.dut.send_expect("rm -fr app/test/test_pmd_perf.c", "# ") self.dut.send_expect("cp %s app/test/test_pmd_perf.c" % self.tmp_path, "# ") self.dut.kill_all() @@ -140,7 +142,6 @@ class TestUnitTestsLoopback(TestCase): """ Run after each test suite. """ - self.dut.send_expect("cp %s app/test/test_pmd_perf.c" % self.tmp_path, "# ") self.dut.send_expect("sed -i -e 's/#define MAX_TRAFFIC_BURST 32/#define MAX_TRAFFIC_BURST %s/' app/test/test_pmd_perf.c" % self.max_traffic_burst, "# ", 30) self.dut.build_install_dpdk(self.target) self.dut.kill_all()