aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/memfd
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2020-03-13 16:12:52 -0700
committerShuah Khan <skhan@linuxfoundation.org>2020-03-26 15:27:52 -0600
commitc31801da6e3d7ef6115a0b5af1816a8f7ab120c2 (patch)
treeade4d820e11857fc1149f9f8c8f13d0289646af5 /tools/testing/selftests/memfd
parentselftests/harness: Move test child waiting logic (diff)
downloadlinux-dev-c31801da6e3d7ef6115a0b5af1816a8f7ab120c2.tar.xz
linux-dev-c31801da6e3d7ef6115a0b5af1816a8f7ab120c2.zip
selftests/harness: Handle timeouts cleanly
When a selftest would timeout before, the program would just fall over and no accounting of failures would be reported (i.e. it would result in an incomplete TAP report). Instead, add an explicit SIGALRM handler to cleanly catch and report the timeout. Before: [==========] Running 2 tests from 2 test cases. [ RUN ] timeout.finish [ OK ] timeout.finish [ RUN ] timeout.too_long Alarm clock After: [==========] Running 2 tests from 2 test cases. [ RUN ] timeout.finish [ OK ] timeout.finish [ RUN ] timeout.too_long timeout.too_long: Test terminated by timeout [ FAIL ] timeout.too_long [==========] 1 / 2 tests passed. [ FAILED ] Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/memfd')
0 files changed, 0 insertions, 0 deletions