From patchwork Wed Aug 17 04:46:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 9285115 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 48F4D60459 for ; Wed, 17 Aug 2016 04:48:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D5E128822 for ; Wed, 17 Aug 2016 04:48:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3206B289B6; Wed, 17 Aug 2016 04:48:50 +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 831A828822 for ; Wed, 17 Aug 2016 04:48:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750812AbcHQEsb (ORCPT ); Wed, 17 Aug 2016 00:48:31 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:10709 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750794AbcHQEsa (ORCPT ); Wed, 17 Aug 2016 00:48:30 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="9997201" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 17 Aug 2016 12:48:17 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 0F75542CD10F; Wed, 17 Aug 2016 12:48:16 +0800 (CST) Received: from localhost.localdomain (10.167.220.69) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.279.2; Wed, 17 Aug 2016 12:48:14 +0800 From: Xiao Yang To: CC: , Xiao Yang Subject: [PATCH v2] xfs/191: skip tests on older xfsprogs Date: Wed, 17 Aug 2016 12:46:01 +0800 Message-ID: <1471409161-28510-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <20160817033640.GP27776@eguan.usersys.redhat.com> References: <20160817033640.GP27776@eguan.usersys.redhat.com> MIME-Version: 1.0 X-Originating-IP: [10.167.220.69] X-yoursite-MailScanner-ID: 0F75542CD10F.A7B3F X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If we don't have /tmp/foo file on xfsprogs 3.2.2, _require_xfs_mkfs_validation will fail because mkfs.xfs can't create this file. We need to skip tests before xfsprogs 4.7.0, so fix it. the feature has been introduced since xfsprogs 4.2.0: commit 20cec860e16b267ea0c71a2f648fa2b26aad2e65 Author: Eric Sandeen Date: Fri Jul 31 09:04:11 2015 +1000 mkfs.xfs: always use underlying fs sector size when mkfs'ing a file Signed-off-by: Xiao Yang --- common/rc | 1 + 1 file changed, 1 insertion(+) diff --git a/common/rc b/common/rc index b19b698..1907c70 100644 --- a/common/rc +++ b/common/rc @@ -3889,6 +3889,7 @@ _get_fs_sysfs_attr() # number of failed cases. _mkfs_validation_check() { + touch /tmp/foo >/dev/null 2>&1 local cmd="$MKFS_XFS_PROG -f -N -d file,name=/tmp/foo,size=$((1024 * 1024 * 1024))" $cmd -s size=2s >/dev/null 2>&1 local sum=$?