From patchwork Mon Nov 27 18:49:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goldwyn Rodrigues X-Patchwork-Id: 10077765 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 D513E602BC for ; Mon, 27 Nov 2017 18:49:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB47828ED5 for ; Mon, 27 Nov 2017 18:49:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C00D428F78; Mon, 27 Nov 2017 18:49:27 +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 5874628ED5 for ; Mon, 27 Nov 2017 18:49:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884AbdK0St0 (ORCPT ); Mon, 27 Nov 2017 13:49:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:49670 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753034AbdK0St0 (ORCPT ); Mon, 27 Nov 2017 13:49:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0D6D4AD92; Mon, 27 Nov 2017 18:49:25 +0000 (UTC) From: Goldwyn Rodrigues To: fstests@vger.kernel.org Cc: darrick.wong@oracle.com, Goldwyn Rodrigues Subject: [PATCH 1/3] Check pwrite parameters Date: Mon, 27 Nov 2017 12:49:18 -0600 Message-Id: <20171127184920.13864-1-rgoldwyn@suse.de> X-Mailer: git-send-email 2.14.2 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Goldwyn Rodrigues There are some parameters added with xfs_io. Check if the pwrite parameters are available. For some cases, xfs_io now returns "command -%c not supported", so added "not supported" to count as error. Signed-off-by: Goldwyn Rodrigues --- common/rc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 4c053a53..b6778f07 100644 --- a/common/rc +++ b/common/rc @@ -2079,6 +2079,14 @@ _require_xfs_io_command() echo $testio | grep -q "invalid option" && \ _notrun "xfs_io $command support is missing" ;; + "pwrite") + if [ "$param" == "-N" ]; then + opts="-d" + fi + testio=`$XFS_IO_PROG -f $opts -c "pwrite $param 0 1M" \ + $testfile 2>&1` + param_checked=1 + ;; "scrub"|"repair") testio=`$XFS_IO_PROG -x -c "$command probe 0" $TEST_DIR 2>&1` echo $testio | grep -q "Inappropriate ioctl" && \ @@ -2109,7 +2117,7 @@ _require_xfs_io_command() $XFS_IO_PROG -c "help $command" | grep -q "^ $param --" || \ _notrun "xfs_io $command doesn't support $param" else - echo $testio | grep -q "invalid option" && \ + echo $testio | grep -q "\(invalid option\|not supported\)" && \ _notrun "xfs_io $command doesn't support $param" fi }