From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3E67FA04AC; Mon, 24 Aug 2020 09:06:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 378C41C0AE; Mon, 24 Aug 2020 09:06:50 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0CC7B1C07B for ; Mon, 24 Aug 2020 09:06:46 +0200 (CEST) IronPort-SDR: ZNUoedPN7dwbu8KFBeRiBFTTGxIpwc9Uio6MrgE8u0/a9TMHOp0BTmwRLWORFYomfBU4wYPZ1V tZbzjrE45Zrg== X-IronPort-AV: E=McAfee;i="6000,8403,9722"; a="153438499" X-IronPort-AV: E=Sophos;i="5.76,347,1592895600"; d="scan'208";a="153438499" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2020 00:06:46 -0700 IronPort-SDR: 2Xn3ETlZPXvcLd4BdCFBq5FGln0cWikEePrYSFyDjKyJMqo5feYC0cLHj0p50ThTBkrGQ0PD7Z GdjLEVAdYaLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,347,1592895600"; d="scan'208";a="330911889" Received: from unknown (HELO localhost.localdomain) ([10.240.183.106]) by fmsmga002.fm.intel.com with ESMTP; 24 Aug 2020 00:06:45 -0700 From: Jianwei Mei To: dts@dpdk.org Cc: Jianwei Mei Date: Mon, 24 Aug 2020 15:46:42 +0000 Message-Id: <20200824154642.27295-3-jianweix.mei@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200824154642.27295-1-jianweix.mei@intel.com> References: <20200824154642.27295-1-jianweix.mei@intel.com> Subject: [dts] [PATHC V1 2/2] tests/rte_flow_common: deal with type list of mark id. 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Add list type to deal with mark id for multiple rules. Signed-off-by: Jianwei Mei --- tests/rte_flow_common.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py index 5728af0..e80575e 100644 --- a/tests/rte_flow_common.py +++ b/tests/rte_flow_common.py @@ -504,8 +504,16 @@ def check_iavf_fdir_mark(out, pkt_num, check_param, stats=True): mark_list = [i for i in res] print("mark list is: ", mark_list) verify(len(res) == pkt_num, "get wrong number of packet with mark_id") - verify(all([int(i, CVL_TXQ_RXQ_NUMBER) == check_param["mark_id"] for i in res]), - "failed: some packet mark id of %s not match" % mark_list) + if isinstance(check_param.get("mark_id"), list): + result = [int(m, CVL_TXQ_RXQ_NUMBER) in check_param.get("mark_id") for m in mark_list] + verify(all(result),"fail: some packet mark id of %s not match" % mark_list) + print((GREEN("pass: mark id %s matched" % mark_list))) + elif isinstance(check_param.get("mark_id"), int): + verify(all([int(i, CVL_TXQ_RXQ_NUMBER) == check_param["mark_id"] for i in res]), + "failed: some packet mark id of %s not match" % mark_list) + else: + raise Exception("wrong mark value, expect int or list") + if check_param.get("queue") is not None: check_iavf_fdir_queue(out, pkt_num, check_param, stats) elif check_param.get("passthru") is not None: -- 2.17.1