This is an archive of the discontinued LLVM Phabricator instance.

[openmp] [test] Set __COMPAT_LAYER=RunAsInvoker when running tests on Windows
ClosedPublic

Authored by mstorsjo on Nov 10 2022, 1:46 AM.

Details

Summary

Windows heuristics may decide to want to run some tested processes
as elevated (since it may think some of them are installers - executables
with "dispatch" in the name may hit a heuristic looking for "patch").

Set this environment variable to disable this heuristic and just run
the executable with whatever privileges the caller has.

This fixes a couple tests on such versions of Windows where this
heuristic is active.

Diff Detail

Event Timeline

mstorsjo created this revision.Nov 10 2022, 1:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2022, 1:46 AM
mstorsjo requested review of this revision.Nov 10 2022, 1:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2022, 1:46 AM
Herald added a subscriber: sstefan1. · View Herald Transcript

since it may think some of them are installers - executables with "dispatch" in the name may hit a heuristic looking for "patch"

Wow, didn't know, but other sources confirm it.

openmp/runtime/test/lit.cfg
111–112

Could you add a comment on what this does?

I did not know about this, but found https://devblogs.microsoft.com/oldnewthing/20161117-00/?p=94735

mstorsjo updated this revision to Diff 476243.Nov 17 2022, 2:37 PM

Rebased, added a comment.

This revision is now accepted and ready to land.Nov 28 2022, 8:24 AM