-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[TSan] Make Test work with Internal Shell #165147
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
Merged
boomanaiden154
merged 8 commits into
main
from
users/boomanaiden154/tsan-make-test-work-with-internal-shell
Oct 30, 2025
Merged
[TSan] Make Test work with Internal Shell #165147
boomanaiden154
merged 8 commits into
main
from
users/boomanaiden154/tsan-make-test-work-with-internal-shell
Oct 30, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Created using spr 1.3.7 [skip ci]
Created using spr 1.3.7
Member
|
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Aiden Grossman (boomanaiden154) ChangesThis test was using subshells to setup LD_LIBRARY_PATH properly. Use a Full diff: https://github.com/llvm/llvm-project/pull/165147.diff 1 Files Affected:
diff --git a/compiler-rt/test/tsan/ignore_lib0.cpp b/compiler-rt/test/tsan/ignore_lib0.cpp
index cba58c6177038..bca4ea5e582aa 100644
--- a/compiler-rt/test/tsan/ignore_lib0.cpp
+++ b/compiler-rt/test/tsan/ignore_lib0.cpp
@@ -4,11 +4,13 @@
// RUN: %clangxx_tsan -O1 -fno-builtin %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib0.so
// RUN: %clangxx_tsan -O1 %s -L%t-dir -lignore_lib0 %link_libcxx_tsan -o %t
// RUN: echo running w/o suppressions:
-// RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP
+// RUN: echo -n %t-dir > %t.ld_library_path
+// RUN: python -c "if 'LD_LIBRARY_PATH' in __import__('os').environ: print(':' + __import__('os').environ['LD_LIBRARY_PATH'])" | tr -d '\n' >> %t.ld_library_path
+// RUN: env LD_LIBRARY_PATH=%{readfile:%t.ld_library_path} %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP
// RUN: echo running with suppressions:
-// RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
+// RUN: env LD_LIBRARY_PATH=%{readfile:%t.ld_library_path} %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
// RUN: echo running with generic suppression of noninstrumented code:
-// RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %env_tsan_opts=ignore_noninstrumented_modules=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
+// RUN: env LD_LIBRARY_PATH=%{readfile:%t.ld_library_path} %env_tsan_opts=ignore_noninstrumented_modules=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
// Tests that interceptors coming from a library specified in called_from_lib
// suppression are ignored.
|
boomanaiden154
added a commit
to boomanaiden154/llvm-project
that referenced
this pull request
Oct 26, 2025
This test was using subshells to setup LD_LIBRARY_PATH properly. Use a python script and readfile substitutions to preserve the same behavior. Pull Request: llvm#165147
thurstond
approved these changes
Oct 27, 2025
Created using spr 1.3.7 [skip ci]
Created using spr 1.3.7 [skip ci]
boomanaiden154
added a commit
to boomanaiden154/llvm-project
that referenced
this pull request
Oct 30, 2025
This test was using subshells to setup LD_LIBRARY_PATH properly. Use a python script and readfile substitutions to preserve the same behavior. Pull Request: llvm#165147
boomanaiden154
added a commit
to boomanaiden154/llvm-project
that referenced
this pull request
Oct 30, 2025
This test was using subshells to setup LD_LIBRARY_PATH properly. Use a python script and readfile substitutions to preserve the same behavior. Pull Request: llvm#165147
boomanaiden154
added a commit
to boomanaiden154/llvm-project
that referenced
this pull request
Oct 30, 2025
This test was using subshells to setup LD_LIBRARY_PATH properly. Use a python script and readfile substitutions to preserve the same behavior. Pull Request: llvm#165147
Created using spr 1.3.7 [skip ci]
llvm-sync bot
pushed a commit
to arm/arm-toolchain
that referenced
this pull request
Oct 30, 2025
This test was using subshells to setup LD_LIBRARY_PATH properly. Use a python script and readfile substitutions to preserve the same behavior. Reviewers: vitalybuka, fmayer, thurstond Reviewed By: thurstond Pull Request: llvm/llvm-project#165147
luciechoi
pushed a commit
to luciechoi/llvm-project
that referenced
this pull request
Nov 1, 2025
This test was using subshells to setup LD_LIBRARY_PATH properly. Use a python script and readfile substitutions to preserve the same behavior. Reviewers: vitalybuka, fmayer, thurstond Reviewed By: thurstond Pull Request: llvm#165147
DEBADRIBASAK
pushed a commit
to DEBADRIBASAK/llvm-project
that referenced
this pull request
Nov 3, 2025
This test was using subshells to setup LD_LIBRARY_PATH properly. Use a python script and readfile substitutions to preserve the same behavior. Reviewers: vitalybuka, fmayer, thurstond Reviewed By: thurstond Pull Request: llvm#165147
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This test was using subshells to setup LD_LIBRARY_PATH properly. Use a
python script and readfile substitutions to preserve the same behavior.