This is an archive of the discontinued LLVM Phabricator instance.

Rewriting TestMultithreaded.py to solve flakyness on Linux
ClosedPublic

Authored by ravitheja on May 10 2016, 1:03 AM.

Details

Summary

test_listener_event_process_state checks for Threads
and Frames in the multithreaded_queue. The listener_func has
more computational load, which may be latter executed than the
pop leading to the failure. This patch tries to only check for
frames in listener_func as presence of frames also confirms
prescence of threads and avoids the second push into the
multithreaded_queue.

Diff Detail

Repository
rL LLVM

Event Timeline

ravitheja updated this revision to Diff 56671.May 10 2016, 1:03 AM
ravitheja retitled this revision from to Rewriting TestMultithreaded.py to solve flakyness on Linux.
ravitheja updated this object.
clayborg accepted this revision.May 10 2016, 10:08 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.May 10 2016, 10:08 AM
labath accepted this revision.May 11 2016, 2:51 AM
labath edited edge metadata.

I am somewhat surprised that this solves anything (I mean, you claim that the problem is the ordering between the push and pop, but I don't see how this could change that ordering). If the problem was that the check_listener was not waiting long enough, then it should be sufficient to increase the timeout...

That said, I don't think it should make things any worse either, so I'm ready to give it a go...

@labath, Well the other tests in TestMultithreaded.py are not flaky and I see the only difference as an extra push operation, so I thought the push operation could be potential bottleneck.

ravitheja closed this revision.May 11 2016, 3:00 AM
This revision was automatically updated to reflect the committed changes.