tests: Replace $TEST_FUNCTIONS

Replace strange $TEST_FUNCTIONS variable/expansion thing with
something more like what we use in nbdkit, a simple tests/functions.sh
script that gets sourced into each test script.

Update the common submodule to get:

  commit 8137d47d0e654065391151eb275e3b64f230f6f5
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Thu Feb 13 11:13:55 2025 +0000

    mlcustomize, mltools: Replace $TEST_FUNCTIONS

    TEST_FUNCTIONS is being removed from libguestfs and guestfs-tools (it
    was removed from virt-v2v a while back).  Make the same adjustment in
    the common submodule.

(and some other commits which are not relevant to libguestfs)
This commit is contained in:
Richard W.M. Jones
2025-02-13 10:32:59 +00:00
parent 82e2dea96a
commit b5fbc7e617
114 changed files with 255 additions and 147 deletions

View File

@@ -18,9 +18,10 @@
# Test the handling of MD devices specified in /etc/fstab
source ./functions.sh
set -e
set -x
$TEST_FUNCTIONS
skip_if_skipped
skip_unless_phony_guest fedora-md1.img
skip_unless_phony_guest fedora-md2.img

View File

@@ -19,11 +19,12 @@
# Test various aspects of core inspection of /etc/fstab.
# This also tests: https://bugzilla.redhat.com/668574
source ./functions.sh
set -e
set -x
$TEST_FUNCTIONS
skip_because "device name hints are broken" ;# XXX Fix before 1.38
skip_if_skipped
skip_because "device name hints are broken" ;# XXX Fix before 1.38
skip_unless_phony_guest fedora.img
canonical="sed -r s,/dev/[abce-ln-z]+d,/dev/sd,g"

View File

@@ -18,9 +18,10 @@
# Test guestfish list-mddevices command
source ./functions.sh
set -e
set -x
$TEST_FUNCTIONS
skip_if_skipped
rm -f list-fs.output

View File

@@ -18,9 +18,10 @@
# Test guestfish list-md-devices command
source ./functions.sh
set -e
set -x
$TEST_FUNCTIONS
skip_if_skipped
output=$(

View File

@@ -18,9 +18,10 @@
# Test guestfish finds logical volume (LV) created on md device
source ./functions.sh
set -e
set -x
$TEST_FUNCTIONS
skip_if_skipped
disk1=lvm-on-md-devices-1.img
@@ -77,4 +78,4 @@ if [ "$output" != "$expected" ]; then
fi
# cleanup() is called implicitly which cleans up everything
exit 0
exit 0

View File

@@ -25,9 +25,10 @@
# is inaccessible so it is easy observable that md device is missing (raid1 in
# this case will be operable but in degraded state).
source ./functions.sh
set -e
set -x
$TEST_FUNCTIONS
skip_if_skipped
disk1=md-and-lvm-devices-1.img

View File

@@ -18,9 +18,10 @@
# Test guestfish md-create and md-detail commands.
source ./functions.sh
set -e
set -x
$TEST_FUNCTIONS
skip_if_skipped
rm -f mdadm-{1,2,3,4}.img

View File

@@ -20,9 +20,10 @@
# md device and does't take into account md device itself (similar to as
# physical devices are skipped if they are partitioned)
source ./functions.sh
set -e
set -x
$TEST_FUNCTIONS
skip_if_skipped
disk1=list-filesystems2-1.img