mbox series

[v3,0/6] Update clone3 self-tests

Message ID cover.1568224280.git.esyr@redhat.com (mailing list archive)
Headers show
Series Update clone3 self-tests | expand

Message

Eugene Syromiatnikov Sept. 11, 2019, 6:01 p.m. UTC
Hello.

This patch set updates clone3 selftest in several aspects:
 - adding checks for exit_signal invalid values handling;
 - adding clone3 to selftests targets;
 - enabling clone3 tests on all architectures;
 - minor cleanups of the clone3 test.

This respin alignes additional clone3 self-tests with v3 of the
exit_signal checking patch[1].

Applied on top of brauer/linux.git/for-next.

Changes since v2[2]:
 - CLONE3_ARGS_INVAL_EXIT_SIGNAL_NSIG check is now expected to fail.

Changes since v1[3]:
 - exit_signal check extended to cover more cases of invalid
   exit_signal value.

[1] https://lkml.org/lkml/2019/9/11/677
[2] https://lkml.org/lkml/2019/9/10/768
[3] https://lkml.org/lkml/2019/9/10/416

Eugene Syromiatnikov (6):
  selftests/clone3: convert test modes into an enum
  selftests/clone3: add a check for invalid exit_signal
  selftests/clone3: use uint64_t for flags parameter
  selftests/clone3: fix up format strings
  selftests/clone3: enable clone3 self-tests on all architectures
  selftests: add clone3 to TARGETS

 tools/testing/selftests/Makefile        |  1 +
 tools/testing/selftests/clone3/Makefile |  4 +--
 tools/testing/selftests/clone3/clone3.c | 64 ++++++++++++++++++++++++++++-----
 3 files changed, 57 insertions(+), 12 deletions(-)

Comments

Anders Roxell Sept. 16, 2019, 11:39 a.m. UTC | #1
On Wed, 11 Sep 2019 at 20:02, Eugene Syromiatnikov <esyr@redhat.com> wrote:
>
> Hello.
>
> This patch set updates clone3 selftest in several aspects:
>  - adding checks for exit_signal invalid values handling;
>  - adding clone3 to selftests targets;
>  - enabling clone3 tests on all architectures;
>  - minor cleanups of the clone3 test.
>
> This respin alignes additional clone3 self-tests with v3 of the
> exit_signal checking patch[1].
>
> Applied on top of brauer/linux.git/for-next.
>
> Changes since v2[2]:
>  - CLONE3_ARGS_INVAL_EXIT_SIGNAL_NSIG check is now expected to fail.
>
> Changes since v1[3]:
>  - exit_signal check extended to cover more cases of invalid
>    exit_signal value.
>
> [1] https://lkml.org/lkml/2019/9/11/677
> [2] https://lkml.org/lkml/2019/9/10/768
> [3] https://lkml.org/lkml/2019/9/10/416
>
> Eugene Syromiatnikov (6):
>   selftests/clone3: convert test modes into an enum
>   selftests/clone3: add a check for invalid exit_signal
>   selftests/clone3: use uint64_t for flags parameter
>   selftests/clone3: fix up format strings
>   selftests/clone3: enable clone3 self-tests on all architectures
>   selftests: add clone3 to TARGETS

I wasn't able to build this patchset for arm64, I applied it on tag
next-20190904:

$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -skj$(getconf
_NPROCESSORS_ONLN) headers_install
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -skj$(getconf
_NPROCESSORS_ONLN) -C tools/testing/selftests/clone3

clone3_set_tid.c: In function ‘raw_clone’:
clone3_set_tid.c:22:17: error: ‘__NR_clone3’ undeclared (first use in
this function); did you mean ‘raw_clone’?
  return syscall(__NR_clone3, args, sizeof(struct clone_args));
                 ^~~~~~~~~~~
                 raw_clone
clone3_set_tid.c:22:17: note: each undeclared identifier is reported
only once for each function it appears in
make: *** [../lib.mk:138:
/srv/src/kernel/kselftest-testing/tools/testing/selftests/clone3/clone3_set_tid]
Error 1
clone3.c: In function ‘raw_clone’:
clone3.c:41:17: error: ‘__NR_clone3’ undeclared (first use in this
function); did you mean ‘raw_clone’?
  return syscall(__NR_clone3, args, size);
                 ^~~~~~~~~~~
                 raw_clone
clone3.c:41:17: note: each undeclared identifier is reported only once
for each function it appears in
make: *** [../lib.mk:138:
/srv/src/kernel/kselftest-testing/tools/testing/selftests/clone3/clone3]
Error 1
make: Target 'all' not remade because of errors.


Any idea what I'm doing wrong?

Cheers,
Anders

>
>  tools/testing/selftests/Makefile        |  1 +
>  tools/testing/selftests/clone3/Makefile |  4 +--
>  tools/testing/selftests/clone3/clone3.c | 64 ++++++++++++++++++++++++++++-----
>  3 files changed, 57 insertions(+), 12 deletions(-)
>
> --
> 2.1.4
>
Christian Brauner Sept. 16, 2019, 11:42 a.m. UTC | #2
On Wed, Sep 11, 2019 at 07:01:54PM +0100, Eugene Syromiatnikov wrote:
> Hello.
> 
> This patch set updates clone3 selftest in several aspects:
>  - adding checks for exit_signal invalid values handling;
>  - adding clone3 to selftests targets;
>  - enabling clone3 tests on all architectures;
>  - minor cleanups of the clone3 test.
> 
> This respin alignes additional clone3 self-tests with v3 of the
> exit_signal checking patch[1].
> 
> Applied on top of brauer/linux.git/for-next.

Just base it on v5.3. That should be easier for everyone. :)

Christian