Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kcsan: remove rng selftest

The first test of the kcsan selftest appears to test if get_random_u32()
returns two zeros in a row, and requires that it doesn't. This seems
like a bogus criteron. Remove it.

Acked-by: Marco Elver <elver@google.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

-8
-8
kernel/kcsan/selftest.c
··· 22 22 23 23 #define ITERS_PER_TEST 2000 24 24 25 - /* Test requirements. */ 26 - static bool __init test_requires(void) 27 - { 28 - /* random should be initialized for the below tests */ 29 - return get_random_u32() + get_random_u32() != 0; 30 - } 31 - 32 25 /* 33 26 * Test watchpoint encode and decode: check that encoding some access's info, 34 27 * and then subsequent decode preserves the access's info. ··· 252 259 pr_err("selftest: " #do_test " failed"); \ 253 260 } while (0) 254 261 255 - RUN_TEST(test_requires); 256 262 RUN_TEST(test_encode_decode); 257 263 RUN_TEST(test_matching_access); 258 264 RUN_TEST(test_barrier);