[PATCH] D149004: [compiler-rt] [test] [builtins] Set __COMPAT_LAYER=RunAsInvoker when running tests
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 22 12:11:30 PDT 2023
mstorsjo created this revision.
mstorsjo added reviewers: alvinhochun, vitalybuka.
Herald added subscribers: Enna1, dberris.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Set __COMPAT_LAYER=RunAsInvoker to avoid the error
"[WinError 740] The requested operation requires elevation";
heuristics can flag "trampoline_setup_test" as an executable that
may need to be run with elevated privileges.
This is the same fix as D137772 <https://reviews.llvm.org/D137772> and D148988 <https://reviews.llvm.org/D148988>, but applied on another
set of tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149004
Files:
compiler-rt/test/builtins/Unit/lit.cfg.py
Index: compiler-rt/test/builtins/Unit/lit.cfg.py
===================================================================
--- compiler-rt/test/builtins/Unit/lit.cfg.py
+++ compiler-rt/test/builtins/Unit/lit.cfg.py
@@ -128,3 +128,12 @@
builtins_source_feature_duplicates)
)
config.available_features.update(builtins_source_features)
+
+# Avoid Windows heuristics which try to detect potential installer programs
+# (which may need to run with elevated privileges) and ask if the user wants
+# to run them in that way. This heuristic may match for executables containing
+# the word "update", e.g. `TestCases/asan_update_allocation.cpp`. Set an
+# environment variable indicating that we want to execute them with the current
+# user.
+if config.host_os == 'Windows':
+ config.environment['__COMPAT_LAYER'] = 'RunAsInvoker'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149004.516095.patch
Type: text/x-patch
Size: 829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230422/2883757b/attachment.bin>
More information about the llvm-commits
mailing list