diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2023-05-26 09:51:20 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2023-06-09 20:46:09 +0200 |
commit | 9a75575b81b5639f7ca82c9701fb199401fd6471 (patch) | |
tree | 7f1c9e1e07f33198c326376c1aacecee1ce537ce /tools | |
parent | tools/nolibc: add support for prctl() (diff) | |
download | linux-9a75575b81b5639f7ca82c9701fb199401fd6471.tar.xz linux-9a75575b81b5639f7ca82c9701fb199401fd6471.zip |
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 <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools')
-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; |