[LTP] [COMMITTED][PATCH 1/1] madvise06: Fix segfault

Petr Vorel pvorel@suse.cz
Fri Mar 11 15:45:09 CET 2022


Test required update after 687f0cbc00 to use struct tst_path_val.

Fixes: 687f0cbc00 ("lib: enhance .save_restore to support set expected value")

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/syscalls/madvise/madvise06.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/madvise/madvise06.c b/testcases/kernel/syscalls/madvise/madvise06.c
index 54391db283..6d218801cd 100644
--- a/testcases/kernel/syscalls/madvise/madvise06.c
+++ b/testcases/kernel/syscalls/madvise/madvise06.c
@@ -229,9 +229,9 @@ static struct tst_test test = {
 	.min_kver = "3.10.0",
 	.needs_tmpdir = 1,
 	.needs_root = 1,
-	.save_restore = (const char * const[]) {
-		"?/proc/sys/vm/swappiness",
-		NULL
+	.save_restore = (const struct tst_path_val[]) {
+		{"?/proc/sys/vm/swappiness", NULL},
+		{}
 	},
 	.needs_cgroup_ctrls = (const char *const []){ "memory", NULL },
 	.tags = (const struct tst_tag[]) {
-- 
2.35.1



More information about the ltp mailing list