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 3FB66A034F; Mon, 22 Mar 2021 07:50:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12C0A40040; Mon, 22 Mar 2021 07:50:23 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id A8F944003D for ; Mon, 22 Mar 2021 07:50:21 +0100 (CET) IronPort-SDR: d8koEhYGyv+NnQf+tncTWUcWZndb5eFidbAFTJYxGevXMvCoOHff+jnpDq/YTX2ZeVOHYNtJXA cAxktyhPJ3UA== X-IronPort-AV: E=McAfee;i="6000,8403,9930"; a="189612896" X-IronPort-AV: E=Sophos;i="5.81,268,1610438400"; d="scan'208";a="189612896" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2021 23:50:20 -0700 IronPort-SDR: E+TiR+6pEiUg3AZWu6Os9YJCH/3m7SDe4aPCN7Xak0m8CuIzRR1i6+NLRxogWk7fkV335G7s3X Hj0e8OA8GdYQ== X-IronPort-AV: E=Sophos;i="5.81,268,1610438400"; d="scan'208";a="441038515" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2021 23:50:19 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Mon, 22 Mar 2021 14:37:59 +0800 Message-Id: <1616395079-56988-3-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616395079-56988-1-git-send-email-zhiminx.huang@intel.com> References: <1616395079-56988-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 2/2] tests/pf_vf_flexible:add decorator for pkg check 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 Sender: "dts" *.add decorator to skip not support os default pkg for pf and vf flexible suite Signed-off-by: Zhimin Huang --- tests/TestSuite_flexible_rxd.py | 26 +++++++++++++------------- tests/TestSuite_iavf_flexible_descriptor.py | 21 +++++++++++++-------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/tests/TestSuite_flexible_rxd.py b/tests/TestSuite_flexible_rxd.py index 648173e..45eb603 100644 --- a/tests/TestSuite_flexible_rxd.py +++ b/tests/TestSuite_flexible_rxd.py @@ -32,11 +32,12 @@ import time -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic from flexible_common import FlexibleRxdBase import rte_flow_common as rfc class TestFlexibleRxd(TestCase, FlexibleRxdBase): + supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2', 'foxville'] def preset_compilation(self): """ @@ -65,17 +66,11 @@ class TestFlexibleRxd(TestCase, FlexibleRxdBase): [self.dut.send_expect(cmd, "#", 15, alt_session=True) for cmd in cmds] self.dut.build_install_dpdk(self.dut.target) + @check_supported_nic(supported_nic) def set_up_all(self): """ run at the start of each test suite. """ - support_nics = [ - "columbiaville_25g", - "columbiaville_100g", - "foxville", - ] - self.verify(self.nic in support_nics, - "flexible rxd only supports CVL NIC.") self.dut_ports = self.dut.get_ports(self.nic) self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing") self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) @@ -85,17 +80,12 @@ class TestFlexibleRxd(TestCase, FlexibleRxdBase): self.pci = self.dut.ports_info[0]['pci'] self.dst_mac = self.dut.get_mac_address(self.dut_ports[0]) self.init_base(self.pci, self.dst_mac, 'pf') - self.ddp_dir = "/lib/firmware/updates/intel/ice/ddp/" - self.suite_config = rfc.get_suite_config(self) - self.os_default_pkg = self.suite_config["os_default_package_file_location"] - self.comms_pkg = self.suite_config["comms_package_file_location"] def tear_down_all(self): """ Run after each test suite. """ self.restore_compilation() - self.replace_pkg(pkg='comms') def set_up(self): """ @@ -111,60 +101,70 @@ class TestFlexibleRxd(TestCase, FlexibleRxdBase): time.sleep(2) self.dut.kill_all() + @skip_unsupported_pkg('os default') def test_check_single_VLAN_fields_in_RXD_8021Q(self): """ Check single VLAN fields in RXD (802.1Q) """ self.check_single_VLAN_fields_in_RXD_8021Q() + @skip_unsupported_pkg('os default') def test_check_double_VLAN_fields_in_RXD_8021Q_1_VLAN_tag(self): """ Check double VLAN fields in RXD (802.1Q) only 1 VLAN tag """ self.check_double_VLAN_fields_in_RXD_8021Q_1_VLAN_tag() + @skip_unsupported_pkg('os default') def test_check_double_VLAN_fields_in_RXD_8021Q_2_VLAN_tag(self): """ Check double VLAN fields in RXD (802.1Q) 2 VLAN tags """ self.check_double_VLAN_fields_in_RXD_8021Q_2_VLAN_tag() + @skip_unsupported_pkg('os default') def test_check_double_VLAN_fields_in_RXD_8021ad(self): """ Check double VLAN fields in RXD (802.1ad) """ self.check_double_VLAN_fields_in_RXD_8021ad() + @skip_unsupported_pkg('os default') def test_check_IPv4_fields_in_RXD(self): """ Check IPv4 fields in RXD """ self.check_IPv4_fields_in_RXD() + @skip_unsupported_pkg('os default') def test_check_IPv6_fields_in_RXD(self): """ Check IPv6 fields in RXD """ self.check_IPv6_fields_in_RXD() + @skip_unsupported_pkg('os default') def test_check_IPv6_flow_field_in_RXD(self): """ Check IPv6 flow field in RXD """ self.check_IPv6_flow_field_in_RXD() + @skip_unsupported_pkg('os default') def test_check_TCP_fields_in_IPv4_in_RXD(self): """ Check TCP fields in IPv4 in RXD """ self.check_TCP_fields_in_IPv4_in_RXD() + @skip_unsupported_pkg('os default') def test_check_TCP_fields_in_IPv6_in_RXD(self): """ Check TCP fields in IPv6 in RXD """ self.check_TCP_fields_in_IPv6_in_RXD() + @skip_unsupported_pkg('os default') def test_check_IPv4_IPv6_TCP_fields_in_RXD_on_specific_queues(self): """ Check IPv4, IPv6, TCP fields in RXD on specific queues diff --git a/tests/TestSuite_iavf_flexible_descriptor.py b/tests/TestSuite_iavf_flexible_descriptor.py index 3bfd5b9..41d227a 100644 --- a/tests/TestSuite_iavf_flexible_descriptor.py +++ b/tests/TestSuite_iavf_flexible_descriptor.py @@ -35,11 +35,12 @@ import time import traceback -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic from flexible_common import FlexibleRxdBase class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase): + supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2', 'foxville'] def preset_compilation(self): """ @@ -100,17 +101,11 @@ class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase): except Exception as e: self.logger.info(traceback.format_exc()) + @check_supported_nic(supported_nic) def set_up_all(self): """ run at the start of each test suite. """ - support_nics = [ - "columbiaville_25g", - "columbiaville_100g", - "foxville", - ] - self.verify(self.nic in support_nics, - "flexible rxd only supports CVL NIC.") self.dut_ports = self.dut.get_ports(self.nic) self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing") self.preset_compilation() @@ -139,18 +134,21 @@ class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase): time.sleep(2) self.dut.kill_all() + @skip_unsupported_pkg('os default') def test_check_single_VLAN_fields_in_RXD_8021Q(self): """ Check single VLAN fields in RXD (802.1Q) """ self.check_single_VLAN_fields_in_RXD_8021Q() + @skip_unsupported_pkg('os default') def test_check_single_VLAN_fields_in_RXD_8021ad(self): """ Check single VLAN fields in RXD (802.1ad) """ self.check_single_VLAN_fields_in_RXD_8021ad() + @skip_unsupported_pkg('os default') def test_check_double_VLAN_fields_in_RXD_8021Q_1_VLAN_tag(self): """ Check double VLAN fields in RXD (802.1Q) only 1 VLAN tag @@ -163,42 +161,49 @@ class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase): """ self.check_double_VLAN_fields_in_RXD_8021Q_2_VLAN_tag() + @skip_unsupported_pkg('os default') def test_check_double_VLAN_fields_in_RXD_8021ad(self): """ Check double VLAN fields in RXD (802.1ad) """ self.check_double_VLAN_fields_in_RXD_8021ad() + @skip_unsupported_pkg('os default') def test_check_IPv4_fields_in_RXD(self): """ Check IPv4 fields in RXD """ self.check_IPv4_fields_in_RXD() + @skip_unsupported_pkg('os default') def test_check_IPv6_fields_in_RXD(self): """ Check IPv6 fields in RXD """ self.check_IPv6_fields_in_RXD() + @skip_unsupported_pkg('os default') def test_check_IPv6_flow_field_in_RXD(self): """ Check IPv6 flow field in RXD """ self.check_IPv6_flow_field_in_RXD() + @skip_unsupported_pkg('os default') def test_check_TCP_fields_in_IPv4_in_RXD(self): """ Check TCP fields in IPv4 in RXD """ self.check_TCP_fields_in_IPv4_in_RXD() + @skip_unsupported_pkg('os default') def test_check_TCP_fields_in_IPv6_in_RXD(self): """ Check TCP fields in IPv6 in RXD """ self.check_TCP_fields_in_IPv6_in_RXD() + @skip_unsupported_pkg('os default') def test_check_IPv4_IPv6_TCP_fields_in_RXD_on_specific_queues(self): """ Check IPv4, IPv6, TCP fields in RXD on specific queues -- 1.8.3.1