[compiler-rt] [compiler-rt][test] Rewrote test to remove curly braces (PR #105696)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 10:20:41 PDT 2024


================
@@ -1,7 +1,7 @@
 // RUN: %clangxx_asan -xc++ -shared -fPIC -o %t.so - < %s
 // RUN: %clang_asan %s -o %t.out -ldl
 //
-// RUN: { env ASAN_OPTIONS=verbosity=1 %t.out %t.so || : ; } 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=verbosity=1 %t.out %t.so 2>&1 | FileCheck %s || : 
----------------
ilovepi wrote:

I don't think these are equivalent, and we probably don't want to change the return code for `FileCheck`, since we still want CHECK lines to trigger a failure. It seems that this program will always return a non-zero exit code, so maybe we can just use `not` instead of `|| :`? Alternatively, we could make the program return `0`, but I'm guessing the author were worried about some optimization preventing the test from working correctly, and I'm not familar enough w/ this test to know if that would be problematic.



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


More information about the llvm-commits mailing list