From patchwork Fri Apr 3 07:01:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 6153881 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 F26A19F389 for ; Fri, 3 Apr 2015 07:03:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 333C2203C0 for ; Fri, 3 Apr 2015 07:03:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DCF9203B6 for ; Fri, 3 Apr 2015 07:03:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751721AbbDCHDj (ORCPT ); Fri, 3 Apr 2015 03:03:39 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:49036 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751059AbbDCHDZ (ORCPT ); Fri, 3 Apr 2015 03:03:25 -0400 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="90147285" Received: from localhost (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 03 Apr 2015 14:59:38 +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 t3372IUU001970 for ; Fri, 3 Apr 2015 15:02:18 +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; Fri, 3 Apr 2015 15:03:23 +0800 From: Qu Wenruo To: Subject: [PATCH 4/6] btrfs-progs: fsck-tests: Add fallback TEST_DEV for test case 013 Date: Fri, 3 Apr 2015 15:01:15 +0800 Message-ID: <1428044477-18485-5-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1428044477-18485-1-git-send-email-quwenruo@cn.fujitsu.com> References: <1428044477-18485-1-git-send-email-quwenruo@cn.fujitsu.com> 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 Add fallback TEST_DEV for test case 013. Fallback to $TOP/tests/test.img. Now all test cases of btrfs-progs need no extra setting except sudo. Signed-off-by: Qu Wenruo --- tests/fsck-tests/013-extent-tree-rebuild/test.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/fsck-tests/013-extent-tree-rebuild/test.sh b/tests/fsck-tests/013-extent-tree-rebuild/test.sh index 7453ed7..e05a035 100755 --- a/tests/fsck-tests/013-extent-tree-rebuild/test.sh +++ b/tests/fsck-tests/013-extent-tree-rebuild/test.sh @@ -6,8 +6,13 @@ check_prereq btrfs-debug-tree setup_root_helper if [ -z $TEST_DEV ]; then - echo " [NOTRUN] extent tree rebuild, need TEST_DEV variant" - exit 0 + echo "\$TEST_DEV not given, use $TOP/test/test.img as fallback" >> \ + $RESULTS + TEST_DEV="$TOP/tests/test.img" + + # Need at least 1G to avoid mixed block group, which extent tree + # rebuild doesn't support. + run_check truncate -s 1G $TEST_DEV fi if [ -z $TEST_MNT ];then