[LTP] [PATCH 2/3] madvise11: Fix lockdown check

Martin Doucha
2023-09-22T07:42:59Z

testcases/kernel/syscalls/madvise/madvise11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/madvise/madvise11.c b/testcases/kernel/syscalls/madvise/madvise11.c
index 4c960dd35..3cde85ef5 100644
--- a/testcases/kernel/syscalls/madvise/madvise11.c
+++ b/testcases/kernel/syscalls/madvise/madvise11.c
@@ -325,7 +325,7 @@ static int open_unpoison_pfn(void)

TEST(open(debugfs_fp, O_WRONLY));

- if (TST_RET == -1 && TST_ERR == EPERM && tst_lockdown_enabled()) {
+ if (TST_RET == -1 && TST_ERR == EPERM && tst_lockdown_enabled() > 0) {
tst_res(TINFO,
"Cannot restore soft-offlined memory due to lockdown");
return TST_RET;