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