Don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
PATCH 1/1 Don't run f2fs test on systems with PAGE_SIZE > 4096 bytes.
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).
--- tests/f2fs_test.in | 6 ++++++ 1 file changed, 6 insertions(+)
tests/f2fs_test.in +6 -0
@@ -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
Signature · 1 line
2.22.0
Hi Anatoly!
Quoted 2 lines · Anatoly Pugachev
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:
Quoted 2 lines
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
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
Quoted 11 lines · John Paul Adrian Glaubitz
Quoted 2 lines · Anatoly Pugachev
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:
Quoted 2 lines
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:
Review
Quoted 9 lines
(quoted diff) +6
-0+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.
From 120f8edad0b0cb95aa496b2cc1b8b956f8a6e62f Mon Sep 17 00:00:00 2001
From: Anatoly Pugachev <[email protected]>
Date: Tue, 30 Jul 2019 15:02:40 +0300
Subject: [PATCH] Don't run f2fs tests on systems with PAGE_SIZE > 4KB
Don't run f2fs tests on systems with PAGE_SIZE > 4096 bytes, since f2fs is not supported on these systems and mounting a f2fs filesystem fails.
--- tests/f2fs_test.in | 6 ++++++ 1 file changed, 6 insertions(+)
tests/f2fs_test.in +6 -0
@@ -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
Signature · 1 line
2.22.0
Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
Quoted 21 lines · Anatoly Pugachev
Quoted 18 lines · John Paul Adrian Glaubitz
Quoted 2 lines · Anatoly Pugachev
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:
Quoted 2 lines
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:
tests/f2fs_test.in +4
-0+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.
Quoted 6 lines
Quoted 2 lines
+ exit 77
+fiAdrian,
thanks. Attached v2 patch.
Any chance this could be merged ? Thanks.
Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
Quoted 22 lines · Anatoly Pugachev
Quoted 21 lines · Anatoly Pugachev
Quoted 18 lines · John Paul Adrian Glaubitz
Quoted 2 lines · Anatoly Pugachev
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:
Quoted 2 lines
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:
tests/f2fs_test.in +4
-0+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.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
+ exit 77
+fiAdrian,
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 <[email protected]>
Daniel
Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
In reply to Anatoly PugachevQuoted 11 lines · Anatoly Pugachev
Quoted 9 lines · Anatoly Pugachev
Quoted 6 lines · John Paul Adrian Glaubitz
Quoted 2 lines · Anatoly Pugachev
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:
Quoted 8 lines
Quoted 8 lines
tests/f2fs_test.in if ! which mkfs.f2fs >/dev/null 2>&1; then · line 20
Quoted 8 lines
Quoted 2 lines
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:
tests/f2fs_test.in +3
-0+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
...
Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB
Quoted 25 lines · Mike Gilbert
Quoted 11 lines · Anatoly Pugachev
Quoted 9 lines · Anatoly Pugachev
Quoted 6 lines · John Paul Adrian Glaubitz
Quoted 2 lines · Anatoly Pugachev
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:
Quoted 8 lines
Quoted 8 lines
tests/f2fs_test.in if ! which mkfs.f2fs >/dev/null 2>&1; then · line 20
Quoted 8 lines
Quoted 2 lines
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:
tests/f2fs_test.in +3
-0+PAGE_SIZE=$(getconf PAGE_SIZE) +F2FS_BLKSIZE=4096 +if [ $PAGE_SIZE > $F2FS_BLKSIZE ]; thenThis 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).
Quoted 3 lines
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