From patchwork Fri Dec 23 03:22:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 121340 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 BDD73A0093; Fri, 23 Dec 2022 04:24:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B724C410F9; Fri, 23 Dec 2022 04:24:22 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id BF2D340685 for ; Fri, 23 Dec 2022 04:24:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671765861; x=1703301861; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Py4iHdmOLRNCtl+0EfL31wIblIWCMTaiVjJ0fpJjaXU=; b=GwsipOxNOkeOYyBn+WUdLBvJEXYP42VG4VoU4jYyiJYQMPgk3qUAD896 wgfvDmXuR6twaLnHt6xECEaXLi6vBLujV+CKOn+QY6Gn6XypVGwQ9C/Hv yDmL9RYOI9rGWSDKEDfI/cOY3yLA41nT2UFIt2fUcq00EFRZISpg57UcA arJor7EXHvKkpH3+Jk8gkg5mUi5lKdeTdpKgoPhLh1ojDFEL0o0SW6G5Z NzlqKX8P4FuIPz5e+isMvkesaW/shet4tju11MxVKY/11l64rITW9xECE 0O/nLJvXk1G4L8Rz4jiaIoePGy5t82NltRPvyaM3fNfTxzmveR32vFhTy g==; X-IronPort-AV: E=McAfee;i="6500,9779,10569"; a="384651750" X-IronPort-AV: E=Sophos;i="5.96,267,1665471600"; d="scan'208";a="384651750" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2022 19:24:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10569"; a="651986595" X-IronPort-AV: E=Sophos;i="5.96,267,1665471600"; d="scan'208";a="651986595" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by orsmga002.jf.intel.com with ESMTP; 22 Dec 2022 19:24:18 -0800 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, weiyuanx.li@intel.com, qi.fu@intel.com, lijuan.tu@intel.com Subject: [DTS][PATCH V5 1/4] tests/vf_offload: fix 2 typos and a bug. Date: Fri, 23 Dec 2022 11:22:31 +0800 Message-Id: <20221223032232.412042-2-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221223032232.412042-1-ke1.xu@intel.com> References: <20221223032232.412042-1-ke1.xu@intel.com> MIME-Version: 1.0 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 Checksum is wrongly spelled as checksup. Finally is wrongly spelled as fially. String formating is wrongly put out side of the function call. Signed-off-by: Ke Xu --- tests/TestSuite_vf_offload.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py index 26fad2b8..3fb6f9c8 100644 --- a/tests/TestSuite_vf_offload.py +++ b/tests/TestSuite_vf_offload.py @@ -265,7 +265,7 @@ class TestVfOffload(TestCase): ( ip_checksum, tcp_checksum, - udp_checksup, + udp_checksum, sctp_checksum, ) = packet_received.split(";") print( @@ -273,8 +273,8 @@ class TestVfOffload(TestCase): ip_checksum, "tcp_checksum:, ", tcp_checksum, - "udp_checksup: ", - udp_checksup, + "udp_checksum: ", + udp_checksum, "sctp_checksum: ", sctp_checksum, ) @@ -284,9 +284,9 @@ class TestVfOffload(TestCase): if tcp_checksum != "??": packet_type = "TCP" l4_checksum = tcp_checksum - elif udp_checksup != "??": + elif udp_checksum != "??": packet_type = "UDP" - l4_checksum = udp_checksup + l4_checksum = udp_checksum elif sctp_checksum != "??": packet_type = "SCTP" l4_checksum = sctp_checksum @@ -439,7 +439,7 @@ class TestVfOffload(TestCase): command = ("tcpdump -w tcpdump_{0}.pcap -i {0} 2>tcpdump_{0}.out &").format( iface ) - self.tester.send_expect("rm -f tcpdump_{0}.pcap", "#").format(iface) + self.tester.send_expect("rm -f tcpdump_{0}.pcap".format(iface), "#") self.tester.send_expect(command, "#") def tcpdump_stop_sniff(self): @@ -478,8 +478,8 @@ class TestVfOffload(TestCase): Execute scanner to return results """ scanner_result = self.tester.send_expect(scanner, "#") - fially_result = re.findall(r"length( \d+)", scanner_result) - return list(fially_result) + finally_result = re.findall(r"length( \d+)", scanner_result) + return list(finally_result) def number_of_bytes(self, iface): """