From patchwork Mon Jan 16 06:40:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 9518107 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 E554C6020B for ; Mon, 16 Jan 2017 06:40:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DD5B28364 for ; Mon, 16 Jan 2017 06:40:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9115E2838C; Mon, 16 Jan 2017 06:40:37 +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 1FE6228364 for ; Mon, 16 Jan 2017 06:40:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750897AbdAPGkg (ORCPT ); Mon, 16 Jan 2017 01:40:36 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:39273 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750845AbdAPGkg (ORCPT ); Mon, 16 Jan 2017 01:40:36 -0500 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="14795651" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 16 Jan 2017 14:40:23 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 8AB8847B0CBB for ; Mon, 16 Jan 2017 14:40:23 +0800 (CST) Received: from localhost.localdomain (10.167.220.62) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Jan 2017 14:40:28 +0800 From: Xiao Yang To: CC: Xiao Yang Subject: [PATCH] common/rc: use $FSTYP and $SCRATCH_DEV in _supports_filetype function Date: Mon, 16 Jan 2017 14:40:19 +0800 Message-ID: <1484548819-4295-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.62] X-yoursite-MailScanner-ID: 8AB8847B0CBB.ACCE1 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 generic/401 failed on RHEL6.8GA because output option is not supported by df. So we use $FSTYP and $SCRATCH_DEV instead of df --output to fix it. Signed-off-by: Xiao Yang --- common/rc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/rc b/common/rc index 892c46e..90ad496 100644 --- a/common/rc +++ b/common/rc @@ -268,14 +268,12 @@ _supports_filetype() { local dir=$1 - local fstyp=$(df --output=fstype $dir | tail -1) - case "$fstyp" in + case $FSTYP in xfs) xfs_info $dir | grep -q "ftype=1" ;; ext2|ext3|ext4) - tune2fs -l $(df --output=source $dir | tail -1) | \ - grep -q filetype + tune2fs -l $SCRATCH_DEV | grep -q filetype ;; *) local testfile=$dir/$$.ftype