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);