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