From 1fb3aff908a7e7b9a6c016bc69051c13b82b53ca Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Mar 2022 11:56:21 +0000 Subject: [PATCH] tests: Fix tests which could use conflicting filenames Commit 6d32773e81 ("tests: Run the tests in parallel.") makes all of the tests run in the same directory. Previously tests expected to be run in their own subdirectories and so were freer about using generic filenames. When run in parallel these filenames now clash. Fix another case. Fixes: commit 6d32773e811882f78dbd8c2a39a2b7a9c3cfca7c --- tests/mountable/test-mountable-inspect.sh | 33 ++++++++++++----------- tests/regressions/rhbz602997.sh | 17 ++++++------ 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/tests/mountable/test-mountable-inspect.sh b/tests/mountable/test-mountable-inspect.sh index 60db6cbea..7bbc6f138 100755 --- a/tests/mountable/test-mountable-inspect.sh +++ b/tests/mountable/test-mountable-inspect.sh @@ -25,41 +25,44 @@ skip_unless_feature_available btrfs canonical="sed s,/dev/vd,/dev/sd,g" -rm -f root.tmp test.qcow2 test.output +root=mountable-inspect.tmp +output=mountable-inspect.output +overlay=mountable-inspect.qcow2 +rm -f $root $overlay $output # Start with the regular (good) fedora image, modify /etc/fstab # and then inspect it. guestfish -- \ - disk-create test.qcow2 qcow2 -1 \ + disk-create $overlay qcow2 -1 \ backingfile:../test-data/phony-guests/fedora-btrfs.img backingformat:raw # Test that basic inspection works and the expected filesystems are # found -guestfish --format=qcow2 -a test.qcow2 -i <<'EOF' | sort | $canonical > test.output - inspect-get-roots | head -1 > root.tmp - $output + inspect-get-roots | head -1 > $root + test.output - inspect-get-roots | head -1 > root.tmp - $output + inspect-get-roots | head -1 > $root + test.output < $output < test.output < $output <