[compiler-rt] f1cf091 - [compiler-rt][test] Added `env` command to fix NSAN_OPTIONS command not found error (#106676)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 09:33:07 PDT 2024


Author: Harini0924
Date: 2024-08-30T09:33:02-07:00
New Revision: f1cf09104eddbbe81c75e112a85c4f8dc14d5035

URL: https://github.com/llvm/llvm-project/commit/f1cf09104eddbbe81c75e112a85c4f8dc14d5035
DIFF: https://github.com/llvm/llvm-project/commit/f1cf09104eddbbe81c75e112a85c4f8dc14d5035.diff

LOG: [compiler-rt][test] Added `env` command to fix NSAN_OPTIONS command not found error (#106676)

Resolved the issue where `'NSAN_OPTIONS=check_nan=true,halt_on_error=0'`
was not recognized as a command. Changed the test command to set the
environment variable correctly using `env`.
fixes: #106598

Added: 
    

Modified: 
    compiler-rt/test/nsan/vec_sqrt.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/nsan/vec_sqrt.cpp b/compiler-rt/test/nsan/vec_sqrt.cpp
index d1ef0487858506..64a7130322873c 100644
--- a/compiler-rt/test/nsan/vec_sqrt.cpp
+++ b/compiler-rt/test/nsan/vec_sqrt.cpp
@@ -1,7 +1,7 @@
 // RUN: %clangxx_nsan -O0 -g -mavx %s -o %t
-// RUN: NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
+// RUN: env NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_nsan -O3 -g -mavx %s -o %t
-// RUN: NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
+// RUN: env NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
 
 #include <cmath>
 #include <immintrin.h>
@@ -31,4 +31,4 @@ int main() {
     // CHECK: WARNING: NumericalStabilitySanitizer: NaN detected
   }
   return 0;
-}
\ No newline at end of file
+}


        


More information about the llvm-commits mailing list