Skip to contentSkip to conversation

lib-make-the-ratelimit-test-more-reliable.patch removed from -mm tree

merged Andrew Morton 1 participant 1 message Jul 11, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: lib: make the ratelimit test more reliable
has been removed from the -mm tree. Its filename was
lib-make-the-ratelimit-test-more-reliable.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Petr Mladek <[email protected]>
Subject: lib: make the ratelimit test more reliable
Date: Wed, 9 Jul 2025 11:03:34 -0700

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

Quoted 5 lines

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.

Cc Bjorn Helgaas <[email protected]>
Cc John Ogness <[email protected]>
Cc Jon Pan-Doh <[email protected]>
Cc Karolina Stolarek <[email protected]>
Cc Kuniyuki Iwashima <[email protected]>
Cc Mateusz Guzik <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Steven Rostedt <[email protected]>

---

 lib/tests/test_ratelimit.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
lib/tests/test_ratelimit.c renamed from lib/tests/test_ratelimit.c~lib-make-the-ratelimit-test-more-reliable +4 -4
@@ -24,19 +24,19 @@ static void test_ratelimit_smoke(struct
 	test_ratelimited(test, true);
 	test_ratelimited(test, false);
 
-	schedule_timeout_idle(TESTRL_INTERVAL - 40);
+	schedule_timeout_idle(TESTRL_INTERVAL / 2);
 	test_ratelimited(test, false);
 
-	schedule_timeout_idle(50);
+	schedule_timeout_idle(TESTRL_INTERVAL * 3 / 4);
 	test_ratelimited(test, true);
 
 	schedule_timeout_idle(2 * TESTRL_INTERVAL);
 	test_ratelimited(test, true);
 	test_ratelimited(test, true);
 
-	schedule_timeout_idle(TESTRL_INTERVAL - 40);
+	schedule_timeout_idle(TESTRL_INTERVAL / 2 );
 	test_ratelimited(test, true);
-	schedule_timeout_idle(50);
+	schedule_timeout_idle(TESTRL_INTERVAL * 3 / 4);
 	test_ratelimited(test, true);
 	test_ratelimited(test, true);
 	test_ratelimited(test, true);

_

Patches currently in -mm which might be from [email protected] are