Commit 9a75575b authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Paul E. McKenney
Browse files

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: default avatarThomas Weißschuh <linux@weissschuh.net>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 208aa9d9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;