[llvm] 19b4e3c - [ORC] Call ExecutionSession::endSession in unit tests.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 14:49:12 PDT 2021


Author: Lang Hames
Date: 2021-10-12T14:27:39-07:00
New Revision: 19b4e3cfc6a19e35c20171caab802f44d36bede9

URL: https://github.com/llvm/llvm-project/commit/19b4e3cfc6a19e35c20171caab802f44d36bede9
DIFF: https://github.com/llvm/llvm-project/commit/19b4e3cfc6a19e35c20171caab802f44d36bede9.diff

LOG: [ORC] Call ExecutionSession::endSession in unit tests.

2815ed57e3c added calls from ExecutorProcessControl::disconnect implementations
to shut down the TaskDispatcher. We still need to call endSession to trigger
disconnection though. This commit adds the necessary calls to the failing unit
tests.

https://llvm.org/PR52153

Added: 
    

Modified: 
    llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp
index ab9489d8fc00..81a9d547f2ba 100644
--- a/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp
@@ -43,6 +43,7 @@ TEST(ExecutionSessionWrapperFunctionCalls, RunWrapperTemplate) {
                         ExecutorAddr::fromPtr(addWrapper), Result, 2, 3),
                     Succeeded());
   EXPECT_EQ(Result, 5);
+  cantFail(ES.endSession());
 }
 
 TEST(ExecutionSessionWrapperFunctionCalls, RunVoidWrapperAsyncTemplate) {
@@ -55,6 +56,7 @@ TEST(ExecutionSessionWrapperFunctionCalls, RunVoidWrapperAsyncTemplate) {
                                  });
   Error Err = RP.get_future().get();
   EXPECT_THAT_ERROR(std::move(Err), Succeeded());
+  cantFail(ES.endSession());
 }
 
 TEST(ExecutionSessionWrapperFunctionCalls, RunNonVoidWrapperAsyncTemplate) {
@@ -71,6 +73,7 @@ TEST(ExecutionSessionWrapperFunctionCalls, RunNonVoidWrapperAsyncTemplate) {
       2, 3);
   Expected<int32_t> Result = RP.get_future().get();
   EXPECT_THAT_EXPECTED(Result, HasValue(5));
+  cantFail(ES.endSession());
 }
 
 TEST(ExecutionSessionWrapperFunctionCalls, RegisterAsyncHandlerAndRun) {


        


More information about the llvm-commits mailing list