tests: Make launcher-service tests more robust and more debuggable
I encountered some race conditions, missing cleanup and other badness while writing tests for !447 (merged).
-
tests: Send dbus-send output to stderr
This avoids corrupting machine-readable TAP stdout.
-
tests: Clean up fd management in test_exit_on_readable
Previously, we were doing a close(0) in the use_stdin code path, instead of closing the read end of the pipe to the subprocess's stdin as we should.
-
testutils: Ensure subprocess and its fds get cleaned up
-
tests: Factor out a method to skip tests if no D-Bus session
-
tests: Ensure that launcher-service subprocesses are fully cleaned up
-
tests: Set a timeout when waiting for test subprocesses
Otherwise, if they get stuck, nothing will happen until the global test timeout, at which point the output will be lost in some cases.
-
tests: While testing launcher-service, show which test-case we're in
This makes it easier to find out what is timing out.
-
tests: Make launcher test more debuggable