[LTP] [PATCH v2] madvise11: Allow test to skip if MADV_SOFT_OFFLINE is not supported

Edward Liaw edliaw@google.com
Tue Nov 7 19:41:12 CET 2023


madvise11 will exit with TFAIL if CONFIG_MEMORY_FAILURE is not
configured.  Require it to be set instead.

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Edward Liaw <edliaw@google.com>
---
 testcases/kernel/syscalls/madvise/madvise11.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/kernel/syscalls/madvise/madvise11.c b/testcases/kernel/syscalls/madvise/madvise11.c
index 74caadc44..7a12abf20 100644
--- a/testcases/kernel/syscalls/madvise/madvise11.c
+++ b/testcases/kernel/syscalls/madvise/madvise11.c
@@ -426,6 +426,10 @@ static struct tst_test test = {
 		"rmmod",
 		NULL
 	},
+	.needs_kconfigs = (const char *[]) {
+		"CONFIG_MEMORY_FAILURE=y",
+		NULL
+	},
 	.max_runtime = 30,
 	.needs_checkpoints = 1,
 	.setup = setup,
-- 
2.42.0.869.gea05f2083d-goog



More information about the ltp mailing list