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 42EE2423A1; Tue, 10 Jan 2023 10:30:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17F7C40691; Tue, 10 Jan 2023 10:30:25 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 4E13440689 for ; Tue, 10 Jan 2023 10:30:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673343024; x=1704879024; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=joy5/SD+QeFxKwQCDCLq/9Z/8Hzuy4YABc/93LO4fJ4=; b=K0Ib8xMzAT32GXK7oXk6fkB5hL0XRwBsjJGvg8BlZ5HegXCyKaeYFGBN HkbrBRy59jU4uRd5TQJ4gkGuuW5VMilBaYDpHYOUqWlcysPdCgt/rnAXz gG1qarNirWJ2zbVLuLOahuQwH345C4S8Z1uGixGh20URCWe+Ab8zh9Zp4 YRVDahKAnjHRgGvnlCBa/4leJ/y9HhpOQxtggcf5H3KSoQ7CWgL8S0bpY QYc6OZevguV9WYtVTP4dhnJJ+LDp+SU6XJ0iqY1pIqFz3epwbxFgvRfNG 64fwVuDjnWKGOS8uY4mHUs8B+FP39ADqSmd1BLvYKUKZTInG1u5r1emjd Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="409346362" X-IronPort-AV: E=Sophos;i="5.96,314,1665471600"; d="scan'208";a="409346362" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 01:30:23 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="830933326" X-IronPort-AV: E=Sophos;i="5.96,314,1665471600"; d="scan'208";a="830933326" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 01:30:21 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V2] tests/vf_offload: fix syntax errors Date: Tue, 10 Jan 2023 17:30:13 +0800 Message-Id: <20230110093013.9449-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 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 Scapy send package count can't have quotation marks. Otherwise, send the packet fails. Signed-off-by: Weiyuan Li --- v2: -Modify the traversal comparison and expectation of the captured packet results. tests/TestSuite_vf_offload.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py index a212133c..5def34c1 100644 --- a/tests/TestSuite_vf_offload.py +++ b/tests/TestSuite_vf_offload.py @@ -752,7 +752,7 @@ class TestVfOffload(TestCase): rx_stats == tx_stats and all( [ - int(payload_size_list[0]) == loading_size + int(payload_size_list[j]) == loading_size for j in range(packet_count) ] ), @@ -887,7 +887,7 @@ class TestVfOffload(TestCase): ) mac = self.vm0_testpmd.get_port_mac(0) - self.vm0_testpmd.execute_cmd("set verbose 1", "testpmd> ", 120) + self.vm0_testpmd.execute_cmd("set verbose 0", "testpmd> ", 120) self.vm0_testpmd.execute_cmd("set fwd csum", "testpmd>", 120) self.vm0_testpmd.execute_cmd("set promisc 0 on", "testpmd> ", 120) self.vm0_testpmd.execute_cmd("set promisc 1 on", "testpmd> ", 120) @@ -934,7 +934,7 @@ class TestVfOffload(TestCase): ( 'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/' + pkts_outer[key_outer] - + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count = %s)' + + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count=%s)' ) % (mac, loading_size, tx_interface, packet_count) ) @@ -952,7 +952,7 @@ class TestVfOffload(TestCase): rx_stats == tx_stats and all( [ - payload_size_list == loading_size + int(payload_size_list[j]) == loading_size for j in range(packet_count) ] ), @@ -994,11 +994,12 @@ class TestVfOffload(TestCase): self.tester.scapy_append( "from scapy.contrib.gtp import GTP_U_Header" ) + self.logger.info([mac, loading_size, tx_interface, packet_count]) self.tester.scapy_append( ( 'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/' + pkts_outer[key_outer] - + '/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' + + '/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s", count=%s)' ) % (mac, loading_size, tx_interface, packet_count) ) -- 2.27.0