From 3570ee3688fdeb0ff360ec793cf41e90f00d7729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 25 Oct 2023 17:52:11 +0100 Subject: [PATCH] test-fstab-generator: skip test impacted by /mnt symlink MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On rpm-ostree distributions such as Fedora SilverBlue /mnt (and other well known paths) will be a symlink to a location under /var. The fstab generator emits correct output in this case, however, the data does not match the expected output stored in the source tree. Rather than trying to adapt the test data, just skip this single test scenario when we see /mnt is a symlink. Signed-off-by: Daniel P. Berrangé --- test/test-fstab-generator.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test-fstab-generator.sh b/test/test-fstab-generator.sh index 50ba321b9c8..af8fa7c226d 100755 --- a/test/test-fstab-generator.sh +++ b/test/test-fstab-generator.sh @@ -128,6 +128,14 @@ test_one() ( ) for f in "$src"/test-*.input; do + # If /mnt is a symlink, then the expected output from this + # test scenario will not match the actual output + if test "$f" = "$src/test-18-options.fstab.input" -a "$(readlink /mnt)" != "/mnt" + then + echo "Skip $f because /mnt is a symlink" + continue + fi + test_one "$f" yes test_one "$f" no done