[clang] [compiler-rt] [llvm] [tsan] Add simulation to TSAN (PR #183200)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 23 23:02:40 PST 2026


================
@@ -0,0 +1,47 @@
+// RUN: %clangxx_tsan -O1 %s -o %t
+// RUN: %env_tsan_opts=atexit_sleep_ms=0:abort_on_error=0:simulate_scheduler=random:simulate_iterations=10:simulate_probability=0.5 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PROB50
----------------
vitalybuka wrote:

The flag is simulate_schedule_probability (int 0..100), not simulate_probability (float); this test is currently passing an unrecognized flag.
```suggestion
// RUN: %env_tsan_opts=atexit_sleep_ms=0:abort_on_error=0:simulate_scheduler=random:simulate_iterations=10:simulate_schedule_probability=50 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PROB50
```

https://github.com/llvm/llvm-project/pull/183200


More information about the cfe-commits mailing list