From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cn.fujitsu.com ([59.151.112.132]:25805 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752979AbdCBEy4 (ORCPT ); Wed, 1 Mar 2017 23:54:56 -0500 Message-ID: <58B7A198.9000007@cn.fujitsu.com> Date: Thu, 2 Mar 2017 12:37:44 +0800 From: Xiao Yang MIME-Version: 1.0 Subject: Re: [PATCH v2] ext4/306: require 64bit feature to run ext4/306 References: <20170301085939.GG14226@eguan.usersys.redhat.com> <1488421466-3303-1-git-send-email-yangx.jy@cn.fujitsu.com> <20170302042212.GI14226@eguan.usersys.redhat.com> In-Reply-To: <20170302042212.GI14226@eguan.usersys.redhat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: fstests-owner@vger.kernel.org To: Eryu Guan Cc: fstests@vger.kernel.org List-ID: On 2017/03/02 12:22, Eryu Guan wrote: > On Thu, Mar 02, 2017 at 10:24:26AM +0800, Xiao Yang wrote: >> The 64bit feature isn't supported by mkfs.ext4 on RHEL6, so >> we add _require_ext4_mkfs_64bit to check it. If 64bit feature >> isn't supported, we could skip this case. This feature has >> been produced by 'commit 02d6f47e9647d ("mke2fs: Fix up mke2fs >> to be able to make 64-bit file systems")'. >> >> Signed-off-by: Xiao Yang >> --- >> common/rc | 11 +++++++++++ >> tests/ext4/306 | 1 + >> 2 files changed, 12 insertions(+) >> >> diff --git a/common/rc b/common/rc >> index 8f23334..8c4f1c3 100644 >> --- a/common/rc >> +++ b/common/rc >> @@ -1669,6 +1669,17 @@ _require_scratch_ext4_crc() >> _scratch_unmount >> } >> >> +# this test requires the 64bit feature to be available in mkfs.ext4 >> +_require_ext4_mkfs_64bit() >> +{ >> + local testfile=$TEST_DIR/$$.64bit >> + >> + touch $testfile >> + $MKFS_EXT4_PROG -F -O 64bit -n $testfile 512m>/dev/null 2>&1 \ >> + || _notrun "mkfs.ext4 doesn't have 64bit feature" >> + rm -f $testfile >> +} > Sorry, I didn't realize earlier that _require_mkfs_mkfs_bigalloc() runs > mkfs test against $SCRATCH_DEV too. Seems we should fix it too. Hi Eryu I will fix it too. :-) > Can you please factor out a new helper, e.g. _mkfs_ext4_supported(), to > accept mkfs options and return mkfs status? So that _require_ext4_mkfs_* > could use this new helper, just pass different feature bits it wants to > test. e.g. > > _require_ext4_mkfs_64bit() > { > _mkfs_ext4_supported -O 64bit || \ > _notrun "mkfs.ext4 doesn't have 64bit feature" > } > That's good idea, and I am trying to write this new helper as you sugguested. Thanks, Xiao Yang > Thanks! > > Eryu > > > . >