[V1] tests/rte_flow_common:fix no fdir matchedid issue
Commit Message
*.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
> -----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
@@ -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")