Skip to content

Commit 45bcc03

Browse files
Geliang Tangdavem330
authored andcommitted
selftests: mptcp: diag: return KSFT_FAIL not test_cnt
The test counter 'test_cnt' should not be returned in diag.sh, e.g. what if only the 4th test fail? Will do 'exit 4' which is 'exit ${KSFT_SKIP}', the whole test will be marked as skipped instead of 'failed'! So we should do ret=${KSFT_FAIL} instead. Fixes: df62f2e ("selftests/mptcp: add diag interface tests") Cc: [email protected] Fixes: 42fb6cd ("selftests: mptcp: more stable diag tests") Signed-off-by: Geliang Tang <[email protected]> Reviewed-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 429679d commit 45bcc03

File tree

1 file changed

+3
-3
lines changed
  • tools/testing/selftests/net/mptcp

1 file changed

+3
-3
lines changed

tools/testing/selftests/net/mptcp/diag.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ __chk_nr()
6969
else
7070
echo "[ fail ] expected $expected found $nr"
7171
mptcp_lib_result_fail "${msg}"
72-
ret=$test_cnt
72+
ret=${KSFT_FAIL}
7373
fi
7474
else
7575
echo "[ ok ]"
@@ -124,11 +124,11 @@ wait_msk_nr()
124124
if [ $i -ge $timeout ]; then
125125
echo "[ fail ] timeout while expecting $expected max $max last $nr"
126126
mptcp_lib_result_fail "${msg} # timeout"
127-
ret=$test_cnt
127+
ret=${KSFT_FAIL}
128128
elif [ $nr != $expected ]; then
129129
echo "[ fail ] expected $expected found $nr"
130130
mptcp_lib_result_fail "${msg} # unexpected result"
131-
ret=$test_cnt
131+
ret=${KSFT_FAIL}
132132
else
133133
echo "[ ok ]"
134134
mptcp_lib_result_pass "${msg}"

0 commit comments

Comments
 (0)