From 498758faee6be7e989869bf7feba5e1026a1bb65 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 22 Dec 2011 11:35:43 +0000 Subject: [PATCH] tests: Split regressions -> various subdirectories of tests/ --- .gitignore | 11 +++--- Makefile.am | 5 ++- configure.ac | 6 ++- daemon/debug.c | 8 +++- fish/Makefile.am | 26 +++++++++++++ {regressions => fish}/test-add-domain.sh | 0 {regressions => fish}/test-copy.sh | 0 {regressions => fish}/test-find0.sh | 0 {regressions => fish}/test-guestfish-a.sh | 0 {regressions => fish}/test-guestfish-d.sh | 0 {regressions => fish}/test-guestfish-escapes.sh | 0 {regressions => fish}/test-guestfish-events.sh | 0 {regressions => fish}/test-guestfish-tilde.sh | 0 {regressions => fish}/test-read_file.sh | 0 {regressions => fish}/test-remote.sh | 0 {regressions => fish}/test-reopen.sh | 0 {regressions => fish}/test-stringlist.sh | 0 {regressions => fish}/test-upload-to-dir.sh | 0 regressions/tell-user-to-ignore-errors.sh | 26 ------------- src/guestfs.pod | 9 ++--- tests/luks/Makefile.am | 33 ++++++++++++++++ {regressions => tests/luks}/test-luks-list.sh | 2 +- {regressions => tests/luks}/test-luks.sh | 2 +- tests/lvm/Makefile.am | 33 ++++++++++++++++ {regressions => tests/lvm}/test-lvm-filtering.sh | 2 +- {regressions => tests/lvm}/test-lvm-mapping.pl | 0 tests/md/Makefile.am | 36 ++++++++++++++++++ {regressions => tests/md}/test-inspect-fstab-md.sh | 8 ++-- {regressions => tests/md}/test-inspect-fstab.sh | 4 +- {regressions => tests/md}/test-list-filesystems.sh | 2 +- {regressions => tests/md}/test-list-md-devices.sh | 4 +- {regressions => tests/md}/test-mdadm.sh | 40 ++++++++++---------- .../protocol/Makefile.am | 38 +++++++++---------- .../protocol}/test-both-ends-cancel.sh | 2 +- .../test-cancellation-download-librarycancels.sh | 2 +- .../test-cancellation-upload-daemoncancels.sh | 2 +- .../protocol}/test-launch-race.pl | 0 .../protocol}/test-qemudie-killsub.sh | 2 +- .../protocol}/test-qemudie-launchfail.sh | 2 +- .../protocol}/test-qemudie-midcommand.sh | 2 +- .../protocol}/test-qemudie-synch.sh | 2 +- tests/qemu/qemu-snapshot-isolation.sh | 2 +- {regressions => tests/regressions}/Makefile.am | 44 +--------------------- {regressions => tests/regressions}/rhbz501893.c | 0 .../regressions}/rhbz503169c13.sh | 2 +- .../regressions}/rhbz557655-expected.stderr | 0 .../regressions}/rhbz557655-expected.stdout | 0 {regressions => tests/regressions}/rhbz557655.sh | 4 +- {regressions => tests/regressions}/rhbz576879.sh | 2 +- {regressions => tests/regressions}/rhbz578407.sh | 2 +- {regressions => tests/regressions}/rhbz580246.sh | 2 +- {regressions => tests/regressions}/rhbz602997.sh | 2 +- {regressions => tests/regressions}/rhbz690819.sh | 2 +- {regressions => tests/regressions}/rhbz727178.sh | 2 +- .../regressions}/test-noexec-stack.pl | 0 55 files changed, 219 insertions(+), 154 deletions(-) rename {regressions => fish}/test-add-domain.sh (100%) rename {regressions => fish}/test-copy.sh (100%) rename {regressions => fish}/test-find0.sh (100%) rename {regressions => fish}/test-guestfish-a.sh (100%) rename {regressions => fish}/test-guestfish-d.sh (100%) rename {regressions => fish}/test-guestfish-escapes.sh (100%) rename {regressions => fish}/test-guestfish-events.sh (100%) rename {regressions => fish}/test-guestfish-tilde.sh (100%) rename {regressions => fish}/test-read_file.sh (100%) rename {regressions => fish}/test-remote.sh (100%) rename {regressions => fish}/test-reopen.sh (100%) rename {regressions => fish}/test-stringlist.sh (100%) rename {regressions => fish}/test-upload-to-dir.sh (100%) delete mode 100755 regressions/tell-user-to-ignore-errors.sh create mode 100644 tests/luks/Makefile.am rename {regressions => tests/luks}/test-luks-list.sh (97%) rename {regressions => tests/luks}/test-luks.sh (97%) create mode 100644 tests/lvm/Makefile.am rename {regressions => tests/lvm}/test-lvm-filtering.sh (97%) rename {regressions => tests/lvm}/test-lvm-mapping.pl (100%) create mode 100644 tests/md/Makefile.am rename {regressions => tests/md}/test-inspect-fstab-md.sh (91%) rename {regressions => tests/md}/test-inspect-fstab.sh (97%) rename {regressions => tests/md}/test-list-filesystems.sh (98%) rename {regressions => tests/md}/test-list-md-devices.sh (94%) rename {regressions => tests/md}/test-mdadm.sh (79%) rename regressions/test-bootbootboot.sh => tests/protocol/Makefile.am (55%) mode change 100755 => 100644 rename {regressions => tests/protocol}/test-both-ends-cancel.sh (96%) rename {regressions => tests/protocol}/test-cancellation-download-librarycancels.sh (98%) rename {regressions => tests/protocol}/test-cancellation-upload-daemoncancels.sh (95%) rename {regressions => tests/protocol}/test-launch-race.pl (100%) rename {regressions => tests/protocol}/test-qemudie-killsub.sh (96%) rename {regressions => tests/protocol}/test-qemudie-launchfail.sh (97%) rename {regressions => tests/protocol}/test-qemudie-midcommand.sh (96%) rename {regressions => tests/protocol}/test-qemudie-synch.sh (96%) rename {regressions => tests/regressions}/Makefile.am (61%) rename {regressions => tests/regressions}/rhbz501893.c (100%) rename {regressions => tests/regressions}/rhbz503169c13.sh (96%) rename {regressions => tests/regressions}/rhbz557655-expected.stderr (100%) rename {regressions => tests/regressions}/rhbz557655-expected.stdout (100%) rename {regressions => tests/regressions}/rhbz557655.sh (95%) rename {regressions => tests/regressions}/rhbz576879.sh (95%) rename {regressions => tests/regressions}/rhbz578407.sh (97%) rename {regressions => tests/regressions}/rhbz580246.sh (97%) rename {regressions => tests/regressions}/rhbz602997.sh (98%) rename {regressions => tests/regressions}/rhbz690819.sh (97%) rename {regressions => tests/regressions}/rhbz727178.sh (97%) rename {regressions => tests/regressions}/test-noexec-stack.pl (100%) diff --git a/.gitignore b/.gitignore index c322a27..9271d74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ *~ *.a +test1.img +test2.img +test.err +test.out ABOUT-NLS aclocal.m4 align/stamp-virt-alignment-scan.pod @@ -294,11 +298,6 @@ python/examples/stamp-guestfs-python.pod python/guestfs.py python/guestfs-py.c python/guestfs.pyc -regressions/rhbz501893 -regressions/test1.img -regressions/test2.img -regressions/test.err -regressions/test.out rescue/stamp-virt-rescue.pod rescue/virt-rescue rescue/virt-rescue.1 @@ -340,7 +339,6 @@ src/libguestfs.syms src/stamp-guestfs.pod *.swp stamp-h1 -test1.img test-tool/libguestfs-test-tool test-tool/libguestfs-test-tool.1 test-tool/libguestfs-test-tool-helper @@ -359,6 +357,7 @@ tests/c-api/test*.img tests/c-api/tests tests/c-api/tests.c tests/c-api/test*.tmp +tests/regressions/rhbz501893 tools/test.img tools/virt-*.1 tools/virt-*.pl diff --git a/Makefile.am b/Makefile.am index 5c8ff67..31da875 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,7 +30,10 @@ SUBDIRS += appliance endif # Tests and the test-tool. -SUBDIRS += gnulib/tests tests/c-api tests/qemu regressions extratests test-tool +SUBDIRS += gnulib/tests tests/c-api tests/qemu +SUBDIRS += tests/protocol tests/lvm tests/luks tests/md +SUBDIRS += tests/regressions +SUBDIRS += extratests test-tool # Guestfish. SUBDIRS += fish diff --git a/configure.ac b/configure.ac index ac09844..33d2aea 100644 --- a/configure.ac +++ b/configure.ac @@ -1041,7 +1041,6 @@ AC_CONFIG_FILES([Makefile po/Makefile.in python/Makefile python/examples/Makefile - regressions/Makefile rescue/Makefile resize/Makefile ruby/Makefile @@ -1051,7 +1050,12 @@ AC_CONFIG_FILES([Makefile src/Makefile test-tool/Makefile tests/c-api/Makefile + tests/luks/Makefile + tests/lvm/Makefile + tests/md/Makefile + tests/protocol/Makefile tests/qemu/Makefile + tests/regressions/Makefile tools/Makefile]) AC_OUTPUT diff --git a/daemon/debug.c b/daemon/debug.c index bb91c9e..31cef46 100644 --- a/daemon/debug.c +++ b/daemon/debug.c @@ -280,7 +280,9 @@ debug_env (const char *subcmd, int argc, char *const *const argv) return out; } -/* Return binaries in the appliance. See regressions/rhbz727178.sh */ +/* Return binaries in the appliance. + * See tests/regressions/rhbz727178.sh + */ static char * debug_binaries (const char *subcmd, int argc, char *const *const argv) { @@ -306,7 +308,9 @@ debug_binaries (const char *subcmd, int argc, char *const *const argv) return out; } -/* Run 'ldd' on a file from the appliance. See regressions/rhbz727178.sh */ +/* Run 'ldd' on a file from the appliance. + * See tests/regressions/rhbz727178.sh + */ static char * debug_ldd (const char *subcmd, int argc, char *const *const argv) { diff --git a/fish/Makefile.am b/fish/Makefile.am index c940c2b..2624a7d 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -45,6 +45,7 @@ BUILT_SOURCES = \ EXTRA_DIST = \ $(BUILT_SOURCES) \ + $(TESTS) \ rc_protocol.x \ guestfish.pod \ guestfish-bash-completion.sh \ @@ -226,3 +227,28 @@ toolsconf_DATA = libguestfs-tools.conf bashcompletiondir = $(sysconfdir)/bash_completion.d bashcompletion_DATA = guestfish-bash-completion.sh + +# Tests. + +random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) + +TESTS_ENVIRONMENT = \ + MALLOC_PERTURB_=$(random_val) \ + LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) + +TESTS = \ + test-add-domain.sh \ + test-copy.sh \ + test-find0.sh \ + test-guestfish-a.sh \ + test-guestfish-d.sh \ + test-guestfish-escapes.sh \ + test-guestfish-events.sh \ + test-guestfish-tilde.sh \ + test-read_file.sh \ + test-remote.sh \ + test-reopen.sh \ + test-stringlist.sh \ + test-upload-to-dir.sh diff --git a/regressions/test-add-domain.sh b/fish/test-add-domain.sh similarity index 100% rename from regressions/test-add-domain.sh rename to fish/test-add-domain.sh diff --git a/regressions/test-copy.sh b/fish/test-copy.sh similarity index 100% rename from regressions/test-copy.sh rename to fish/test-copy.sh diff --git a/regressions/test-find0.sh b/fish/test-find0.sh similarity index 100% rename from regressions/test-find0.sh rename to fish/test-find0.sh diff --git a/regressions/test-guestfish-a.sh b/fish/test-guestfish-a.sh similarity index 100% rename from regressions/test-guestfish-a.sh rename to fish/test-guestfish-a.sh diff --git a/regressions/test-guestfish-d.sh b/fish/test-guestfish-d.sh similarity index 100% rename from regressions/test-guestfish-d.sh rename to fish/test-guestfish-d.sh diff --git a/regressions/test-guestfish-escapes.sh b/fish/test-guestfish-escapes.sh similarity index 100% rename from regressions/test-guestfish-escapes.sh rename to fish/test-guestfish-escapes.sh diff --git a/regressions/test-guestfish-events.sh b/fish/test-guestfish-events.sh similarity index 100% rename from regressions/test-guestfish-events.sh rename to fish/test-guestfish-events.sh diff --git a/regressions/test-guestfish-tilde.sh b/fish/test-guestfish-tilde.sh similarity index 100% rename from regressions/test-guestfish-tilde.sh rename to fish/test-guestfish-tilde.sh diff --git a/regressions/test-read_file.sh b/fish/test-read_file.sh similarity index 100% rename from regressions/test-read_file.sh rename to fish/test-read_file.sh diff --git a/regressions/test-remote.sh b/fish/test-remote.sh similarity index 100% rename from regressions/test-remote.sh rename to fish/test-remote.sh diff --git a/regressions/test-reopen.sh b/fish/test-reopen.sh similarity index 100% rename from regressions/test-reopen.sh rename to fish/test-reopen.sh diff --git a/regressions/test-stringlist.sh b/fish/test-stringlist.sh similarity index 100% rename from regressions/test-stringlist.sh rename to fish/test-stringlist.sh diff --git a/regressions/test-upload-to-dir.sh b/fish/test-upload-to-dir.sh similarity index 100% rename from regressions/test-upload-to-dir.sh rename to fish/test-upload-to-dir.sh diff --git a/regressions/tell-user-to-ignore-errors.sh b/regressions/tell-user-to-ignore-errors.sh deleted file mode 100755 index 6564288..0000000 --- a/regressions/tell-user-to-ignore-errors.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# libguestfs -# Copyright (C) 2010 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -echo -echo '*****' -echo -echo 'Some of these tests print error messages. You can ignore' -echo 'these error messages as long as the tests print "PASS".' -echo -echo '*****' -echo diff --git a/src/guestfs.pod b/src/guestfs.pod index 45f6329..8576065 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -2737,8 +2737,9 @@ the OCaml description. You can supply zero or as many tests as you want per API call. The tests can either be added as part of the API description (C), or in some rarer cases you may -want to drop a script into C. Note that adding a script -to C is slower, so if possible use the first method. +want to drop a script into C. Note that adding +a script to C is slower, so if possible use the +first method. The following describes the test environment used when you add an API test in C. @@ -2996,10 +2997,6 @@ The build infrastructure and PO files for translations of manpages and POD files. Eventually this will be combined with the C directory, but that is rather complicated. -=item C - -Regression tests. - =item C L command and documentation. diff --git a/tests/luks/Makefile.am b/tests/luks/Makefile.am new file mode 100644 index 0000000..2bc21ed --- /dev/null +++ b/tests/luks/Makefile.am @@ -0,0 +1,33 @@ +# libguestfs +# Copyright (C) 2009-2011 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +include $(top_srcdir)/subdir-rules.mk + +TESTS = \ + test-luks.sh \ + test-luks-list.sh + +random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) + +TESTS_ENVIRONMENT = \ + MALLOC_PERTURB_=$(random_val) \ + LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) + +EXTRA_DIST = \ + $(TESTS) diff --git a/regressions/test-luks-list.sh b/tests/luks/test-luks-list.sh similarity index 97% rename from regressions/test-luks-list.sh rename to tests/luks/test-luks-list.sh index 9385a4c..80ff6e7 100755 --- a/regressions/test-luks-list.sh +++ b/tests/luks/test-luks-list.sh @@ -27,7 +27,7 @@ set -e rm -f test1.img test.output -../fish/guestfish --keys-from-stdin > test.output <<'EOF' +../../fish/guestfish --keys-from-stdin > test.output <<'EOF' sparse test1.img 1G run part-init /dev/sda mbr diff --git a/regressions/test-luks.sh b/tests/luks/test-luks.sh similarity index 97% rename from regressions/test-luks.sh rename to tests/luks/test-luks.sh index fcf9d70..a9edca0 100755 --- a/regressions/test-luks.sh +++ b/tests/luks/test-luks.sh @@ -27,7 +27,7 @@ set -e rm -f test1.img -../fish/guestfish --keys-from-stdin < test.output exists /boot/grub/grub.conf diff --git a/regressions/test-inspect-fstab.sh b/tests/md/test-inspect-fstab.sh similarity index 97% rename from regressions/test-inspect-fstab.sh rename to tests/md/test-inspect-fstab.sh index 332cde0..72a11fa 100755 --- a/regressions/test-inspect-fstab.sh +++ b/tests/md/test-inspect-fstab.sh @@ -22,13 +22,13 @@ set -e export LANG=C -guestfish=../fish/guestfish +guestfish=../../fish/guestfish rm -f test1.img test.fstab test.output # Start with the regular (good) fedora image, modify /etc/fstab # and then inspect it. -cp ../images/fedora.img test1.img +cp ../../images/fedora.img test1.img cat <<'EOF' > test.fstab /dev/VG/Root / ext2 default 0 0 diff --git a/regressions/test-list-filesystems.sh b/tests/md/test-list-filesystems.sh similarity index 98% rename from regressions/test-list-filesystems.sh rename to tests/md/test-list-filesystems.sh index 353cdd0..9aea21a 100755 --- a/regressions/test-list-filesystems.sh +++ b/tests/md/test-list-filesystems.sh @@ -31,7 +31,7 @@ set -e # vg0 : 16M LV (lv0) # lv0 : 16M vfat output=$( -../fish/guestfish < md-detail.out +for md in `../../fish/guestfish --remote list-md-devices`; do + ../../fish/guestfish --remote md-detail "${md}" > md-detail.out sed 's/:\s*/=/' md-detail.out > md-detail.out.sh . md-detail.out.sh @@ -143,24 +143,24 @@ for md in `../fish/guestfish --remote list-md-devices`; do if [ "$error" == "1" ]; then echo "$0: Unexpected output from md-detail for device $md" cat md-detail.out - ../fish/guestfish --remote exit + ../../fish/guestfish --remote exit exit 1 fi done -../fish/guestfish --remote exit +../../fish/guestfish --remote exit -eval `../fish/guestfish --listen` -../fish/guestfish --remote add-ro md-test1.img -../fish/guestfish --remote add-ro md-test2.img -../fish/guestfish --remote add-ro md-test3.img -../fish/guestfish --remote add-ro md-test4.img -../fish/guestfish --remote run +eval `../../fish/guestfish --listen` +../../fish/guestfish --remote add-ro md-test1.img +../../fish/guestfish --remote add-ro md-test2.img +../../fish/guestfish --remote add-ro md-test3.img +../../fish/guestfish --remote add-ro md-test4.img +../../fish/guestfish --remote run -for md in `../fish/guestfish --remote list-md-devices`; do - ../fish/guestfish --remote md-stop "${md}" +for md in `../../fish/guestfish --remote list-md-devices`; do + ../../fish/guestfish --remote md-stop "${md}" done -../fish/guestfish --remote exit +../../fish/guestfish --remote exit rm -f md-detail.out md-test1.img md-test2.img md-test3.img md-test4.img diff --git a/regressions/test-bootbootboot.sh b/tests/protocol/Makefile.am old mode 100755 new mode 100644 similarity index 55% rename from regressions/test-bootbootboot.sh rename to tests/protocol/Makefile.am index 476cfdb..0d899dd --- a/regressions/test-bootbootboot.sh +++ b/tests/protocol/Makefile.am @@ -1,6 +1,5 @@ -#!/bin/bash - # libguestfs -# Copyright (C) 2009 Red Hat Inc. +# Copyright (C) 2009-2011 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,25 +15,24 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# Some versions of qemu can be flakey and can hang occasionally -# during boot (particularly KVM if the BIOS is the qemu version -# which doesn't have the required KVM patches). Test repeatedly -# booting. +include $(top_srcdir)/subdir-rules.mk -set -e +TESTS = \ + test-both-ends-cancel.sh \ + test-cancellation-download-librarycancels.sh \ + test-cancellation-upload-daemoncancels.sh \ + test-launch-race.pl \ + test-qemudie-killsub.sh \ + test-qemudie-midcommand.sh \ + test-qemudie-synch.sh -rm -f test1.img +random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) -n=10 -if [ -n "$1" ]; then n=$1; fi +TESTS_ENVIRONMENT = \ + MALLOC_PERTURB_=$(random_val) \ + LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) -export LIBGUESTFS_DEBUG=1 - -for i in $(seq 1 $n); do - echo Test boot $i of $n ... - ../fish/guestfish -N disk test.pid ! sleep 2 ; kill $(cat test.pid) & diff --git a/regressions/test-qemudie-synch.sh b/tests/protocol/test-qemudie-synch.sh similarity index 96% rename from regressions/test-qemudie-synch.sh rename to tests/protocol/test-qemudie-synch.sh index 697c83b..fb4e25f 100755 --- a/regressions/test-qemudie-synch.sh +++ b/tests/protocol/test-qemudie-synch.sh @@ -22,7 +22,7 @@ set -e rm -f test.pid test1.img -../fish/guestfish -N disk <<'EOF' +../../fish/guestfish -N disk <<'EOF' # Kill subprocess. pid | cat > test.pid ! kill $(cat test.pid) ; sleep 2 diff --git a/tests/qemu/qemu-snapshot-isolation.sh b/tests/qemu/qemu-snapshot-isolation.sh index 384706c..70b6839 100755 --- a/tests/qemu/qemu-snapshot-isolation.sh +++ b/tests/qemu/qemu-snapshot-isolation.sh @@ -33,7 +33,7 @@ test3_md5sum="$(md5sum test3.img | awk '{print $1}')" # The vitally important calls are 'add-drive-ro' and # 'add-drive-opts ... readonly:true'. -../fish/guestfish <<'EOF' +../../fish/guestfish <<'EOF' add-drive-ro test1.img add-drive-opts test2.img format:raw readonly:true add-drive-opts test3.img format:qcow2 readonly:true diff --git a/regressions/Makefile.am b/tests/regressions/Makefile.am similarity index 61% rename from regressions/Makefile.am rename to tests/regressions/Makefile.am index 00c25f1..e43d9e9 100644 --- a/regressions/Makefile.am +++ b/tests/regressions/Makefile.am @@ -15,14 +15,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# Regression tests and other important tests which are not -# specific to the C API. We can write these more easily in -# higher level languages than C. - include $(top_srcdir)/subdir-rules.mk TESTS = \ - tell-user-to-ignore-errors.sh \ rhbz501893 \ rhbz503169c13.sh \ rhbz557655.sh \ @@ -31,42 +26,7 @@ TESTS = \ rhbz580246.sh \ rhbz602997.sh \ rhbz690819.sh \ - test-add-domain.sh \ - test-both-ends-cancel.sh \ - test-cancellation-download-librarycancels.sh \ - test-cancellation-upload-daemoncancels.sh \ - test-copy.sh \ - test-find0.sh \ - test-guestfish-a.sh \ - test-guestfish-d.sh \ - test-guestfish-escapes.sh \ - test-guestfish-events.sh \ - test-guestfish-tilde.sh \ - test-inspect-fstab.sh \ - test-inspect-fstab-md.sh \ - test-launch-race.pl \ - test-list-filesystems.sh \ - test-list-md-devices.sh \ - test-luks.sh \ - test-luks-list.sh \ - test-lvm-filtering.sh \ - test-lvm-mapping.pl \ - test-mdadm.sh \ - test-noexec-stack.pl \ - test-qemudie-killsub.sh \ - test-qemudie-midcommand.sh \ - test-qemudie-synch.sh \ - test-read_file.sh \ - test-remote.sh \ - test-reopen.sh \ - test-stringlist.sh \ - test-upload-to-dir.sh - -SKIPPED_TESTS = \ - test-bootbootboot.sh - -FAILING_TESTS = \ - test-qemudie-launchfail.sh + test-noexec-stack.pl random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) @@ -89,8 +49,6 @@ rhbz501893_LDADD = \ $(top_builddir)/src/libguestfs.la EXTRA_DIST = \ - $(FAILING_TESTS) \ - $(SKIPPED_TESTS) \ $(TESTS) \ rhbz557655-expected.stdout \ rhbz557655-expected.stderr diff --git a/regressions/rhbz501893.c b/tests/regressions/rhbz501893.c similarity index 100% rename from regressions/rhbz501893.c rename to tests/regressions/rhbz501893.c diff --git a/regressions/rhbz503169c13.sh b/tests/regressions/rhbz503169c13.sh similarity index 96% rename from regressions/rhbz503169c13.sh rename to tests/regressions/rhbz503169c13.sh index f1cfa5e..1f3c152 100755 --- a/regressions/rhbz503169c13.sh +++ b/tests/regressions/rhbz503169c13.sh @@ -28,7 +28,7 @@ set -e rm -f test1.img -../fish/guestfish -N fs -m /dev/sda1 <> test.out 2>> test.err <> test.out 2>> test.err <> test.out 2>> test.err <> test.out 2>> test.err </dev/null` diff --git a/regressions/rhbz580246.sh b/tests/regressions/rhbz580246.sh similarity index 97% rename from regressions/rhbz580246.sh rename to tests/regressions/rhbz580246.sh index 0e5dbc6..847ced6 100755 --- a/regressions/rhbz580246.sh +++ b/tests/regressions/rhbz580246.sh @@ -29,7 +29,7 @@ dd if=/dev/zero of=test.img bs=1M count=2 tar cf test.tar test.img output=$( -../fish/guestfish 2>&1 <<'EOF' +../../fish/guestfish 2>&1 <<'EOF' add test.img run mkfs ext2 /dev/sda diff --git a/regressions/rhbz602997.sh b/tests/regressions/rhbz602997.sh similarity index 98% rename from regressions/rhbz602997.sh rename to tests/regressions/rhbz602997.sh index 61b9df6..401211d 100755 --- a/regressions/rhbz602997.sh +++ b/tests/regressions/rhbz602997.sh @@ -22,7 +22,7 @@ set -e export LANG=C -guestfish=../fish/guestfish +guestfish=../../fish/guestfish rm -f test.img test.output diff --git a/regressions/rhbz690819.sh b/tests/regressions/rhbz690819.sh similarity index 97% rename from regressions/rhbz690819.sh rename to tests/regressions/rhbz690819.sh index 251cc8d..a706285 100755 --- a/regressions/rhbz690819.sh +++ b/tests/regressions/rhbz690819.sh @@ -27,7 +27,7 @@ rm -f test.img truncate -s 100M test.img -../fish/guestfish <