================ @@ -212,15 +209,14 @@ TEST_F(MainLoopTest, PendingCallbackTrigger) { ASSERT_TRUE(callback2_called); } -// Regression test for assertion failure if a lot of callbacks end up -// being queued after loop exits. -TEST_F(MainLoopTest, PendingCallbackAfterLoopExited) { +TEST_F(MainLoopTest, ManyPendingCallbacks) { MainLoop loop; Status error; - ASSERT_TRUE(loop.Run().Success()); - // Try to fill the pipe buffer in. + // Try to fill up the pipe buffer and make sure bad things don't happen. ---------------- labath wrote:
I'll expand on that a bit. I had to refactor the test as it was no longer possible to run in in this way. Although it was testing very a specific scenario (adding callbacks after the loop has exited, the overall problem was wider). The original implementation was writing one character to the pipe for each interrupt/callback, which meant that you could fill up the pipe (and block) if noone was draining it. That could happen because the loop was busy doing something, not just because it has exited. https://github.com/llvm/llvm-project/pull/112565 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits