From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jTqWB-0004SP-Cd for mharc-grub-devel@gnu.org; Wed, 29 Apr 2020 13:29:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55484) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTqVa-0004LB-6m for grub-devel@gnu.org; Wed, 29 Apr 2020 13:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTqTY-0003bB-UO for grub-devel@gnu.org; Wed, 29 Apr 2020 13:28:29 -0400 Received: from mailout02.mx.bawue.net ([193.7.176.63]:32850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jTqTY-0002k6-95 for grub-devel@gnu.org; Wed, 29 Apr 2020 13:26:24 -0400 Received: from n-dimensional.de (p5B0825D9.dip0.t-ipconnect.de [91.8.37.217]) (Authenticated sender: pdim@bawue.de) by smtp.bawue.net (Postfix) with ESMTPSA id 1820720481 for ; Wed, 29 Apr 2020 19:25:58 +0200 (CEST) Date: Wed, 29 Apr 2020 19:25:57 +0200 From: Hans Ulrich Niedermann To: grub-devel@gnu.org Subject: Re: [PATCH v2] tests: Don't run f2fs test on systems with PAGE_SIZE more than 4096 bytes Message-ID: <20200429192557.15dd5a4c@n-dimensional.de> In-Reply-To: <20200429140636.GA4270@yogzotot> References: <20200429140636.GA4270@yogzotot> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanner: SAV Dynamic Interface 2.6.0, Engine: 3.77.1, SAV: 5.74 (3BCAA3C3) on relay01.mx.bawue.net using milter-sssp 0.1.0 X-Virus-Scan: Found to be clean. Received-SPF: pass client-ip=193.7.176.63; envelope-from=hun@n-dimensional.de; helo=mailout02.mx.bawue.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/29 13:26:01 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 193.7.176.63 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 17:29:06 -0000 On Wed, 29 Apr 2020 17:06:36 +0300 Anatoly Pugachev 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 > Reviewed-by: Mike Gilbert > > --- > 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