Skip to content

Conversation

@boomanaiden154
Copy link
Contributor

There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

@llvmbot
Copy link
Member

llvmbot commented Oct 26, 2025

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

Author: Aiden Grossman (boomanaiden154)

Changes

There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.


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

1 Files Affected:

  • (modified) compiler-rt/test/nsan/Posix/allocator_mapping.cpp (+2-1)
diff --git a/compiler-rt/test/nsan/Posix/allocator_mapping.cpp b/compiler-rt/test/nsan/Posix/allocator_mapping.cpp
index 3a3e655e259d0..a92962e16d9d2 100644
--- a/compiler-rt/test/nsan/Posix/allocator_mapping.cpp
+++ b/compiler-rt/test/nsan/Posix/allocator_mapping.cpp
@@ -2,7 +2,8 @@
 /// Test that a module constructor can not map memory over the NSan heap
 /// (without MAP_FIXED, of course).
 // RUN: %clangxx_nsan -O0 %s -o %t_1
-// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=$(%run %t_1) %s -o %t_2 && %run %t_2
+// RUN: %run %t_1 > %t.heap_address
+// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=%{readfile:%t.heap_address} %s -o %t_2 && %run %t_2
 
 #include <assert.h>
 #include <stdio.h>

boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 26, 2025
There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

Pull Request: llvm#165142
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 30, 2025
There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

Pull Request: llvm#165142
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 30, 2025
There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

Pull Request: llvm#165142
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 30, 2025
There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

Pull Request: llvm#165142
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
@boomanaiden154 boomanaiden154 changed the base branch from users/boomanaiden154/main.nsan-make-tests-work-with-internal-shell to main October 30, 2025 19:28
@boomanaiden154 boomanaiden154 merged commit d2c5e49 into main Oct 30, 2025
10 of 12 checks passed
@boomanaiden154 boomanaiden154 deleted the users/boomanaiden154/nsan-make-tests-work-with-internal-shell branch October 30, 2025 19:29
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 30, 2025
There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

Reviewers: alexander-shaposhnikov, fmayer

Reviewed By: alexander-shaposhnikov, fmayer

Pull Request: llvm/llvm-project#165142
luciechoi pushed a commit to luciechoi/llvm-project that referenced this pull request Nov 1, 2025
There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

Reviewers: alexander-shaposhnikov, fmayer

Reviewed By: alexander-shaposhnikov, fmayer

Pull Request: llvm#165142
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

Reviewers: alexander-shaposhnikov, fmayer

Reviewed By: alexander-shaposhnikov, fmayer

Pull Request: llvm#165142
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.

5 participants