From 6638dc9c36c5b549a4ad09aae510c99d0bc244b6 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Thu, 9 Aug 2012 09:33:30 +1700 Subject: [PATCH] Re: [PATCH 3/3] test: add broken roundtrip test --- 94/5d9351aa74c12ea75b79e1ab2a67deb1ee0878 | 120 ++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 94/5d9351aa74c12ea75b79e1ab2a67deb1ee0878 diff --git a/94/5d9351aa74c12ea75b79e1ab2a67deb1ee0878 b/94/5d9351aa74c12ea75b79e1ab2a67deb1ee0878 new file mode 100644 index 000000000..d2032a03b --- /dev/null +++ b/94/5d9351aa74c12ea75b79e1ab2a67deb1ee0878 @@ -0,0 +1,120 @@ +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 7D195431FBD + for ; Wed, 8 Aug 2012 09:33:43 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.29 +X-Spam-Level: +X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 Hrvp6f5vJ2bQ for ; + Wed, 8 Aug 2012 09:33:43 -0700 (PDT) +Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu + [131.215.239.19]) + by olra.theworths.org (Postfix) with ESMTP id 155FA431FAE + for ; Wed, 8 Aug 2012 09:33:43 -0700 (PDT) +Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by fire-doxen-postvirus (Postfix) with ESMTP id 78DF332801B; + Wed, 8 Aug 2012 09:33:38 -0700 (PDT) +X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new +Received: from finestructure.net (unknown [76.89.192.57]) + (Authenticated sender: jrollins) + by fire-doxen-submit (Postfix) with ESMTP id 934382E50766; + Wed, 8 Aug 2012 09:33:33 -0700 (PDT) +Received: by finestructure.net (Postfix, from userid 1000) + id 127905CF; Wed, 8 Aug 2012 09:33:33 -0700 (PDT) +From: Jameson Graef Rollins +To: Mark Walters , david@tethera.net, + notmuch@notmuchmail.org +Subject: Re: [PATCH 3/3] test: add broken roundtrip test +In-Reply-To: <87zk6524f0.fsf@qmul.ac.uk> +References: <1344190393-22497-1-git-send-email-david@tethera.net> + <1344190393-22497-4-git-send-email-david@tethera.net> + <87zk6524f0.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.13.2+137~ge34ed71 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Wed, 08 Aug 2012 09:33:30 -0700 +Message-ID: <87k3x9ibs5.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha256; protocol="application/pgp-signature" +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 16:33:43 -0000 + +--=-=-= +Content-Transfer-Encoding: quoted-printable + +On Wed, Aug 08 2012, Mark Walters wrote: +>> 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.act= +ual +>>=20=20 +>> +test_expect_success 'roundtripping random message-ids and tags' \ +>> + 'test_subtest_known_broken && +>> + ${TEST_DIRECTORY}/random-corpus --config-path=3D${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. + +I don't understand what's going on here either. This seems like a +strange way to run these tests, as a command string to +test_expect_success. Why not just run them directly? + +I'm also worried about the test output blowing away the users terminal. +I think that should be avoided, even if we expect failures to be rare. + +jamie. + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.12 (GNU/Linux) + +iQIcBAEBCAAGBQJQIpTaAAoJEO00zqvie6q8D/wP/iqcM+7J9Qky+8R80lRob490 +larFqaOLdL/veUtXthwOo0ceqefEJ7Sy0FJEsPvDMJiarwE+dsHUL5S5HkRrgzy4 +T5/Hqb3HJY8OfuIwNqRKdNrhOLrC2tasP3XqaPqTRAun2igfxdxjjMU/EuWkNDeL +I9KTfH78+bptPg+jdwAnIZ5hnd9SKjmT0CQ9laTYpzFCdB0gFRBhSZ0vIZq7BvV0 +c6hytG1IpqCWT+VpRYWGrOybjyZzE/ua3uPBLoSzNmGMV5dQMKF7tYZWe4UX7Fdn +fAgRz5J9ejihDWOzoDLjMVCK7DAPvaJ66Ti2YJFzgM55BsB87rO93ngo8c9Ik1dN +33zoKN5OPsboQ+RlV3VC9tzicbHDk0+fqT/wblsm+wVyTWNSoKK1Rl8yphMSTkBd +VDFcmC7nHrd8oz/uvb+5UP+1FSMBtA5FxJO2VRSVZuyLfZJZAVFr9++Lct3ebxZx +Fj0i40+DujvTWkJYYCS/dv1sQuV+/U19XsYx9MeQ52YVnZHcLegHd/XyvvaH48mB +LkwqVlqQ4W7FZnveqNnzXbXL517YaW9n8UqkdTztRTXeWNuoS8sUn3A3w7o7BM1f +wb90/xb6uP2QOn2DCcM4CiiyuKFE39O8XIDCtVRtQoU0Dfies1Fjc6i+m7MtA/66 +8PxH9o2vLTFwm0CWXHZ5 +=ubiH +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2