Re: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests
authorTomi Ollila <tomi.ollila@iki.fi>
Fri, 11 Nov 2011 21:15:02 +0000 (23:15 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:05 +0000 (09:40 -0800)
09/8dd9060972c58b1500fb1fb61ce9ff78bc7e73 [new file with mode: 0644]

diff --git a/09/8dd9060972c58b1500fb1fb61ce9ff78bc7e73 b/09/8dd9060972c58b1500fb1fb61ce9ff78bc7e73
new file mode 100644 (file)
index 0000000..9b09dde
--- /dev/null
@@ -0,0 +1,141 @@
+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 90441429E25\r
+       for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 13:15:06 -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 H2MfuabAldLW for <notmuch@notmuchmail.org>;\r
+       Fri, 11 Nov 2011 13:15:05 -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 944CE431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 13:15:05 -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
+       pABLF2x5016181; Fri, 11 Nov 2011 23:15:03 +0200\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>,\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: <87fwhu2wtb.fsf@gmail.com>\r
+References: <yf6mxc3ab4t.fsf@taco2.nixu.fi>\r
+       <1320963737-1666-1-git-send-email-jrollins@finestructure.net>\r
+       <yf64nyae67m.fsf@taco2.nixu.fi> <87fwhu2wtb.fsf@gmail.com>\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 23:15:02 +0200\r
+Message-ID: <yf6y5vmcqeh.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 21:15:06 -0000\r
+\r
+On Sat, 12 Nov 2011 01:06:40 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
+> On Fri, 11 Nov 2011 22:48:13 +0200, Tomi Ollila <too@iki.fi> wrote:\r
+> > dtach is simpler than screen and is not setuid/setgid program so\r
+> > TMPDIR does not get cleared by dynamic loader when executed.\r
+> > ---\r
+> > \r
+> > Updated version after discussion with DmitryKurochkin and amdragon\r
+> > on IRC. Thank you.\r
+> > \r
+> \r
+> Looks good to me (though I did not test it).\r
+> \r
+> Few minor comments below.\r
+> \r
+> >  test/test-lib.sh |   25 +++++++++++++------------\r
+> >  1 files changed, 13 insertions(+), 12 deletions(-)\r
+> > \r
+> > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+> > index c81c709..c232130 100755\r
+> > --- a/test/test-lib.sh\r
+> > +++ b/test/test-lib.sh\r
+> > @@ -39,7 +39,7 @@ done,*)\r
+> >    ;;\r
+> >  esac\r
+> >  \r
+> > -# Keep the original TERM for say_color\r
+> > +# Keep the original TERM for say_color and emacs tests\r
+> \r
+> s/emacs tests/test_emacs/ for consistency with say_color?\r
+\r
+yes. thanks...\r
+\r
+> \r
+> >  ORIGINAL_TERM=$TERM\r
+> >  \r
+> >  # For repeatability, reset the environment to known value.\r
+> > @@ -843,12 +841,15 @@ EOF\r
+> >  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
+> > -                  --no-window-system \\r
+> > -                  --eval "(setq server-name \"$EMACS_SERVER\")" \\r
+> > -                  --eval '(server-start)' \\r
+> > -                  --eval "(orphan-watchdog $$)" || return\r
+> > +          # start a detached session with an emacs server\r
+> > +          # user's TERM is given to dtach which assumes a minimally\r
+> > +          # VT100-compatible terminal -- and emacs inherits that\r
+> > +          TERM=$ORIGINAL_TERM dtach -n "$TMP_DIRECTORY/emacs-dtach-socket.$$" \\r
+> > +                  sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \\r
+> \r
+> The above line has a space after two tabs.\r
+\r
+oops...\r
+\r
+I also forgot \r
+\r
+-export SCREENRC=/dev/null\r
+-export SYSSCREENRC=/dev/null\r
+\r
+(dropped accidetally when cherry-picking non-whitespace changes)\r
+Thanks for playing. Try once more...\r
+\r
+> \r
+> Regards,\r
+>   Dmitry\r
+\r
+Tomi\r
+\r
+> \r
+> > +                          --no-window-system \\r
+> > +                          --eval '(setq server-name \"$EMACS_SERVER\")' \\r
+> > +                          --eval '(server-start)' \\r
+> > +                          --eval '(orphan-watchdog $$)'" || return\r
+> >            # wait until the emacs server is up\r
+> >            until test_emacs '()' 2>/dev/null; do\r
+> >                    sleep 1\r
+> > -- \r
+> > 1.7.6.1\r
+> > \r
+> > _______________________________________________\r
+> > notmuch mailing list\r
+> > notmuch@notmuchmail.org\r
+> > http://notmuchmail.org/mailman/listinfo/notmuch\r
+> \r