Commit 3ed97037 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller

selftests: forwarding: pedit_dsfield: Check counter value

A missing stats_update callback was recently added to act_pedit. Now that
iproute2 supports JSON dumping for pedit, extend the pedit_dsfield selftest
with a check that would have caught the fact that the callback was missing.
Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1c0522b4
...@@ -132,7 +132,12 @@ do_test_pedit_dsfield_common() ...@@ -132,7 +132,12 @@ do_test_pedit_dsfield_common()
local pkts local pkts
pkts=$(busywait "$TC_HIT_TIMEOUT" until_counter_is ">= 10" \ pkts=$(busywait "$TC_HIT_TIMEOUT" until_counter_is ">= 10" \
tc_rule_handle_stats_get "dev $h2 ingress" 101) tc_rule_handle_stats_get "dev $h2 ingress" 101)
check_err $? "Expected to get 10 packets, but got $pkts." check_err $? "Expected to get 10 packets on test probe, but got $pkts."
pkts=$(tc_rule_handle_stats_get "$pedit_locus" 101)
((pkts >= 10))
check_err $? "Expected to get 10 packets on pedit rule, but got $pkts."
log_test "$pedit_locus pedit $pedit_action" log_test "$pedit_locus pedit $pedit_action"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment