From 29350f1bd53d65148531d8a8e8b4a746e541abe1 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Sat, 5 Dec 2026 03:53:09 -0500 Subject: [PATCH] Fail the spill test when its readers do not go quiet before the measurement --- tools/tests/test_zram_spill_preload.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/tests/test_zram_spill_preload.py b/tools/tests/test_zram_spill_preload.py index cdab52ced1..7deab8d601 100644 --- a/tools/tests/test_zram_spill_preload.py +++ b/tools/tests/test_zram_spill_preload.py @@ -171,6 +171,13 @@ int main(int argc, char **argv) { if (undumpable) { shared->quiet = 1; for (int waited = 0; __atomic_load_n(&shared->quieted, __ATOMIC_ACQUIRE) < THREADS && waited < 5000; waited += 1) nap(1); + if (__atomic_load_n(&shared->quieted, __ATOMIC_ACQUIRE) < THREADS) { + // a reader still scanning would fault pages back in before the resident set is measured + shared->stop = 1; + kill(child, SIGKILL); + waitpid(child, NULL, 0); + return 5; + } } put(".hold", "4 0"); kill(child, SIGURG);