From patchwork Mon Feb 6 05:47:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 9557111 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 597576021C for ; Mon, 6 Feb 2017 05:48:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 673C2267EC for ; Mon, 6 Feb 2017 05:48:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BEEE27F82; Mon, 6 Feb 2017 05:48:19 +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 0923D267EC for ; Mon, 6 Feb 2017 05:48:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751241AbdBFFsA (ORCPT ); Mon, 6 Feb 2017 00:48:00 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:60909 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751139AbdBFFrv (ORCPT ); Mon, 6 Feb 2017 00:47:51 -0500 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="15312243" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 06 Feb 2017 13:47:44 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id CE0C447B153E; Mon, 6 Feb 2017 13:47:44 +0800 (CST) Received: from localhost.localdomain (10.167.226.34) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 6 Feb 2017 13:47:47 +0800 From: Qu Wenruo To: CC: , , Subject: [PATCH v2 08/12] btrfs-progs: fsck-test: Add test image for lowmem mode block group false alert Date: Mon, 6 Feb 2017 13:47:31 +0800 Message-ID: <20170206054735.5227-9-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170206054735.5227-1-quwenruo@cn.fujitsu.com> References: <20170206054735.5227-1-quwenruo@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.34] X-yoursite-MailScanner-ID: CE0C447B153E.A17B8 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: quwenruo@cn.fujitsu.com Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a minimal image which can reproduce the block group used space false alert for lowmem mode fsck. Reported-by: Christoph Anton Mitterer Signed-off-by: Qu Wenruo --- .../block_group_item_false_alert.raw.xz | Bin 0 -> 47792 bytes tests/fsck-tests/020-extent-ref-cases/test.sh | 15 +++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 tests/fsck-tests/020-extent-ref-cases/block_group_item_false_alert.raw.xz diff --git a/tests/fsck-tests/020-extent-ref-cases/block_group_item_false_alert.raw.xz b/tests/fsck-tests/020-extent-ref-cases/block_group_item_false_alert.raw.xz new file mode 100644 index 0000000000000000000000000000000000000000..559c3fa9e8491f3ce1f424d1baef29853e8fb889 GIT binary patch literal 47792 zcmeHwWmukDmL={If(LhZcL)S`cXxMpcPD`W!5xAV+%>qnyL)h$?&&{0(>=H9R^2;Q z-Ti*Qd7ksJzrEL4dz~#W9G>c$ARrKXb9JI%AVi?JARr*`#??pO-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LbUTccgG_ z&&afK8uh|fvYg*8h>Il{eW$Z}GszmGjf%VlLtPz=TD(7oh=nL&`C)Gwy8VW`*=nV- zpcALEZe5AFDYP`W{;B-rU_FvieL}s?{)b7vL%By7$tKHP7emh`lyve(K0kkHl^(aF zWr)~<$?Bpucnlpkad~SP+aMKgUnSS^7qQadQU;8jBWiGvZ z>3I_W%)hsp<&UbM{4)!@>=~L+fr15~U;!vt_$Mn^0Gd94rjNg?&lRYL{G%((fsh13 z5(vqEs>Wv^B!Q3wLJ|nczclpYH^|VRnO*yB!VSXaGk8I2ypw z{ws4d0K)(b127E0FaX2;@(joS3eVnuRbmc+J^=av=>L;}J{`!3bFi?+SLBeM0;K`^ z{8KYW!9TBf;U6dt{@q6#ncQL<{HtC;3k=i!ck`eBGd=b-F|^LsFho`(PGu=UjPpS3Soii=l^jL(r?7YZ>M{I{|=_# zI2r(b0Q3RS|0mor1>};yGnd2$W%z#!uSq^m0o~iH;u|+ppTw{2)o1^fRd&AtqyInz z{~M3S)rH#yL_|PD1Vluj6ZJ1|@%-n6K7hOe3C*Wa#hXEc2JhK7MY{07#@M`pyLMe(|@*mLvxFvyG z61XM*V_X38&hLy1z+iyE{#+mdJPhzKz{3E=6;NEMt=H>$E`BE(08Ae+*q;lZfQJDd z26z~dO9F~3ptu5xE1&1 | - grep -q "Errors found in extent allocation tree or chunk allocation" && - _fail "unexpected error occurred when checking $img" + + # Since the return value bug is already fixed, we don't need + # the old grep hack to detect bug. + run_check $TOP/btrfs check "$image" rm -f "$image" done