On Mon, 31 Oct 2011 23:59:49 -0300, David Bremner <da...@tethera.net> wrote:
> On Fri, 30 Sep 2011 01:26:46 +0200, Thomas Schwinge <tho...@schwinge.name> 
> 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".


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
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
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
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
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to