summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-06-11 16:57:59 +0100
committerRichard Jones <rjones@redhat.com>2009-06-11 16:57:59 +0100
commit6a623e37e191385c0d9285e3ec1136b2a02e6156 (patch)
tree94451ba8a804e0cae1b430a28fe789693be245f6 /src
parent8a58d6b6252d07a2d157e892bddfdbb510616705 (diff)
downloadlibguestfs-6a623e37e191385c0d9285e3ec1136b2a02e6156.tar.gz
libguestfs-6a623e37e191385c0d9285e3ec1136b2a02e6156.tar.xz
libguestfs-6a623e37e191385c0d9285e3ec1136b2a02e6156.zip
Catching hanging qemu in tests (RHBZ#505329).
Diffstat (limited to 'src')
-rwxr-xr-xsrc/generator.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml
index b3f27cd7..0a0f9b17 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -3980,11 +3980,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 = %d;
" (500 * 1024 * 1024) (50 * 1024 * 1024) (10 * 1024 * 1024) nr_tests;