Skip to content

[Sanitizer] XFAIL android test because env var is not read #142234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

ellishg
Copy link
Contributor

@ellishg ellishg commented May 30, 2025

I attempted to fix android tests in #142207 (broken by #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.

@llvmbot
Copy link
Member

llvmbot commented May 30, 2025

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

Author: Ellis Hoag (ellishg)

Changes

I attempted to fix android tests in #142207 (broken by #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 --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>

@fmayer
Copy link
Contributor

fmayer commented May 30, 2025

I think you want to update build_env in android_run.py to include your variables?

@ellishg
Copy link
Contributor Author

ellishg commented May 30, 2025

Thanks! Hopefully #142235 will fix

@ellishg ellishg closed this May 30, 2025
ellishg added a commit that referenced this pull request May 31, 2025
I attempted to fix android tests in
#142207 (broken by
#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.
(#142234 (comment))
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request May 31, 2025
I attempted to fix android tests in
llvm/llvm-project#142207 (broken by
llvm/llvm-project#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.
(llvm/llvm-project#142234 (comment))
DhruvSrivastavaX pushed a commit to DhruvSrivastavaX/lldb-for-aix that referenced this pull request Jun 12, 2025
I attempted to fix android tests in
llvm#142207 (broken by
llvm#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.
(llvm#142234 (comment))
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.

3 participants