From patchwork Thu Nov 3 04:07:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 9410145 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 77A6A6022E for ; Thu, 3 Nov 2016 04:08:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69F1B2A7D5 for ; Thu, 3 Nov 2016 04:08:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DC612A7D9; Thu, 3 Nov 2016 04:08:23 +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 8BD9D2A7D5 for ; Thu, 3 Nov 2016 04:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751986AbcKCEIT (ORCPT ); Thu, 3 Nov 2016 00:08:19 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:51486 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751524AbcKCEIR (ORCPT ); Thu, 3 Nov 2016 00:08:17 -0400 X-IronPort-AV: E=Sophos;i="5.20,367,1444665600"; d="scan'208";a="941991" Received: from unknown (HELO cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 03 Nov 2016 12:08:02 +0800 Received: from localhost.localdomain (unknown [10.167.226.34]) by cn.fujitsu.com (Postfix) with ESMTP id 1E53D41B4BC3; Thu, 3 Nov 2016 12:08:03 +0800 (CST) From: Qu Wenruo To: linux-btrfs@vger.kernel.org, dsterba@suse.cz Subject: [PATCH v4 4/4] btrfs-progs: misc-test: Add send stream dump test Date: Thu, 3 Nov 2016 12:07:34 +0800 Message-Id: <20161103040734.8098-5-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161103040734.8098-1-quwenruo@cn.fujitsu.com> References: <20161103040734.8098-1-quwenruo@cn.fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 1E53D41B4BC3.ADEE7 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 * PLEASE DON'T MERGE THIS PATCH* With 2 send stream which contains all operations for user to check the output. This is just used for checking output format and find any possible deflects or ugly layout. It doesn't really checks any thing and doesn't follow normal test output redirection. Signed-off-by: Qu Wenruo --- .../016-send-dump-output/creation.stream.xz | Bin 0 -> 984 bytes .../016-send-dump-output/deletion.stream.xz | Bin 0 -> 408 bytes tests/misc-tests/016-send-dump-output/test.sh | 23 +++++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 tests/misc-tests/016-send-dump-output/creation.stream.xz create mode 100644 tests/misc-tests/016-send-dump-output/deletion.stream.xz create mode 100755 tests/misc-tests/016-send-dump-output/test.sh diff --git a/tests/misc-tests/016-send-dump-output/creation.stream.xz b/tests/misc-tests/016-send-dump-output/creation.stream.xz new file mode 100644 index 0000000000000000000000000000000000000000..521c5d97170e7ad41ac8b3305461df09e2cb4c86 GIT binary patch literal 984 zcmV;}11J3bH+ooF000E$*0e?f03iVu0001VFXf})8bkw?T>vp13XGw}P}F=IbdLR( z>U`@9XCIGr1@6OEPWlaQgT5hCS#G{B*Zx$SeQxx(I;AlUUp>USnJ^DpJDxOMlV57u zelh2}f67+r{m^CB^YzYr3tjQ|k)GN6FCPlJzZl~%dVK~u^utMa*9rwMg9+N$g{SND zcZ-NRsrbN=(OpirB^JtZ_@@|0ko&m=lrZK&kwT4$K~N%4wfsccFuJN7=oxM?(C{$t zrJ3+}UkQ}_E*UQZWqzP7z377g)WK7w_xN6@JI=Ju(YvI$Mt_bx^7=ASE}(b8_B}4i zasV`w=9w+*M6KB1PI0epqZRs16o(yJ_TJRHtLJs)H=r2l{lUm#HgtEO+R509mJ9Dp zH53E2E>5wavINe=AaNq|VGT6MOCuv!R7O%jU@r%Yrdpfo?l6$2s-G=tmJ&#ZJK-XI zc3_*HY85LsZo<$!ckHazSUr=utE9f?X_~CA>t03#bx~FT8lXi$?P|( zyUn-J`1NVoq>_vLA+8)in6aeaTk1B53fFNk)2uRv5OTLy;afVi?wl>cMS@Y{dRkH;AHw zS^qftW|-zRq~4aB8Kg{kG*5vYWv*suPOOIx5<3%t>J~EcplJGDQ@?EpA?a!WZ^tuQB7Lid{7l zWLuhRJZ3uiQ(-7c!+d4j2#bJ4GD4P%lv6G(cG-A7%R}d${N+_2>{&W|9ejC}b5lc$A}M$5e(E4qn&EfR`1?U4vp13XGw}P}F=IbdLR( z>U`@R#K~!;K6&PD9_87`}Ysb&w5Tjy)cDTA~&eSS_FzE%Qx z1=H-qw6D#$620}uFzMY^0002pjh8@1RLQ^q0rLWy1pojcFQxvm#Ao{g000001X)_e CV8dwu literal 0 HcmV?d00001 diff --git a/tests/misc-tests/016-send-dump-output/test.sh b/tests/misc-tests/016-send-dump-output/test.sh new file mode 100755 index 0000000..cc8586c --- /dev/null +++ b/tests/misc-tests/016-send-dump-output/test.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +# output receive --dump output for further tunning + +source $TOP/tests/common + +check_prereq btrfs + +# send streams are in *.stream.xz format, can't reuse check_all_images() + +rm *.stream -f + +for image in $(find . -iname '*.stream.xz'); do + xz --decompress --keep "$image" || \ + _fail "failed to decompress $image" >&2 + image=${image%%.xz} + + echo "###### $image: ######" + # We call btrfs directly to output result without redirection + $TOP/btrfs receive --dump -f $image || \ + _fail "failed to exam send stream" + rm -f $image +done