Reland "Fix threading in FileDescriptorWatcher and MessagePumpLibevent tests."
This is a reland of 45df4f39 Original change's description: > Fix threading in FileDescriptorWatcher and MessagePumpLibevent tests. > > Changes to MessagePumpLibevent & tests: > 1. Add an explicit wait for thread start-up to TestWatchingFromBadThread, > which was not updated when the base::ThreadStart() call was changed to > not wait for the thread startup to complete. > 2. Reinstate TestWatchingFromBadThread on all libevent platforms. > 3. Add sanity-check tests for readable/writable notifications. > 4. Clean up some .get()s and add some DPLOGs. > > Changes to FileDescriptorWatcher & tests: > 1. Add a DLOG_IF() to StartWatching, to make it easier to spot > WatchFileDescriptor failures. This can't be a DCHECK or CHECK, since the > StartWatching operation is racey with file-descriptor close() on the > calling thread. > 2. Fix the test fixture to Stop() |other_thread_| to ensure it is done > working before we tear down the test file descriptors. > 3. Fix the WatchWritable test to request write notifications for the > correct end of the pipe (since pipe()s are uni-directional). > > Bug: 138845,740692 > > TBR=dcheng,fdoray > > Change-Id: I86bdd100561fbc56c1e6291216cafc3168b185dc > Reviewed-on: https://chromium-review.googlesource.com/565227 > Commit-Queue: Wez <wez@chromium.org> > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > Reviewed-by: Wez <wez@chromium.org> > Reviewed-by: Nico Weber <thakis@chromium.org> > Cr-Commit-Position: refs/heads/master@{#485822} TBR: dcheng, thakis Bug: 138845, 740692 Change-Id: Ibc6e48316351b311bfa06727964bbcf4cf5e699b Reviewed-on: https://chromium-review.googlesource.com/566840Reviewed-by:Wez <wez@chromium.org> Commit-Queue: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#485880}
Showing
Please register or sign in to comment