[llvm-branch-commits] [MemProf] Make Test work with Internal Shell (PR #165146)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Oct 26 01:31:06 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-pgo

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

There is one test that uses a subshell to generate a long path name.
Replace it with a python invocation and a readfile substitution. This
helps move compiler-rt over to lit's internal shell.


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


1 Files Affected:

- (modified) compiler-rt/test/memprof/TestCases/log_path_test.cpp (+2-1) 


``````````diff
diff --git a/compiler-rt/test/memprof/TestCases/log_path_test.cpp b/compiler-rt/test/memprof/TestCases/log_path_test.cpp
index 664ab79393195..683ca67122c31 100644
--- a/compiler-rt/test/memprof/TestCases/log_path_test.cpp
+++ b/compiler-rt/test/memprof/TestCases/log_path_test.cpp
@@ -18,7 +18,8 @@
 // RUN: %env_memprof_opts=print_text=true:log_path=/dev/null/INVALID not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-BAD-DIR --dump-input=always
 
 // Too long log_path.
-// RUN: %env_memprof_opts=print_text=true:log_path=`for((i=0;i<10000;i++)); do echo -n $i; done` \
+// RUN: %python -c "for i in range(0, 10000): print(i, end='')" > %t.long_log_path
+// RUN: %env_memprof_opts=print_text=true:log_path=%{readfile:%t.long_log_path} \
 // RUN:   not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LONG --dump-input=always
 
 // Specifying the log name via the __memprof_profile_filename variable.

``````````

</details>


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


More information about the llvm-branch-commits mailing list