[compiler-rt] [NFC][asan] Try to deflake asan_lsan_deadlock test (PR #137718)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 14:50:54 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Vitaly Buka (vitalybuka)
<details>
<summary>Changes</summary>
10s looks not enough. With highly parallel test
execution on VMs it's very possible that Asan
report will have no enough time to produce output.
I can reproduce locally 1s is not always enough,
but likely my workstation is faster then buildbot.
Additionally, don't use puts/CHECK to validate
timeout. We can exit with 0 and it should violate
"not" expectation.
---
Full diff: https://github.com/llvm/llvm-project/pull/137718.diff
1 Files Affected:
- (modified) compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp (+2-5)
``````````diff
diff --git a/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp b/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
index 7ca07edbaf18c..7c2dbf27da3d4 100644
--- a/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
+++ b/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
@@ -36,11 +36,8 @@
void Watchdog() {
// Safety mechanism: Turn infinite deadlock into finite test failure
- usleep(10000000);
- // CHECK-NOT: Timeout! Deadlock detected.
- puts("Timeout! Deadlock detected.");
- fflush(stdout);
- _exit(1);
+ sleep(60);
+ _exit(0);
}
int main(int argc, char **argv) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/137718
More information about the llvm-commits
mailing list