APPLIED: [SRU][E][PATCH 0/2] kselftest: properly use timeout
Kelsey Skunberg
kelsey.skunberg at canonical.com
Fri Apr 17 17:38:06 UTC 2020
On 2020-04-10 12:55:16 , Andrea Righi wrote:
> BugLink: https://bugs.launchpad.net/bugs/1872047
>
> [Impact]
>
> While running seccomp_bpf, kill_after_ptrace() gets stuck if we run it
> via /usr/bin/timeout (that is the default), until the timeout expires.
>
> This is because /usr/bin/timeout is preventing to properly deliver
> signals to ptrace'd children (SIGSYS in this case).
>
> [Test case]
>
> This problem can be easily reproduced by running:
>
> $ sudo make TARGETS=seccomp kselftest
> ...
>
> # [ RUN ] TRACE_syscall.skip_a#
> not ok 1 selftests: seccomp: seccomp_bpf # TIMEOUT
>
> The test is hanging at this point until the timeout expires and then it
> reports the timeout error.
>
> [Fix]
>
> This problem can be prevented by passing --foreground to
> /usr/bin/timeout, allowing to properly deliver signals to children
> processes.
>
> In addition to that make sure to use /usr/bin/timeout only when it's
> needed (this is addressed by PATCH 2/2): when timeout is set to 0 (no
> timeout) via the file 'settings', simply run the test without using
> /usr/bin/timeout.
>
> [Regression potential]
>
> These two fixes are not upsteam (not yet), but they are trivial and they
> are affecting only the selftest infrastructure, so regression potential
> is minimal.
>
> ----------------------------------------------------------------
> Andrea Righi (2):
> UBUNTU: SAUCE: kselftest/runner: avoid using timeout if timeout is disabled
> UBUNTU: SAUCE: kselftest/runner: allow to properly deliver signals to tests
>
> tools/testing/selftests/kselftest/runner.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
Applied to Eoan/master-next. Thank you!
-Kelsey
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list