Skip to contentSkip to conversation

selftests: forwarding: couple of fixes

PATCH Applied Jiri Pirko 2 participants 5 messages Mar 7, 2018

Subsystems (4)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

cover selftests: forwarding: couple of fixes

From: Jiri Pirko <[email protected]>

Jiri Pirko (2):
selftests: forwarding: fix "ok" action test
selftests: forwarding: fix flags passed to first drop rule in
gact_drop_and_ok_test

 tools/testing/selftests/net/forwarding/tc_actions.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.14.3
author
#1 lore raw

PATCH 1/2 selftests: forwarding: fix "ok" action test

From: Jiri Pirko <[email protected]>

Fix the "ok" action test so it checks that packet that is okayed does not continue to be processed by other rules. Fix error message as well.

---
 tools/testing/selftests/net/forwarding/tc_actions.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tools/testing/selftests/net/forwarding/tc_actions.sh +4 -1
index 6b18ba2d3982..ac6b6a1057d8 100755
@@ -96,7 +96,10 @@ gact_drop_and_ok_test()
 		-t ip -q
 
 	tc_check_packets "dev $swp1 ingress" 101 1
-	check_err $? "Did not see trapped packet"
+	check_err $? "Did not see passed packet"
+
+	tc_check_packets "dev $swp1 ingress" 102 2
+	check_fail $? "Packet was dropped and it should not reach here"
 
 	tc filter del dev $swp1 ingress protocol ip pref 2 handle 102 flower
 	tc filter del dev $swp1 ingress protocol ip pref 1 handle 101 flower
Signature · 1 line
2.14.3
author
#3 lore raw

PATCH 2/2 selftests: forwarding: fix flags passed to first drop rule in gact_drop_and_ok_test

In reply to Jiri Pirko

From: Jiri Pirko <[email protected]>

Fix copy&paste error and pass proper flags.

---
 tools/testing/selftests/net/forwarding/tc_actions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/forwarding/tc_actions.sh +1 -1
index ac6b6a1057d8..3a6385ebd5d0 100755
@@ -81,7 +81,7 @@ gact_drop_and_ok_test()
 	RET=0
 
 	tc filter add dev $swp1 ingress protocol ip pref 2 handle 102 flower \
-		skip_hw dst_ip 192.0.2.2 action drop
+		$tcflags dst_ip 192.0.2.2 action drop
 
 	$MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \
 		-t ip -q
Signature · 1 line
2.14.3