[LTP] [PATCH] Fix landlock06 test
Andrea Cervesato
andrea.cervesato@suse.com
Tue Aug 13 10:19:18 CEST 2024
Hi Andreas,
thank you for this patch. I was just about to debug the test and to find
a solution :-)
Do you have a validation test (for example in openQA) for this patch?
On 8/13/24 10:11, Andreas Schwab wrote:
> 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));
Andrea
More information about the ltp
mailing list