From patchwork Wed Aug 17 03:18:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 9285103 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 BC095600CB for ; Wed, 17 Aug 2016 03:20:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7E6628649 for ; Wed, 17 Aug 2016 03:20:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98FA2287DF; Wed, 17 Aug 2016 03:20:54 +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 2752F28649 for ; Wed, 17 Aug 2016 03:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751439AbcHQDUx (ORCPT ); Tue, 16 Aug 2016 23:20:53 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:24300 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751284AbcHQDUx (ORCPT ); Tue, 16 Aug 2016 23:20:53 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="9995207" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 17 Aug 2016 11:20:44 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id AA6BA42BC511; Wed, 17 Aug 2016 11:20:42 +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 11:20:41 +0800 From: Xiao Yang To: CC: , Xiao Yang Subject: [PATCH] xfs/191: skip tests on older xfsprogs Date: Wed, 17 Aug 2016 11:18:55 +0800 Message-ID: <1471403935-24222-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.220.69] X-yoursite-MailScanner-ID: AA6BA42BC511.A9814 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/rc b/common/rc index b19b698..db99794 100644 --- a/common/rc +++ b/common/rc @@ -3889,6 +3889,9 @@ _get_fs_sysfs_attr() # number of failed cases. _mkfs_validation_check() { + if [ ! -f /tmp/foo ]; then + touch /tmp/foo + fi 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=$?