Skip to content
  • Eric Blake's avatar
    b8e1f74b
    tests/libqos: Utilize newer glib spawn check · b8e1f74b
    Eric Blake authored
    
    
    During development, I got a 'make check' failure that claimed:
    
    qemu-img returned status code 32512
    **
    ERROR:tests/libqos/libqos.c:202:mkimg: assertion failed: (!rc)
    
    But 32512 is too big for a normal exit status value, which means we
    failed to use WEXITSTATUS() to shift the bits to the desired value
    for printing.  However, instead of worrying about how to portably
    parse g_spawn()'s rc in the proper platform-dependent manner, it's
    better to just rely on the fact that we now require glib 2.40 (since
    commit e7b3af81) and can therefore use glib's portable checker
    instead, where the message under my same condition improves to:
    
    Child process exited with code 127
    **
    ERROR:tests/libqos/libqos.c:192:mkimg: assertion failed: (ret && !err)
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
    b8e1f74b
    tests/libqos: Utilize newer glib spawn check
    Eric Blake authored
    
    
    During development, I got a 'make check' failure that claimed:
    
    qemu-img returned status code 32512
    **
    ERROR:tests/libqos/libqos.c:202:mkimg: assertion failed: (!rc)
    
    But 32512 is too big for a normal exit status value, which means we
    failed to use WEXITSTATUS() to shift the bits to the desired value
    for printing.  However, instead of worrying about how to portably
    parse g_spawn()'s rc in the proper platform-dependent manner, it's
    better to just rely on the fact that we now require glib 2.40 (since
    commit e7b3af81) and can therefore use glib's portable checker
    instead, where the message under my same condition improves to:
    
    Child process exited with code 127
    **
    ERROR:tests/libqos/libqos.c:192:mkimg: assertion failed: (ret && !err)
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Loading