From 8d5a0d77fbed365211ec0e52dd848c7c1b93d950 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 Aug 2013 16:19:11 +0100 Subject: [PATCH] uml: tests: Skip some tests which cannot work with the UML backend. --- tests/disk-labels/test-disk-labels.pl | 5 +++++ tests/nbd/test-nbd.pl | 5 +++++ tests/regressions/rhbz690819.sh | 5 +++++ tests/regressions/rhbz975797.sh | 5 +++++ tests/rsync/test-rsync.sh | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/tests/disk-labels/test-disk-labels.pl b/tests/disk-labels/test-disk-labels.pl index a989c4457..a74e30013 100755 --- a/tests/disk-labels/test-disk-labels.pl +++ b/tests/disk-labels/test-disk-labels.pl @@ -25,6 +25,11 @@ use Sys::Guestfs; exit 77 if $ENV{SKIP_TEST_DISK_LABELS_PL}; +if (Sys::Guestfs->new()->get_backend() eq "uml") { + print "$0: test skipped because UML backend does not support disk labels\n"; + exit 77 +} + my $g = Sys::Guestfs->new (); # Add two drives. diff --git a/tests/nbd/test-nbd.pl b/tests/nbd/test-nbd.pl index d547a370a..2917f4d46 100755 --- a/tests/nbd/test-nbd.pl +++ b/tests/nbd/test-nbd.pl @@ -26,6 +26,11 @@ my $disk = "../guests/fedora.img"; exit 77 if $ENV{SKIP_TEST_NBD_PL}; +if (Sys::Guestfs->new()->get_backend() eq "uml") { + print "$0: test skipped because UML backend does not support NBD\n"; + exit 77 +} + # Check we have qemu-nbd. if (system ("qemu-nbd --help >/dev/null 2>&1") != 0) { print "$0: test skipped because qemu-nbd program not found\n"; diff --git a/tests/regressions/rhbz690819.sh b/tests/regressions/rhbz690819.sh index 7f84668ff..d53b38215 100755 --- a/tests/regressions/rhbz690819.sh +++ b/tests/regressions/rhbz690819.sh @@ -34,6 +34,11 @@ if [[ "$backend" =~ ^libvirt ]]; then exit 77 fi +if [ "$backend" = "uml" ]; then + echo "$0: test skipped because uml backend does not support 'iface' param." + exit 77 +fi + rm -f rhbz690819.img ../../fish/guestfish sparse rhbz690819.img 100M diff --git a/tests/regressions/rhbz975797.sh b/tests/regressions/rhbz975797.sh index b57d173a2..3856e7546 100755 --- a/tests/regressions/rhbz975797.sh +++ b/tests/regressions/rhbz975797.sh @@ -34,6 +34,11 @@ if [[ "$backend" =~ ^libvirt ]]; then exit 77 fi +if [ "$backend" = "uml" ]; then + echo "$0: test skipped because uml backend does not support 'iface' param." + exit 77 +fi + rm -f rhbz975797-*.img # The timeout utility was not available in RHEL 5. diff --git a/tests/rsync/test-rsync.sh b/tests/rsync/test-rsync.sh index 0c5ec0e4b..6e792e460 100755 --- a/tests/rsync/test-rsync.sh +++ b/tests/rsync/test-rsync.sh @@ -35,6 +35,11 @@ if ! rsync --help >/dev/null 2>&1; then exit 77 fi +if [ "$($guestfish get-backend)" = "uml" ]; then + echo "$0: skipping test because networking is not available in the UML backend" + exit 77 +fi + # If rsync is not available, bail. if ! $guestfish -a /dev/null run : available rsync; then echo "$0: skipping test because rsync is not available in the appliance"