From patchwork Mon Dec 29 07:17:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 5548851 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 044839F344 for ; Mon, 29 Dec 2014 07:19:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2458320117 for ; Mon, 29 Dec 2014 07:19:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 238402010F for ; Mon, 29 Dec 2014 07:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbaL2HTY (ORCPT ); Mon, 29 Dec 2014 02:19:24 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:53091 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750934AbaL2HTW (ORCPT ); Mon, 29 Dec 2014 02:19:22 -0500 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="55254149" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 29 Dec 2014 15:15:57 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id sBT7IpXn026848; Mon, 29 Dec 2014 15:18:51 +0800 Received: from localhost.localdomain (10.167.226.33) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Mon, 29 Dec 2014 15:19:23 +0800 From: Qu Wenruo To: , Subject: [PATCH] fstests: btrfs/079: Fix wrong value passed to available space check. Date: Mon, 29 Dec 2014 15:17:18 +0800 Message-ID: <1419837438-13771-1-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.2.1 MIME-Version: 1.0 X-Originating-IP: [10.167.226.33] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Before the patch, we passed wrong value to _require_fs_space, which should be in unit of 1024, but passed in unit of GB. Fix it and add better prompt for falloc failure. Signed-off-by: Qu Wenruo --- tests/btrfs/079 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/btrfs/079 b/tests/btrfs/079 index 202d3e6..99d0187 100755 --- a/tests/btrfs/079 +++ b/tests/btrfs/079 @@ -73,8 +73,9 @@ rm -f $seqres.full _scratch_mkfs >>$seqres.full 2>&1 _scratch_mount -_require_fs_space $SCRATCH_MNT $(($filesize / 1024 / 1024 / 1024)) -$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile +_require_fs_space $SCRATCH_MNT $(($filesize / 1024)) +$XFS_IO_PROG -f -c "falloc 0 $filesize" $testfile || \ + _fail "falloc failed" dd_work() { out=$1