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 ED884431FD0 for ; Thu, 29 Sep 2011 16:26:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 kW1uEp+P5JBC for ; Thu, 29 Sep 2011 16:26:53 -0700 (PDT) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.97]) by olra.theworths.org (Postfix) with ESMTP id 3E74E431FB6 for ; Thu, 29 Sep 2011 16:26:53 -0700 (PDT) Received: from [87.180.87.168] (helo=stokes.schwinge.homeip.net) by smtprelay05.ispgateway.de with esmtpa (Exim 4.68) (envelope-from ) id 1R9Q0B-0007Hh-Uw for notmuch@notmuchmail.org; Fri, 30 Sep 2011 01:26:52 +0200 Received: (qmail 28339 invoked from network); 29 Sep 2011 23:26:50 -0000 Received: from kepler.schwinge.homeip.net (192.168.111.7) by stokes.schwinge.homeip.net with QMQP; 29 Sep 2011 23:26:50 -0000 Received: (nullmailer pid 7455 invoked by uid 1000); Thu, 29 Sep 2011 23:26:50 -0000 From: Thomas Schwinge To: notmuch@notmuchmail.org Subject: [PATCH] Repeatability when copying a whole directory into a new one. Date: Fri, 30 Sep 2011 01:26:46 +0200 Message-Id: <1317338806-7414-1-git-send-email-thomas@schwinge.name> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Df-Sender: dGhvbWFzQHNjaHdpbmdlLm5hbWU= Cc: Thomas Schwinge 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: Thu, 29 Sep 2011 23:26:54 -0000 This new test currently fails -- but it shouldn't. --- Hi! I found this while manually copying directories and running notmuch new. Am I just too sleepy at this time, or is it another DB vs. directory mtime issue? BROKEN Repeatability when copying a whole directory into a new one --- new.18.expected 2011-09-29 23:23:39.000000000 +0000 +++ new.18.output 2011-09-29 23:23:39.000000000 +0000 @@ -1,2 +1 @@ -Processed 51 total files in almost no time. No new mail. Grüße, Thomas --- test/new | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/test/new b/test/new index 49f390d..0afb04c 100755 --- a/test/new +++ b/test/new @@ -153,4 +153,25 @@ rm -rf "${MAIL_DIR}"/two output=$(NOTMUCH_NEW) test_expect_equal "$output" "No new mail. Removed 3 messages." + +test_begin_subtest 'Repeatability when copying a whole directory into a new one' + +add_email_corpus + +mkdir "$MAIL_DIR"/2nd +cp -a "$MAIL_DIR"/cur "$MAIL_DIR"/2nd/ +output1=$(notmuch new) + +rm -rf "$MAIL_DIR"/2nd +notmuch new > /dev/null + +# This was quite enjoyable. Let's do it again. +mkdir "$MAIL_DIR"/2nd +cp -a "$MAIL_DIR"/cur "$MAIL_DIR"/2nd/ +output2=$(notmuch new) + +test_subtest_known_broken +test_expect_equal "$output2" "$output1" + + test_done -- 1.7.5.4