From patchwork Fri Nov 10 01:34:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 10052261 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 B928560631 for ; Fri, 10 Nov 2017 01:34:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6729F223A1 for ; Fri, 10 Nov 2017 01:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B41F2B22B; Fri, 10 Nov 2017 01:34:31 +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 B51B22B20A for ; Fri, 10 Nov 2017 01:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755594AbdKJBe2 (ORCPT ); Thu, 9 Nov 2017 20:34:28 -0500 Received: from victor.provo.novell.com ([137.65.250.26]:50283 "EHLO prv3-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755576AbdKJBe0 (ORCPT ); Thu, 9 Nov 2017 20:34:26 -0500 Received: from adam-pc.lan (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Thu, 09 Nov 2017 18:34:23 -0700 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Cc: dsterba@suse.cz Subject: [PATCH 2/3] btrfs-progs: test/fsck/020: Cleanup custom check function by overriding check_image function Date: Fri, 10 Nov 2017 09:34:18 +0800 Message-Id: <20171110013419.15159-2-wqu@suse.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171110013419.15159-1-wqu@suse.com> References: <20171110013419.15159-1-wqu@suse.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 Signed-off-by: Qu Wenruo --- tests/fsck-tests/020-extent-ref-cases/test.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/fsck-tests/020-extent-ref-cases/test.sh b/tests/fsck-tests/020-extent-ref-cases/test.sh index 1e1e4e2386fb..f5c6591a92b8 100755 --- a/tests/fsck-tests/020-extent-ref-cases/test.sh +++ b/tests/fsck-tests/020-extent-ref-cases/test.sh @@ -19,12 +19,11 @@ source "$TOP/tests/common" check_prereq btrfs -for img in *.img *.raw.xz -do - image=$(extract_image "$img") +check_image() { + local image - # Since the return value bug is already fixed, we don't need - # the old grep hack to detect bug. + image=$1 run_check "$TOP/btrfs" check "$image" - rm -f "$image" -done +} + +check_all_images