* [PATCH mptcp-next] Squash to "selftests: mptcp: add mp_fail testcases"
@ 2021-10-29 11:15 Geliang Tang
0 siblings, 0 replies; 2+ messages in thread
From: Geliang Tang @ 2021-10-29 11:15 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
Abort if one of the tc command fails.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index d33cb5ce0ff3..1a11ec690f79 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -253,7 +253,10 @@ checksum_failure()
while true; do
local pkt=$(tc -n $ns2 -j -s action show action csum index 100 |
jq '.[1].actions[0].stats.packets')
- if [ $pkt -gt 0 ]; then
+ if [ $pkt = "null" ]; then
+ echo "tc show action csum failed"
+ break
+ elif [ $pkt -gt 0 ]; then
tc -n $ns2 qdisc del dev ns2eth$i clsact
break
fi
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH mptcp-next] Squash to "selftests: mptcp: add mp_fail testcases"
@ 2022-02-09 9:22 Geliang Tang
0 siblings, 0 replies; 2+ messages in thread
From: Geliang Tang @ 2022-02-09 9:22 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
Use '|| exit 1' as Matt suggested.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 880430058492..62bae737c081 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -212,19 +212,15 @@ reset_with_fail()
-p tcp \
-m length --length 150:9999 \
-m statistic --mode nth --packet 1 --every 99999 \
- -j MARK --set-mark 42
- if [ $? -ne 0 ];then
- echo "SKIP: Couldn not add the $tables rule"
- exit $ksft_skip
- fi
+ -j MARK --set-mark 42 || exit 1
- tc -n $ns2 qdisc add dev ns2eth$i clsact
+ tc -n $ns2 qdisc add dev ns2eth$i clsact || exit 1
tc -n $ns2 filter add dev ns2eth$i egress \
protocol ip prio 1000 \
handle 42 fw \
action pedit munge offset 148 u8 invert \
pipe csum tcp \
- index 100
+ index 100 || exit 1
}
ip -Version > /dev/null 2>&1
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-09 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 11:15 [PATCH mptcp-next] Squash to "selftests: mptcp: add mp_fail testcases" Geliang Tang
2022-02-09 9:22 Geliang Tang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.