diff options
author | Richard Jones <rjones@redhat.com> | 2009-06-11 16:57:59 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-06-11 16:57:59 +0100 |
commit | 6a623e37e191385c0d9285e3ec1136b2a02e6156 (patch) | |
tree | 94451ba8a804e0cae1b430a28fe789693be245f6 /capitests | |
parent | 8a58d6b6252d07a2d157e892bddfdbb510616705 (diff) | |
download | libguestfs-6a623e37e191385c0d9285e3ec1136b2a02e6156.tar.gz libguestfs-6a623e37e191385c0d9285e3ec1136b2a02e6156.tar.xz libguestfs-6a623e37e191385c0d9285e3ec1136b2a02e6156.zip |
Catching hanging qemu in tests (RHBZ#505329).
Diffstat (limited to 'capitests')
-rw-r--r-- | capitests/tests.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/capitests/tests.c b/capitests/tests.c index 536da7f2..0e42cb40 100644 --- a/capitests/tests.c +++ b/capitests/tests.c @@ -15753,11 +15753,18 @@ int main (int argc, char *argv[]) printf ("guestfs_launch FAILED\n"); exit (1); } + + /* Set a timeout in case qemu hangs during launch (RHBZ#505329). */ + alarm (600); + if (guestfs_wait_ready (g) == -1) { printf ("guestfs_wait_ready FAILED\n"); exit (1); } + /* Cancel previous alarm. */ + alarm (0); + nr_tests = 146; test_num++; |