Skip to content

Commit

Permalink
Fix landlock06 test
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
  • Loading branch information
andreas-schwab authored and acerv committed Aug 13, 2024
1 parent 87a8b54 commit a67dc56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/landlock/landlock06.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit a67dc56

Please sign in to comment.