Page MenuHomePhabricator

fix Bug21211 : reworked test/api/multithreaded/test_listener_event_description.cpp to work properly on Linux/FreeBSD
ClosedPublic

Authored by sbest on Oct 16 2014, 8:29 PM.

Details

Summary

Issue D5632 fixed an issue where linux would dump spurious output to tty on startup (due to a broadcast stop event). After the checkin, it was noticed on FreeBSD a unit test was now failing. On closer investigation I found the test was using the C++ API to launch an inferior while using an SBListener to monitor the public state changes. It was expecting to see:

eStateRunning
eStateStopped

On Linux/FreeBSD, there is an extra state change

eStateLaunching
eStateRunning
eStateStopped

I reworked the test to work for both cases.

Diff Detail

Repository
rL LLVM

Event Timeline

sbest updated this revision to Diff 15062.Oct 16 2014, 8:29 PM
sbest retitled this revision from to fix Bug21211 : reworked test/api/multithreaded/test_listener_event_description.cpp to work properly on Linux/FreeBSD.
sbest updated this object.
sbest edited the test plan for this revision. (Show Details)
sbest added a reviewer: emaste.
sbest added a subscriber: Unknown Object (MLST).
sbest added a comment.Nov 14 2014, 4:39 PM

friendly ping. I was waiting until the other change (D5838 ENABLE_STD_THREADS) landed and I could run the tests in api/multithreaded again. This is a rework of the test program logic to accommodate the fact that OSx and linux broadcast a different sequence of public events due to their different inferior launching.

I can confirm the test passes on Linux, and OSx. I assume it now will pass correctly on FreeBSD since it exhibited a similar failure to Linux when it got broken by D5632.

emaste accepted this revision.Nov 20 2014, 5:00 PM
emaste edited edge metadata.

lgtm

This revision is now accepted and ready to land.Nov 20 2014, 5:00 PM
sbest closed this revision.Nov 20 2014, 10:50 PM
sbest updated this revision to Diff 16474.

Closed by commit rL222511 (authored by @sbest).