Move prctl04 in seccomp testing suite
PATCH 1/1 Move prctl04 in seccomp testing suite
From: Andrea Cervesato <[email protected]>
prictl04 has been renamed as seccomp01 and a test variant has been added in order to support the seccomp() syscall, that is currently equivalent to prctl(PR_SET_SECCOMP).
---
This testing suite is aiming to test seccomp() syscall which is supposed to wrap prctl(PR_SET_SECCOMP). Some parts have been moved from prctl tesitng suite to a new seccomp testing suite and added a test variant.
---
runtest/syscalls | 3 +-
testcases/kernel/syscalls/prctl/.gitignore | 1 -
testcases/kernel/syscalls/seccomp/.gitignore | 1 +
testcases/kernel/syscalls/seccomp/Makefile | 7 ++
.../{prctl/prctl04.c => seccomp/seccomp01.c} | 79 +++++++++++++---------
5 files changed, 56 insertions(+), 35 deletions(-)runtest/syscalls +2 -1
@@ -1021,7 +1021,6 @@ ppoll01 ppoll01 prctl01 prctl01 prctl02 prctl02 prctl03 prctl03 -prctl04 prctl04 prctl05 prctl05 prctl06 prctl06 prctl07 prctl07
@@ -1239,6 +1238,8 @@ sched_setattr01 sched_setattr01 sched_getattr01 sched_getattr01 sched_getattr02 sched_getattr02 +seccomp01 seccomp01 + select01 select01 select02 select02 select03 select03
testcases/kernel/syscalls/prctl/.gitignore +0 -1
@@ -1,7 +1,6 @@ /prctl01 /prctl02 /prctl03 -/prctl04 /prctl05 /prctl06 /prctl06_execve
testcases/kernel/syscalls/seccomp/.gitignore new file +1 -0
@@ -0,0 +1 @@ +seccomp01
testcases/kernel/syscalls/seccomp/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2024 SUSE LLC Andrea Cervesato <[email protected]> + +top_srcdir ?= ../../../.. + +include $(top_srcdir)/include/mk/testcases.mk +include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/syscalls/seccomp/seccomp01.c renamed from testcases/kernel/syscalls/prctl/prctl04.c +46 -33
146 lines not on this page · raw message
---
base-commit: 66517b89141fc455ed807f3b95e5260dcf9fb90f
change-id: 20240603-seccomp-06f18e9551df
Best regards,
Signature · 5 lines
Andrea Cervesato <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Andrea,
Quoted 5 lines
From: Andrea Cervesato <[email protected]>
prictl04 has been renamed as seccomp01 and a test variant has been added in order to support the
seccomp()syscall, that is currently equivalent toprctl(PR_SET_SECCOMP).
It'd be nice to update test description, that __NR_seccomp is also used.
And print info what is being tested, based on tst_variant (see chmod/chmod01.c).
BTW the old test was broken on musl:
prctl04.c:212: TFAIL: SECCOMP_MODE_FILTER doesn't permit exit()
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Petr,
Quoted 9 lines · Petr Vorel
Hi Andrea,
Quoted 4 lines
From: Andrea Cervesato <[email protected]>
prictl04 has been renamed as seccomp01 and a test variant has been added in order to support theseccomp()syscall, that is currently equivalent toprctl(PR_SET_SECCOMP).Reviewed-by Petr Vorel <[email protected]>It'd be nice to update test description, that
__NR_seccompis also used.
That can be done easily
Quoted 2 lines
And print info what is being tested, based on
tst_variant(seechmod/chmod01.c).
Ok
Quoted 2 lines
BTW the old test was broken on musl:
prctl04.c:212: TFAIL:SECCOMP_MODE_FILTERdoesn't permitexit()
I don't know about this. Maybe it requires one more test. Is there are reason for that?
Quoted 3 lines
Kind regards,
Petr
Andrea
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Andrea,
Quoted 5 lines
Hi Petr,
Quoted 1 line · Petr Vorel
Hi Andrea,
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
From: Andrea Cervesato <[email protected]>
prictl04 has been renamed as seccomp01 and a test variant has been added in order to support theseccomp()syscall, that is currently equivalent toprctl(PR_SET_SECCOMP).Reviewed-by Petr Vorel <[email protected]>It'd be nice to update test description, that
__NR_seccompis also used.That can be done easily
Sure (this would not block merging if it were the only thing).
Quoted 2 lines
Quoted 1 line
And print info what is being tested, based on
tst_variant(seechmod/chmod01.c).Ok
I could even add this, if you don't have time to send new version (please Cc me with the new version or let me know if I should just modify the test).
Quoted 5 lines
Quoted 2 lines
BTW the old test was broken on musl:
prctl04.c:212: TFAIL:SECCOMP_MODE_FILTERdoesn't permitexit()I don't know about this. Maybe it requires one more test. Is there are reason for that?
That's kind of report that either musl has bug or it's a test bug when running on musl. We at SUSE does not care about musl, thus it's for somebody who actually cares.
Kind regards,
Petr
Quoted 4 lines
Quoted 2 lines
Kind regards,
PetrAndrea
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp