Introduce regression tests for various qemu failures.
[libguestfs.git] / regressions / test-qemudie-launchfail.sh
similarity index 79%
rename from regressions/test-cleanup.sh
rename to regressions/test-qemudie-launchfail.sh
index a68f57e..7da1c35 100755 (executable)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-# XXX Unfortunately we can't enable this by default since it
-# requires './configure --enable-debug-command'
+# Test if we can handle qemu failure during launch.
 
-./fish/guestfish <<EOF
-alloc /tmp/test.img 100M
-run
+set -e
+
+rm -f test.img
 
-# Force a segfault inside the daemon.
--debug segv ''
+../fish/guestfish <<'EOF'
+alloc test.img 10M
+
+append "root=/dev/null"
+-run
 
 # We should now be able to rerun the subprocess.
+append ""
 run
 ping-daemon
 EOF
+
+rm -f test.img