From: Hans Ulrich Niedermann <hun@n-dimensional.de>
To: grub-devel@gnu.org
Subject: Re: [PATCH v2] tests: Don't run f2fs test on systems with PAGE_SIZE more than 4096 bytes
Date: Wed, 29 Apr 2020 19:25:57 +0200 [thread overview]
Message-ID: <20200429192557.15dd5a4c@n-dimensional.de> (raw)
In-Reply-To: <20200429140636.GA4270@yogzotot>
On Wed, 29 Apr 2020 17:06:36 +0300
Anatoly Pugachev <matorola@gmail.com> wrote:
> Don't run f2fs test on systems with PAGE_SIZE > 4096 bytes, since
> f2fs is not supported on these systems and trying to mount a f2fs
> filesystem would fail.
"Skip the f2fs test on ..." might be better wording, both in this
paragraph and the Subject.
Exit code 77 is certainly documented with the word "skip", and "exit
77" will show up in the "make check" output as "SKIP" as well.
> v2 changes:
>
> - fix compare
> - quotes around variable expansion
>
> Signed-off-by: Anatoly Pugachev <matorola@gmail.com>
> Reviewed-by: Mike Gilbert <floppym@gentoo.org>
>
> ---
> tests/f2fs_test.in | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/f2fs_test.in b/tests/f2fs_test.in
> index 1ea77c826..3da1dad57 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" -gt "$F2FS_BLKSIZE" ]; then
> + printf "f2fs is not supported on PAGE_SIZE(%d) != %d\n" $PAGE_SIZE
> $F2FS_BLKSIZE
> + exit 77
> +fi
This confusing to me. You are skipping the test when
PAGE_SIZE > F2FS_BLKSIZE
but the corresponding message says
PAGE_SIZE != F2FS_BLKSIZE
Now... which condition is it supposed to be? ">" or "!="?
I know from the Linux kernel's ext2 driver that it is very well
possible that PAGE_SIZE != EXT2_BLOCK_SIZE can work
unless EXT2_BLOCK_SIZE > PAGE_SIZE.
So ">" and "!=" are not necessarily the same thing, and IMHO the check
and the message use the same condition.
Uli
next prev parent reply other threads:[~2020-04-29 17:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 14:06 [PATCH v2] tests: Don't run f2fs test on systems with PAGE_SIZE more than 4096 bytes Anatoly Pugachev
2020-04-29 17:25 ` Hans Ulrich Niedermann [this message]
2020-04-29 20:34 ` Hans Ulrich Niedermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200429192557.15dd5a4c@n-dimensional.de \
--to=hun@n-dimensional.de \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.