From patchwork Wed Jun 28 11:20:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 9813977 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 D3995603F3 for ; Wed, 28 Jun 2017 11:20:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C85A322B26 for ; Wed, 28 Jun 2017 11:20:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCC9E28505; Wed, 28 Jun 2017 11:20:57 +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 5925428469 for ; Wed, 28 Jun 2017 11:20:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500AbdF1LU5 (ORCPT ); Wed, 28 Jun 2017 07:20:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:44959 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751498AbdF1LU4 (ORCPT ); Wed, 28 Jun 2017 07:20:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0F21DAAB6; Wed, 28 Jun 2017 11:20:55 +0000 (UTC) Received: from localhost (hermes.olymp [local]) by hermes.olymp (OpenSMTPD) with ESMTPA id 25885a89; Wed, 28 Jun 2017 11:20:52 +0000 (UTC) From: Luis Henriques To: Eryu Guan Cc: fstests@vger.kernel.org, Anna Schumaker , Luis Henriques Subject: [PATCH 2/2 v2] common/rc: handle xfs_io copy_range when copy_file_range syscall isn't available Date: Wed, 28 Jun 2017 12:20:51 +0100 Message-Id: <20170628112051.9164-1-lhenriques@suse.com> In-Reply-To: <20170628075008.GE23360@eguan.usersys.redhat.com> References: <20170628075008.GE23360@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 _require_xfs_io_command() isn't handling the case where the copy_file_range syscall isn't available. To fix this simply check the error returned by xfs_io. Signed-off-by: Luis Henriques --- Changes since v1: - dropped check that worked around an xfs_io bug. common/rc | 2 ++ 1 file changed, 2 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 2972f89e9527..57d596cd4f2e 100644 --- a/common/rc +++ b/common/rc @@ -2195,6 +2195,8 @@ _require_xfs_io_command() _notrun "xfs_io $command failed (old kernel/wrong fs/bad args?)" echo $testio | grep -q "foreign file active" && \ _notrun "xfs_io $command not supported on $FSTYP" + echo $testio | egrep -q "Function not implemented" && \ + _notrun "xfs_io $command support is missing (missing syscall?)" if [ -n "$param" -a $param_checked -eq 0 ]; then $XFS_IO_PROG -c "help $command" | grep -q "^ $param --" || \