From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F19ED429E25 for ; Thu, 3 Nov 2011 09:50:46 -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 S6nznZ7A8dan for ; Thu, 3 Nov 2011 09:50:46 -0700 (PDT) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id A5AF9431FB6 for ; Thu, 3 Nov 2011 09:50:45 -0700 (PDT) Received: by eyx24 with SMTP id 24so1638856eyx.26 for ; Thu, 03 Nov 2011 09:50:44 -0700 (PDT) Received: by 10.216.134.80 with SMTP id r58mr3093876wei.63.1320339043896; Thu, 03 Nov 2011 09:50:43 -0700 (PDT) Received: from localhost ([109.131.187.47]) by mx.google.com with ESMTPS id a27sm11174070wbp.16.2011.11.03.09.50.42 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Nov 2011 09:50:42 -0700 (PDT) From: Pieter Praet To: David Bremner , Thomas Schwinge Subject: Re: [PATCH] Repeatability when copying a whole directory into a new one. In-Reply-To: <8739e88s4a.fsf@zancas.localnet> References: <1317338806-7414-1-git-send-email-thomas@schwinge.name> <8739e88s4a.fsf@zancas.localnet> User-Agent: Notmuch/0.9+33~gadde72d (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) Date: Thu, 03 Nov 2011 17:49:59 +0100 Message-ID: <878vnxp2vc.fsf@praet.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: notmuch 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, 03 Nov 2011 16:50:47 -0000 --=-=-= On Mon, 31 Oct 2011 23:59:49 -0300, David Bremner wrote: > On Fri, 30 Sep 2011 01:26:46 +0200, Thomas Schwinge wrote: > > 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. > > I'm a bit confused here too. When the files are removed, the "notmuch new" > sent to /dev/null in your test detects the deletes as renames. Shouldn't > the copies be detected as duplicates or something? > They should. Applying any one of the attached patches makes the test pass; I vote "directory mtime issue". --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=update-dir-mtime.patch diff --git a/test/new b/test/new index 0afb04c..32b058f 100755 --- a/test/new +++ b/test/new @@ -168,6 +168,7 @@ 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/ +touch "$MAIL_DIR"/2nd/cur output2=$(notmuch new) test_subtest_known_broken --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=cp-without-archive-opt.patch diff --git a/test/new b/test/new index 0afb04c..0627d69 100755 --- a/test/new +++ b/test/new @@ -159,7 +159,7 @@ 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/ +cp "$MAIL_DIR"/cur "$MAIL_DIR"/2nd/ output1=$(notmuch new) rm -rf "$MAIL_DIR"/2nd @@ -167,7 +167,7 @@ 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/ +cp "$MAIL_DIR"/cur "$MAIL_DIR"/2nd/ output2=$(notmuch new) test_subtest_known_broken --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=cp-to-other-dir.patch diff --git a/test/new b/test/new index 0afb04c..a3c270c 100755 --- a/test/new +++ b/test/new @@ -166,8 +166,8 @@ 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/ +mkdir "$MAIL_DIR"/3rd +cp -a "$MAIL_DIR"/cur "$MAIL_DIR"/3rd/ output2=$(notmuch new) test_subtest_known_broken --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=cp-dir-content.patch diff --git a/test/new b/test/new index 0afb04c..f600983 100755 --- a/test/new +++ b/test/new @@ -159,7 +159,7 @@ 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/ +cp -a "$MAIL_DIR"/cur/* "$MAIL_DIR"/2nd/ output1=$(notmuch new) rm -rf "$MAIL_DIR"/2nd @@ -167,7 +167,7 @@ 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/ +cp -a "$MAIL_DIR"/cur/* "$MAIL_DIR"/2nd/ output2=$(notmuch new) test_subtest_known_broken --=-=-= > d > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch Peace -- Pieter --=-=-=--