tests: Fix small race in GSubprocess tests

Merged Philip Withnall requested to merge pwithnall/glib:gsubprocess-test-fix into master

This was introduced in commit 7846d615: g_subprocess_get_identifier() will return NULL after the subprocess has exited, and the subprocess in the noop test will exit as soon as it has started spawning. So if the scheduler scheduled the testprog subprocess quickly, descheduled the parent test process until the testprog exited, then the return value from g_subprocess_get_identifier() would be NULL.

Move the g_subprocess_get_identifier() test to one which calls testprog in sleep-forever mode, since that is guaranteed not to exit until killed (which we do later in the test).

Signed-off-by: Philip Withnall withnall@endlessm.com

Merge request reports