All of lore.kernel.org
 help / color / mirror / Atom feed
* Quoting issues in Bash script `grub-fs-tester` causes F2FS test failure
@ 2020-08-28  9:19 Paul Menzel
  2020-08-28 23:30 ` [PATCH] tests: F2FS test should use MOUNTDEVICE like other tests Glenn Washburn
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Menzel @ 2020-08-28  9:19 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Jaegeuk Kim

Dear GRUB folks,


Running `sudo env make -e check VERBOSE=yes SUBDIRS=` the F2FS is one of 
the two tests failing. It returns 255.

Running only the specific test

     sudo env TESTS=f2fs_test make -e check VERBOSE=yes SUBDIRS=

which runs

     sudo ./grub-fs-tester f2fs

and using `set -ex` in `grub-fs-tester` the call below has quoting issues.

                 xf2fs)
                     "mkfs.f2fs" -l "$FSLABEL" -q "${LODEVICES[0]}"

fails due to the loop device being passed in single quotes, which does 
not exist with the leading space.

      + LODEVICE=/dev/loop11
      + LODEVICES=' /dev/loop11'

      + mkfs.f2fs -l 
'grub_;/testé䏌䐓䏕киритiurewfceniuewruewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvvcreivire 
nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoirvcreivire 
nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoircreivire 
nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoiq' -q ' 
/dev/loop11'
      FAIL f2fs_test (exit status: 255)

Is there a Bash expert in here, able to fix it?


Kind regards,

Paul


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] tests: F2FS test should use MOUNTDEVICE like other tests.
  2020-08-28  9:19 Quoting issues in Bash script `grub-fs-tester` causes F2FS test failure Paul Menzel
@ 2020-08-28 23:30 ` Glenn Washburn
  2020-09-17 14:19   ` Daniel Kiper
  2020-09-18  7:06   ` Paul Menzel
  0 siblings, 2 replies; 5+ messages in thread
From: Glenn Washburn @ 2020-08-28 23:30 UTC (permalink / raw)
  To: grub-devel; +Cc: Glenn Washburn

LODEVICES is not an array variable and should not be accessed as such. This
allows the f2fs test to pass as it was failing because a device name had a
space prepended to the path.

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 tests/util/grub-fs-tester.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
index bc14a05ca..bfc425e1f 100644
--- a/tests/util/grub-fs-tester.in
+++ b/tests/util/grub-fs-tester.in
@@ -796,7 +796,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		    MOUNTFS=ext2
 		    "mkfs.ext2" -L "$FSLABEL" -q "${MOUNTDEVICE}"  ;;
 		xf2fs)
-		    "mkfs.f2fs" -l "$FSLABEL" -q "${LODEVICES[0]}" ;;
+		    "mkfs.f2fs" -l "$FSLABEL" -q "${MOUNTDEVICE}" ;;
 		xnilfs2)
 		    "mkfs.nilfs2" -L "$FSLABEL" -b $BLKSIZE  -q "${MOUNTDEVICE}" ;;
 		xext2_old)
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: F2FS test should use MOUNTDEVICE like other tests.
  2020-08-28 23:30 ` [PATCH] tests: F2FS test should use MOUNTDEVICE like other tests Glenn Washburn
@ 2020-09-17 14:19   ` Daniel Kiper
  2020-09-17 16:34     ` Jaegeuk Kim
  2020-09-18  7:06   ` Paul Menzel
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Kiper @ 2020-09-17 14:19 UTC (permalink / raw)
  To: Glenn Washburn; +Cc: grub-devel, jaegeuk, pmenzel

Adding Jaegeuk and Paul...

On Fri, Aug 28, 2020 at 06:30:25PM -0500, Glenn Washburn wrote:
> LODEVICES is not an array variable and should not be accessed as such. This
> allows the f2fs test to pass as it was failing because a device name had a
> space prepended to the path.
>
> Signed-off-by: Glenn Washburn <development@efficientek.com>
> ---
>  tests/util/grub-fs-tester.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
> index bc14a05ca..bfc425e1f 100644
> --- a/tests/util/grub-fs-tester.in
> +++ b/tests/util/grub-fs-tester.in
> @@ -796,7 +796,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
>  		    MOUNTFS=ext2
>  		    "mkfs.ext2" -L "$FSLABEL" -q "${MOUNTDEVICE}"  ;;
>  		xf2fs)
> -		    "mkfs.f2fs" -l "$FSLABEL" -q "${LODEVICES[0]}" ;;
> +		    "mkfs.f2fs" -l "$FSLABEL" -q "${MOUNTDEVICE}" ;;

LGTM...

Jaegeuk, Paul does this fix work for you?

Daniel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: F2FS test should use MOUNTDEVICE like other tests.
  2020-09-17 14:19   ` Daniel Kiper
@ 2020-09-17 16:34     ` Jaegeuk Kim
  0 siblings, 0 replies; 5+ messages in thread
From: Jaegeuk Kim @ 2020-09-17 16:34 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: Glenn Washburn, grub-devel, pmenzel

On 09/17, Daniel Kiper wrote:
> Adding Jaegeuk and Paul...
> 
> On Fri, Aug 28, 2020 at 06:30:25PM -0500, Glenn Washburn wrote:
> > LODEVICES is not an array variable and should not be accessed as such. This
> > allows the f2fs test to pass as it was failing because a device name had a
> > space prepended to the path.
> >
> > Signed-off-by: Glenn Washburn <development@efficientek.com>
> > ---
> >  tests/util/grub-fs-tester.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
> > index bc14a05ca..bfc425e1f 100644
> > --- a/tests/util/grub-fs-tester.in
> > +++ b/tests/util/grub-fs-tester.in
> > @@ -796,7 +796,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
> >  		    MOUNTFS=ext2
> >  		    "mkfs.ext2" -L "$FSLABEL" -q "${MOUNTDEVICE}"  ;;
> >  		xf2fs)
> > -		    "mkfs.f2fs" -l "$FSLABEL" -q "${LODEVICES[0]}" ;;
> > +		    "mkfs.f2fs" -l "$FSLABEL" -q "${MOUNTDEVICE}" ;;
> 
> LGTM...
> 
> Jaegeuk, Paul does this fix work for you?

Thank you. I'm okay and should follow the others.

Acked-by: Jaegeuk Kim <jaegeuk@kernel.org>

> 
> Daniel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: F2FS test should use MOUNTDEVICE like other tests.
  2020-08-28 23:30 ` [PATCH] tests: F2FS test should use MOUNTDEVICE like other tests Glenn Washburn
  2020-09-17 14:19   ` Daniel Kiper
@ 2020-09-18  7:06   ` Paul Menzel
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Menzel @ 2020-09-18  7:06 UTC (permalink / raw)
  To: Glenn Washburn; +Cc: grub-devel

Dear Glenn,


Am 29.08.20 um 01:30 schrieb Glenn Washburn:
> LODEVICES is not an array variable and should not be accessed as such. This
> allows the f2fs test to pass as it was failing because a device name had a
> space prepended to the path.
> 
> Signed-off-by: Glenn Washburn <development@efficientek.com>
> ---
>   tests/util/grub-fs-tester.in | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
> index bc14a05ca..bfc425e1f 100644
> --- a/tests/util/grub-fs-tester.in
> +++ b/tests/util/grub-fs-tester.in
> @@ -796,7 +796,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
>   		    MOUNTFS=ext2
>   		    "mkfs.ext2" -L "$FSLABEL" -q "${MOUNTDEVICE}"  ;;
>   		xf2fs)
> -		    "mkfs.f2fs" -l "$FSLABEL" -q "${LODEVICES[0]}" ;;
> +		    "mkfs.f2fs" -l "$FSLABEL" -q "${MOUNTDEVICE}" ;;
>   		xnilfs2)
>   		    "mkfs.nilfs2" -L "$FSLABEL" -b $BLKSIZE  -q "${MOUNTDEVICE}" ;;
>   		xext2_old)

Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-18  7:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28  9:19 Quoting issues in Bash script `grub-fs-tester` causes F2FS test failure Paul Menzel
2020-08-28 23:30 ` [PATCH] tests: F2FS test should use MOUNTDEVICE like other tests Glenn Washburn
2020-09-17 14:19   ` Daniel Kiper
2020-09-17 16:34     ` Jaegeuk Kim
2020-09-18  7:06   ` Paul Menzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.