[compiler-rt] 79da1c4 - [Sanitizer] Use %device_rundir/ to fix test (#142274)

via llvm-commits llvm-commits at lists.llvm.org
Sat May 31 07:33:14 PDT 2025


Author: Ellis Hoag
Date: 2025-05-31T07:33:11-07:00
New Revision: 79da1c405dc1b7a6692689b30dd2afa166a17961

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

LOG: [Sanitizer] Use %device_rundir/ to fix test (#142274)

I attempted to fix this test in
https://github.com/llvm/llvm-project/pull/142235 but we a new error.


https://lab.llvm.org/buildbot/#/builders/186/builds/9524/steps/26/logs/stdio
> ERROR: Can't create directory: /var

The path we want is actually at `/data/local/tmp/Output/var/...`.

I found `%device_rundir/` evaluates to this prefix on android, and
nothing otherwise.


https://github.com/llvm/llvm-project/blob/f057a593a7151437edd25cfbbdcf450139346f12/compiler-rt/test/lit.common.cfg.py#L658

Added: 
    

Modified: 
    compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_test.cpp

Removed: 
    


################################################################################
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..cebe19afb1bd8 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
@@ -1,6 +1,6 @@
 // Test __sanitizer_set_report_path and __sanitizer_get_report_path:
 // RUN: %clangxx -O2 %s -o %t
-// RUN: %env HOME=%t.homedir TMPDIR=%t.tmpdir %run %t 2>&1 | FileCheck %s
+// RUN: %env HOME=%device_rundir/%t.homedir TMPDIR=%device_rundir/%t.tmpdir %run %t 2>&1 | FileCheck %s
 
 #include <sanitizer/common_interface_defs.h>
 #include <stdio.h>


        


More information about the llvm-commits mailing list