From patchwork Fri Oct 3 14:59:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 5022931 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EDF4FC11AB for ; Fri, 3 Oct 2014 14:59:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CD6320123 for ; Fri, 3 Oct 2014 14:59:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 621A92011D for ; Fri, 3 Oct 2014 14:59:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbaJCO7k (ORCPT ); Fri, 3 Oct 2014 10:59:40 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:13088 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752541AbaJCO7k (ORCPT ); Fri, 3 Oct 2014 10:59:40 -0400 Received: from pps.filterd (m0004003 [127.0.0.1]) by mx0b-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id s93ExBCq010429 for ; Fri, 3 Oct 2014 07:59:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : mime-version : content-type; s=facebook; bh=YmMFDGB7IFJsPSaR78V9CyVN24mY5oGoODiL+yIUeVw=; b=rMKjBSXhGaNYX+9TTRaIWuG4vhJV2ToXFE6lEUNZwZ57ZhcSPB3WZbrpj35gPtHsJclY dyrzkEcDX755vGo2C+/i3FcCbCpqeCCj5ZZyJb2qKcr/+PEEFC8mEabGAr1AZNk3M8rX WlGvxfMB6h3v0MYExGzLjd2wDSr4LfIKhWg= Received: from mail.thefacebook.com (mailwest.thefacebook.com [173.252.71.148]) by mx0b-00082601.pphosted.com with ESMTP id 1psverg8wt-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK) for ; Fri, 03 Oct 2014 07:59:39 -0700 Received: from localhost (192.168.57.29) by mail.thefacebook.com (192.168.16.23) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 3 Oct 2014 07:59:37 -0700 From: Josef Bacik To: Subject: [PATCH] Btrfs-progs: skip extent rebuild test if no testdev Date: Fri, 3 Oct 2014 10:59:36 -0400 Message-ID: <1412348376-6771-1-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [192.168.57.29] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52, 1.0.28, 0.0.0000 definitions=2014-10-03_06:2014-10-03, 2014-10-03, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 kscore.is_bulkscore=5.41114621888106e-07 kscore.compositescore=0 circleOfTrustscore=502.112 compositescore=0.999776574422466 urlsuspect_oldscore=0.999776574422466 suspectscore=1 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=62764 rbsscore=0.999776574422466 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1410030145 X-FB-Internal: deliver 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,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 It is highly obnoxious to have to go put in a testdev when all you really want is to run the quick image tests. Make this part optional so if we don't have a testdev specified we just don't run that particular test. Thanks, Signed-off-by: Josef Bacik --- tests/fsck-tests.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh index b783b78..867366b 100644 --- a/tests/fsck-tests.sh +++ b/tests/fsck-tests.sh @@ -24,10 +24,6 @@ run_check() rm -f $RESULT -if [ -z $TEST_DEV ] || [ -z $TEST_MNT ];then - _fail "please set TEST_DEV and TEST_MNT" -fi - # test rely on corrupting blocks tool run_check make btrfs-corrupt-block @@ -45,6 +41,11 @@ do run_check $here/btrfsck test.img done +if [ -z $TEST_DEV ] || [ -z $TEST_MNT ];then + echo " [NOTRUN] extent tree rebuild" + exit 0 +fi + # test whether fsck can rebuild a corrupted extent tree test_extent_tree_rebuild() {