diff options
author | Thomas Weißschuh <[email protected]> | 2023-05-26 09:51:20 +0200 |
---|---|---|
committer | Paul E. McKenney <[email protected]> | 2023-06-09 11:46:09 -0700 |
commit | 9a75575b81b5639f7ca82c9701fb199401fd6471 (patch) | |
tree | 7f1c9e1e07f33198c326376c1aacecee1ce537ce | |
parent | 208aa9d94c1181d8dff8e60d681e3b6cf0b37fae (diff) |
selftests/nolibc: prevent coredumps during test execution
The child process forked during stackprotector tests intentionally gets
killed with SIGABRT. By default this will trigger writing a coredump.
The writing of the coredump can spam the systems coredump machinery and
take some time.
Timings for the full run of nolibc-test:
Before: 200ms
After: 20ms
This is on a desktop x86 system with systemd-coredumpd enabled.
Signed-off-by: Thomas Weißschuh <[email protected]>
Signed-off-by: Willy Tarreau <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
-rw-r--r-- | tools/testing/selftests/nolibc/nolibc-test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 6db788603a34..84a1b02eb6f9 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -831,6 +831,7 @@ static int run_protection(int min, int max) close(STDOUT_FILENO); close(STDERR_FILENO); + prctl(PR_SET_DUMPABLE, 0, 0, 0, 0); smash_stack(); return 1; |