[llvm] [utils/not] Disable coredumps when --crash is passed (PR #83704)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 2 19:39:06 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-testing-tools
Author: Alexander Richardson (arichardson)
<details>
<summary>Changes</summary>
We are expecting a crash, so it is unlikely that a coredump is going to
be particularly useful. For debugging the program can always be run without
the `not --crash` wrapper.
---
Full diff: https://github.com/llvm/llvm-project/pull/83704.diff
1 Files Affected:
- (modified) llvm/utils/not/not.cpp (+4)
``````````diff
diff --git a/llvm/utils/not/not.cpp b/llvm/utils/not/not.cpp
index 4fcc0e89fc4023..1504ee87a3606c 100644
--- a/llvm/utils/not/not.cpp
+++ b/llvm/utils/not/not.cpp
@@ -12,6 +12,7 @@
// Will return true if cmd crashes (e.g. for testing crash reporting).
#include "llvm/Support/Program.h"
+#include "llvm/Support/Process.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
@@ -41,6 +42,9 @@ int main(int argc, const char **argv) {
setenv("LLVM_DISABLE_CRASH_REPORT", "1", 0);
setenv("LLVM_DISABLE_SYMBOLIZATION", "1", 0);
#endif
+ // Try to disable coredumps for expected crashes as well since this can
+ // noticeably slow down running the test suite.
+ sys::Process::PreventCoreFiles();
}
if (argc == 0)
``````````
</details>
https://github.com/llvm/llvm-project/pull/83704
More information about the llvm-commits
mailing list