Skip to contentSkip to conversation

syscalls/fsmount02: fix invalid-flags test failure on Linux 7.1+

PATCH Applied Avinesh Kumar via ltp 3 participants 5 messages Apr 30 – May 6

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscalls/fsmount02: fix invalid-flags test failure on Linux 7.1+

Upstream Linux commit 5e8969bd1927 ("mount: add FSMOUNT_NAMESPACE") [1] introduced the FSMOUNT_NAMESPACE flag, which maps to 0x02. This causes fsmount02 test failure as 0x02 value is no longer invalid.

fsmount02.c:56: TFAIL: invalid-flags: fsmount() succeeded unexpectedly (index: 1)

Use 0x80000000 as invalid flag value to adapt test for this upstream change.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e8969bd1927

---
 testcases/kernel/syscalls/fsmount/fsmount02.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/fsmount/fsmount02.c +1 -1
index 55f0e2f28..934d775ab 100644
@@ -19,7 +19,7 @@ static struct tcase {
 	int exp_errno;
 } tcases[] = {
 	{"invalid-fd", &invalid_fd, FSMOUNT_CLOEXEC, 0, EBADF},
-	{"invalid-flags", &fd, 0x02, 0, EINVAL},
+	{"invalid-flags", &fd, 0x80000000, 0, EINVAL},
 	{"invalid-attrs", &fd, FSMOUNT_CLOEXEC, 0x100, EINVAL},
 };
 
Signature · 5 lines
2.54.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Avinesh Kumar via ltp

Upstream Linux commit 5e8969bd1927 ("mount: add FSMOUNT_NAMESPACE") [1] introduced the FSMOUNT_NAMESPACE flag, which maps to 0x02. This causes fsmount02 test failure as 0x02 value is no longer invalid.

fsmount02.c:56: TFAIL: invalid-flags: fsmount() succeeded unexpectedly (index: 1)

Use 0x80000000 as invalid flag value to adapt test for this upstream change.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e8969bd1927

Good catch.

Signature · 5 lines
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by LTP AI Reviewer on v1 1/1
#2 lore raw
In reply to Avinesh Kumar via ltp

Hi Avinesh,

testcases/kernel/syscalls/fsmount/fsmount02.c static struct tcase { · line 22

Quoted 4 lines · Avinesh Kumar

syscalls/fsmount02: fix invalid-flags test failure on Linux 7.1+

testcases/kernel/syscalls/fsmount/fsmount02.c +1 -1
-       {"invalid-flags", &fd, 0x02, 0, EINVAL},
+       {"invalid-flags", &fd, 0x80000000, 0, EINVAL},

---
Note:

Our agent completed the review of the patch.

The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp