diff mbox series

Fix landlock06 test

Message ID mvm7cckdeqf.fsf@suse.de
State Accepted
Headers show
Series Fix landlock06 test | expand

Commit Message

Andreas Schwab Aug. 13, 2024, 8:11 a.m. UTC
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(-)

Comments

Andreas Schwab Aug. 13, 2024, 8:47 a.m. UTC | #1
On Aug 13 2024, Andrea Cervesato wrote:

> Do you have a validation test (for example in openQA) for this patch?

I don't understand this question.  Please expand.
Andrea Cervesato Aug. 13, 2024, 8:53 a.m. UTC | #2
We had some testing failures in openSUSE TW which can be reproduced 
publicly in openQA, both for Jeos and x86_64:

https://openqa.opensuse.org/tests/4394255#step/landlock06/7
https://openqa.opensuse.org/tests/4398508#step/landlock06/7

My question was if you tested it locally, or you have a link to a public 
testing for different platforms. I can eventually trigger them otherwise.

On 8/13/24 10:47, Andreas Schwab wrote:
> On Aug 13 2024, Andrea Cervesato wrote:
>
>> Do you have a validation test (for example in openQA) for this patch?
> I don't understand this question.  Please expand.
>
Andreas Schwab Aug. 13, 2024, 9:09 a.m. UTC | #3
On Aug 13 2024, Andrea Cervesato wrote:

> My question was if you tested it locally,

Yes, I did.
Andrea Cervesato Aug. 13, 2024, 11:27 a.m. UTC | #4
The patch works well in Tumbleweed: 
https://openqa.opensuse.org/tests/4401154#step/landlock06/8

I will push the fix in the upstream.

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>


Thank you,
Andrea

On 8/13/24 11:09, Andreas Schwab wrote:
> On Aug 13 2024, Andrea Cervesato wrote:
>
>> My question was if you tested it locally,
> Yes, I did.
>
diff mbox series

Patch

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));