[LTP] [PATCH v2 4/4] readahead02: reset timeout based the IO test elapsed

Li Wang liwang@redhat.com
Thu Jan 9 05:55:32 CET 2025


Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/syscalls/readahead/readahead02.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c
index de4eb406c..850866c28 100644
--- a/testcases/kernel/syscalls/readahead/readahead02.c
+++ b/testcases/kernel/syscalls/readahead/readahead02.c
@@ -321,16 +321,16 @@ static void test_readahead(unsigned int n)
 
 	/*
 	 * The time consuming of readahead quite depending on the platform IO
-	 * speed, sometime test timeout when the default runtime is used up.
+	 * speed, sometime test timed out when the default timeout 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.
+	 * Here extend the entire timeout dynamically.
 	 */
 	if ((tc+1)->readahead)
-		tst_set_runtime(test.runtime + (usec + usec_ra) / 1000000);
+		tst_set_timeout(test.timeout + (usec + usec_ra) / 1000000);
 }
 
 
@@ -422,7 +422,7 @@ static struct tst_test test = {
 	},
 	.test = test_readahead,
 	.tcnt = ARRAY_SIZE(tcases),
-	.runtime = 30,
+	.timeout = 30,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "b833a3660394"},
 		{"linux-git", "5b910bd615ba"},
-- 
2.47.1



More information about the ltp mailing list