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 E57A4429E28 for ; Sun, 13 Nov 2011 00:44:19 -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 BL4J0fXL4uml for ; Sun, 13 Nov 2011 00:44:19 -0800 (PST) Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id E0B55429E27 for ; Sun, 13 Nov 2011 00:44:18 -0800 (PST) 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 pAD8iD4o022316; Sun, 13 Nov 2011 10:44:13 +0200 From: Tomi Ollila To: Dmitry Kurochkin , Austin Clements Subject: Re: [PATCH] test: attempt to send QUIT to smtp-dummy in case mail send failed In-Reply-To: <8739ds33qz.fsf@gmail.com> References: <20111112024941.GY2658@mit.edu> <20111112154128.GB2658@mit.edu> <8739ds33qz.fsf@gmail.com> User-Agent: Notmuch/0.9+23~g556c5fa (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org 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, 13 Nov 2011 08:44:20 -0000 On Sun, 13 Nov 2011 11:01:24 +0400, Dmitry Kurochkin wrote: > On Sat, 12 Nov 2011 23:07:38 +0200, Tomi Ollila 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@gmail.com>" is applied before creating new patch based on this then these 2 apply cleanly. > > Regards, > Dmitry > > > Tomi Tomi