[LTP] [PATCH] Fix landlock06 test
Andreas Schwab
schwab@suse.de
Tue Aug 13 10:11:20 CEST 2024
Initialize the flag variable, so that FIOASYNC does not spuriously fail
with ENOTTY (/dev/zero has no support for FASYNC).
Signed-off-by: Andreas Schwab <schwab@suse.de>
---
testcases/kernel/syscalls/landlock/landlock06.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/landlock/landlock06.c b/testcases/kernel/syscalls/landlock/landlock06.c
index 4dc1f532a..1a6e59241 100644
--- a/testcases/kernel/syscalls/landlock/landlock06.c
+++ b/testcases/kernel/syscalls/landlock/landlock06.c
@@ -28,7 +28,7 @@ static void run(void)
if (SAFE_FORK())
return;
- int flag;
+ int flag = 0;
size_t sz = 0;
TST_EXP_PASS(ioctl(file_fd, FIONREAD, &sz));
--
2.46.0
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the ltp
mailing list