All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
@ 2019-07-30  8:11 Anatoly Pugachev
  2019-07-30 10:00 ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 7+ messages in thread
From: Anatoly Pugachev @ 2019-07-30  8:11 UTC (permalink / raw)
  To: grub-devel

don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
Since f2fs is not supported on this systems (can't mount f2fs filesystem).

Signed-off-by: Anatoly Pugachev <matorola@gmail.com>
---
 tests/f2fs_test.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/f2fs_test.in b/tests/f2fs_test.in
index 1ea77c826..9f8db7f35 100644
--- a/tests/f2fs_test.in
+++ b/tests/f2fs_test.in
@@ -15,5 +15,11 @@ if ! which mkfs.f2fs >/dev/null 2>&1; then
  exit 77
 fi
 
+PAGE_SIZE=$(getconf PAGE_SIZE)
+F2FS_BLKSIZE=4096
+if [ $PAGE_SIZE > $F2FS_BLKSIZE ]; then
+ printf "F2FS not supported on PAGE_SIZE(%d) != %d\n" $PAGE_SIZE $F2FS_BLKSIZE
+ exit 77
+fi
 
 "@builddir@/grub-fs-tester" f2fs
-- 
2.22.0



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

* Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
  2019-07-30  8:11 [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4096 bytes Anatoly Pugachev
@ 2019-07-30 10:00 ` John Paul Adrian Glaubitz
  2019-07-30 12:10   ` [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB Anatoly Pugachev
  0 siblings, 1 reply; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2019-07-30 10:00 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Anatoly Pugachev

Hi Anatoly!

On 7/30/19 10:11 AM, Anatoly Pugachev wrote:
> don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
> Since f2fs is not supported on this systems (can't mount f2fs filesystem).

Some spelling fixes and re-phrasing suggestion:

> Don't run f2fs tests on systems with PAGE_SIZE > 4096 bytes since f2fs
> is not supported on these systems and mounting a f2fs filesystems fails.

And:

+PAGE_SIZE=$(getconf PAGE_SIZE)
+F2FS_BLKSIZE=4096
+if [ $PAGE_SIZE > $F2FS_BLKSIZE ]; then
+ printf "F2FS not supported on PAGE_SIZE(%d) != %d\n" $PAGE_SIZE $F2FS_BLKSIZE
          ^^^^
  I would write "f2fs" in lower case here for consistency with the rest of the script.

+ exit 77
+fi

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


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

* Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
  2019-07-30 10:00 ` John Paul Adrian Glaubitz
@ 2019-07-30 12:10   ` Anatoly Pugachev
  2020-04-23  9:10     ` Anatoly Pugachev
  0 siblings, 1 reply; 7+ messages in thread
From: Anatoly Pugachev @ 2019-07-30 12:10 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

On Tue, Jul 30, 2019 at 1:00 PM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> On 7/30/19 10:11 AM, Anatoly Pugachev wrote:
> > don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
> > Since f2fs is not supported on this systems (can't mount f2fs filesystem).
>
> Some spelling fixes and re-phrasing suggestion:
>
> > Don't run f2fs tests on systems with PAGE_SIZE > 4096 bytes since f2fs
> > is not supported on these systems and mounting a f2fs filesystems fails.
>
> And:
>
> +PAGE_SIZE=$(getconf PAGE_SIZE)
> +F2FS_BLKSIZE=4096
> +if [ $PAGE_SIZE > $F2FS_BLKSIZE ]; then
> + printf "F2FS not supported on PAGE_SIZE(%d) != %d\n" $PAGE_SIZE $F2FS_BLKSIZE
>           ^^^^
>   I would write "f2fs" in lower case here for consistency with the rest of the script.
>
> + exit 77
> +fi

Adrian,

thanks. Attached v2 patch.

[-- Attachment #2: 0001-Don-t-run-f2fs-tests-on-systems-with-PAGE_SIZE-4096-.patch --]
[-- Type: application/x-patch, Size: 941 bytes --]

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

* Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
  2019-07-30 12:10   ` [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB Anatoly Pugachev
@ 2020-04-23  9:10     ` Anatoly Pugachev
  2020-04-23 10:54       ` Daniel Kiper
  2020-04-26  4:53       ` Mike Gilbert
  0 siblings, 2 replies; 7+ messages in thread
From: Anatoly Pugachev @ 2020-04-23  9:10 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: John Paul Adrian Glaubitz

On Tue, Jul 30, 2019 at 3:10 PM Anatoly Pugachev <matorola@gmail.com> wrote:
>
> On Tue, Jul 30, 2019 at 1:00 PM John Paul Adrian Glaubitz
> <glaubitz@physik.fu-berlin.de> wrote:
> > On 7/30/19 10:11 AM, Anatoly Pugachev wrote:
> > > don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
> > > Since f2fs is not supported on this systems (can't mount f2fs filesystem).
> >
> > Some spelling fixes and re-phrasing suggestion:
> >
> > > Don't run f2fs tests on systems with PAGE_SIZE > 4096 bytes since f2fs
> > > is not supported on these systems and mounting a f2fs filesystems fails.
> >
> > And:
> >
> > +PAGE_SIZE=$(getconf PAGE_SIZE)
> > +F2FS_BLKSIZE=4096
> > +if [ $PAGE_SIZE > $F2FS_BLKSIZE ]; then
> > + printf "F2FS not supported on PAGE_SIZE(%d) != %d\n" $PAGE_SIZE $F2FS_BLKSIZE
> >           ^^^^
> >   I would write "f2fs" in lower case here for consistency with the rest of the script.
> >
> > + exit 77
> > +fi
>
> Adrian,
>
> thanks. Attached v2 patch.


Any chance this could be merged ? Thanks.


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

* Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
  2020-04-23  9:10     ` Anatoly Pugachev
@ 2020-04-23 10:54       ` Daniel Kiper
  2020-04-26  4:53       ` Mike Gilbert
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Kiper @ 2020-04-23 10:54 UTC (permalink / raw)
  To: Anatoly Pugachev; +Cc: The development of GNU GRUB, John Paul Adrian Glaubitz

On Thu, Apr 23, 2020 at 12:10:07PM +0300, Anatoly Pugachev wrote:
> On Tue, Jul 30, 2019 at 3:10 PM Anatoly Pugachev <matorola@gmail.com> wrote:
> >
> > On Tue, Jul 30, 2019 at 1:00 PM John Paul Adrian Glaubitz
> > <glaubitz@physik.fu-berlin.de> wrote:
> > > On 7/30/19 10:11 AM, Anatoly Pugachev wrote:
> > > > don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
> > > > Since f2fs is not supported on this systems (can't mount f2fs filesystem).
> > >
> > > Some spelling fixes and re-phrasing suggestion:
> > >
> > > > Don't run f2fs tests on systems with PAGE_SIZE > 4096 bytes since f2fs
> > > > is not supported on these systems and mounting a f2fs filesystems fails.
> > >
> > > And:
> > >
> > > +PAGE_SIZE=$(getconf PAGE_SIZE)
> > > +F2FS_BLKSIZE=4096
> > > +if [ $PAGE_SIZE > $F2FS_BLKSIZE ]; then
> > > + printf "F2FS not supported on PAGE_SIZE(%d) != %d\n" $PAGE_SIZE $F2FS_BLKSIZE
> > >           ^^^^
> > >   I would write "f2fs" in lower case here for consistency with the rest of the script.
> > >
> > > + exit 77
> > > +fi
> >
> > Adrian,
> >
> > thanks. Attached v2 patch.
>
> Any chance this could be merged ? Thanks.

Sorry, somehow I have missed your patch. Next time please use
"git send-email ..." to send new patch in new thread. Then it
will be much easier to spot.

I will put all variables expansions into quotes. Just in case.

Otherwise Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel


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

* Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
  2020-04-23  9:10     ` Anatoly Pugachev
  2020-04-23 10:54       ` Daniel Kiper
@ 2020-04-26  4:53       ` Mike Gilbert
  2020-04-27 12:00         ` Daniel Kiper
  1 sibling, 1 reply; 7+ messages in thread
From: Mike Gilbert @ 2020-04-26  4:53 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: John Paul Adrian Glaubitz

On Thu, Apr 23, 2020 at 5:10 AM Anatoly Pugachev <matorola@gmail.com> wrote:
>
> On Tue, Jul 30, 2019 at 3:10 PM Anatoly Pugachev <matorola@gmail.com> wrote:
> >
> > On Tue, Jul 30, 2019 at 1:00 PM John Paul Adrian Glaubitz
> > <glaubitz@physik.fu-berlin.de> wrote:
> > > On 7/30/19 10:11 AM, Anatoly Pugachev wrote:
> > > > don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
> > > > Since f2fs is not supported on this systems (can't mount f2fs filesystem).
> > >
> > > Some spelling fixes and re-phrasing suggestion:
> > >
> > > > Don't run f2fs tests on systems with PAGE_SIZE > 4096 bytes since f2fs
> > > > is not supported on these systems and mounting a f2fs filesystems fails.
> > >
> > > And:
> > >
> > > +PAGE_SIZE=$(getconf PAGE_SIZE)
> > > +F2FS_BLKSIZE=4096
> > > +if [ $PAGE_SIZE > $F2FS_BLKSIZE ]; then

This code does not do what you think it does. It runs the command "[
$PAGE_SIZE" and pipes the output to a file called "4096". The
resulting status will always be 0 (success).

You probably want to use "-gt" in place of ">".

if [ $PAGE_SIZE -gt $F2FS_BLKSIZE ]; then
...


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

* Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
  2020-04-26  4:53       ` Mike Gilbert
@ 2020-04-27 12:00         ` Daniel Kiper
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Kiper @ 2020-04-27 12:00 UTC (permalink / raw)
  To: matorola, Mike Gilbert
  Cc: The development of GNU GRUB, John Paul Adrian Glaubitz

On Sun, Apr 26, 2020 at 12:53:35AM -0400, Mike Gilbert wrote:
> On Thu, Apr 23, 2020 at 5:10 AM Anatoly Pugachev <matorola@gmail.com> wrote:
> >
> > On Tue, Jul 30, 2019 at 3:10 PM Anatoly Pugachev <matorola@gmail.com> wrote:
> > >
> > > On Tue, Jul 30, 2019 at 1:00 PM John Paul Adrian Glaubitz
> > > <glaubitz@physik.fu-berlin.de> wrote:
> > > > On 7/30/19 10:11 AM, Anatoly Pugachev wrote:
> > > > > don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
> > > > > Since f2fs is not supported on this systems (can't mount f2fs filesystem).
> > > >
> > > > Some spelling fixes and re-phrasing suggestion:
> > > >
> > > > > Don't run f2fs tests on systems with PAGE_SIZE > 4096 bytes since f2fs
> > > > > is not supported on these systems and mounting a f2fs filesystems fails.
> > > >
> > > > And:
> > > >
> > > > +PAGE_SIZE=$(getconf PAGE_SIZE)
> > > > +F2FS_BLKSIZE=4096
> > > > +if [ $PAGE_SIZE > $F2FS_BLKSIZE ]; then
>
> This code does not do what you think it does. It runs the command "[
> $PAGE_SIZE" and pipes the output to a file called "4096". The
> resulting status will always be 0 (success).
>
> You probably want to use "-gt" in place of ">".
>
> if [ $PAGE_SIZE -gt $F2FS_BLKSIZE ]; then

Ugh... Good point! I missed that somehow.

Anatoly, please take into account Mike's and mine comments and repost
the patch.

Daniel


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

end of thread, other threads:[~2020-04-27 12:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30  8:11 [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4096 bytes Anatoly Pugachev
2019-07-30 10:00 ` John Paul Adrian Glaubitz
2019-07-30 12:10   ` [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB Anatoly Pugachev
2020-04-23  9:10     ` Anatoly Pugachev
2020-04-23 10:54       ` Daniel Kiper
2020-04-26  4:53       ` Mike Gilbert
2020-04-27 12:00         ` Daniel Kiper

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.