From patchwork Sun Aug 14 13:35: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: 9285101 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 BC8D860839 for ; Wed, 17 Aug 2016 03:04:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A99112850F for ; Wed, 17 Aug 2016 03:04:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DFC428516; Wed, 17 Aug 2016 03:04:28 +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 0F2EE2850F for ; Wed, 17 Aug 2016 03:04:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753129AbcHQDE1 (ORCPT ); Tue, 16 Aug 2016 23:04:27 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:27838 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752152AbcHQDE1 (ORCPT ); Tue, 16 Aug 2016 23:04:27 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="9994654" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 17 Aug 2016 11:04:24 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 0D5DB42BC511; Wed, 17 Aug 2016 11:04:24 +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:04:23 +0800 From: Xiao Yang To: CC: , , root Subject: [PATCH] xfs/191: skip tests on older xfsprogs Date: Sun, 14 Aug 2016 21:35:01 +0800 Message-ID: <1471181701-23877-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: 0D5DB42BC511.A5BFE 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 From: root 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: root --- 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=$?