Skip to content
  • Philip Withnall's avatar
    tests: Fix small race in GSubprocess tests · 7f256e63
    Philip Withnall authored
    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: default avatarPhilip Withnall <withnall@endlessm.com>
    7f256e63