* [PATCH v1] selftests: Make test_harness.h more generally available
@ 2017-04-30 12:26 Mickaël Salaün
2017-04-30 17:39 ` Kees Cook
0 siblings, 1 reply; 5+ messages in thread
From: Mickaël Salaün @ 2017-04-30 12:26 UTC (permalink / raw)
To: linux-kernel
Cc: Mickaël Salaün, Andy Lutomirski, Kees Cook, Shuah Khan,
Will Drewry, linux-kselftest
The seccomp/test_harness.h file contains useful helpers to build tests.
Moving it to the selftest directory should benefit to other test
components.
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Will Drewry <wad@chromium.org>
Link: https://lkml.kernel.org/r/CAGXu5j+8CVz8vL51DRYXqOY=xc3zuKFf=PTENe88XYHzFYidUQ@mail.gmail.com
---
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%)
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 03f1fa495d74..d7095ff58e72 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -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
diff --git a/tools/testing/selftests/seccomp/test_harness.h b/tools/testing/selftests/test_harness.h
similarity index 100%
rename from tools/testing/selftests/seccomp/test_harness.h
rename to tools/testing/selftests/test_harness.h
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] selftests: Make test_harness.h more generally available
2017-04-30 12:26 [PATCH v1] selftests: Make test_harness.h more generally available Mickaël Salaün
@ 2017-04-30 17:39 ` Kees Cook
2017-04-30 18:22 ` Will Drewry
0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2017-04-30 17:39 UTC (permalink / raw)
To: Mickaël Salaün, Shuah Khan
Cc: LKML, Andy Lutomirski, Will Drewry, linux-kselftest
On Sun, Apr 30, 2017 at 5:26 AM, Mickaël Salaün <mic@digikod.net> wrote:
> The seccomp/test_harness.h file 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 <keescook@chromium.org>
Thanks!
-Kees
>
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
> Cc: Andy Lutomirski <luto@amacapital.net>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Will Drewry <wad@chromium.org>
> Link: https://lkml.kernel.org/r/CAGXu5j+8CVz8vL51DRYXqOY=xc3zuKFf=PTENe88XYHzFYidUQ@mail.gmail.com
> ---
> 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%)
>
> diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
> index 03f1fa495d74..d7095ff58e72 100644
> --- a/tools/testing/selftests/seccomp/seccomp_bpf.c
> +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
> @@ -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
> diff --git a/tools/testing/selftests/seccomp/test_harness.h b/tools/testing/selftests/test_harness.h
> similarity index 100%
> rename from tools/testing/selftests/seccomp/test_harness.h
> rename to tools/testing/selftests/test_harness.h
> --
> 2.11.0
>
--
Kees Cook
Pixel Security
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] selftests: Make test_harness.h more generally available
2017-04-30 17:39 ` Kees Cook
@ 2017-04-30 18:22 ` Will Drewry
2017-05-01 15:11 ` Mickaël Salaün
2017-05-01 19:23 ` Shuah Khan
0 siblings, 2 replies; 5+ messages in thread
From: Will Drewry @ 2017-04-30 18:22 UTC (permalink / raw)
To: Kees Cook
Cc: Mickaël Salaün, Shuah Khan, LKML, Andy Lutomirski,
linux-kselftest
On Sun, Apr 30, 2017 at 12:39 PM, Kees Cook <keescook@chromium.org> wrote:
>
> On Sun, Apr 30, 2017 at 5:26 AM, Mickaël Salaün <mic@digikod.net> wrote:
> > The seccomp/test_harness.h file 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 <keescook@chromium.org>
Same here!
Acked-by: Will Drewry <wad@chromium.org>
>
> Thanks!
>
> -Kees
>
> >
> > Signed-off-by: Mickaël Salaün <mic@digikod.net>
> > Cc: Andy Lutomirski <luto@amacapital.net>
> > Cc: Kees Cook <keescook@chromium.org>
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: Will Drewry <wad@chromium.org>
> > Link: https://lkml.kernel.org/r/CAGXu5j+8CVz8vL51DRYXqOY=xc3zuKFf=PTENe88XYHzFYidUQ@mail.gmail.com
> > ---
> > 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%)
> >
> > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
> > index 03f1fa495d74..d7095ff58e72 100644
> > --- a/tools/testing/selftests/seccomp/seccomp_bpf.c
> > +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
> > @@ -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
> > diff --git a/tools/testing/selftests/seccomp/test_harness.h b/tools/testing/selftests/test_harness.h
> > similarity index 100%
> > rename from tools/testing/selftests/seccomp/test_harness.h
> > rename to tools/testing/selftests/test_harness.h
> > --
> > 2.11.0
> >
>
>
>
> --
> Kees Cook
> Pixel Security
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] selftests: Make test_harness.h more generally available
2017-04-30 18:22 ` Will Drewry
@ 2017-05-01 15:11 ` Mickaël Salaün
2017-05-01 19:23 ` Shuah Khan
1 sibling, 0 replies; 5+ messages in thread
From: Mickaël Salaün @ 2017-05-01 15:11 UTC (permalink / raw)
To: Will Drewry, Kees Cook; +Cc: Shuah Khan, LKML, Andy Lutomirski, linux-kselftest
[-- Attachment #1.1: Type: text/plain, Size: 2521 bytes --]
Maybe an update on the MAINTAINERS file could help for future reviews?
diff --git a/MAINTAINERS b/MAINTAINERS
index c265a5fe4848..0361364afb50 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -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
On 30/04/2017 20:22, Will Drewry wrote:
> On Sun, Apr 30, 2017 at 12:39 PM, Kees Cook <keescook@chromium.org> wrote:
>>
>> On Sun, Apr 30, 2017 at 5:26 AM, Mickaël Salaün <mic@digikod.net> wrote:
>>> The seccomp/test_harness.h file 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 <keescook@chromium.org>
>
> Same here!
>
> Acked-by: Will Drewry <wad@chromium.org>
>
>>
>> Thanks!
>>
>> -Kees
>>
>>>
>>> Signed-off-by: Mickaël Salaün <mic@digikod.net>
>>> Cc: Andy Lutomirski <luto@amacapital.net>
>>> Cc: Kees Cook <keescook@chromium.org>
>>> Cc: Shuah Khan <shuah@kernel.org>
>>> Cc: Will Drewry <wad@chromium.org>
>>> Link: https://lkml.kernel.org/r/CAGXu5j+8CVz8vL51DRYXqOY=xc3zuKFf=PTENe88XYHzFYidUQ@mail.gmail.com
>>> ---
>>> 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%)
>>>
>>> diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
>>> index 03f1fa495d74..d7095ff58e72 100644
>>> --- a/tools/testing/selftests/seccomp/seccomp_bpf.c
>>> +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
>>> @@ -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
>>> diff --git a/tools/testing/selftests/seccomp/test_harness.h b/tools/testing/selftests/test_harness.h
>>> similarity index 100%
>>> rename from tools/testing/selftests/seccomp/test_harness.h
>>> rename to tools/testing/selftests/test_harness.h
>>> --
>>> 2.11.0
>>>
>>
>>
>>
>> --
>> Kees Cook
>> Pixel Security
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] selftests: Make test_harness.h more generally available
2017-04-30 18:22 ` Will Drewry
2017-05-01 15:11 ` Mickaël Salaün
@ 2017-05-01 19:23 ` Shuah Khan
1 sibling, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2017-05-01 19:23 UTC (permalink / raw)
To: Will Drewry, Kees Cook
Cc: Mickaël Salaün, LKML, Andy Lutomirski, linux-kselftest,
Shuah Khan
On 04/30/2017 12:22 PM, Will Drewry wrote:
> On Sun, Apr 30, 2017 at 12:39 PM, Kees Cook <keescook@chromium.org> wrote:
>>
>> On Sun, Apr 30, 2017 at 5:26 AM, Mickaël Salaün <mic@digikod.net> wrote:
>>> The seccomp/test_harness.h file 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 <keescook@chromium.org>
>
> Same here!
>
> Acked-by: Will Drewry <wad@chromium.org>
>
>>
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-01 19:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-30 12:26 [PATCH v1] selftests: Make test_harness.h more generally available Mickaël Salaün
2017-04-30 17:39 ` Kees Cook
2017-04-30 18:22 ` Will Drewry
2017-05-01 15:11 ` Mickaël Salaün
2017-05-01 19:23 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).