[V1] tests/rte_flow_common:fix no fdir matchedid issue

Message ID 20210728151532.31188-1-zhiminx.huang@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/rte_flow_common:fix no fdir matchedid issue |

Commit Message

Huang, ZhiminX July 28, 2021, 3:15 p.m. UTC
  *.when expect markid is 0 and testpmd not have fdir matchid,
it should be failed for this issue, so add empty set judgement.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 tests/rte_flow_common.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tu, Lijuan Aug. 3, 2021, 5:09 a.m. UTC | #1
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Zhimin Huang
> Sent: 2021年7月28日 23:16
> To: dts@dpdk.org
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V1] tests/rte_flow_common:fix no fdir matchedid issue
> 
> *.when expect markid is 0 and testpmd not have fdir matchid, it should be failed
> for this issue, so add empty set judgement.
> 
> Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>

Applied, thanks
  

Patch

diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py
index 42afbfd1..591aa5a1 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -400,7 +400,7 @@  def check_mark(out, pkt_num, check_param, stats=True):
                 raise Exception("got wrong output, not match pattern %s" % p.pattern)
             if mark_id is not None:
                 mark_list = set(int(i, CVL_TXQ_RXQ_NUMBER) for i in fdir_scanner.findall(out))
-                verify(all([i == check_param["mark_id"] for i in mark_list]),
+                verify(all([i == check_param["mark_id"] for i in mark_list]) and mark_list,
                        "failed: some packet mark id of %s not match" % mark_list)
             else:
                 verify(not fdir_flag, "output should not include mark id")