tests: Stop using deprecated g_test_trap_fork() API
commita8dcd4f0decf78afdd22caaaad4ac746e075c3b0
authorPhilip Withnall <withnall@endlessm.com>
Tue, 14 Aug 2018 15:03:03 +0000 (14 16:03 +0100)
committerPhilip Withnall <withnall@endlessm.com>
Thu, 16 Aug 2018 17:58:27 +0000 (16 18:58 +0100)
tree5f26bd3238f330f280d15ed9421bf88b7258d1e5
parentea8c09f14da4b931cdadbabe2be315f6747ac7b7
tests: Stop using deprecated g_test_trap_fork() API

Use g_test_subprocess() and g_test_trap_subprocess() instead. This
requires splitting up some of the unit tests, since subprocesses are
handled at a per-test level, and you can’t trivially fork multiple
different subprocesses from a single test (like you could with fork()).

While fork was safe to use on POSIX (and dconf only targets POSIX), the
fact that we had to redefine GLIB_VERSION_MIN_REQUIRED to hide the
deprecation errors was not doing wonders for the maintainability of the
tests.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
tests/dbus.c
tests/engine.c
tests/shm.c