[compiler-rt] [compiler-rt][test] Added `env` command to fix NSAN_OPTIONS command not found error (PR #106676)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 23:58:52 PDT 2024
https://github.com/Harini0924 created https://github.com/llvm/llvm-project/pull/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
>From 68352ba5a664543d943875a0eed81162cba01b65 Mon Sep 17 00:00:00 2001
From: Harini <harinidonthula at google.com>
Date: Fri, 30 Aug 2024 06:53:44 +0000
Subject: [PATCH] Added env command to environment not found error
---
compiler-rt/test/nsan/vec_sqrt.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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