diff mbox series

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

Message ID 20240214174209.3284958-1-mcgrof@kernel.org (mailing list archive)
State New, archived
Headers show
Series [fstests] common/config: fix CANON_DEVS=yes when file does not exist | expand

Commit Message

Luis Chamberlain Feb. 14, 2024, 5:42 p.m. UTC
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"
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 common/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Disseldorp Feb. 15, 2024, 3:54 a.m. UTC | #1
On Wed, 14 Feb 2024 09:42:08 -0800, Luis Chamberlain wrote:

> 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

> 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>
Luis Chamberlain Feb. 15, 2024, 5:50 p.m. UTC | #2
On Thu, Feb 15, 2024 at 02:54:22PM +1100, David Disseldorp wrote:
> On Wed, 14 Feb 2024 09:42:08 -0800, Luis Chamberlain wrote:
> 
> > 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?

> > 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>

Thanks!

  Luis
Zorro Lang Feb. 25, 2024, 4:23 p.m. UTC | #3
On Thu, Feb 15, 2024 at 09:50:11AM -0800, Luis Chamberlain wrote:
> On Thu, Feb 15, 2024 at 02:54:22PM +1100, David Disseldorp wrote:
> > On Wed, 14 Feb 2024 09:42:08 -0800, Luis Chamberlain wrote:
> > 
> > > 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.

> 
> > > 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>
> 
> Thanks!
> 
>   Luis
>
diff mbox series

Patch

diff --git a/common/config b/common/config
index a3b15b96f336..2a1434bb11b9 100644
--- a/common/config
+++ b/common/config
@@ -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"