Index: test/functionalities/attach_resume/TestAttachResume.py =================================================================== --- test/functionalities/attach_resume/TestAttachResume.py +++ test/functionalities/attach_resume/TestAttachResume.py @@ -14,7 +14,6 @@ mydir = TestBase.compute_mydir(__file__) - @expectedFlakeyLinux('llvm.org/pr19310') @expectedFailureFreeBSD('llvm.org/pr19310') @skipIfRemote @dwarf_test @@ -23,7 +22,6 @@ self.buildDwarf() self.process_attach_continue_interrupt_detach() - @expectedFlakeyLinux('llvm.org/pr19478') # intermittent ~2/14 runs @skipIfRemote def process_attach_continue_interrupt_detach(self): """Test attach/continue/interrupt/detach""" @@ -81,12 +79,11 @@ self.assertTrue(wait_for_state(lldb.eStateStopped), 'Process not stopped after breakpoint') - # This test runs a bunch of threads in the same little function with this - # breakpoint. We want to make sure the breakpoint got hit at least once, - # but more than one thread may hit it at a time. So we really only care - # that is isn't 0 times, not how many times it is. self.expect('br list', 'Breakpoint not hit', - patterns = ['hit count = [1-9]']) + substrs = ['hit count = 1']) + + # Make sure the breakpoint is not hit again. + self.expect("expr debugger_flag = false", substrs=[" = false"]); self.runCmd("c") self.assertTrue(wait_for_state(lldb.eStateRunning), Index: test/functionalities/attach_resume/main.cpp =================================================================== --- test/functionalities/attach_resume/main.cpp +++ test/functionalities/attach_resume/main.cpp @@ -8,15 +8,17 @@ #include #endif +volatile bool debugger_flag = true; // The debugger will flip this to false + void *start(void *data) { int i; size_t idx = (size_t)data; for (i=0; i<30; i++) { - if ( idx == 0 ) - std::this_thread::sleep_for(std::chrono::microseconds(1)); - std::this_thread::sleep_for(std::chrono::seconds(1)); // Set breakpoint here + if ( idx == 0 && debugger_flag) + std::this_thread::sleep_for(std::chrono::microseconds(1)); // Set breakpoint here + std::this_thread::sleep_for(std::chrono::seconds(1)); } return 0; }