X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=regressions%2Ftest-remote.sh;h=40c2ee9a8d4d0481ab87ec2c4774aa5b8f320a67;hp=f3c14b4b85ab5f490adc57c3bab0361f92d9dff0;hb=50d2af4f8541a81d047753d7d300804ff649230c;hpb=a86aa7d152ed996170714a3a4516eab58bf8b59d diff --git a/regressions/test-remote.sh b/regressions/test-remote.sh index f3c14b4..40c2ee9 100755 --- a/regressions/test-remote.sh +++ b/regressions/test-remote.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # @@ -26,9 +26,21 @@ eval `../fish/guestfish --listen` ../fish/guestfish --remote alloc test.img 10M ../fish/guestfish --remote run -../fish/guestfish --remote sfdiskM /dev/sda , +../fish/guestfish --remote part-disk /dev/sda mbr ../fish/guestfish --remote mkfs ext2 /dev/sda1 -../fish/guestfish --remote mount /dev/sda1 / +../fish/guestfish --remote mount-options "" /dev/sda1 / + +# Failure of the above commands will cause the guestfish listener to exit. +# Incorrect return from echo_daemon will not, so need to ensure the listener +# exits in any case, while still reporting an error. +error=0 +echo=$(../fish/guestfish --remote echo_daemon "This is a test") +if [ "$echo" != "This is a test" ]; then + error=1; +fi + ../fish/guestfish --remote exit rm -f test.img + +exit $error