Skip to content

Conversation

@Harini0924
Copy link
Contributor

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

@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: None (Harini0924)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/106676.diff

1 Files Affected:

  • (modified) compiler-rt/test/nsan/vec_sqrt.cpp (+3-3)
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
+}

@Harini0924 Harini0924 merged commit f1cf091 into llvm:main Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[llvm-lit] Environment variable not found in compiler-rt subproject with lit internal shell

3 participants