]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
common/config: fix CANON_DEVS=yes when file does not exist
authorLuis Chamberlain <mcgrof@kernel.org>
Wed, 14 Feb 2024 17:42:08 +0000 (09:42 -0800)
committerZorro Lang <zlang@kernel.org>
Fri, 1 Mar 2024 11:24:16 +0000 (19:24 +0800)
CANON_DEVS=yes allows you to use symlinks for devices, so fstests
resolves them back to the real backing device. The iteration for
resolving the backing device works obviously if you have the file
present, but if one was not present there is a parsing error. Fix
this parsing error introduced by a0c36009103b8 ("fstests: add helper
to canonicalize devices used to enable persistent disks").

Fixes: a0c36009103b8 ("fstests: add helper to canonicalize devices used to enable persistent disks"
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/config

index a3b15b96f3367fbc07fe282af516f01512adcb57..2a1434bb11b9cfb3a25f1079649476b7cd31e90d 100644 (file)
@@ -679,7 +679,7 @@ _canonicalize_devices()
                        if [ -L $i ]; then
                                NEW_SCRATCH_POOL="$NEW_SCRATCH_POOL $(readlink -e $i)"
                        else
-                               NEW_SCRATCH_POOL="$NEW_SCRATCH_POOL $i)"
+                               NEW_SCRATCH_POOL="$NEW_SCRATCH_POOL $i"
                        fi
                done
                SCRATCH_DEV_POOL="$NEW_SCRATCH_POOL"