Richard W.M. Jones
2015-Nov-05 13:03 UTC
[Libguestfs] [PATCH 1/2] test-data: phony-guests: Don't use *.tmp.* temporary files.
--- test-data/phony-guests/Makefile.am | 3 +-- test-data/phony-guests/make-archlinux-img.sh | 4 ++-- test-data/phony-guests/make-coreos-img.sh | 10 ++++---- test-data/phony-guests/make-debian-img.sh | 10 ++++---- test-data/phony-guests/make-fedora-img.pl | 34 ++++++++++++++-------------- test-data/phony-guests/make-ubuntu-img.sh | 14 ++++++------ test-data/phony-guests/make-windows-img.sh | 4 ++-- 7 files changed, 39 insertions(+), 40 deletions(-) diff --git a/test-data/phony-guests/Makefile.am b/test-data/phony-guests/Makefile.am index 98922c7..f05aeb9 100644 --- a/test-data/phony-guests/Makefile.am +++ b/test-data/phony-guests/Makefile.am @@ -63,8 +63,7 @@ check_DATA = $(disk_images) guests-all-good.xml CLEANFILES = \ $(check_DATA) \ guests-all-good.xml \ - stamp-fedora-md.img \ - *.tmp.* + stamp-fedora-md.img # Make several different blank images. These are not guests, but we # include them in the libvirt fake XML to make sure that virt-df and diff --git a/test-data/phony-guests/make-archlinux-img.sh b/test-data/phony-guests/make-archlinux-img.sh index 5c848d2..066df09 100755 --- a/test-data/phony-guests/make-archlinux-img.sh +++ b/test-data/phony-guests/make-archlinux-img.sh @@ -23,7 +23,7 @@ set -e # Create a disk image. guestfish <<EOF -sparse archlinux.img.tmp.$$ 512M +sparse archlinux.img-t 512M run # Format the disk. @@ -55,4 +55,4 @@ mkdir /boot/grub touch /boot/grub/grub.conf EOF -mv archlinux.img.tmp.$$ archlinux.img +mv archlinux.img-t archlinux.img diff --git a/test-data/phony-guests/make-coreos-img.sh b/test-data/phony-guests/make-coreos-img.sh index b8e0816..1de2f25 100755 --- a/test-data/phony-guests/make-coreos-img.sh +++ b/test-data/phony-guests/make-coreos-img.sh @@ -22,7 +22,7 @@ export LANG=C set -e # lsb-release file. -cat > release.tmp.$$ <<'EOF' +cat > archlinux.release <<'EOF' DISTRIB_ID=CoreOS DISTRIB_RELEASE=647.0.0 DISTRIB_CODENAME="Red Dog" @@ -31,7 +31,7 @@ EOF # Create a disk image. guestfish <<EOF -sparse coreos.img.tmp.$$ 512M +sparse coreos.img-t 512M run part-init /dev/sda gpt @@ -73,11 +73,11 @@ mkdir /root mkdir /home write /etc/coreos/update.conf "GROUP=stable" -upload release.tmp.$$ /usr/share/coreos/lsb-release +upload archlinux.release /usr/share/coreos/lsb-release ln-s ../usr/share/coreos/lsb-release /etc/lsb-release write /etc/hostname "coreos.invalid" EOF -rm release.tmp.$$ -mv coreos.img.tmp.$$ coreos.img +rm archlinux.release +mv coreos.img-t coreos.img diff --git a/test-data/phony-guests/make-debian-img.sh b/test-data/phony-guests/make-debian-img.sh index b52758f..637bd4b 100755 --- a/test-data/phony-guests/make-debian-img.sh +++ b/test-data/phony-guests/make-debian-img.sh @@ -22,7 +22,7 @@ export LANG=C set -e # fstab file. -cat > fstab.tmp.$$ <<EOF +cat > debian.fstab <<EOF LABEL=BOOT /boot ext2 default 0 0 /dev/debian/root / ext2 default 0 0 /dev/debian/usr /usr ext2 default 1 2 @@ -32,7 +32,7 @@ EOF # Create a disk image. guestfish <<EOF -sparse debian.img.tmp.$$ 512M +sparse debian.img-t 512M run # Format the disk. @@ -78,7 +78,7 @@ mkdir-p /var/lib/dpkg mkdir /var/lib/urandom mkdir /var/log -upload fstab.tmp.$$ /etc/fstab +upload debian.fstab /etc/fstab write /etc/debian_version "5.0.1" write /etc/hostname "debian.invalid" @@ -92,5 +92,5 @@ mkdir /boot/grub touch /boot/grub/grub.conf EOF -rm fstab.tmp.$$ -mv debian.img.tmp.$$ debian.img +rm debian.fstab +mv debian.img-t debian.img diff --git a/test-data/phony-guests/make-fedora-img.pl b/test-data/phony-guests/make-fedora-img.pl index 520a02d..41521e7 100755 --- a/test-data/phony-guests/make-fedora-img.pl +++ b/test-data/phony-guests/make-fedora-img.pl @@ -49,9 +49,9 @@ foreach ('LAYOUT', 'SRCDIR') { } if ($ENV{LAYOUT} eq 'partitions') { - push (@images, "fedora.img.tmp.$$"); + push (@images, "fedora.img-t"); - open (my $fstab, '>', "fstab.tmp.$$") or die; + open (my $fstab, '>', "fedora.fstab") or die; print $fstab <<EOF; LABEL=BOOT /boot ext2 default 0 0 LABEL=ROOT / ext2 default 0 0 @@ -60,9 +60,9 @@ EOF $bootdev = '/dev/sda1'; - $g->disk_create ("fedora.img.tmp.$$", "raw", $IMAGE_SIZE); + $g->disk_create ("fedora.img-t", "raw", $IMAGE_SIZE); - $g->add_drive ("fedora.img.tmp.$$"); + $g->add_drive ("fedora.img-t"); $g->launch (); $g->part_init ('/dev/sda', 'mbr'); @@ -74,9 +74,9 @@ EOF } elsif ($ENV{LAYOUT} eq 'partitions-md') { - push (@images, "fedora-md1.img.tmp.$$", "fedora-md2.img.tmp.$$"); + push (@images, "fedora-md1.img-t", "fedora-md2.img-t"); - open (my $fstab, '>', "fstab.tmp.$$") or die; + open (my $fstab, '>', "fedora.fstab") or die; print $fstab <<EOF; /dev/md0 /boot ext2 default 0 0 LABEL=ROOT / ext2 default 0 0 @@ -103,7 +103,7 @@ EOF $g->md_create ('boot', ['/dev/sda1', '/dev/sdb1']); $g->md_create ('root', ['/dev/sda2', '/dev/sdb2']); - open (my $mdadm, '>', "mdadm.tmp.$$") or die; + open (my $mdadm, '>', "fedora.mdadm") or die; print $mdadm <<EOF; MAILADDR root AUTO +imsm +1.x -all @@ -123,9 +123,9 @@ EOF } elsif ($ENV{LAYOUT} eq 'btrfs') { - push (@images, "fedora-btrfs.img.tmp.$$"); + push (@images, "fedora-btrfs.img-t"); - open (my $fstab, '>', "fstab.tmp.$$") or die; + open (my $fstab, '>', "fedora.fstab") or die; print $fstab <<EOF; LABEL=BOOT /boot ext2 default 0 0 LABEL=ROOT / btrfs subvol=root 0 0 @@ -135,9 +135,9 @@ EOF $bootdev = '/dev/sda1'; - $g->disk_create ("fedora-btrfs.img.tmp.$$", "raw", $IMAGE_SIZE); + $g->disk_create ("fedora-btrfs.img-t", "raw", $IMAGE_SIZE); - $g->add_drive ("fedora-btrfs.img.tmp.$$"); + $g->add_drive ("fedora-btrfs.img-t"); $g->launch (); $g->part_init ('/dev/sda', 'mbr'); @@ -206,15 +206,15 @@ $g->chmod (0, '/etc/shadow'); $g->lsetxattr ('security.selinux', "system_u:object_r:shadow_t:s0\0", 30, '/etc/shadow'); -$g->upload ("fstab.tmp.$$", '/etc/fstab'); +$g->upload ("fedora.fstab", '/etc/fstab'); $g->write ('/etc/motd', "Welcome to Fedora release 14 (Phony)\n"); $g->write ('/etc/redhat-release', 'Fedora release 14 (Phony)'); $g->write ('/etc/fedora-release', 'Fedora release 14 (Phony)'); $g->write ('/etc/sysconfig/network', 'HOSTNAME=fedora.invalid'); -if (-f "mdadm.tmp.$$") { - $g->upload ("mdadm.tmp.$$", '/etc/mdadm.conf'); - unlink ("mdadm.tmp.$$") or die; +if (-f "fedora.mdadm") { + $g->upload ("fedora.mdadm", '/etc/mdadm.conf'); + unlink ("fedora.mdadm") or die; } $g->upload ($ENV{SRCDIR}.'/fedora-name.db', '/var/lib/rpm/Name'); @@ -252,8 +252,8 @@ $g->mknod (0777, 10, 10, '/bin/test7'); $g->shutdown (); $g->close (); -unlink ("fstab.tmp.$$") or die; +unlink ("fedora.fstab") or die; foreach my $img (@images) { - $img =~ /^(.*)\.tmp\.\d+$/ or die; + $img =~ /^(.*)-t$/ or die; rename ($img, $1) or die; } diff --git a/test-data/phony-guests/make-ubuntu-img.sh b/test-data/phony-guests/make-ubuntu-img.sh index d546aee..a3aa610 100755 --- a/test-data/phony-guests/make-ubuntu-img.sh +++ b/test-data/phony-guests/make-ubuntu-img.sh @@ -22,7 +22,7 @@ export LANG=C set -e # fstab file. -cat > fstab.tmp.$$ <<EOF +cat > ubuntu.fstab <<EOF LABEL=BOOT /boot ext2 default 0 0 /dev/sda2 / ext2 default 1 2 @@ -31,7 +31,7 @@ LABEL=BOOT /boot ext2 default 0 0 EOF # lsb-release file. -cat > release.tmp.$$ <<'EOF' +cat > ubuntu.release <<'EOF' DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.10 DISTRIB_CODENAME=maverick @@ -40,7 +40,7 @@ EOF # Create a disk image. guestfish <<EOF -sparse ubuntu.img.tmp.$$ 512M +sparse ubuntu.img-t 512M run # Format the disk. @@ -68,9 +68,9 @@ mkdir /usr mkdir-p /var/lib/dpkg mkdir /var/lib/urandom -upload fstab.tmp.$$ /etc/fstab +upload ubuntu.fstab /etc/fstab write /etc/debian_version "5.0.1" -upload release.tmp.$$ /etc/lsb-release +upload ubuntu.release /etc/lsb-release write /etc/hostname "ubuntu.invalid" upload $SRCDIR/debian-packages /var/lib/dpkg/status @@ -81,5 +81,5 @@ mkdir /boot/grub touch /boot/grub/grub.conf EOF -rm fstab.tmp.$$ release.tmp.$$ -mv ubuntu.img.tmp.$$ ubuntu.img +rm ubuntu.fstab ubuntu.release +mv ubuntu.img-t ubuntu.img diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh index 0c2fe69..4075238 100755 --- a/test-data/phony-guests/make-windows-img.sh +++ b/test-data/phony-guests/make-windows-img.sh @@ -37,7 +37,7 @@ fi # Create a disk image. guestfish <<EOF -sparse windows.img.tmp.$$ 512M +sparse windows.img-t 512M run # Format the disk. @@ -69,4 +69,4 @@ touch /autoexec.bat EOF -mv windows.img.tmp.$$ windows.img +mv windows.img-t windows.img -- 2.5.0
Richard W.M. Jones
2015-Nov-05 13:03 UTC
[Libguestfs] [PATCH 2/2] build: Drop serial_tests.
Use (implicitly) parallel tests on new enough automake. The tests run a bit quicker with this change. On my laptop, I measured 27 mins down to 18 mins. Change the ./run function so that ./run --test no longer spools the test output to a file. That is not necessary when using parallel tests, since the test harness does the same thing. Fix a few tests that either shouldn't be run in parallel, or weren't using uniquely named test files and so would break when tests were run in parallel. Note: This commit breaks the $RUN_OUTPUT_FILE functionality. --- .gitignore | 4 ++-- builder/test-virt-builder.sh | 8 ++++---- configure.ac | 19 ++----------------- fish/test-events.sh | 10 +++++----- fish/test-file-attrs.sh | 10 +++++----- fish/test-find0.sh | 10 +++++----- fish/test-read-file.sh | 8 ++++---- run.in | 34 +++++++++++++--------------------- tests/btrfs/test-btrfs-replace.sh | 8 ++++---- tests/qemu/Makefile.am | 4 ++++ tests/regressions/rhbz563450.sh | 10 +++++----- tests/regressions/rhbz563450b.sh | 10 +++++----- tests/regressions/rhbz789960.sh | 10 +++++----- v2v/test-v2v-oa-option.sh | 2 +- v2v/test-v2v-of-option.sh | 2 +- v2v/test-v2v-on-option.sh | 2 +- 16 files changed, 66 insertions(+), 85 deletions(-) diff --git a/.gitignore b/.gitignore index 091a943..8091608 100644 --- a/.gitignore +++ b/.gitignore @@ -14,11 +14,13 @@ *.jar *.la *.lo +*.log *.o *.orig *.patch *.rej *.swp +*.trs bindtests.tmp cscope.out @@ -462,8 +464,6 @@ Makefile.in /sysprep/sysprep-operations.pod /sysprep/virt-sysprep /sysprep/virt-sysprep.1 -/test.err -/test.out /tests/c-api/test-add-drive-opts /tests/c-api/test-add-libvirt-dom /tests/c-api/test-backend-settings diff --git a/builder/test-virt-builder.sh b/builder/test-virt-builder.sh index f357d12..2a9227b 100755 --- a/builder/test-virt-builder.sh +++ b/builder/test-virt-builder.sh @@ -74,7 +74,7 @@ $VG virt-builder phony-fedora \ --firstboot-install "minicom,inkscape" # Check that some modifications were made. -$VG guestfish --ro -i -a $output > test.out <<EOF +$VG guestfish --ro -i -a $output > test-virt-builder.out <<EOF # Uploaded files is-file /etc/foo/bar/baz/Makefile cat /etc/foo/bar/baz/foo @@ -99,7 +99,7 @@ is-file /etc/shadow cat /etc/shadow | sed -r '/^root:/!d;s,^(root:\\\$6\\\$).*,\\1,g' EOF -if [ "$(cat test.out)" != "true +if [ "$(cat test-virt-builder.out)" != "true Hello World true true @@ -115,9 +115,9 @@ true true root:\$6\$" ]; then echo "$0: unexpected output:" - cat test.out + cat test-virt-builder.out exit 1 fi rm $output -rm test.out +rm test-virt-builder.out diff --git a/configure.ac b/configure.ac index 88f5568..bd3e5e9 100644 --- a/configure.ac +++ b/configure.ac @@ -30,23 +30,8 @@ AC_SUBST([RELEASE_DATE], [2015-11-04]) AC_CONFIG_AUX_DIR([build-aux]) -dnl Initialize automake. automake < 1.12 didn't have serial-tests and -dnl gives an error if it sees this, but for automake >= 1.13 -dnl serial-tests is required so we have to include it. Solution is to -dnl test for the version of automake (by running an external command) -dnl and provide it if necessary. Note we have to do this entirely using -dnl m4 macros since automake queries this macro by running -dnl 'autoconf --trace'. -m4_define([serial_tests], [ - m4_esyscmd([automake --version | head -1 | awk ' - { - split ($NF, version, "."); - if (version[1] == 1 && version[2] >= 12) - print "serial-tests"; - }' - ]) -]) -AM_INIT_AUTOMAKE(foreign serial_tests subdir-objects) dnl NB: Do not [quote] this parameter. +dnl Initialize automake. +AM_INIT_AUTOMAKE(foreign subdir-objects) dnl NB: Do not [quote] this parameter. m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. diff --git a/fish/test-events.sh b/fish/test-events.sh index 3f65164..7d4cd82 100755 --- a/fish/test-events.sh +++ b/fish/test-events.sh @@ -20,9 +20,9 @@ set -e -rm -f test.out +rm -f test-events.out -$VG guestfish -a /dev/null <<'EOF' | grep -v get_verbose | grep -v get_trace | grep -v 'library .*0x' | grep -v 'library command' | grep -v 'get_path' > test.out +$VG guestfish -a /dev/null <<'EOF' | grep -v get_verbose | grep -v get_trace | grep -v 'library .*0x' | grep -v 'library command' | grep -v 'get_path' > test-events.out trace true event ev1 * "echo $EVENT $@" @@ -49,7 +49,7 @@ list-events EOF -if [ "$(cat test.out)" != '"ev1" (0): *: echo $EVENT $@ +if [ "$(cat test-events.out)" != '"ev1" (0): *: echo $EVENT $@ "ev1" (1): *: echo $EVENT $@ "ev2" (2): *: echo $EVENT $@ "ev2" (2): *: echo $EVENT $@ @@ -75,8 +75,8 @@ close "ev2" (1): close,subprocess_quit: echo $EVENT $@ close' ]; then echo "$0: unexpected output from guestfish events" - cat test.out + cat test-events.out exit 1 fi -rm test.out +rm test-events.out diff --git a/fish/test-file-attrs.sh b/fish/test-file-attrs.sh index 55d602c..7f34348 100755 --- a/fish/test-file-attrs.sh +++ b/fish/test-file-attrs.sh @@ -21,9 +21,9 @@ set -e export LANG=C -rm -f test.out +rm -f test-file-attrs.out -$VG guestfish > test.out <<EOF +$VG guestfish > test-file-attrs.out <<EOF scratch 50MB run part-disk /dev/sda mbr @@ -72,7 +72,7 @@ copy-attributes /foo /new mode:true stat /new | grep mode: EOF -if [ "$(cat test.out)" != "mode: 33226 +if [ "$(cat test-file-attrs.out)" != "mode: 33226 mode: 33226 ----- uid: 0 @@ -150,8 +150,8 @@ gid: 11 } mode: 33226" ]; then echo "$0: unexpected output:" - cat test.out + cat test-file-attrs.out exit 1 fi -rm test.out +rm test-file-attrs.out diff --git a/fish/test-find0.sh b/fish/test-find0.sh index 042e4ef..f327761 100755 --- a/fish/test-find0.sh +++ b/fish/test-find0.sh @@ -20,20 +20,20 @@ set -e -rm -f test.out +rm -f test-find0.out $VG guestfish <<'EOF' add-ro ../test-data/test.iso run mount-ro /dev/sda / -find0 / test.out +find0 / test-find0.out EOF -n=$(tr '\0' '\n' < test.out | grep '^known-[1-5]' | wc -l) +n=$(tr '\0' '\n' < test-find0.out | grep '^known-[1-5]' | wc -l) [ "$n" = 5 ] || { echo find0: Invalid list of files - tr '\0' '\n' < test.out + tr '\0' '\n' < test-find0.out exit 1 } -rm -f test.out +rm -f test-find0.out diff --git a/fish/test-read-file.sh b/fish/test-read-file.sh index 7819041..b83faa9 100755 --- a/fish/test-read-file.sh +++ b/fish/test-read-file.sh @@ -20,15 +20,15 @@ set -e -rm -f test.out +rm -f test-read-file.out -$VG guestfish <<'EOF' > test.out +$VG guestfish <<'EOF' > test-read-file.out add-ro ../test-data/test.iso run mount-ro /dev/sda / read-file /helloworld.tar EOF -cmp $srcdir/../test-data/files/helloworld.tar test.out +cmp $srcdir/../test-data/files/helloworld.tar test-read-file.out -rm -f test.out +rm -f test-read-file.out diff --git a/run.in b/run.in index 46dbaf0..d59da7f 100755 --- a/run.in +++ b/run.in @@ -31,15 +31,20 @@ # For lots more ways to use this script, see the libguestfs README # file. # -# The script can also be used to make the output of tests shorter: +# The script should also be used for tests like this: +# # TESTS_ENVIRONMENT = ... $(top_builddir)/run --test [$(VG)] -# (Use the optional $(VG) when the tests must also be run under -# valgrind). +# +# The --test parameter introduces a timeout, stopping tests from +# running forever. +# +# Use the optional $(VG) when the tests must also be run under +# valgrind. #---------------------------------------------------------------------- if [ "$1" = "--test" ]; then - test_mode=1 + timeout_mode=1 shift fi @@ -223,14 +228,11 @@ export GNOME_KEYRING_CONTROL export GNOME_KEYRING_PID # Run the program. -if [ -z "$test_mode" ]; then +if [ -z "$timeout_mode" ]; then exec $libtool "$@" fi # For tests (./run --test): -# - redirect all output to a file, and only print the file if the -# test fails -# - print how long it takes to run the test # - timeout if the test takes too long to run # Originally 1h, but that is not long enough to run the C API @@ -246,28 +248,19 @@ if timeout --foreground 2 sleep 0 >/dev/null 2>&1; then fi fi -pid=$$ -tmpout=$b/tmp/run-$pid -rm -f $tmpout -start_t="$(date +'%s')" -$timeout $libtool "$@" > $tmpout 2>&1 +$timeout $libtool "$@" fail=$? -end_t="$(date +'%s')" if [ "$fail" -eq 0 ]; then # Test successful. - echo $(($end_t - $start_t)) seconds: "$@" + : elif [ "$fail" -eq 77 ]; then # Tests return 77 to mean skipped. - cat $tmpout + : elif [ "$fail" -eq 124 ]; then # Timed out. - echo "$b/run --test" "$@" - cat $tmpout echo "$b/run: command timed out after $timeout_period" else # Test failed. - echo "$b/run --test" "$@" - cat $tmpout echo "$b/run: command failed with exit code $fail" fi if [ -n "$RUN_OUTPUT_FILE" ]; then @@ -282,5 +275,4 @@ if [ -n "$RUN_OUTPUT_FILE" ]; then echo "]]>" >> $RUN_OUTPUT_FILE echo "</test>" >> $RUN_OUTPUT_FILE fi -rm -f $tmpout exit $fail diff --git a/tests/btrfs/test-btrfs-replace.sh b/tests/btrfs/test-btrfs-replace.sh index b0f4a1e..77aeb46 100755 --- a/tests/btrfs/test-btrfs-replace.sh +++ b/tests/btrfs/test-btrfs-replace.sh @@ -32,12 +32,12 @@ if ! guestfish -a /dev/null run : available btrfs; then exit 77 fi -rm -f test-btrfs-devices-{1,2}.img replace.output +rm -f test-btrfs-replace-{1,2}.img replace.output guestfish <<EOF > replace.output # Add 2 empty disks -sparse test-btrfs-devices-1.img 1G -sparse test-btrfs-devices-2.img 1G +sparse test-btrfs-replace-1.img 1G +sparse test-btrfs-replace-2.img 1G run mkfs-btrfs /dev/sda @@ -63,4 +63,4 @@ filesanddirs-10M.tar.xz" ]; then exit 1 fi -rm test-btrfs-devices-{1,2}.img replace.output +rm test-btrfs-replace-{1,2}.img replace.output diff --git a/tests/qemu/Makefile.am b/tests/qemu/Makefile.am index 478b3f1..6c72b18 100644 --- a/tests/qemu/Makefile.am +++ b/tests/qemu/Makefile.am @@ -75,3 +75,7 @@ qemu_speed_test_LDADD = \ $(LIBVIRT_LIBS) \ $(LTLIBINTL) \ $(top_builddir)/gnulib/lib/libgnu.la + +# Don't run these tests in parallel, since they are designed to check +# the integrity of qemu. +.NOTPARALLEL: diff --git a/tests/regressions/rhbz563450.sh b/tests/regressions/rhbz563450.sh index 90397a2..5215676 100755 --- a/tests/regressions/rhbz563450.sh +++ b/tests/regressions/rhbz563450.sh @@ -27,9 +27,9 @@ if [ ! -s ../../test-data/phony-guests/fedora.img -o ! -s ../../test-data/test.i exit 77 fi -rm -f test.out +rm -f rhbz563450.out -guestfish --ro > test.out <<EOF +guestfish --ro > rhbz563450.out <<EOF add-drive-ro ../../test-data/phony-guests/fedora.img add-cdrom ../../test-data/test.iso add-drive-ro ../../test-data/phony-guests/debian.img @@ -43,7 +43,7 @@ list-partitions | sed -r 's,^/dev/[abce-ln-z]+d,/dev/sd,' ping-daemon EOF -if [ "$(cat test.out)" != "/dev/sda +if [ "$(cat rhbz563450.out)" != "/dev/sda /dev/sdb /dev/sdc ---- @@ -52,8 +52,8 @@ if [ "$(cat test.out)" != "/dev/sda /dev/sdc1 /dev/sdc2" ]; then echo "$0: unexpected output:" - cat test.out + cat rhbz563450.out exit 1 fi -rm -f test.out +rm -f rhbz563450.out diff --git a/tests/regressions/rhbz563450b.sh b/tests/regressions/rhbz563450b.sh index f17b8f3..30f07b0 100755 --- a/tests/regressions/rhbz563450b.sh +++ b/tests/regressions/rhbz563450b.sh @@ -27,9 +27,9 @@ if [ ! -s ../../test-data/test.iso ]; then exit 77 fi -rm -f test.out +rm -f rhbz563450b.out -guestfish --ro > test.out <<EOF +guestfish --ro > rhbz563450b.out <<EOF add-cdrom ../../test-data/test.iso run @@ -39,10 +39,10 @@ list-devices | sed -r 's,^/dev/[abce-ln-z]+d,/dev/sd,' ping-daemon EOF -if [ "$(cat test.out)" != "/dev/sda" ]; then +if [ "$(cat rhbz563450b.out)" != "/dev/sda" ]; then echo "$0: unexpected output:" - cat test.out + cat rhbz563450b.out exit 1 fi -rm -f test.out +rm -f rhbz563450b.out diff --git a/tests/regressions/rhbz789960.sh b/tests/regressions/rhbz789960.sh index adfb10a..57c04c3 100755 --- a/tests/regressions/rhbz789960.sh +++ b/tests/regressions/rhbz789960.sh @@ -22,9 +22,9 @@ set -e export LANG=C -rm -f test.out +rm -f rhbz789960.out -guestfish -a ../../test-data/phony-guests/fedora.img --ro > test.out <<EOF +guestfish -a ../../test-data/phony-guests/fedora.img --ro > rhbz789960.out <<EOF run # Not a device at all, should fail. @@ -59,10 +59,10 @@ echo done EOF -if [ "$(cat test.out)" != "done" ]; then +if [ "$(cat rhbz789960.out)" != "done" ]; then echo "$0: unexpected output:" - cat test.out + cat rhbz789960.out exit 1 fi -rm -f test.out +rm -f rhbz789960.out diff --git a/v2v/test-v2v-oa-option.sh b/v2v/test-v2v-oa-option.sh index 5648f95..f3ffed8 100755 --- a/v2v/test-v2v-oa-option.sh +++ b/v2v/test-v2v-oa-option.sh @@ -43,7 +43,7 @@ fi export VIRT_TOOLS_DATA_DIR="$PWD/fake-virt-tools" -d=test-v2v-windows-conversion.d +d=test-v2v-oa-option.d rm -rf $d mkdir $d diff --git a/v2v/test-v2v-of-option.sh b/v2v/test-v2v-of-option.sh index a151c73..16e2fd0 100755 --- a/v2v/test-v2v-of-option.sh +++ b/v2v/test-v2v-of-option.sh @@ -43,7 +43,7 @@ fi export VIRT_TOOLS_DATA_DIR="$PWD/fake-virt-tools" -d=test-v2v-windows-conversion.d +d=test-v2v-of-option.d rm -rf $d mkdir $d diff --git a/v2v/test-v2v-on-option.sh b/v2v/test-v2v-on-option.sh index 5aaad2f..da55fe3 100755 --- a/v2v/test-v2v-on-option.sh +++ b/v2v/test-v2v-on-option.sh @@ -43,7 +43,7 @@ fi export VIRT_TOOLS_DATA_DIR="$PWD/fake-virt-tools" -d=test-v2v-windows-conversion.d +d=test-v2v-on-option.d rm -rf $d mkdir $d -- 2.5.0
Possibly Parallel Threads
- [PATCH] drives: add CD-ROM disk images as read-only drives (RHBZ#563450).
- Re: [PATCH] drives: add CD-ROM disk images as read-only drives (RHBZ#563450).
- [PATCH 0/3] misc tests-only changes
- Re: [PATCH] drives: add CD-ROM disk images as read-only drives (RHBZ#563450).
- [PATCH 0/3] tests: Define common test functions.