From patchwork Thu Mar 18 09:22:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, HaiyangX" X-Patchwork-Id: 89465 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 EAD73A0562; Thu, 18 Mar 2021 10:31:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70DCB140F25; Thu, 18 Mar 2021 10:31:16 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id F39EC140F17 for ; Thu, 18 Mar 2021 10:31:14 +0100 (CET) IronPort-SDR: z75ySsd2CUSvqvyeqQwfH2ssGtj7O3jSAbvO3PZfZm8ZFLGGCcceWrE3zDc7q3k994HfO8lXXN T7LBIx6wGxYw== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="189731901" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="189731901" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:14 -0700 IronPort-SDR: QwB3cNaU4vYOnVBQDVgcIWWDdBP8y7hjptiTOpBoFfTklvvEM8eBiwB9HaDcOgPGJVDAF252BZ M5cPp9Er1O7Q== X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="413013382" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:13 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: lijuan.tu@intel.com, Haiyang Zhao Date: Thu, 18 Mar 2021 17:22:11 +0800 Message-Id: <20210318092215.27270-2-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210318092215.27270-1-haiyangx.zhao@intel.com> References: <20210318092215.27270-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V2 1/5] framework/exception: add new exception VerifySkip 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" this new type exeption is used for framework to handle the cases which should be skipped. Signed-off-by: Haiyang Zhao --- framework/exception.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/framework/exception.py b/framework/exception.py index cc2f724b..bdedd743 100644 --- a/framework/exception.py +++ b/framework/exception.py @@ -35,6 +35,19 @@ class VerifyFailure(Exception): return repr(self.value) +class VerifySkip(Exception): + + """ + To be used within the test cases to verify if case should be skipped. + """ + + def __init__(self, value): + self.value = value + + def __str__(self): + return repr(self.value) + + class SSHConnectionException(Exception): """ From patchwork Thu Mar 18 09:22:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, HaiyangX" X-Patchwork-Id: 89466 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 94E55A0561; Thu, 18 Mar 2021 10:31:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FE9D140F2C; Thu, 18 Mar 2021 10:31:18 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id E307A140F17 for ; Thu, 18 Mar 2021 10:31:16 +0100 (CET) IronPort-SDR: AFjW9EpV1ewD7qcIvzLCzsqHaH85TSsLLO55r9U5EUkynHaysb6wjBdIb184CRqps+llRa6yZV 2oDitJNbDEBg== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="189731907" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="189731907" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:16 -0700 IronPort-SDR: 47zIuwYtjsd0T0weME49KiLkJ6sX+VJtuEb8Qvbu2QDAp2j6nNu+18uIQAKxI6mgRjJs9rhFkE r+JSoIhzQ8ew== X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="413013393" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:14 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: lijuan.tu@intel.com, Haiyang Zhao Date: Thu, 18 Mar 2021 17:22:12 +0800 Message-Id: <20210318092215.27270-3-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210318092215.27270-1-haiyangx.zhao@intel.com> References: <20210318092215.27270-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V2 2/5] framework/test_case: handle the VerifySkip exception and add some functions 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" handle the VerfiySkip exception and mark the related case with N/A in result. add some functions to check if the nic or pkg support current case. Signed-off-by: Haiyang Zhao --- framework/test_case.py | 102 +++++++++++++++++++++++++++++++++++------ 1 file changed, 89 insertions(+), 13 deletions(-) diff --git a/framework/test_case.py b/framework/test_case.py index 57bea562..3347adad 100644 --- a/framework/test_case.py +++ b/framework/test_case.py @@ -38,7 +38,7 @@ import traceback import signal import time -from exception import VerifyFailure, TimeoutException +from exception import VerifyFailure, VerifySkip, TimeoutException from settings import DRIVERS, NICS, get_nic_name, load_global_setting from settings import PERF_SETTING, FUNC_SETTING, DEBUG_SETTING from settings import DEBUG_CASE_SETTING, HOST_DRIVER_SETTING @@ -48,6 +48,7 @@ from test_result import ResultTable, Result from logger import getLogger from config import SuiteConf from utils import BLUE, RED +from functools import wraps class TestCase(object): @@ -68,15 +69,10 @@ class TestCase(object): self._check_and_reconnect(crb=self.tester) # convert netdevice to codename - self.nics = [] - for portid in range(len(self.dut.ports_info)): - nic_type = self.dut.ports_info[portid]['type'] - self.nics.append(get_nic_name(nic_type)) - if len(self.nics): - self.nic = self.nics[0] - else: - self.nic = '' - self.kdriver = self._get_nic_driver(self.nic) + self.nic = self.dut.nic.name + self.nic_obj = self.dut.nic + self.kdriver = self.dut.nic.default_driver + self.pkg = self.dut.nic.pkg # result object for save suite result self._suite_result = Result() @@ -168,6 +164,12 @@ class TestCase(object): print(RED("History dump finished.")) raise VerifyFailure(description) + def skip_case(self, passed, description): + if not passed: + if self._enable_debug: + print("skip case: \"%s\" " % RED(description)) + raise VerifySkip(description) + def _get_nic_driver(self, nic_name): if nic_name in list(DRIVERS.keys()): return DRIVERS[nic_name] @@ -257,17 +259,28 @@ class TestCase(object): try: self.set_up_all() return True - except Exception: + except VerifySkip as v: + self.logger.info('set_up_all SKIPPED:\n' + traceback.format_exc()) + # record all cases N/A + if self._enable_func: + for case_obj in self._get_functional_cases(): + self._suite_result.test_case = case_obj.__name__ + self._suite_result.test_case_skip(str(v)) + if self._enable_perf: + for case_obj in self._get_performance_cases(): + self._suite_result.test_case = case_obj.__name__ + self._suite_result.test_case_skip(str(v)) + except Exception as v: self.logger.error('set_up_all failed:\n' + traceback.format_exc()) # record all cases blocked if self._enable_func: for case_obj in self._get_functional_cases(): self._suite_result.test_case = case_obj.__name__ - self._suite_result.test_case_blocked('set_up_all failed') + self._suite_result.test_case_blocked('set_up_all failed: {}'.format(str(v))) if self._enable_perf: for case_obj in self._get_performance_cases(): self._suite_result.test_case = case_obj.__name__ - self._suite_result.test_case_blocked('set_up_all failed') + self._suite_result.test_case_blocked('set_up_all failed: {}'.format(str(v))) return False def _execute_test_case(self, case_obj): @@ -328,6 +341,10 @@ class TestCase(object): self._suite_result.test_case_failed(str(v)) self._rst_obj.write_result("FAIL") self.logger.error('Test Case %s Result FAILED: ' % (case_name) + str(v)) + except VerifySkip as v: + self._suite_result.test_case_skip(str(v)) + self._rst_obj.write_result("N/A") + self.logger.info('Test Case %s N/A: ' % (case_name)) except KeyboardInterrupt: self._suite_result.test_case_blocked("Skipped") self.logger.error('Test Case %s SKIPPED: ' % (case_name)) @@ -504,3 +521,62 @@ class TestCase(object): bitrate *= 100 return bitrate * num_ports / 8 / (frame_size + 20) + + +def skip_unsupported_pkg(pkgs): + """ + Skip case which are not supported by the input pkgs + """ + if isinstance(pkgs, str): + pkgs = [pkgs] + + def decorator(func): + @wraps(func) + def wrapper(*args, **kwargs): + test_case = args[0] + pkg_type = test_case.pkg.get('type') + pkg_version = test_case.pkg.get('version') + if not pkg_type or not pkg_version: + raise VerifyFailure('Failed due to pkg is empty'.format(test_case.pkg)) + for pkg in pkgs: + if pkg in pkg_type: + raise VerifySkip('{} {} do not support this case'.format(pkg_type, pkg_version)) + return func(*args, **kwargs) + return wrapper + return decorator + + +def skip_unsupported_nic(nics): + """ + Skip case which are not supported by the input nics + """ + if isinstance(nics, str): + nics = [nics] + + def decorator(func): + @wraps(func) + def wrapper(*args, **kwargs): + test_case = args[0] + if test_case.nic in nics: + raise VerifySkip('{} do not support this case'.format(test_case.nic)) + return func(*args, **kwargs) + return wrapper + return decorator + + +def check_supported_nic(nics): + """ + check if the test case is supported by the input nics + """ + if isinstance(nics, str): + nics = [nics] + + def decorator(func): + @wraps(func) + def wrapper(*args, **kwargs): + test_case = args[0] + if test_case.nic not in nics: + raise VerifySkip('{} do not support this case'.format(test_case.nic)) + return func(*args, **kwargs) + return wrapper + return decorator From patchwork Thu Mar 18 09:22:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, HaiyangX" X-Patchwork-Id: 89467 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 BAF97A0561; Thu, 18 Mar 2021 10:31:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5B49140F32; Thu, 18 Mar 2021 10:31:19 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 0D87B140F17 for ; Thu, 18 Mar 2021 10:31:17 +0100 (CET) IronPort-SDR: tBdNwrPQ8KBzaF6jfPoSugoPki+ea5Hw1BwG8GeCs7GG3kjmuL+SKxQ3g5r+3qDQtb2IIrQqVE 8JmD+5hYpJ1w== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="189731922" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="189731922" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:17 -0700 IronPort-SDR: nQy7hR1r16I+kLnBl90zGcxOUvEZ5X4KEI7vzL970DlNS0NEvdL9jZtx49EgdfzxwqER/9h+9m GWjFK85xlR3A== X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="413013400" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:16 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: lijuan.tu@intel.com, Haiyang Zhao Date: Thu, 18 Mar 2021 17:22:13 +0800 Message-Id: <20210318092215.27270-4-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210318092215.27270-1-haiyangx.zhao@intel.com> References: <20210318092215.27270-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V2 3/5] nics/net_device: add attribute pkg and get method 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 attribute pkg to record nic current package and add the related get method. Signed-off-by: Haiyang Zhao --- nics/net_device.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/nics/net_device.py b/nics/net_device.py index bdc9d37d..6a26d1eb 100644 --- a/nics/net_device.py +++ b/nics/net_device.py @@ -71,6 +71,7 @@ class NetDevice(object): self.intf2_name = None self.get_interface_name() self.socket = self.get_nic_socket() + self.pkg = {} def stop(self): pass @@ -118,6 +119,27 @@ class NetDevice(object): """ return self.crb.get_pci_dev_driver(self.domain_id, self.bus_id, self.devfun_id) + def get_nic_pkg(self): + """ + Get the NIC pkg. + """ + out = self.__send_expect('dmesg | grep "DDP package" | tail -1', '# ') + if 'could not load' in out: + print(RED(out)) + print(RED('Warning: The loaded DDP package version may not as you expected')) + try: + pkg_info = out.split('. ')[1].lower() + self.pkg['type'] = re.findall(".*package '(.*)'", pkg_info)[0].strip() + self.pkg['version'] = re.findall("version(.*)", pkg_info)[0].strip() + except: + print(RED('Warning: get pkg info failed')) + else: + pkg_info = out.split(': ')[-1].lower().split('package version') + if len(pkg_info) > 1: + self.pkg['type'] = pkg_info[0].strip() + self.pkg['version'] = pkg_info[1].strip() + return self.pkg + def get_nic_socket(self): """ Get socket id of specified pci device. @@ -428,7 +450,6 @@ class NetDevice(object): self.__send_expect("ifconfig %s down" % intf, "# ") self.__send_expect("ifconfig %s up" % intf, "# ") - @nic_has_driver def disable_ipv6(self): """ From patchwork Thu Mar 18 09:22:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, HaiyangX" X-Patchwork-Id: 89468 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 E1CBEA0561; Thu, 18 Mar 2021 10:31:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBCE8140F34; Thu, 18 Mar 2021 10:31:21 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id BE214140F34 for ; Thu, 18 Mar 2021 10:31:19 +0100 (CET) IronPort-SDR: KF0qpgIcysnbJIPGTdcIjMxQ+UzfPkKz1m6V5FS9TEoJ3vvo8P5xxNJFJRZJutH9x56FjRa20I IdIWnLGkAEKA== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="189731926" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="189731926" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:19 -0700 IronPort-SDR: 6+S0kYYgBBYMFuRUT5kExeVszGWKuctapV0Je1Aop353DKmFGDDd46480A/8hQSohYoaJlN4+q kAzrb7LCi5VA== X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="413013409" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:17 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: lijuan.tu@intel.com, Haiyang Zhao Date: Thu, 18 Mar 2021 17:22:14 +0800 Message-Id: <20210318092215.27270-5-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210318092215.27270-1-haiyangx.zhao@intel.com> References: <20210318092215.27270-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V2 4/5] framework/dut: get nic package in dut prerequisites 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" get nic package if nic kernel driver is ice, and it will retry three times in case of get package failed. Signed-off-by: Haiyang Zhao --- framework/dut.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index 113116f2..5bc84fca 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -404,11 +404,12 @@ class Dut(Crb): self.map_available_ports() # disable tester port ipv6 self.disable_tester_ipv6() + self.get_nic_configurations() + # print latest ports_info for port_info in self.ports_info: self.logger.info(port_info) - if self.nic is None: - self.nic = port_info['port'] + if self.ports_map is None or len(self.ports_map) == 0: self.logger.warning("ports_map should not be empty, please check all links") @@ -419,6 +420,24 @@ class Dut(Crb): name_cfg = AppNameConf() self.apps_name_conf = name_cfg.load_app_name_conf() + def get_nic_configurations(self): + retry_times = 3 + if self.ports_info: + self.nic = self.ports_info[0]['port'] + # TODO: get nic driver/firmware version + if self.nic.default_driver == 'ice': + self.get_nic_pkg(retry_times) + + def get_nic_pkg(self, retry_times=3): + self.nic.pkg = self.nic.get_nic_pkg() + while not self.nic.pkg and retry_times > 0: + self.restore_interfaces() + self.nic.pkg = self.nic.get_nic_pkg() + retry_times = retry_times - 1 + self.logger.info('pkg: {}'.format(self.nic.pkg)) + if not self.nic.pkg: + raise Exception('Get nic pkg failed') + def restore_interfaces(self): """ Restore all ports's interfaces. From patchwork Thu Mar 18 09:22:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, HaiyangX" X-Patchwork-Id: 89469 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 0CA7EA0562; Thu, 18 Mar 2021 10:31:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0696D140F39; Thu, 18 Mar 2021 10:31:22 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 56FE3140F17 for ; Thu, 18 Mar 2021 10:31:21 +0100 (CET) IronPort-SDR: CU/bJpWCOBjb6EhceCexy79YntHJsi7q7qPTmOZzS5+2dzw+EUbs7ENLi7v47sAy+CH/5ZmuX9 VuSDrm9izu8Q== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="189731931" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="189731931" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:21 -0700 IronPort-SDR: 0lAiEnjandWRhQTTcs9q/17vMtjxMjlYqXrtEBvtOwCrb14V4FQK1seL0VLIXqliaX62qbD97J rNxtIdfYOY6w== X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="413013421" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:19 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: lijuan.tu@intel.com, Haiyang Zhao Date: Thu, 18 Mar 2021 17:22:15 +0800 Message-Id: <20210318092215.27270-6-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210318092215.27270-1-haiyangx.zhao@intel.com> References: <20210318092215.27270-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V2 5/5] tests: add nic and pkg check for rss_gtpu 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 decorate in set_up_all to check if nic and pkg support current suite, if not, all the cases will be marked as N/A. Signed-off-by: Haiyang Zhao --- tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py | 5 ++++- tests/TestSuite_cvl_advanced_rss_gtpu.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py b/tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py index 93e1309b..6490dcbf 100755 --- a/tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py +++ b/tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py @@ -35,7 +35,7 @@ import random import time from packet import Packet from pmd_output import PmdOutput -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic from rte_flow_common import RssProcessing mac_ipv4_gtpu_ipv4_basic = { @@ -7807,7 +7807,10 @@ mac_ipv6_gtpc_symmetric_toeplitz = [mac_ipv6_gtpc_symmetric] class TestCVLAdvancedIAVFRSSGTPU(TestCase): + supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2'] + @check_supported_nic(supported_nic) + @skip_unsupported_pkg('os default') def set_up_all(self): """ Run at the start of each test suite. diff --git a/tests/TestSuite_cvl_advanced_rss_gtpu.py b/tests/TestSuite_cvl_advanced_rss_gtpu.py index df514198..054f1907 100755 --- a/tests/TestSuite_cvl_advanced_rss_gtpu.py +++ b/tests/TestSuite_cvl_advanced_rss_gtpu.py @@ -34,7 +34,7 @@ import re import time from packet import Packet from pmd_output import PmdOutput -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic from rte_flow_common import RssProcessing @@ -5555,7 +5555,10 @@ mac_ipv4_gtpu_eh_ipv6_tcp_without_ul_dl_symmetric = eval(str(mac_ipv4_gtpu_eh_ip class TestCVLAdvancedRSSGTPU(TestCase): + supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2'] + @check_supported_nic(supported_nic) + @skip_unsupported_pkg('os default') def set_up_all(self): """ Run at the start of each test suite.