Merge lp:~mhr3/dbus-test-runner/watch-pipes-for-hup into lp:dbus-test-runner/13.10
Status: | Merged |
---|---|
Approved by: | Ted Gould |
Approved revision: | 75 |
Merged at revision: | 65 |
Proposed branch: | lp:~mhr3/dbus-test-runner/watch-pipes-for-hup |
Merge into: | lp:dbus-test-runner/13.10 |
Diff against target: |
235 lines (+56/-20) 5 files modified
libdbustest/Makefile.am (+2/-0) libdbustest/bustle.c (+1/-1) libdbustest/leash.c (+12/-11) libdbustest/process.c (+13/-5) libdbustest/service.c (+28/-3) |
To merge this branch: | bzr merge lp:~mhr3/dbus-test-runner/watch-pipes-for-hup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Ted Gould (community) | Approve | ||
Alberto Mardegan (community) | Approve | ||
Review via email: mp+176092@code.launchpad.net |
Commit message
Watch created pipes for the G_IO_HUP event, as when a pipe closes, polling it will return this event.
Description of the change
Watch created pipes for the G_IO_HUP event, as when a pipe closes, polling it will return this event.
Without this patch, the test runner is somewhat racy as it expects to always get a child watch event before a pipe closing. Moreover not handling HUP can cause 100% CPU usage, since polling a closed pipe will keep returning POLLHUP and nothing in the code removed the pipe from the poll fds.
Also clean up the code in the watchdog process, use g_unix_signal_add, which plays nicer with glib's main loop.
Lastly, don't print empty line after each received line from the process tasks. :)
FAILED: Continuous integration, rev:67 jenkins. qa.ubuntu. com/job/ dbus-test- runner- ci/3/ jenkins. qa.ubuntu. com/job/ dbus-test- runner- quantal- amd64-ci/ 3/console jenkins. qa.ubuntu. com/job/ dbus-test- runner- quantal- armhf-ci/ 3/console jenkins. qa.ubuntu. com/job/ dbus-test- runner- saucy-amd64- ci/3/console jenkins. qa.ubuntu. com/job/ dbus-test- runner- saucy-armhf- ci/3/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ dbus-test- runner- ci/3/rebuild
http://