From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 69C0E42861; Thu, 30 Mar 2023 10:24:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 857A0410F3; Thu, 30 Mar 2023 10:24:11 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 3B91A40685 for ; Thu, 30 Mar 2023 10:24:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680164650; x=1711700650; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EHgxjm9M1y/ctQLc6/urHbkp8yB/0j0mkci7S9vX2aE=; b=nxC+du9JD4ajv3etAs+30tFW1PnyRc/84m+aW6y/PVUuc+fgjAsaStrH hZDLzTUJQMJcyz0qQY7O5f2wDFjFHnJ2d5waqgXb/s5ebge56Fd0ClNWi LrEsAWO5jb/XkaFbz229XRO4bWI2o513R7CoiwaIAdoOtubh0g2w0BVuj qjb1c2fkq+7vVqCLt4RM4gUOOxmmYmX1muG9yC3wIw4JgzESzsVVrId03 ik7RLVqFZ65uG5wLUY6439VNfHpcA85mlJ2mziIST7wlTOtGR5x4BeHpV irrPtevX4qiu4t3TiunzQNIs91apDxKKeVFtZR8NII1Z5ph2ZtaBZ59kl g==; X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="427381479" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="427381479" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 01:24:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="930640115" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="930640115" Received: from dpdk-lingjin.sh.intel.com ([10.67.114.166]) by fmsmga006.fm.intel.com with ESMTP; 30 Mar 2023 01:24:03 -0700 From: Jin Ling To: dts@dpdk.org Cc: yuan.peng@intel.com, lijuan.tu@intel.com, Jin Ling Subject: [DTS][PATCH V1 1/1] tests/uni_pkt: delete code for check result Date: Thu, 30 Mar 2023 16:23:53 +0800 Message-Id: <20230330082353.2404798-2-jin.ling@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230330082353.2404798-1-jin.ling@intel.com> References: <20230330082353.2404798-1-jin.ling@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 hw ptype shows the info of NIC descriptor, and sw ptype shows the info of mbuf, both of them can indicate the packet type was detected, so delete the code of check hw ptype only. Signed-off-by: Jin Ling --- tests/TestSuite_uni_pkt.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py index abeb3c35..e883b84d 100644 --- a/tests/TestSuite_uni_pkt.py +++ b/tests/TestSuite_uni_pkt.py @@ -16,7 +16,6 @@ translate the offloaded packet types into these 7 fields of information, for user applications """ -import re import time import framework.utils as utils @@ -60,13 +59,10 @@ class TestUniPacket(TestCase): pkt = Packet(pkt_type=pkt_type) pkt.send_pkt(self.tester, tx_port=self.tester_iface, count=4) out = self.dut.get_session_output(timeout=2) - pattern = re.compile(r"hw ptype: (.*?)sw") - hw_ptype = re.findall(pattern, out) for pkt_layer_name in pkt_names: - for tag in hw_ptype: - if pkt_layer_name.strip() not in tag: - print((utils.RED("Fail to detect %s" % pkt_layer_name))) - raise VerifyFailure("Failed to detect %s" % pkt_layer_name) + if pkt_layer_name not in out: + print((utils.RED("Fail to detect %s" % pkt_layer_name))) + raise VerifyFailure("Failed to detect %s" % pkt_layer_name) print((utils.GREEN("Detected %s successfully" % pkt_type))) def test_l2pkt_detect(self): -- 2.25.1