X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fgenerator.ml;h=0a0f9b1764ed1ebe6c5cfcf049afc7d81a4bd81c;hb=5dc2f852d275b79c3e338c6ea5629c6baf4e1a8e;hp=27ecb51eebe8fcfa51ffcee0cc82e2e71bc30ab7;hpb=d96554c58fd48db02156044fc15b181e453f0315;p=libguestfs.git diff --git a/src/generator.ml b/src/generator.ml index 27ecb51..0a0f9b1 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -143,13 +143,6 @@ can easily destroy all your data>." * * Between each test we blockdev-setrw, umount-all, lvm-remove-all. * - * If the appliance is running an older Linux kernel (eg. RHEL 5) then - * devices are named /dev/hda etc. To cope with this, the test suite - * adds some hairly logic to detect this case, and then automagically - * replaces all strings which match "/dev/sd.*" with "/dev/hd.*". - * When writing test cases you shouldn't have to worry about this - * difference. - * * Don't assume anything about the previous contents of the block * devices. Use 'Init*' to create some initial scenarios. * @@ -3987,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;