From patchwork Wed Jul 20 05:34:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 9238913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ACFAD600CB for ; Wed, 20 Jul 2016 05:34:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D22D275A2 for ; Wed, 20 Jul 2016 05:34:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91BCE279E0; Wed, 20 Jul 2016 05:34:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 012B9275A2 for ; Wed, 20 Jul 2016 05:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752398AbcGTFet (ORCPT ); Wed, 20 Jul 2016 01:34:49 -0400 Received: from sandeen.net ([63.231.237.45]:59411 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbcGTFer (ORCPT ); Wed, 20 Jul 2016 01:34:47 -0400 Received: from Liberator.local (204-195-32-108.wavecable.com [204.195.32.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id E60144A4; Wed, 20 Jul 2016 00:34:45 -0500 (CDT) Subject: Re: [PATCH] generic/071: require falloc -k To: Eryu Guan , Christoph Hellwig References: <1468829204-24593-1-git-send-email-hch@lst.de> <20160718084714.GD27776@eguan.usersys.redhat.com> <20160719041718.GA17223@lst.de> <7bd28494-84e9-1458-5e28-893d02dd5c06@sandeen.net> <20160719083047.GA21083@lst.de> <20160720045217.GT27776@eguan.usersys.redhat.com> Cc: fstests@vger.kernel.org From: Eric Sandeen Message-ID: <07f34424-ed2c-4f5f-991b-91981367c1a5@sandeen.net> Date: Tue, 19 Jul 2016 22:34:43 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160720045217.GT27776@eguan.usersys.redhat.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 7/19/16 9:52 PM, Eryu Guan wrote: > On Tue, Jul 19, 2016 at 10:30:47AM +0200, Christoph Hellwig wrote: >> On Mon, Jul 18, 2016 at 11:49:57PM -0700, Eric Sandeen wrote: >>> Some tests actually do run xfs_io on a real file, but we probably >>> don't want to go that way. >>> >>> The test for finding it in help output seems way too specific, >>> >>> _require_xfs_io_command "pwrite" "-Z" >>> >>> fails as well because it doesn't hit the specific format in >>> the grep. >>> >>> What if we loosen up the test; is this too loose? (look for param >>> preceded by whitespace or square bracket) >> >> Seems like it's not loose enough as it still tries to run the test >> on NFS. > > For this NFSv4.2 case, I think we have to actually run "falloc -k" to > check whether the underlying fs supports (FALLOC_FL_KEEP_SIZE) or not. > > Current check in _require_xfs_io_command only checks whether xfs_io > knows the given option, not the underlying fs. And in this NFSv4.2 case, > NFSv4.2 supports fallocate(2), and xfs_io falloc command knows "-k" > option, so test runs on NFS. Oh right, sorry. So, this? -Eric --- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/common/rc b/common/rc index 6add69e..f087813 100644 --- a/common/rc +++ b/common/rc @@ -1880,7 +1880,7 @@ _require_xfs_io_command() testfile=$TEST_DIR/$$.xfs_io case $command in "falloc" ) - testio=`$XFS_IO_PROG -F -f -c "falloc 0 1m" $testfile 2>&1` + testio=`$XFS_IO_PROG -F -f -c "falloc $param 0 1m" $testfile 2>&1` ;; "fpunch" | "fcollapse" | "zero" | "fzero" | "finsert" ) testio=`$XFS_IO_PROG -F -f -c "pwrite 0 20k" -c "fsync" \