]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: mptcp: diag: return KSFT_FAIL not test_cnt
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 1 Mar 2024 17:11:22 +0000 (18:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:40 +0000 (15:28 +0200)
commitbae5b98dcf633bf76f7f10b9a952fd9d0547b38b
treebdaf70b57f2c7a8d7f72951c9a29a9f277f97469
parentb93494329656547cdd6fd7b69cc0637d5c0dbda0
selftests: mptcp: diag: return KSFT_FAIL not test_cnt

commit 45bcc0346561daa3f59e19a753cc7f3e08e8dff1 upstream.

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: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
Cc: stable@vger.kernel.org
Fixes: 42fb6cddec3b ("selftests: mptcp: more stable diag tests")
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/mptcp/diag.sh