[compiler-rt] [Sanitizer] XFAIL android test because env var is not read (PR #142234)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 30 16:06:34 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

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

Author: Ellis Hoag (ellishg)

<details>
<summary>Changes</summary>

I attempted to fix android tests in https://github.com/llvm/llvm-project/pull/142207 (broken by https://github.com/llvm/llvm-project/pull/141820). They are still failing but now I have more info.

https://lab.llvm.org/buildbot/#/builders/186/builds/9504/steps/16/logs/stdio

> ERROR: Can't open file: //foo.8862 (reason: 30)

I believe the reason is that on android the `HOME` and `TMPDIR` environment variables are not being set correctly, or they are not read correctly. I will follow up with more investigation and hopefully a fix, but for now lets xfail this test for android to fix the bots.

Also remove an extra `%env` left in a related test.

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


2 Files Affected:

- (modified) compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_fail.cpp (+2-2) 
- (modified) compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_test.cpp (+3) 


``````````diff
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_fail.cpp b/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_fail.cpp
index 782cd0218fd22..af5187a0d3265 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_fail.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_fail.cpp
@@ -1,10 +1,10 @@
 // RUN: %clangxx -O2 %s -o %t
 
 // Case 1: Try setting a path that is an invalid/inaccessible directory.
-// RUN: not %env %run %t 2>&1 | FileCheck %s --check-prefix=ERROR1
+// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=ERROR1
 
 // Case 2: Try setting a path that is too large.
-// RUN: not %env %run %t A 2>&1 | FileCheck %s --check-prefix=ERROR2
+// RUN: not %run %t A 2>&1 | FileCheck %s --check-prefix=ERROR2
 
 #include <sanitizer/common_interface_defs.h>
 #include <stdio.h>
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_test.cpp b/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_test.cpp
index 8abd476708b4c..d83081ea607b6 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_test.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_test.cpp
@@ -2,6 +2,9 @@
 // RUN: %clangxx -O2 %s -o %t
 // RUN: %env HOME=%t.homedir TMPDIR=%t.tmpdir %run %t 2>&1 | FileCheck %s
 
+// FIXME: Environment variables are no propagated or not properly read on android.
+// XFAIL: android
+
 #include <sanitizer/common_interface_defs.h>
 #include <stdio.h>
 #include <string.h>

``````````

</details>


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


More information about the llvm-commits mailing list