selftests: Make test_harness.h more generally available
Subsystems (2)
PATCH 1/1 selftests: Make test_harness.h more generally available
The seccomp/test_harness.h file contains useful helpers to build tests. Moving it to the selftest directory should benefit to other test components.
---
tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +-
tools/testing/selftests/{seccomp => }/test_harness.h | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename tools/testing/selftests/{seccomp => }/test_harness.h (100%)tools/testing/selftests/seccomp/seccomp_bpf.c +1 -1
@@ -37,7 +37,7 @@#include <unistd.h> #include <sys/syscall.h> -#include "test_harness.h" +#include "../test_harness.h" #ifndef PR_SET_PTRACER # define PR_SET_PTRACER 0x59616d61
tools/testing/selftests/test_harness.h renamed from tools/testing/selftests/seccomp/test_harness.h +0 -0
Signature · 1 line
2.11.0
Quoted 3 lines · Mickaël Salaün
The
seccomp/test_harness.hfile contains useful helpers to build tests. Moving it to the selftest directory should benefit to other test components.
Unless Shuah thinks this should live in a new include/ directory, this looks fine to me.
Thanks!
-Kees
Quoted 33 lines
Signed-off-by Mickaël Salaün <[email protected]>Cc Andy Lutomirski <[email protected]>Cc Kees Cook <[email protected]>Cc Shuah Khan <[email protected]>Cc Will Drewry <[email protected]>--- tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- tools/testing/selftests/{seccomp => }/test_harness.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tools/testing/selftests/{seccomp => }/test_harness.h (100%)tools/testing/selftests/seccomp/seccomp_bpf.c +1
-1@@ -37,7 +37,7 @@#include <unistd.h> #include <sys/syscall.h> -#include "test_harness.h" +#include "../test_harness.h" #ifndef PR_SET_PTRACER # define PR_SET_PTRACER 0x59616d61tools/testing/selftests/test_harness.h renamed from tools/testing/selftests/seccomp/test_harness.h +0
-1--2.11.0
Signature · 2 lines
Kees Cook Pixel Security
Quoted 10 lines · Kees Cook
Quoted 3 lines · Mickaël Salaün
The
seccomp/test_harness.hfile contains useful helpers to build tests. Moving it to the selftest directory should benefit to other test components.Unless Shuah thinks this should live in a new
include/directory, this looks fine to me.Acked-by Kees Cook <[email protected]>
Same here!
Quoted 44 lines
Thanks!
-Kees
Quoted 31 lines
Signed-off-by Mickaël Salaün <[email protected]>Cc Andy Lutomirski <[email protected]>Cc Kees Cook <[email protected]>Cc Shuah Khan <[email protected]>Cc Will Drewry <[email protected]>--- tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- tools/testing/selftests/{seccomp => }/test_harness.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tools/testing/selftests/{seccomp => }/test_harness.h (100%)tools/testing/selftests/seccomp/seccomp_bpf.c +1
-1@@ -37,7 +37,7 @@#include <unistd.h> #include <sys/syscall.h> -#include "test_harness.h" +#include "../test_harness.h" #ifndef PR_SET_PTRACER # define PR_SET_PTRACER 0x59616d61tools/testing/selftests/test_harness.h renamed from tools/testing/selftests/seccomp/test_harness.h +0
-1--Quoted 2 lines
2.11.0
--
Kees Cook
Pixel Security
Maybe an update on the MAINTAINERS file could help for future reviews?
MAINTAINERS +1 -0
@@ -11254,6 +11254,7 @@ F: kernel/seccomp.c F: include/uapi/linux/seccomp.h F: include/linux/seccomp.h F: tools/testing/selftests/seccomp/* +F: tools/testing/selftests/test_harness.h K: \bsecure_computing K: \bTIF_SECCOMP\b
Quoted 61 lines · Will Drewry
Quoted 10 lines · Kees Cook
Quoted 3 lines · Mickaël Salaün
The
seccomp/test_harness.hfile contains useful helpers to build tests. Moving it to the selftest directory should benefit to other test components.Unless Shuah thinks this should live in a new
include/directory, this looks fine to me.Acked-by Kees Cook <[email protected]>Same here!
Acked-by Will Drewry <[email protected]>Quoted 44 lines
Thanks!
-Kees
Quoted 31 lines
Signed-off-by Mickaël Salaün <[email protected]>Cc Andy Lutomirski <[email protected]>Cc Kees Cook <[email protected]>Cc Shuah Khan <[email protected]>Cc Will Drewry <[email protected]>--- tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- tools/testing/selftests/{seccomp => }/test_harness.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tools/testing/selftests/{seccomp => }/test_harness.h (100%)tools/testing/selftests/seccomp/seccomp_bpf.c +1
-1@@ -37,7 +37,7 @@#include <unistd.h> #include <sys/syscall.h> -#include "test_harness.h" +#include "../test_harness.h" #ifndef PR_SET_PTRACER # define PR_SET_PTRACER 0x59616d61tools/testing/selftests/test_harness.h renamed from tools/testing/selftests/seccomp/test_harness.h +0
-1--Quoted 2 lines
2.11.0
--
Kees Cook
Pixel Security
Shuah Khan
maintainerQuoted 7 lines · Will Drewry
Quoted 6 lines · Kees Cook
Quoted 3 lines · Mickaël Salaün
The
seccomp/test_harness.hfile contains useful helpers to build tests. Moving it to the selftest directory should benefit to other test components.
Quoted 10 lines
Quoted 4 lines
Unless Shuah thinks this should live in a new
include/directory, this looks fine to me.Acked-by Kees Cook <[email protected]>Same here!
Acked-by Will Drewry <[email protected]>Quoted 1 line
I think the location fine. It will be a good idea to write documentation on how to use this harness. I would recommend rename the file to kselftest_harness.h and a doc file kselftest_harness.txt which will go into Documentation directory.
thanks,
- Shuah