Skip to content

Commit 2c0a442

Browse files
t-8chKAGA-KOKO
authored andcommitted
selftests: vDSO: chacha: Correctly skip test if necessary
According to kselftest.h ksft_exit_skip() is not meant to be called when a plan has already been printed. Use the recommended function ksft_test_result_skip(). This fixes a bug, where the TAP output would be invalid when skipping: TAP version 13 1..1 ok 2 # SKIP Not implemented on architecture The SKIP line should start with "ok 1" as the plan only contains one test. Fixes: 3b5992e ("selftests: vDSO: unconditionally build chacha test") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-1-e62e37a6bcf5@linutronix.de
1 parent d0b3b7b commit 2c0a442

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/testing/selftests/vDSO/vdso_test_chacha.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ static void reference_chacha20_blocks(uint8_t *dst_bytes, const uint32_t *key, u
7676

7777
void __weak __arch_chacha20_blocks_nostack(uint8_t *dst_bytes, const uint32_t *key, uint32_t *counter, size_t nblocks)
7878
{
79-
ksft_exit_skip("Not implemented on architecture\n");
79+
ksft_test_result_skip("Not implemented on architecture\n");
80+
ksft_finished();
8081
}
8182

8283
int main(int argc, char *argv[])

0 commit comments

Comments
 (0)