From: Mark Walters Date: Wed, 8 Aug 2012 08:06:59 +0000 (+0100) Subject: Re: [PATCH 3/3] test: add broken roundtrip test X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=60977b0379352583a6a9a898db65e0bf47e7c3fb;p=notmuch-archives.git Re: [PATCH 3/3] test: add broken roundtrip test --- diff --git a/19/49e4dde96679dd540fb4e1c70c1fed4e00b4cf b/19/49e4dde96679dd540fb4e1c70c1fed4e00b4cf new file mode 100644 index 000000000..c252ffb58 --- /dev/null +++ b/19/49e4dde96679dd540fb4e1c70c1fed4e00b4cf @@ -0,0 +1,125 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 397F7431FAF + for ; Wed, 8 Aug 2012 01:07:08 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Jv4N2b53+Gx2 for ; + Wed, 8 Aug 2012 01:07:07 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 73E0C431FAE + for ; Wed, 8 Aug 2012 01:07:07 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1Sz1IH-0001QF-J3; Wed, 08 Aug 2012 09:07:05 +0100 +Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] + helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) + (envelope-from ) + id 1Sz1IH-0002cu-8O; Wed, 08 Aug 2012 09:07:05 +0100 +From: Mark Walters +To: david@tethera.net, notmuch@notmuchmail.org +Subject: Re: [PATCH 3/3] test: add broken roundtrip test +In-Reply-To: <1344190393-22497-4-git-send-email-david@tethera.net> +References: <1344190393-22497-1-git-send-email-david@tethera.net> + <1344190393-22497-4-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.13.2+96~g634443c (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Wed, 08 Aug 2012 09:06:59 +0100 +Message-ID: <87zk6524f0.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 94.192.233.223 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: df5f8e9a13ad07f3a4897cb6e7162134 (of first 20000 bytes) +X-SpamAssassin-Score: -1.8 +X-SpamAssassin-SpamBar: - +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -1.8 points. + Summary of the scoring: + * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, + * medium trust + * [138.37.6.40 listed in list.dnswl.org] + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay + * domain + * 0.5 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: David Bremner +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 08 Aug 2012 08:07:08 -0000 + +On Sun, 05 Aug 2012, david@tethera.net wrote: +> From: David Bremner +> +> The output of test_cmp is redirected because it is pretty horrible, +> and tends to mess up terminals. When the test is no longer marked as +> broken, this redirection should be removed. + +How about piping the output to hexdump or even cat -v or something? + +> --- +> test/dump-restore | 9 +++++++++ +> 1 file changed, 9 insertions(+) +> +> diff --git a/test/dump-restore b/test/dump-restore +> index 439e998..7979ebf 100755 +> --- a/test/dump-restore +> +++ b/test/dump-restore +> @@ -82,4 +82,13 @@ test_begin_subtest "dump outfile -- from:cworth" +> notmuch dump dump-outfile-dash-inbox.actual -- from:cworth +> test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual +> +> +test_expect_success 'roundtripping random message-ids and tags' \ +> + 'test_subtest_known_broken && +> + ${TEST_DIRECTORY}/random-corpus --config-path=${NOTMUCH_CONFIG} && +> + notmuch dump > EXPECTED.$test_count && +> + notmuch tag -random-corpus tag:random-corpus && +> + notmuch restore < EXPECTED.$test_count 2>/dev/null && +> + notmuch dump > OUTPUT.$test_count && +> + test_cmp EXPECTED.$test_count OUTPUT.$test_count 1>/dev/null' + +Are the single quotes at the start and end of the main block meant to be +there? And with them deleted this seems to pass (but there is lots of +diff if the redirection is removed). I am not familiar with +test_expect_success/test_cmp so don't know what to expect. + +Best wishes + +Mark + +> + +> test_done +> -- +> 1.7.10.4 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch