From patchwork Fri Mar 31 06:09:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 125673 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B3FF42881; Fri, 31 Mar 2023 09:18:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDD3842BFE; Fri, 31 Mar 2023 09:18:10 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id D80A9427F2 for ; Fri, 31 Mar 2023 09:18:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680247090; x=1711783090; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=FuV7IHgTmnyetzbFecufeYV8bt1bdo3KHh+TFuVxxoY=; b=kVdJas6WYmWwDDFzKxTDEfX8RgNKIGFkjr/YN3h9Vl76+MHNni7kOQiO Hq8Oux9a33VeA4m5tpXBKGLpmsLQHcq5Wt9zW6FNlzG24Nix49SX0FXog QhUHqSXzz+1VcK81EFI8BK9stxg0AeREsY800s75iOmxF9WNbWdUxdp4B sqf63dGgwCPs4NfKnChhG/aiPIcVYnSWuiNLKsdV8h4esh4cvHDSfl4iZ 0mvyytT9HXGRyAcTiGAcEPtBZvr1GIENzfzSeX9GXBEO8a809CEStiFmT feVGMMOhbwgbVS56rbZxzzF41TMMZFJJyS5HkPZFtn9kUh5+Ea2lMPWjS g==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="321771321" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="321771321" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 00:18:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="715352774" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="715352774" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 00:18:07 -0700 From: Lingli Chen To: dts@dpdk.org Cc: yuan.peng@intel.com, Lingli Chen Subject: [dts][PATCH V1 2/3] tests/queue_start_stop: optimize test script to remove re-compile dpdk test step Date: Fri, 31 Mar 2023 02:09:08 -0400 Message-Id: <20230331060909.43701-2-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230331060909.43701-1-linglix.chen@intel.com> References: <20230331060909.43701-1-linglix.chen@intel.com> X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 remove re-compile dpdk test step to sync with test_plans Signed-off-by: Lingli Chen --- tests/TestSuite_queue_start_stop.py | 42 +++-------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py index 80baf8d6..27af1419 100644 --- a/tests/TestSuite_queue_start_stop.py +++ b/tests/TestSuite_queue_start_stop.py @@ -43,21 +43,6 @@ class TestQueueStartStop(TestCase): """ Run before each test case. """ - try: - patch_file = FOLDERS["Depends"] + r"/macfwd_log.patch" - except: - self.logger.warning(str(FOLDERS)) - patch_file = r"dep/macfwd_log.patch" - FOLDERS["Depends"] = "dep" - patch_dst = "/tmp/" - - # dpdk patch and build - try: - self.dut.session.copy_file_to(patch_file, patch_dst) - self.patch_hotfix_dpdk(patch_dst + "macfwd_log.patch", True) - self.dut.build_install_dpdk(self.target) - except Exception as e: - raise IOError("dpdk setup failure: %s" % e) def check_forwarding(self, ports, nic, pktSize=64, received=True): self.send_packet(ports[0], ports[1], self.nic, pktSize, received) @@ -85,20 +70,6 @@ class TestQueueStartStop(TestCase): else: self.verify(len(sniff_pkts) == 0, "stop queue not work as expected") - def patch_hotfix_dpdk(self, patch_dir, on=True): - """ - This function is to apply or remove patch for dpdk. - patch_dir: the abs path of the patch - on: True for apply, False for remove - """ - try: - if on: - self.dut.send_expect("patch -p0 < %s" % patch_dir, "[~|~\]]# ") - else: - self.dut.send_expect("patch -p0 -R < %s" % patch_dir, "[~|~\]]# ") - except Exception as e: - raise ValueError("patch_hotfix_dpdk failure: %s" % e) - def test_queue_start_stop(self): """ queue start/stop test @@ -114,6 +85,7 @@ class TestQueueStartStop(TestCase): ) time.sleep(5) self.dut.send_expect("set fwd mac", "testpmd>") + self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("start", "testpmd>") self.check_forwarding([0, 0], self.nic) except Exception as e: @@ -138,7 +110,7 @@ class TestQueueStartStop(TestCase): except Exception as e: raise IOError("queue start/stop forward failure: %s" % e) self.verify( - "ports 0 queue 0 receive " not in out, + "port 0/queue 0: received 1 packets" not in out, "start queue revice package failed, out = %s" % out, ) @@ -153,7 +125,7 @@ class TestQueueStartStop(TestCase): except Exception as e: raise IOError("queue start/stop forward failure: %s" % e) self.verify( - "ports 0 queue 0 receive " in out, + "port 0/queue 0: received 1 packets" in out, "start queue revice package failed, out = %s" % out, ) @@ -161,7 +133,6 @@ class TestQueueStartStop(TestCase): """ Run after each test case. """ - patch_dst = "/tmp/" try: self.dut.send_expect("stop", "testpmd>") @@ -169,13 +140,6 @@ class TestQueueStartStop(TestCase): except: print("Failed to quit testpmd") - self.dut.kill_all() - - try: - self.patch_hotfix_dpdk(patch_dst + "macfwd_log.patch", False) - except Exception as e: - print(("patch_hotfix_dpdk remove failure :%s" % e)) - def tear_down_all(self): """ Run after each test suite.