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 63C75431FD0 for ; Sun, 18 Dec 2011 05:08:56 -0800 (PST) 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=[none] 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 wHeAEMRQHbKk for ; Sun, 18 Dec 2011 05:08:55 -0800 (PST) Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 51302431FB6 for ; Sun, 18 Dec 2011 05:08:55 -0800 (PST) Received: from pps.filterd (mail-gw3 [127.0.0.1]) by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id pBID8oTr031961; Sun, 18 Dec 2011 15:08:50 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by mail-gw3.nixu.fi with ESMTP id 114cs0u674-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sun, 18 Dec 2011 15:08:49 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBID8mSW023249; Sun, 18 Dec 2011 15:08:48 +0200 From: Tomi Ollila To: Thomas Schwinge , notmuch@notmuchmail.org Subject: Re: [PATCH] Repeatability when copying a whole directory into a new one. In-Reply-To: <1317338806-7414-1-git-send-email-thomas@schwinge.name> References: <1317338806-7414-1-git-send-email-thomas@schwinge.name> User-Agent: Notmuch/0.10.2+93~g631d290 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2011-12-18_02:2011-12-16, 2011-12-18, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1112180092 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: Sun, 18 Dec 2011 13:08:56 -0000 On Fri, 30 Sep 2011 01:26:46 +0200, Thomas Schwinge = wrote: > This new test currently fails -- but it shouldn't. > --- >=20 > Hi! >=20 > I found this while manually copying directories and running notmuch new. >=20 > Am I just too sleepy at this time, or is it another DB vs. directory > mtime issue? I played a bit with this... making directories early and touching and... ... and always got the same output as below. > 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. Then, finally, the following line changes +output1=3D$(notmuch new; notmuch search --format=3Dfiles '*') ... +output2=3D$(notmuch new; notmuch search --format=3Dfiles '*') we see this BROKEN Repeatability when copying a whole directory into a new one --- new.18.expected 2011-12-18 13:01:47.000000000 +0000 +++ new.18.output 2011-12-18 13:01:47.000000000 +0000 @@ -1,104 +1,52 @@ -Processed 51 total files in almost no time. No new mail. /home/too/vc/ext/notmuch/test/tmp.new/mail/cur/50:2, -/home/too/vc/ext/notmuch/test/tmp.new/mail/2nd/cur/50:2, /home/too/vc/ext/notmuch/test/tmp.new/mail/cur/49:2, -/home/too/vc/ext/notmuch/test/tmp.new/mail/2nd/cur/49:2, /home/too/vc/ext/notmuch/test/tmp.new/mail/cur/48:2, -/home/too/vc/ext/notmuch/test/tmp.new/mail/2nd/cur/48:2, ... We see that after second time the files are not added to the message (again).=20 I cannot see that the issue is with directory mtimes, but perhaps that the directory .../2nd/... is not forgotten... ... but whatever the reason will eventually be I suggest to make this change to the test -- it provides more concrete information to anyone who will be looking fix for this case. >=20 >=20 > Gr=C3=BC=C3=9Fe, > Thomas Tomi >=20 > --- > test/new | 21 +++++++++++++++++++++ > 1 files changed, 21 insertions(+), 0 deletions(-) >=20 > 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=3D$(NOTMUCH_NEW) > test_expect_equal "$output" "No new mail. Removed 3 messages." >=20=20 > + > +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=3D$(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=3D$(notmuch new) > + > +test_subtest_known_broken > +test_expect_equal "$output2" "$output1" > + > + > test_done > --=20 > 1.7.5.4 >=20