[PATCH 2/2] test: use emacsclient(1) for Emacs tests
Dmitry Kurochkin
dmitry.kurochkin at gmail.com
Tue Jun 28 13:47:37 PDT 2011
On Tue, 28 Jun 2011 13:10:58 -0700, Carl Worth <cworth at cworth.org> wrote:
> On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin <dmitry.kurochkin at gmail.com> wrote:
> > I would like to hear what other (Carl in particular) think about this.
> > If the consensus is for your approach, I would be happy to implement
> > it.
>
> In general, I love the whole series, thanks! I'm looking forward to our
> future, faster test suite.
>
> Even more, I love the constructive dialog that follows the original
> series and the attention being focused on getting things right.
>
> As for the detail of whether to use emacsclient or Austin's look-alike,
> I don't have a strong attachment to either solution. I do appreciate
> concrete technical things like "robust against recycled PIDs",
This is an issue indeed. We can take more care to better identify the
process. But I think this is not really needed. I am fine with leaving
a small (very tiny, really :)) possibility for leaving Emacs running for
longer than needed. Note this only happens if test is terminated
abnormally.
> "more
> robust against leaving daemon's around for some reason", etc.
>
Not sure I agree with this. The watchdog is not perfect, but not less
reliable. It reacts with a delay, but again I do not think this is so
important.
I think I found an issue with Austin's approach: if an error happens
(and is not catched), the loop would stop. Currently, this would result
in non-working tests and also would leave the Emacs process behind. I
guess we will have to add error catching in the loop. Austin?
> Would any of this potentially interfere with my own usage of emacsclient
> and emacs server? I use them regularly and would be quite surprised (and
> likely frustrated) if the test suite got mixed up with my existing emacs
> server (or the other way around). Maybe that's already taken care of
> with either approach? (A quick skim of the emacsclient manual age didn't
> make it obvious to me how emacslcient finds its server.)
>
Emacs uses `server-name' and emacsclient --socket-name to identify the
server. Tests use "notmuch-test-suite-<TEST_SHELL_PID>" server name.
While it is not entirely impossible to mess your existing Emacs server,
it is unlikely enough IMO.
Regards,
Dmitry
> -Carl
>
> --
> carl.d.worth at intel.com
More information about the notmuch
mailing list