diff options
-rwxr-xr-x | fish/test-copy.sh | 2 | ||||
-rwxr-xr-x | fish/test-edit.sh | 2 | ||||
-rwxr-xr-x | fish/test-mount-local.sh | 4 | ||||
-rwxr-xr-x | fuse/test-fuse-umount-race.sh | 4 | ||||
-rwxr-xr-x | fuse/test-fuse.sh | 6 | ||||
-rwxr-xr-x | gobject/run-live-tests | 2 | ||||
-rwxr-xr-x | gobject/run-tests | 2 | ||||
-rw-r--r-- | ocaml/t/guestfs_500_mount_local.ml | 2 | ||||
-rw-r--r-- | run.in | 10 | ||||
-rwxr-xr-x | sysprep/test-virt-sysprep-script.sh | 4 | ||||
-rwxr-xr-x | tests/btrfs/test-btrfs-devices.sh | 2 | ||||
-rwxr-xr-x | tests/btrfs/test-btrfs-subvolume-default.pl | 2 | ||||
-rwxr-xr-x | tests/extra/test-upstream-qemu.sh | 4 | ||||
-rwxr-xr-x | tests/luks/test-luks-list.sh | 2 | ||||
-rwxr-xr-x | tests/luks/test-luks.sh | 2 | ||||
-rwxr-xr-x | tests/md/test-inspect-fstab-md.sh | 4 | ||||
-rwxr-xr-x | tests/md/test-list-filesystems.sh | 2 | ||||
-rwxr-xr-x | tests/md/test-mdadm.sh | 2 | ||||
-rw-r--r-- | tests/mount-local/test-parallel-mount-local.c | 4 | ||||
-rwxr-xr-x | tests/ntfsclone/test-ntfsclone.sh | 4 | ||||
-rwxr-xr-x | tests/protocol/test-launch-race.pl | 2 | ||||
-rwxr-xr-x | tests/regressions/rhbz690819.sh | 4 | ||||
-rwxr-xr-x | tests/selinux/run-test.pl | 14 |
23 files changed, 45 insertions, 41 deletions
diff --git a/fish/test-copy.sh b/fish/test-copy.sh index 6467a52a..ca4885bf 100755 --- a/fish/test-copy.sh +++ b/fish/test-copy.sh @@ -23,7 +23,7 @@ test -d /dev/fd || { echo "$0: Skipping this test because /dev/fd is missing." - exit 0 + exit 77 } set -e diff --git a/fish/test-edit.sh b/fish/test-edit.sh index a077ada6..b9acf457 100755 --- a/fish/test-edit.sh +++ b/fish/test-edit.sh @@ -23,7 +23,7 @@ test -d /dev/fd || { echo "$0: Skipping this test because /dev/fd is missing." - exit 0 + exit 77 } set -e diff --git a/fish/test-mount-local.sh b/fish/test-mount-local.sh index c1b3f550..ad62a925 100755 --- a/fish/test-mount-local.sh +++ b/fish/test-mount-local.sh @@ -20,7 +20,7 @@ if [ -n "$SKIP_TEST_MOUNT_LOCAL_SH" ]; then echo "$0: skipping test because SKIP_TEST_MOUNT_LOCAL_SH is set." - exit 0 + exit 77 fi # Skip if no FUSE. @@ -28,7 +28,7 @@ fi test -w /dev/fuse || { echo "$0: Skipping this test" echo " because /dev/fuse is missing or not writable by the current user." - exit 0 + exit 77 } set -e diff --git a/fuse/test-fuse-umount-race.sh b/fuse/test-fuse-umount-race.sh index c4ff2e9a..59186ab4 100755 --- a/fuse/test-fuse-umount-race.sh +++ b/fuse/test-fuse-umount-race.sh @@ -25,12 +25,12 @@ set -e if [ -n "$SKIP_TEST_FUSE_SH" ]; then echo "$0: test skipped because environment variable is set." - exit 0 + exit 77 fi if [ ! -w /dev/fuse ]; then echo "SKIPPING guestmount test, because there is no /dev/fuse." - exit 0 + exit 77 fi rm -f test.qcow2 test-copy.qcow2 test.pid diff --git a/fuse/test-fuse.sh b/fuse/test-fuse.sh index 255e524d..60a32122 100755 --- a/fuse/test-fuse.sh +++ b/fuse/test-fuse.sh @@ -22,17 +22,17 @@ set -e if [ -n "$SKIP_TEST_FUSE_SH" ]; then echo "$0: test skipped because environment variable is set." - exit 0 + exit 77 fi if [ ! -w /dev/fuse ]; then echo "SKIPPING guestmount test, because there is no /dev/fuse." - exit 0 + exit 77 fi if ! setfacl --help >/dev/null 2>&1; then echo "SKIPPING guestmount test, because setfacl is not installed." - exit 0 + exit 77 fi if [ -z "$top_builddir" ]; then diff --git a/gobject/run-live-tests b/gobject/run-live-tests index 3f3648e2..2ab2ce46 100755 --- a/gobject/run-live-tests +++ b/gobject/run-live-tests @@ -20,7 +20,7 @@ set -e if [ -z "$GJS" ]; then echo "GObject bind tests skipped: gjs is missing" - exit 0 + exit 77 fi $GJS $srcdir/tests-misc.js 2>/dev/null diff --git a/gobject/run-tests b/gobject/run-tests index 014f646e..6bcd94ec 100755 --- a/gobject/run-tests +++ b/gobject/run-tests @@ -20,7 +20,7 @@ set -e if [ -z "$GJS" ]; then echo "GObject bind tests skipped: gjs is missing" - exit 0 + exit 77 fi $GJS $srcdir/bindtests.js > bindtests.tmp diff --git a/ocaml/t/guestfs_500_mount_local.ml b/ocaml/t/guestfs_500_mount_local.ml index b4dd28d7..fb22d026 100644 --- a/ocaml/t/guestfs_500_mount_local.ml +++ b/ocaml/t/guestfs_500_mount_local.ml @@ -39,7 +39,7 @@ let rec main () = if value <> "" then ( printf "%s: test skipped because %s is set.\n" Sys.executable_name name; - exit 0 + exit 77 ) in @@ -116,9 +116,13 @@ else rm -f $b/run.$pid $libtool "$@" > $b/run.$pid 2>&1 || { fail=$? - echo "$b/run --test" "$@" - cat $b/run.$pid - echo "$b/run: command failed with exit code $fail" + if [ "$fail" -eq 77 ]; then + cat $b/run.$pid + else + echo "$b/run --test" "$@" + cat $b/run.$pid + echo "$b/run: command failed with exit code $fail" + fi } rm -f $b/run.$pid exit $fail diff --git a/sysprep/test-virt-sysprep-script.sh b/sysprep/test-virt-sysprep-script.sh index 09c42aff..98ecb966 100755 --- a/sysprep/test-virt-sysprep-script.sh +++ b/sysprep/test-virt-sysprep-script.sh @@ -22,12 +22,12 @@ set -e if [ -n "$SKIP_TEST_VIRT_SYSPREP_SCRIPT_SH" ]; then echo "$0: test skipped because environment variable is set." - exit 0 + exit 77 fi if [ ! -w /dev/fuse ]; then echo "$0: SKIPPING test, because there is no /dev/fuse." - exit 0 + exit 77 fi # Check that multiple scripts can run. diff --git a/tests/btrfs/test-btrfs-devices.sh b/tests/btrfs/test-btrfs-devices.sh index 8e014323..d2de6f63 100755 --- a/tests/btrfs/test-btrfs-devices.sh +++ b/tests/btrfs/test-btrfs-devices.sh @@ -29,7 +29,7 @@ guestfish=../../fish/guestfish # If btrfs is not available, bail. if ! $guestfish -a /dev/null run : available btrfs; then echo "$0: skipping test because btrfs is not available" - exit 0 + exit 77 fi rm -f test[1234].img diff --git a/tests/btrfs/test-btrfs-subvolume-default.pl b/tests/btrfs/test-btrfs-subvolume-default.pl index 4672bed8..1eb36768 100755 --- a/tests/btrfs/test-btrfs-subvolume-default.pl +++ b/tests/btrfs/test-btrfs-subvolume-default.pl @@ -39,7 +39,7 @@ $g->launch (); # If btrfs is not available, bail. unless (feature_available ($g, "btrfs")) { warn "$0: skipping test because btrfs is not available\n"; - exit 0; + exit 77; } $g->part_disk ("/dev/sda", "mbr"); diff --git a/tests/extra/test-upstream-qemu.sh b/tests/extra/test-upstream-qemu.sh index eb226805..d8f16f4b 100755 --- a/tests/extra/test-upstream-qemu.sh +++ b/tests/extra/test-upstream-qemu.sh @@ -20,13 +20,13 @@ set -e if [ ! -d "$QEMUDIR" ]; then echo "$0: \$QEMUDIR not a directory, tests against upstream qemu skipped" - exit 0 + exit 77 fi QEMU="$QEMUDIR/x86_64-softmmu/qemu-system-x86_64" if ! "$QEMU" --help >/dev/null 2>&1; then echo "$0: $QEMU not executable, tests against upstream qemu skipped" - exit 0 + exit 77 fi "$QEMU" --version diff --git a/tests/luks/test-luks-list.sh b/tests/luks/test-luks-list.sh index 80ff6e7a..f5984dac 100755 --- a/tests/luks/test-luks-list.sh +++ b/tests/luks/test-luks-list.sh @@ -22,7 +22,7 @@ set -e [ -n "$SKIP_TEST_LUKS_SH" ] && { echo "test-luks-list.sh skipped (environment variable set)" - exit 0 + exit 77 } rm -f test1.img test.output diff --git a/tests/luks/test-luks.sh b/tests/luks/test-luks.sh index a9edca0c..eee7295d 100755 --- a/tests/luks/test-luks.sh +++ b/tests/luks/test-luks.sh @@ -22,7 +22,7 @@ set -e [ -n "$SKIP_TEST_LUKS_SH" ] && { echo "test-luks.sh skipped (environment variable set)" - exit 0 + exit 77 } rm -f test1.img diff --git a/tests/md/test-inspect-fstab-md.sh b/tests/md/test-inspect-fstab-md.sh index a64cbe09..bd29c310 100755 --- a/tests/md/test-inspect-fstab-md.sh +++ b/tests/md/test-inspect-fstab-md.sh @@ -23,7 +23,7 @@ export LANG=C if [ -n "$SKIP_TEST_INSPECT_FSTAB_MD_SH" ]; then echo "$0: test skipped because environment variable is set." - exit 0 + exit 77 fi # The first test requires a new Augeas lens for parsing mdadm.conf. @@ -32,7 +32,7 @@ fi f=$(grep mdadm_conf.aug ../../appliance/supermin.d/hostfiles | head -1) if [ -z "$f" -o ! -f "$f" ]; then echo "$0: test skipped because Augeas mdadm.conf lens is not available." - exit 0 + exit 77 fi guestfish=../../fish/guestfish diff --git a/tests/md/test-list-filesystems.sh b/tests/md/test-list-filesystems.sh index f52afb00..642e0339 100755 --- a/tests/md/test-list-filesystems.sh +++ b/tests/md/test-list-filesystems.sh @@ -22,7 +22,7 @@ set -e if [ -n "$SKIP_TEST_LIST_FILESYSTEMS_SH" ]; then echo "$0: test skipped because environment variable is set." - exit 0 + exit 77 fi rm -f test.output diff --git a/tests/md/test-mdadm.sh b/tests/md/test-mdadm.sh index 91fcca3d..c72cd503 100755 --- a/tests/md/test-mdadm.sh +++ b/tests/md/test-mdadm.sh @@ -22,7 +22,7 @@ set -e if [ -n "$SKIP_TEST_MDADM_SH" ]; then echo "$0: test skipped because environment variable is set." - exit 0 + exit 77 fi rm -f md-test1.img md-test2.img md-test3.img md-test4.img diff --git a/tests/mount-local/test-parallel-mount-local.c b/tests/mount-local/test-parallel-mount-local.c index 9e216297..791a7488 100644 --- a/tests/mount-local/test-parallel-mount-local.c +++ b/tests/mount-local/test-parallel-mount-local.c @@ -101,13 +101,13 @@ main (int argc, char *argv[]) if (skip && STREQ (skip, "1")) { fprintf (stderr, "%s: test skipped because environment variable set.\n", argv[0]); - exit (EXIT_SUCCESS); + exit (77); } if (access ("/dev/fuse", W_OK) == -1) { fprintf (stderr, "%s: test skipped because /dev/fuse is not writable.\n", argv[0]); - exit (EXIT_SUCCESS); + exit (77); } /* Choose the number of threads based on the amount of free memory. */ diff --git a/tests/ntfsclone/test-ntfsclone.sh b/tests/ntfsclone/test-ntfsclone.sh index 999cbfbf..efed7d87 100755 --- a/tests/ntfsclone/test-ntfsclone.sh +++ b/tests/ntfsclone/test-ntfsclone.sh @@ -22,7 +22,7 @@ set -e if [ -n "$SKIP_TEST_NTFSCLONE_SH" ]; then echo "$0: test skipped because environment variable is set." - exit 0 + exit 77 fi rm -f test1.img backup1 backup2 @@ -32,7 +32,7 @@ guestfish=../../fish/guestfish # Skip if ntfs-3g is not supported by the appliance. if ! $guestfish add /dev/null : run : available "ntfs3g"; then echo "$0: skipped because ntfs-3g is not supported by the appliance" - exit 0 + exit 77 fi # Export the filesystems to the backup file. diff --git a/tests/protocol/test-launch-race.pl b/tests/protocol/test-launch-race.pl index 5a660cee..c2f52967 100755 --- a/tests/protocol/test-launch-race.pl +++ b/tests/protocol/test-launch-race.pl @@ -26,7 +26,7 @@ use POSIX; use Sys::Guestfs; # Allow this test to be skipped. -exit 0 if $ENV{SKIP_TEST_LAUNCH_RACE_PL}; +exit 77 if $ENV{SKIP_TEST_LAUNCH_RACE_PL}; # Use a temporary TMPDIR to ensure it's clean my $tmpdir = tempdir (CLEANUP => 1); diff --git a/tests/regressions/rhbz690819.sh b/tests/regressions/rhbz690819.sh index e3f9bb89..4e79f4be 100755 --- a/tests/regressions/rhbz690819.sh +++ b/tests/regressions/rhbz690819.sh @@ -29,7 +29,7 @@ # the mkfs fails. It's not clear how to solve this cleanly. XXX [ -n "$SKIP_TEST_RHBZ690819_SH" ] && { echo "$0 skipped (environment variable set)" - exit 0 + exit 77 } set -e @@ -37,7 +37,7 @@ export LANG=C if [ -n "$SKIP_TEST_RHBZ690819_SH" ]; then echo "$0: test skipped because environment variable is set." - exit 0 + exit 77 fi rm -f test.img diff --git a/tests/selinux/run-test.pl b/tests/selinux/run-test.pl index 0d3300cc..5258bb11 100755 --- a/tests/selinux/run-test.pl +++ b/tests/selinux/run-test.pl @@ -48,7 +48,7 @@ die unless $test_via eq "direct" || $test_via eq "fuse"; my $env_name = "SKIP_TEST_SELINUX_" . uc ($test_type) . "_" . uc ($test_via); if ($ENV{$env_name}) { print "$prog $test_type $test_via: test skipped because $env_name is set.\n"; - exit 0 + exit 77 } # SELinux labelling won't work (and can be skipped) if SELinux isn't @@ -58,7 +58,7 @@ if ($test_type eq "selinux") { chomp; if ($_ ne "Enforcing" && $_ ne "Permissive") { print "$prog $test_type $test_via: test skipped because SELinux is not enabled.\n"; - exit + exit 77 } } @@ -66,7 +66,7 @@ if ($test_type eq "selinux") { if ($test_via eq "fuse") { unless (-w "/dev/fuse") { print "$prog $test_type $test_via: test skipped because there is no /dev/fuse.\n"; - exit + exit 77 } } @@ -74,7 +74,7 @@ if ($test_via eq "fuse") { if ($test_type eq "xattrs" && $test_via eq "fuse") { if (system ("setfattr --help >/dev/null 2>&1") != 0) { print "$prog $test_type $test_via: test skipped because 'setfattr' is not installed.\n"; - exit + exit 77 } } @@ -82,7 +82,7 @@ if ($test_type eq "xattrs" && $test_via eq "fuse") { if ($test_type eq "selinux" && $test_via eq "fuse") { if (system ("chcon --help >/dev/null 2>&1") != 0) { print "$prog $test_type $test_via: test skipped because 'chcon' is not installed.\n"; - exit + exit 77 } } @@ -95,7 +95,7 @@ if ($test_type eq "selinux" && $test_via eq "fuse") { print "don't work well together:\n"; print "https://bugzilla.redhat.com/show_bug.cgi?id=811217\n"; print "https://bugzilla.redhat.com/show_bug.cgi?id=812798#c42\n"; - exit; + exit 77; } # Create a filesystem that could support xattrs and SELinux labels. @@ -115,7 +115,7 @@ unless (feature_available ($g, "linuxxattrs")) { print "$prog $test_type $test_via: test skipped because 'linuxxattrs' feature not available.\n"; $g->close (); unlink $testimg; - exit 0 + exit 77 } $g->part_disk ("/dev/sda", "mbr"); |