[PATCH] test: attempt to send QUIT to smtp-dummy in case mail send failed
Tomi Ollila
tomi.ollila at iki.fi
Sun Nov 13 00:44:13 PST 2011
On Sun, 13 Nov 2011 11:01:24 +0400, Dmitry Kurochkin <dmitry.kurochkin at gmail.com> wrote:
> On Sat, 12 Nov 2011 23:07:38 +0200, Tomi Ollila <tomi.ollila at iki.fi> wrote:
> > SO, in our cases there are 2 options:
> >
> >
> > 1) add line
> > { echo QUIT > /dev/tcp/127.0.0.1/25025; } 2>/dev/null
> > before
> > wait ${smtp_dummy_pid}
> >
> > in test-lib.sh
> >
> >
> > 2) add line
> > kill ${smtp_dummy_pid}
> > before
> > wait ${smtp_dummy_pid}
> >
> > in test-lib.sh *and* add that fflush (output) before free (line) in
> > smtp-dummy.c function receive_data_to_file.
> >
> > folks! opinions!
> >
>
> I think we should add fflush(3) call to smtp-dummy in any case.
True. In a separate patch.
> As for sending QUIT over TCP vs kill, I prefer the former. On one hand,
> kill is more reliable. But smtp-dummy must handle QUIT and it is a bug
> if it does not.
Me too, basically for the same reasons. It is also aesthetically nicer
not to kill anything ;)
> An unrelated issue: currently we discard test_emacs output in
> emacs_deliver_message and other cases. Ideally we should not do that
> because it may contain useful information. We should capture the output
> and print it in case of error, at least.
I agree. And if id:"<1309487028-18786-1-git-send-email-dmitry.kurochkin at gmail.com>"
is applied before creating new patch based on this then these 2 apply cleanly.
>
> Regards,
> Dmitry
>
> > Tomi
Tomi
More information about the notmuch
mailing list