Re: [PATCH 10/10] test: use emacsclient(1) for Emacs tests

Subject: Re: [PATCH 10/10] test: use emacsclient(1) for Emacs tests

Date: Tue, 28 Jun 2011 17:15:42 -0700

To: Dmitry Kurochkin, notmuch@notmuchmail.org

Cc:

From: Carl Worth


On Wed, 29 Jun 2011 02:22:31 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> Ouch.  I never saw these.  Do you get these in crypto tests only?

Yes.

I just found the bug. The crypto tests use emacs_deliver_message to
generate signed/encrypted messages, but that function doesn't call
increment_mtime between running emacs and running "notmuch new".

That means that if the emacs_deliver_message code is fast enough, (less
than 1 second), and if the test suite is being run on a lame filesystem
without sub-second timestamp granularity (including ext3fs) that the
"notmuch new" invocation will not see the mail[*].

I've added a call to increment_mtime and the failures go away. So I've
pushed the patch to use emacsclient now.

Thanks very much for helping our test suite run faster!

-Carl

[*] And, yes, this does mean that there are race conditions under which
mail can be delivered and notmuch won't see it, (unless subsequent mails
are delivered to the same directory). Austin has a plan to fix the use
of the mtime timestamp in notmuch, (never storing the current mtime in
the database if it's the same as the current time), that should
hopefully close this race window.

-- 
carl.d.worth@intel.com
part-000.sig (application/pgp-signature)

Thread: