syscalls/fsmount02: fix invalid-flags test failure on Linux 7.1+
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
@@ -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
Quoted 10 lines · Avinesh Kumar via ltp
Upstream Linux commit
5e8969bd1927("mount: addFSMOUNT_NAMESPACE") [1] introduced theFSMOUNT_NAMESPACEflag, which maps to0x02. This causes fsmount02 test failure as0x02value is no longer invalid.fsmount02.c:56: TFAIL: invalid-flags:
fsmount()succeeded unexpectedly (index: 1)Use
0x80000000as 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
Signed-off-by Avinesh Kumar <[email protected]>
Good catch.
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/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
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea Cervesato via ltp
AppliedMerged, Thanks!
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp