[LTP] [PATCH v2 11/30] syscalls/inotify06: Convert to runtime.
Cyril Hrubis
chrubis@suse.cz
Tue May 3 19:46:59 CEST 2022
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/syscalls/inotify/inotify06.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/inotify/inotify06.c b/testcases/kernel/syscalls/inotify/inotify06.c
index 68813769b..10b5de0bc 100644
--- a/testcases/kernel/syscalls/inotify/inotify06.c
+++ b/testcases/kernel/syscalls/inotify/inotify06.c
@@ -87,6 +87,11 @@ static void verify_inotify(void)
myinotify_add_watch(inotify_fd, names[i], IN_MODIFY);
}
SAFE_CLOSE(inotify_fd);
+
+ if (!tst_remaining_runtime()) {
+ tst_res(TINFO, "Test out of runtime, exitting");
+ break;
+ }
}
/* We survived for given time - test succeeded */
tst_res(TPASS, "kernel survived inotify beating");
@@ -108,7 +113,7 @@ static void cleanup(void)
}
static struct tst_test test = {
- .timeout = 600,
+ .max_iteration_runtime = 600,
.needs_root = 1,
.needs_tmpdir = 1,
.forks_child = 1,
--
2.35.1
More information about the ltp
mailing list