diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-05-08 13:35:07 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-05-08 20:51:14 +1000 |
commit | 27c9736e27c1545be195bf9477aab54b40311e14 (patch) | |
tree | 5339a5f174824c02310b745aaa6db0838d176ae8 /test | |
parent | 8dcd71b3951bdd105c5782fbb319b5456ca70db8 (diff) |
test: disable coredumps during test suite runs
Running valgrind through mesontest produces coredumps for a lot of tests
(unclear why, the core dump merely shows a call to abort). But even without
mesontest, creating a core dump for each failed test is a bad idea - if one
fails, most likely many others fail and the coredumps quickly fill up the file
system.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r-- | test/litest.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/litest.c b/test/litest.c index 9eadc45..a7449a4 100644 --- a/test/litest.c +++ b/test/litest.c @@ -39,6 +39,7 @@ #include <unistd.h> #include "linux/input.h" #include <sys/ptrace.h> +#include <sys/resource.h> #include <sys/sendfile.h> #include <sys/timerfd.h> #include <sys/wait.h> @@ -3581,6 +3582,7 @@ litest_list_tests(struct list *tests) int main(int argc, char **argv) { + const struct rlimit corelimit = { 0, 0 }; enum litest_mode mode; list_init(&all_tests); @@ -3619,6 +3621,9 @@ main(int argc, char **argv) return EXIT_SUCCESS; } + if (setrlimit(RLIMIT_CORE, &corelimit) != 0) + perror("WARNING: Core dumps not disabled. Reason"); + return litest_run(argc, argv); } #endif |