]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: kselftest: fix wrong test number in ksft_exit_skip
authorSarthak Sharma <sarthak.sharma@arm.com>
Mon, 27 Apr 2026 11:24:47 +0000 (16:54 +0530)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 27 Apr 2026 16:48:24 +0000 (10:48 -0600)
commit74f192205c48333de054620a79d7ce9f4515fb0b
treea8317db0f0e2f8465d02c9b712900fa05f9847e7
parent254f49634ee16a731174d2ae34bc50bd5f45e731
selftests: kselftest: fix wrong test number in ksft_exit_skip

ksft_exit_skip() increments ksft_xskip before printing the KTAP
result. As a result, ksft_test_num() already includes the skipped
test.

Adding 1 to ksft_test_num() increments the printed test number
again, producing an incorrect test number and wrong KTAP output.

Drop the extra increment and print ksft_test_num() directly.

Link: https://lore.kernel.org/r/20260427112447.147985-1-sarthak.sharma@arm.com
Fixes: b85d387c9b09 ("kselftest: fix TAP output for skipped tests")
Signed-off-by: Sarthak Sharma <sarthak.sharma@arm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest.h