[LTP] [PATCH v2 4/4] readahead02: reset timeout based the IO test elapsed
Li Wang
liwang@redhat.com
Thu Jan 9 10:03:40 CET 2025
Note: Patch 4/4 need to be rewirten.
If go with Li Wang's .runtime thought, just ignore this patch should be ok.
If go with Cryil's suggestion, need changes to:
--- a/testcases/kernel/syscalls/readahead/readahead02.c
+++ b/testcases/kernel/syscalls/readahead/readahead02.c
@@ -318,19 +318,6 @@ static void test_readahead(unsigned int n)
tst_res(TCONF, "Page cache on your system is too small "
"to hold whole testfile.");
}
-
- /*
- * The time consuming of readahead quite depending on the platform
IO
- * speed, sometime test timeout when the default runtime is used up.
- *
- * readahead02.c:221: TINFO: Test #2: POSIX_FADV_WILLNEED on file
- * readahead02.c:285: TINFO: read_testfile(0) took: 26317623 usec
- * readahead02.c:286: TINFO: read_testfile(1) took: 26101484 usec
- *
- * Here raise the maximum runtime dynamically.
- */
- if ((tc+1)->readahead)
- tst_set_runtime(test.runtime + (usec + usec_ra) / 1000000);
}
@@ -422,7 +409,7 @@ static struct tst_test test = {
},
.test = test_readahead,
.tcnt = ARRAY_SIZE(tcases),
- .runtime = 30,
+ .timeout = 60, // or another value measured on slow HW
.tags = (const struct tst_tag[]) {
{"linux-git", "b833a3660394"},
{"linux-git", "5b910bd615ba"},
--
Regards,
Li Wang
More information about the ltp
mailing list