[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:46:43 PDT 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
miyuki marked an inline comment as done.
Closed by commit rG07b7a24e3fe8: [unittests] Preserve LD_LIBRARY_PATH in crash recovery test (authored by miyuki).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88308/new/
https://reviews.llvm.org/D88308
Files:
llvm/unittests/Support/CrashRecoveryTest.cpp
Index: llvm/unittests/Support/CrashRecoveryTest.cpp
===================================================================
--- llvm/unittests/Support/CrashRecoveryTest.cpp
+++ llvm/unittests/Support/CrashRecoveryTest.cpp
@@ -170,12 +170,12 @@
Executable, "--gtest_filter=CrashRecoveryTest.UnixCRCReturnCode"};
// Add LLVM_CRC_UNIXCRCRETURNCODE to the environment of the child process.
- std::vector<StringRef> EnvTable;
- EnvTable.push_back("LLVM_CRC_UNIXCRCRETURNCODE=1");
+ int Res = setenv("LLVM_CRC_UNIXCRCRETURNCODE", "1", 0);
+ ASSERT_EQ(Res, 0);
std::string Error;
bool ExecutionFailed;
- int RetCode = ExecuteAndWait(Executable, argv, makeArrayRef(EnvTable), {}, 0, 0, &Error,
+ int RetCode = ExecuteAndWait(Executable, argv, {}, {}, 0, 0, &Error,
&ExecutionFailed);
ASSERT_EQ(-2, RetCode);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88308.294735.patch
Type: text/x-patch
Size: 860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200928/7be10d07/attachment.bin>
More information about the llvm-commits
mailing list