Skip to contentSkip to conversation

common/config: fix CANON_DEVS=yes when file does not exist

PATCH In review Luis Chamberlain 3 participants 4 messages Feb 14, 2024 – Feb 25, 2024 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/config: fix CANON_DEVS=yes when file does not exist

CANON_DEVS=yes allows you to use symlinks for devices, so fstests resolves them back to the real backind device. The iteration for resolving the backind 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"
---
 common/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/config +1 -1
index a3b15b96f336..2a1434bb11b9 100644
@@ -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"
Signature · 1 line
2.42.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Luis Chamberlain

CANON_DEVS=yes allows you to use symlinks for devices, so fstests resolves them back to the real backind device. The iteration for resolving the backind device works obviously if you have the file

s/backind/backing

Quoted 6 lines

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"
#2 lore raw
Quoted 7 lines · David Disseldorp
Quoted 3 lines · Luis Chamberlain

CANON_DEVS=yes allows you to use symlinks for devices, so fstests resolves them back to the real backind device. The iteration for resolving the backind device works obviously if you have the file

s/backind/backing

Zorro, can you do the minor edit?

Quoted 8 lines
Quoted 6 lines

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"

Thanks!

Luis

#3 lore raw
Quoted 10 lines · Luis Chamberlain
Quoted 7 lines · David Disseldorp
Quoted 3 lines · Luis Chamberlain

CANON_DEVS=yes allows you to use symlinks for devices, so fstests resolves them back to the real backind device. The iteration for resolving the backind device works obviously if you have the file

s/backind/backing

Zorro, can you do the minor edit?

Sure, will do that.

Quoted 14 lines
Quoted 9 lines
Quoted 7 lines

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"

Thanks!

Luis