[PATCH] D88308: [unittests] Preserve LD_LIBRARY_PATH in crash recovery test
Mikhail Maltsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 09:37:52 PDT 2020
miyuki marked an inline comment as done.
miyuki added inline comments.
================
Comment at: llvm/unittests/Support/CrashRecoveryTest.cpp:185
bool ExecutionFailed;
int RetCode = ExecuteAndWait(Executable, argv, makeArrayRef(EnvTable), {}, 0, 0, &Error,
&ExecutionFailed);
----------------
aganea wrote:
> MaskRay wrote:
> > Perhaps ExecuteAndWait should have a mode to append environment variables. In the absence of that feature,
> >
> > llvm/utils/not/not.cpp
> >
> > ```
> > #ifdef _WIN32
> > SetEnvironmentVariableA("...);
> > #else
> > setenv(...);
> > #endif
> > ```
> Agreed. In that case @miyuki would this work?
> Replacing:
> ```
> std::vector<StringRef> EnvTable;
> EnvTable.push_back("LLVM_CRC_UNIXCRCRETURNCODE=1");
> ```
> by:
> ```
> setenv("LLVM_CRC_UNIXCRCRETURNCODE", "1", 0);
> ```
Yes, this works in our environment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88308/new/
https://reviews.llvm.org/D88308
More information about the llvm-commits
mailing list