Commit graph

5 commits

Author SHA1 Message Date
Simon McVittie
63632eaf8d test: Add basic test coverage for _dbus_close_all and friends
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-21 11:02:44 +01:00
Simon McVittie
7db891482f sysdeps test: Wait for spawned process to exit
On Windows, the "out" parameter for the process handle isn't set
unless we specify G_SPAWN_FLAGS_DO_NOT_REAP_CHILD. That means we
can't terminate it, and the child process is leaked. When running the
test individually, the leaked process is harmless apart from its
resource cost, but when running under CTest, it holds a file descriptor
open (or something) which causes CTest to not exit.

If we *do* specify G_SPAWN_FLAGS_DO_NOT_REAP_CHILD, we become
responsible for "reaping" the child process by waiting for its exit
status, which is an OS-specific action.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Resolves: https://gitlab.freedesktop.org/dbus/dbus/issues/238
2018-12-05 15:30:47 +01:00
Simon McVittie
e8cdb9171e tests: Assert that _dbus_command_for_pid() has correct error behaviour
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-31 16:56:36 +00:00
Simon McVittie
d70040d8d2 tests: Assert that dbus#222 has been fixed 2018-10-31 16:56:36 +00:00
Simon McVittie
93c1d08300 tests: Add a unit test for _dbus_command_for_pid()
In particular this demonstrates that dbus#222 has been solved.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-31 16:56:36 +00:00