From patchwork Sun May 6 06:36:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10382603 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 3C19A60467 for ; Sun, 6 May 2018 06:34:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C91928C5C for ; Sun, 6 May 2018 06:34:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2129128C63; Sun, 6 May 2018 06:34:47 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 AEF4C28C5C for ; Sun, 6 May 2018 06:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751358AbeEFGeq (ORCPT ); Sun, 6 May 2018 02:34:46 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:39422 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbeEFGep (ORCPT ); Sun, 6 May 2018 02:34:45 -0400 Received: by mail-wm0-f65.google.com with SMTP id f8-v6so10936773wmc.4; Sat, 05 May 2018 23:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3Jhq2IdbZLtc0Eofs4TfihvtF1ohtbcp0BnpMvRgulQ=; b=KfrGx4Qot9dUrukeY9LiBF9/D7NWatBF2ScFULnH6SZz/LcaLDUagcFHQowqfLiiBY MnEuNLHiaKrVRCjqmY7/ihcA70XwIZCk2mlHQlDKac8255+juH4XJjWjyLSBtommim61 V9NZ1DtKt2RyhJpy/iHBTEBVIJsUoGB5ZEXRzg5LIRRPGn1txS2noesW1Fm6xAomfZFO qZ0TXU+cyWDww97WqD3igEA9ARB93DDSK+UB14Gz8coLTQbdnXpnFgZuWFCQcgTxtN0R iEoYhUjXqmrWHf5rElxNXN8Qm6UkLnqqzs9sNMk/Mw6Ca91Argwh33gGJFBlBJShP5Gt AhNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3Jhq2IdbZLtc0Eofs4TfihvtF1ohtbcp0BnpMvRgulQ=; b=co0/418AZYqqc03x7tW9Nl8Tu6r43hBf77oARSZEw4sFgIssQoiV847w8bOXcmnfYD PHfoL8Fwuf9qEtG7qOkayIRFiIkFIQl5pG9rdF6REHCCHGnRPA+tQa0xTcIK49n3zGZk uoVN0rIaBulOazxCyyxSZYtt5bjfTgX8d5bZntQgHacUIgf4+Ge9kGEfyUA3rrQW7Kg/ 48oAcWsMLsWMCfSyUzGU4mUlXeoV55RhN6zlAARYMYPW+4LKN5/3YYPMNNnzeg2XL9qd TOa19Vz3p9xhJXisCLw+iIToPg595FuKchT1RKnDXD4Gs+sq6SLI15eWBsnQtzft8e1K GKGw== X-Gm-Message-State: ALQs6tBjwIrejIeWkaJBREmnc/IHVlkXePmbu5P7nj4DwuiGL3IPqmus HUWkDiPhpF9WuLvPPeZIKRw= X-Google-Smtp-Source: AB8JxZrgwOJPPt9oddFHzohcjzQeuFnrsW+JMd37fmq8KgiTeIk2HRPLKHv0re/RmeUIK3zC/XI2vw== X-Received: by 10.28.113.196 with SMTP id d65mr19617620wmi.157.1525588483871; Sat, 05 May 2018 23:34:43 -0700 (PDT) Received: from localhost.localdomain ([94.230.83.122]) by smtp.gmail.com with ESMTPSA id p17sm4174149wmc.17.2018.05.05.23.34.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 05 May 2018 23:34:43 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 1/2] common/rc: decouple xfs_io flink check from xfs_io -T check Date: Sun, 6 May 2018 09:36:07 +0300 Message-Id: <1525588568-1714-2-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525588568-1714-1-git-send-email-amir73il@gmail.com> References: <1525588568-1714-1-git-send-email-amir73il@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The 3 tests that _require_xfs_io_command "flink", actually require O_TMPFILE support and flink command, but the former is far unlikely to be missing. The test btrfs/058 doesn't even use the flink command. When running these tests on a filesystem that does not support O_TMPFILE (e.g. overlayfs) the result is not very infomative: generic/004 1s ... [not run] xfs_io flink failed (old kernel/wrong fs?) Decouple the requirements for "flink" command and "-T" command line flag and require the former explicitly in tests that use it. As a result the report is now more informative: generic/004 1s ... [not run] O_TMPFILE is not supported Signed-off-by: Amir Goldstein --- common/rc | 15 +++++++++++---- tests/btrfs/058 | 4 +--- tests/generic/004 | 1 + tests/generic/389 | 1 + 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/common/rc b/common/rc index 9ffab7f..3dabdc9 100644 --- a/common/rc +++ b/common/rc @@ -2147,13 +2147,20 @@ _require_xfs_io_command() -c "fiemap -v $param" $testfile 2>&1` param_checked=1 ;; - "flink" ) - testio=`$XFS_IO_PROG -T -F -c "flink $testfile" \ - $TEST_DIR 2>&1` + "flink") + local testlink=$TEST_DIR/$$.link.xfs_io + testio=`$XFS_IO_PROG -F -f -c "flink $testlink" $testfile 2>&1` + rm -f $testlink > /dev/null 2>&1 + ;; + "-T") + # Check O_TMPFILE support in xfs_io, kernel and fs + testio=`$XFS_IO_PROG -T -c quit $TEST_DIR 2>&1` echo $testio | egrep -q "invalid option|Is a directory" && \ _notrun "xfs_io $command support is missing" + echo $testio | grep -q "Operation not supported" && \ + _notrun "O_TMPFILE is not supported" ;; - "fsmap" ) + "fsmap") testio=`$XFS_IO_PROG -f -c "fsmap" $testfile 2>&1` echo $testio | grep -q "Inappropriate ioctl" && \ _notrun "xfs_io $command support is missing" diff --git a/tests/btrfs/058 b/tests/btrfs/058 index ed39f94..f139d0c 100755 --- a/tests/btrfs/058 +++ b/tests/btrfs/058 @@ -53,9 +53,7 @@ _cleanup() _supported_fs btrfs _supported_os Linux _require_scratch -# Requiring flink command tests for the presence of the -T option used -# to pass O_TMPFILE to open(2). -_require_xfs_io_command "flink" +_require_xfs_io_command "-T" rm -f $seqres.full diff --git a/tests/generic/004 b/tests/generic/004 index d0926f1..df6f215 100755 --- a/tests/generic/004 +++ b/tests/generic/004 @@ -45,6 +45,7 @@ _supported_fs generic _supported_os Linux _require_test +_require_xfs_io_command "-T" _require_xfs_io_command "flink" rm -f $seqres.full diff --git a/tests/generic/389 b/tests/generic/389 index 6d63eda..1b7bd77 100755 --- a/tests/generic/389 +++ b/tests/generic/389 @@ -47,6 +47,7 @@ _supported_fs generic _supported_os Linux _require_test +_require_xfs_io_command "-T" _require_xfs_io_command "flink" _require_acls