From patchwork Fri Jun 30 04:12:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9818393 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 77601603F3 for ; Fri, 30 Jun 2017 04:12:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F41F28479 for ; Fri, 30 Jun 2017 04:12:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4442228567; Fri, 30 Jun 2017 04:12:45 +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, UNPARSEABLE_RELAY 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 DF3402844B for ; Fri, 30 Jun 2017 04:12:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751026AbdF3EMo (ORCPT ); Fri, 30 Jun 2017 00:12:44 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:39359 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730AbdF3EMn (ORCPT ); Fri, 30 Jun 2017 00:12:43 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5U4Cfh6020863 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Jun 2017 04:12:41 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v5U4Cemp030882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Jun 2017 04:12:41 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v5U4CeZQ032646; Fri, 30 Jun 2017 04:12:40 GMT Received: from localhost (/24.21.211.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Jun 2017 21:12:40 -0700 Date: Thu, 29 Jun 2017 21:12:39 -0700 From: "Darrick J. Wong" To: eguan@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 10/8] common/rc: test that the xfs_io scrub/repair commands actually work Message-ID: <20170630041239.GE5871@birch.djwong.org> References: <149808222258.8924.1682057078986741098.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <149808222258.8924.1682057078986741098.stgit@birch.djwong.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When we call _require_xfs_io_command for the scrub ioctl, we have to actually try calling the ioctl to make sure that the ioctl is present on the running kernel. Signed-off-by: Darrick J. Wong --- common/rc | 5 +++++ 1 file changed, 5 insertions(+) -- 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 0062f6f..a3addad 100644 --- a/common/rc +++ b/common/rc @@ -2186,6 +2186,11 @@ _require_xfs_io_command() echo $testio | egrep -q "invalid option" && \ _notrun "xfs_io $command support is missing" ;; + "scrub"|"repair") + testio=`$XFS_IO_PROG -x -c "$command dummy 0" $TEST_DIR 2>&1` + echo $testio | egrep -q "Inappropriate ioctl" && \ + _notrun "xfs_io $command support is missing" + ;; "utimes" ) testio=`$XFS_IO_PROG -f -c "utimes" 0 0 0 0 $testfile 2>&1` ;;