Re: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests.
authorTomi Ollila <tomi.ollila@iki.fi>
Fri, 11 Nov 2011 08:09:17 +0000 (10:09 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:04 +0000 (09:40 -0800)
4f/2affa28b653deda837c822cc354cc24d8185d1 [new file with mode: 0644]

diff --git a/4f/2affa28b653deda837c822cc354cc24d8185d1 b/4f/2affa28b653deda837c822cc354cc24d8185d1
new file mode 100644 (file)
index 0000000..83af1aa
--- /dev/null
@@ -0,0 +1,151 @@
+Return-Path: <tomi.ollila@nixu.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 57B6C431FD0\r
+       for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 00:09:29 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 69qWO+h7tBwk for <notmuch@notmuchmail.org>;\r
+       Fri, 11 Nov 2011 00:09:28 -0800 (PST)\r
+Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 2C878431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 00:09:27 -0800 (PST)\r
+Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
+       by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
+       pAB89HW7003584; Fri, 11 Nov 2011 10:09:18 +0200\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Pieter Praet <pieter@praet.org>,\r
+       Jameson Graef Rollins <jrollins@finestructure.net>,\r
+       Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests.\r
+In-Reply-To: <87hb2btsv2.fsf@praet.org>\r
+References: <yf6mxc3ab4t.fsf@taco2.nixu.fi>\r
+       <1320963737-1666-1-git-send-email-jrollins@finestructure.net>\r
+       <87hb2btsv2.fsf@praet.org>\r
+User-Agent: Notmuch/0.9+23~g556c5fa (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Fri, 11 Nov 2011 10:09:17 +0200\r
+Message-ID: <yf6ipmrdqs2.fsf@taco2.nixu.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 11 Nov 2011 08:09:29 -0000\r
+\r
+On Fri, 11 Nov 2011 01:17:37 +0100, Pieter Praet <pieter@praet.org> wrote:\r
+> On Thu, 10 Nov 2011 14:22:17 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+> > From: Tomi Ollila <tomi.ollila@iki.fi>\r
+> > \r
+> > dtach is lighter than screen and is not setuid/setgid program so\r
+> > TMPDIR does not get reset by dynamic loader when executed.\r
+> > \r
+> \r
+> `dtach' may be lighter than `screen', but contrary to my expectations,\r
+> it appears to be far less efficient:\r
+> \r
+> |      | original [1] | w/ screen [2] | w/ dtach [3] |\r
+> |------+--------------+---------------+--------------|\r
+> | real |    0m17.570s |     0m20.132s |    0m28.567s |\r
+> | user |     0m2.453s |      0m2.593s |     0m2.753s |\r
+> | sys  |     0m1.700s |      0m1.577s |     0m1.753s |\r
+\r
+This sounds interesting; how were these runs measured?\r
+Just using shell builtin time command ?\r
+\r
+Does time measure the time of the process and it's subprocesses\r
+or just the process. In any way 20 vs 28 second 'real' time difference\r
+could indicate that there are more other processes running and\r
+the context switch time affects user and system time.\r
+\r
+Or, dtach does some stupid io things. Or screen does some advanced\r
+optimizations. Or emacs works more effectively when TERM=screen.\r
+Or the 'virtual' window size emacs sees is unsuitable...\r
+\r
+\r
+> \r
+> > Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>\r
+> > ---\r
+> > This tweaks the original patch slightly by removing the no-longer needed\r
+> > screenrc variables.\r
+> > \r
+> >  test/test-lib.sh |    5 ++---\r
+> >  1 files changed, 2 insertions(+), 3 deletions(-)\r
+> > \r
+> > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+> > index c81c709..c0fe037 100755\r
+> > --- a/test/test-lib.sh\r
+> > +++ b/test/test-lib.sh\r
+> > @@ -50,8 +50,6 @@ TZ=UTC\r
+> >  TERM=dumb\r
+> >  export LANG LC_ALL PAGER TERM TZ\r
+> >  GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}\r
+> > -export SCREENRC=/dev/null\r
+> > -export SYSSCREENRC=/dev/null\r
+> >  \r
+> >  # Protect ourselves from common misconfiguration to export\r
+> >  # CDPATH into the environment\r
+> > @@ -844,7 +842,8 @@ test_emacs () {\r
+> >    if [ -z "$EMACS_SERVER" ]; then\r
+> >            EMACS_SERVER="notmuch-test-suite-$$"\r
+> >            # start a detached screen session with an emacs server\r
+> > -          screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \\r
+> > +          TERM=xterm dtach -n "$TMP_DIRECTORY/dtach-emacs-socket-$$" \\r
+> \r
+> It's worth noting that $TERM is only set to "xterm" to deceive `dtach',\r
+> so thankfully, xterm (and all its deps) aren't actually required to run\r
+> the tests.\r
+\r
+Actually, emacs SIGSEGVs if there is unsuitable TERM in use. I don't know\r
+what it originally was.\r
+\r
+> \r
+> > +                  "$TMP_DIRECTORY/run_emacs" \\r
+> >                    --no-window-system \\r
+> >                    --eval "(setq server-name \"$EMACS_SERVER\")" \\r
+> >                    --eval '(server-start)' \\r
+> > -- \r
+> > 1.7.7.1\r
+> > \r
+> > _______________________________________________\r
+> > notmuch mailing list\r
+> > notmuch@notmuchmail.org\r
+> > http://notmuchmail.org/mailman/listinfo/notmuch\r
+> \r
+> \r
+> Peace\r
+> \r
+> -- \r
+> Pieter\r
+> \r
+> [1] @ commit 749abb74\r
+> [2] @ commit 760b311b\r
+> [3] @ commit 760b311b + id:"1320963737-1666-1-git-send-email-jrollins@finestructure.net"\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+> \r
+\r
+Tomi\r