From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DA1C65681 for ; Fri, 30 Mar 2018 04:39:51 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2018 19:39:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,378,1517904000"; d="scan'208";a="43410055" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga001.jf.intel.com with ESMTP; 29 Mar 2018 19:39:49 -0700 From: "zhu,shuai" To: dts@dpdk.org Cc: "zhu,shuai" Date: Fri, 30 Mar 2018 10:41:05 +0800 Message-Id: <1522377665-104981-1-git-send-email-shuaix.zhu@intel.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1] tests/uni_pkt:Fixed syntax error 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: , X-List-Received-Date: Fri, 30 Mar 2018 02:39:52 -0000 Use NIC family name to match case. fortville NIC family: fortville_eagle, fortville_spirit, fortville_spirit_single, fortville_25g fortpark NIC family: fortpark_TLV, fortpark_TLV_vf Signed-off-by: zhu,shuai --- tests/TestSuite_uni_pkt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py index e11b482..2586ad9 100644 --- a/tests/TestSuite_uni_pkt.py +++ b/tests/TestSuite_uni_pkt.py @@ -115,7 +115,7 @@ class TestUniPacket(TestCase): """ checked that whether L3 and L4 packet can be normally detected. """ - if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower(): + if "fortville" in self.nic or "fortpark_TLV" in self.nic: outerL4Type = "L4_NONFRAG" ipv4_default_packet_type = ["L2_ETHER", "L3_IPV4_EXT_UNKNOWN"] elif "niantic" in self.nic.lower() or "i350" in self.nic.lower(): @@ -133,7 +133,7 @@ class TestUniPacket(TestCase): } # delete the unsupported packet based on nic type - if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower(): + if "fortville" in self.nic or "fortpark_TLV" in self.nic: pktType.pop("MAC_IPihl_PKT") pktType.pop("MAC_IPihl_SCTP_PKT") elif "niantic" in self.nic.lower() or "i350" in self.nic.lower(): @@ -146,7 +146,7 @@ class TestUniPacket(TestCase): """ checked that whether IPv6 and L4 packet can be normally detected. """ - if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower(): + if "fortville" in self.nic or "fortpark_TLV" in self.nic: outerL4Type = "L4_NONFRAG" ipv6_default_packet_type = ["L2_ETHER", "L3_IPV6_EXT_UNKNOWN"] elif "niantic" in self.nic.lower() or "i350" in self.nic.lower(): @@ -162,7 +162,7 @@ class TestUniPacket(TestCase): } # delete the unsupported packet based on nic type - if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower(): + if "fortville" in self.nic or "fortpark_TLV" in self.nic: pktType.pop("MAC_IPv6FRAG_PKT_N") elif "niantic" in self.nic.lower() or "i350" in self.nic.lower(): pktType.pop("MAC_IPv6FRAG_PKT_F") -- 1.9.3