Commit 5a5c5a3d authored by Petr Mladek's avatar Petr Mladek Committed by Paul E. McKenney
Browse files

lib: Make the ratelimit test more reliable



The selftest fails most of the times when running in qemu with
a kernel configured with CONFIG_HZ = 250:

>  test_ratelimit_smoke: 1 callbacks suppressed
>  # test_ratelimit_smoke: ASSERTION FAILED at lib/tests/test_ratelimit.c:28
>                    Expected ___ratelimit(&testrl, "test_ratelimit_smoke") == (false), but
>                        ___ratelimit(&testrl, "test_ratelimit_smoke") == 1 (0x1)
>                        (false) == 0 (0x0)

Try to make the test slightly more reliable by calling the problematic
ratelimit in the middle of the interval.

Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent d19e9fa6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment