All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] Fix landlock06 test
@ 2024-08-13  8:11 Andreas Schwab
  2024-08-13  8:19 ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2024-08-13  8:11 UTC (permalink / raw)
  To: ltp

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."

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-13 11:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-13  8:11 [LTP] [PATCH] Fix landlock06 test Andreas Schwab
2024-08-13  8:19 ` Andrea Cervesato via ltp
2024-08-13  8:47   ` Andreas Schwab
2024-08-13  8:53     ` Andrea Cervesato via ltp
2024-08-13  9:09       ` Andreas Schwab
2024-08-13 11:27         ` Andrea Cervesato via ltp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.