Commit e141c1e8 authored by Matthieu Baerts's avatar Matthieu Baerts Committed by David S. Miller

selftests: mptcp: userspace pm: don't stop if error

No more tests were executed after a failure but it is still interesting
to get results for all the tests to better understand what's still OK
and what's not after a modification.

Now we only exit earlier if the two connections cannot be established.
Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent edbc16c4
...@@ -52,6 +52,7 @@ sec=$(date +%s) ...@@ -52,6 +52,7 @@ sec=$(date +%s)
rndh=$(printf %x "$sec")-$(mktemp -u XXXXXX) rndh=$(printf %x "$sec")-$(mktemp -u XXXXXX)
ns1="ns1-$rndh" ns1="ns1-$rndh"
ns2="ns2-$rndh" ns2="ns2-$rndh"
ret=0
print_title() print_title()
{ {
...@@ -257,21 +258,21 @@ check_expected_one() ...@@ -257,21 +258,21 @@ check_expected_one()
# $@: all var names to check # $@: all var names to check
check_expected() check_expected()
{ {
local ret=0 local rc=0
local var local var
for var in "${@}" for var in "${@}"
do do
check_expected_one "${var}" "${ret}" || ret=1 check_expected_one "${var}" "${rc}" || rc=1
done done
if [ ${ret} -eq 0 ] if [ ${rc} -eq 0 ]
then then
stdbuf -o0 -e0 printf "[OK]\n" stdbuf -o0 -e0 printf "[OK]\n"
return 0 return 0
fi fi
exit 1 ret=1
} }
verify_announce_event() verify_announce_event()
...@@ -323,7 +324,7 @@ test_announce() ...@@ -323,7 +324,7 @@ test_announce()
stdbuf -o0 -e0 printf "[OK]\n" stdbuf -o0 -e0 printf "[OK]\n"
else else
stdbuf -o0 -e0 printf "[FAIL]\n\ttype defined: %s\n" "${type}" stdbuf -o0 -e0 printf "[FAIL]\n\ttype defined: %s\n" "${type}"
exit 1 ret=1
fi fi
# ADD_ADDR from the client to server machine reusing the subflow port # ADD_ADDR from the client to server machine reusing the subflow port
...@@ -423,7 +424,7 @@ test_remove() ...@@ -423,7 +424,7 @@ test_remove()
stdbuf -o0 -e0 printf "[OK]\n" stdbuf -o0 -e0 printf "[OK]\n"
else else
stdbuf -o0 -e0 printf "[FAIL]\n" stdbuf -o0 -e0 printf "[FAIL]\n"
exit 1 ret=1
fi fi
# RM_ADDR using an invalid addr id should result in no action # RM_ADDR using an invalid addr id should result in no action
...@@ -438,7 +439,7 @@ test_remove() ...@@ -438,7 +439,7 @@ test_remove()
stdbuf -o0 -e0 printf "[OK]\n" stdbuf -o0 -e0 printf "[OK]\n"
else else
stdbuf -o0 -e0 printf "[FAIL]\n" stdbuf -o0 -e0 printf "[FAIL]\n"
exit 1 ret=1
fi fi
# RM_ADDR from the client to server machine # RM_ADDR from the client to server machine
...@@ -859,7 +860,7 @@ test_prio() ...@@ -859,7 +860,7 @@ test_prio()
[ -z "$count" ] && count=0 [ -z "$count" ] && count=0
if [ $count != 1 ]; then if [ $count != 1 ]; then
stdbuf -o0 -e0 printf "[FAIL]\n\tCount != 1: %d\n" "${count}" stdbuf -o0 -e0 printf "[FAIL]\n\tCount != 1: %d\n" "${count}"
exit 1 ret=1
else else
stdbuf -o0 -e0 printf "[OK]\n" stdbuf -o0 -e0 printf "[OK]\n"
fi fi
...@@ -870,7 +871,7 @@ test_prio() ...@@ -870,7 +871,7 @@ test_prio()
[ -z "$count" ] && count=0 [ -z "$count" ] && count=0
if [ $count != 1 ]; then if [ $count != 1 ]; then
stdbuf -o0 -e0 printf "[FAIL]\n\tCount != 1: %d\n" "${count}" stdbuf -o0 -e0 printf "[FAIL]\n\tCount != 1: %d\n" "${count}"
exit 1 ret=1
else else
stdbuf -o0 -e0 printf "[OK]\n" stdbuf -o0 -e0 printf "[OK]\n"
fi fi
...@@ -961,4 +962,4 @@ test_subflows_v4_v6_mix ...@@ -961,4 +962,4 @@ test_subflows_v4_v6_mix
test_prio test_prio
test_listener test_listener
exit 0 exit ${ret}
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