From patchwork Tue Jul 19 06:49:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 9235953 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 9A4A6600CB for ; Tue, 19 Jul 2016 06:50:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D067200E7 for ; Tue, 19 Jul 2016 06:50:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8181D205AD; Tue, 19 Jul 2016 06:50: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 917F0200E7 for ; Tue, 19 Jul 2016 06:50:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbcGSGuG (ORCPT ); Tue, 19 Jul 2016 02:50:06 -0400 Received: from sandeen.net ([63.231.237.45]:35426 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752269AbcGSGuG (ORCPT ); Tue, 19 Jul 2016 02:50:06 -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 3E5B117DE2; Tue, 19 Jul 2016 01:49:59 -0500 (CDT) Subject: Re: [PATCH] generic/071: require falloc -k To: Christoph Hellwig , Eryu Guan References: <1468829204-24593-1-git-send-email-hch@lst.de> <20160718084714.GD27776@eguan.usersys.redhat.com> <20160719041718.GA17223@lst.de> Cc: fstests@vger.kernel.org From: Eric Sandeen Message-ID: <7bd28494-84e9-1458-5e28-893d02dd5c06@sandeen.net> Date: Mon, 18 Jul 2016 23:49:57 -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: <20160719041718.GA17223@lst.de> 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/18/16 9:17 PM, Christoph Hellwig wrote: > On Mon, Jul 18, 2016 at 04:47:14PM +0800, Eryu Guan wrote: >> This stops generic/071 from running no matter what filesystem it's >> testing, this is because _require_xfs_io_command only checks whether >> xfs_io knows the option (-k) by searching it in help message, not really >> running it, i.e. > > Well, we can at least add the documentation as that would be useful > on it's own. I'll look into a patch. > >> Perhaps we should update _require_xfs_io_command to actually run the >> command with the provided additional option? > > I'll have to look at the archives, but I remember we had a reason for > this way of probing for feature support. 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) --- 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..0eef3d5 100644 --- a/common/rc +++ b/common/rc @@ -1907,7 +1907,7 @@ _require_xfs_io_command() _notrun "xfs_io $command failed (old kernel/wrong fs?)" test -z "$param" && return - $XFS_IO_PROG -c "help $command" | grep -q "^ $param --" || \ + $XFS_IO_PROG -c "help $command" | egrep -qw "[ \[]$param" || \ _notrun "xfs_io $command doesn't support $param" }