Re: [PATCH] test: new: Fix intermittent test failures with --debug
authorAustin Clements <amdragon@MIT.EDU>
Mon, 22 Oct 2012 08:28:17 +0000 (04:28 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:58 +0000 (09:49 -0800)
65/7a14a08cee4327f6da530794618f5f59568d66 [new file with mode: 0644]

diff --git a/65/7a14a08cee4327f6da530794618f5f59568d66 b/65/7a14a08cee4327f6da530794618f5f59568d66
new file mode 100644 (file)
index 0000000..1034d1b
--- /dev/null
@@ -0,0 +1,131 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8EF4C431FBD\r
+       for <notmuch@notmuchmail.org>; Mon, 22 Oct 2012 01:28:22 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id gZs8CbDPp6sB for <notmuch@notmuchmail.org>;\r
+       Mon, 22 Oct 2012 01:28:21 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id CD323431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 22 Oct 2012 01:28:21 -0700 (PDT)\r
+X-AuditID: 1209190e-b7f756d000000904-0b-508503a587bf\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 9D.45.02308.5A305805; Mon, 22 Oct 2012 04:28:21 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q9M8SKv1019666; \r
+       Mon, 22 Oct 2012 04:28:21 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q9M8SJsq025081\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 22 Oct 2012 04:28:20 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1TQDMw-0003Wh-Ne; Mon, 22 Oct 2012 04:28:18 -0400\r
+Date: Mon, 22 Oct 2012 04:28:17 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>\r
+Subject: Re: [PATCH] test: new: Fix intermittent test failures with --debug\r
+Message-ID: <20121022082817.GN14861@mit.edu>\r
+References: <1350825298-8261-1-git-send-email-ethan@betacantrips.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1350825298-8261-1-git-send-email-ethan@betacantrips.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42IRYrdT113K3Bpg8Ou/qMWdnl0sFrsmz2Wz\r
+       uH5zJrMDs8f/63+ZPHbOusvu8WzVLeYA5igum5TUnMyy1CJ9uwSujBnLJQq2i1e82/GTuYHx\r
+       jnAXIyeHhICJxKe751ggbDGJC/fWs3UxcnEICexjlDhw9hgjhLOBUaLh+zFWCOckk8Tf+Yuh\r
+       MksYJQ7/nMMM0s8ioCox4fUMRhCbTUBDYtv+5UA2B4eIgKnE34PqIGFmAQ+JPb3TwNYJC3hL\r
+       3Nv1jRXE5hXQkZjYsBrMFhJwlfjatQkqLihxcuYTFoheLYkb/14ygYxkFpCWWP6PAyTMKeAm\r
+       cfHwY7CtogIqElNObmObwCg0C0n3LCTdsxC6FzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI1\r
+       1svNLNFLTSndxAgKdE5Jvh2MXw8qHWIU4GBU4uFtuN4SIMSaWFZcmXuIUZKDSUmU994foBBf\r
+       Un5KZUZicUZ8UWlOavEhRgkOZiURXleG1gAh3pTEyqrUonyYlDQHi5I475WUm/5CAumJJanZ\r
+       qakFqUUwWRkODiUJ3glMQI2CRanpqRVpmTklCGkmDk6Q4TxAw/VBaniLCxJzizPTIfKnGBWl\r
+       xHlXgyQEQBIZpXlwvbBE9IpRHOgVYd4lIFU8wCQG1/0KaDAT0GBz7kaQwSWJCCmpBsZY9ocT\r
+       dpxfZ99ge9it6xdHxrT+z/VCD38omn/d7f+s6NMzRZfclNtxllGTNPpPFcg5flqzM3Ta7Ivb\r
+       VrNx8MQYnqxVMFroV12T1yGb0rC/YcGmdCMRxkouFlYtVbZP0tH3Vu4Mush58fSkps+eP+ao\r
+       MaVtW/Dvpr7txIMbBPL1Gh+JSPjEpCixFGckGmoxFxUnAgCCFHs9HwMAAA==\r
+Cc: notmuch@notmuchmail.org, Ethan Glasser-Camp <ethan@betacantrips.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 22 Oct 2012 08:28:22 -0000\r
+\r
+LGTM.\r
+\r
+This is closely related to another problem in the test suite that\r
+causes frequent failures for me when I run on tmpfs: generate_message\r
+creates messages with the same time stamp by default, which means that\r
+the output of date-sorted notmuch search is technically\r
+non-deterministic.  I suspect this doesn't cause problems most of the\r
+time or for most people because messages get added in the order\r
+they're read from the file system (of course, this isn't guaranteed in\r
+general and doesn't hold on tmpfs), which assigns them monotonically\r
+increasing docids, which stabilizes the search results (though I don't\r
+think this is guaranteed either).\r
+\r
+Quoth Ethan Glasser-Camp on Oct 21 at  9:14 am:\r
+> Although messages are created in a particular order, it seems that\r
+> when they are created on a tmpfs, they do not always come back in the\r
+> same order, leading to the same files being ignored but being output\r
+> in a different order. This causes the test to fail because the outputs\r
+> being compared are the same.\r
+> \r
+> Fix the failures by sorting the output of notmuch --debug and\r
+> comparing this to a hand-sorted version of its output.\r
+> \r
+> Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>\r
+> ---\r
+>  test/new |   10 +++++-----\r
+>  1 file changed, 5 insertions(+), 5 deletions(-)\r
+> \r
+> diff --git a/test/new b/test/new\r
+> index cc2af72..587aa11 100755\r
+> --- a/test/new\r
+> +++ b/test/new\r
+> @@ -189,17 +189,17 @@ touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan.\r
+>  mkdir -p "${MAIL_DIR}"/one/two/three/.git\r
+>  notmuch new > /dev/null # ensure that files/folders will be printed in ASCII order.\r
+>  touch "${MAIL_DIR}"/{one,one/two,one/two/three}/ignored_file\r
+> -output=$(NOTMUCH_NEW --debug 2>&1)\r
+> +output=$(NOTMUCH_NEW --debug 2>&1 | sort)\r
+>  test_expect_equal "$output" \\r
+>  "(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/.git\r
+>  (D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/three/.git\r
+> -(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/.git\r
+> -(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/ignored_file\r
+> -(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/ignored_file\r
+> -(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/ignored_file\r
+>  (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.git\r
+>  (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file\r
+>  (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/ignored_file\r
+> +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/ignored_file\r
+> +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/ignored_file\r
+> +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/.git\r
+> +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/ignored_file\r
+>  No new mail."\r
+>  \r
+>  \r