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 B77F6431FD0 for ; Fri, 11 Nov 2011 00:41:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 UiYuRAO7gcrw for ; Fri, 11 Nov 2011 00:41:27 -0800 (PST) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id CBE94431FB6 for ; Fri, 11 Nov 2011 00:41:26 -0800 (PST) Received: by bkaq10 with SMTP id q10so3680553bka.26 for ; Fri, 11 Nov 2011 00:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=GdLOAQAnl0gb+Gf3xWa8AlhdtEMuEEmuTRCPSpcdDig=; b=vfLbUrhptr42h+CBr4tmnKH2gjj9zFo+WMELYeB9Fo0IFXdFNCjnjfDG6DP/IBl3iK YQ/DxvvCcO0lTdwPBF1FljF0+xIiBjdHr80cUA+C0Z3KCAq2h/84nO55vAq31nuCQZ+4 8whTBEi8ERgZcAi4wbqHlbKasbpUerXv7fivQ= Received: by 10.204.29.8 with SMTP id o8mr7300665bkc.48.1321000883783; Fri, 11 Nov 2011 00:41:23 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id q6sm9914973bka.6.2011.11.11.00.41.22 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Nov 2011 00:41:22 -0800 (PST) From: Dmitry Kurochkin To: Tomi Ollila , Notmuch Mail Subject: Re: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests. In-Reply-To: <1320963737-1666-1-git-send-email-jrollins@finestructure.net> References: <1320963737-1666-1-git-send-email-jrollins@finestructure.net> User-Agent: Notmuch/0.9+55~g81c615b (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 11 Nov 2011 12:41:11 +0400 Message-ID: <877h373vbs.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Fri, 11 Nov 2011 08:41:27 -0000 Hi Tomi. On Thu, 10 Nov 2011 14:22:17 -0800, Jameson Graef Rollins wrote: > From: Tomi Ollila > > dtach is lighter than screen and is not setuid/setgid program so > TMPDIR does not get reset by dynamic loader when executed. > > Signed-off-by: Jameson Graef Rollins > --- > This tweaks the original patch slightly by removing the no-longer needed > screenrc variables. > > test/test-lib.sh | 5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/test/test-lib.sh b/test/test-lib.sh > index c81c709..c0fe037 100755 > --- a/test/test-lib.sh > +++ b/test/test-lib.sh > @@ -50,8 +50,6 @@ TZ=UTC > TERM=dumb > export LANG LC_ALL PAGER TERM TZ > GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u} > -export SCREENRC=/dev/null > -export SYSSCREENRC=/dev/null > > # Protect ourselves from common misconfiguration to export > # CDPATH into the environment > @@ -844,7 +842,8 @@ test_emacs () { > if [ -z "$EMACS_SERVER" ]; then > EMACS_SERVER="notmuch-test-suite-$$" > # start a detached screen session with an emacs server > - screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \ > + TERM=xterm dtach -n "$TMP_DIRECTORY/dtach-emacs-socket-$$" \ Can you please give a more detailed explanation (and a comment) to justify this workaround: * Is it actually needed for dtach or emacs? If it is the latter, then it should be "dtach ... env TERM=xterm emacs ...", right? * Why should we care about systems that use terminals without corresponding terminfo installed? * Why is it safe to use xterm? Is there any standard that requires xterm info to be present on the system? I have tried running dtach with emacs in rxvt-unicode and it worked fine without overriding TERM. I have also tried running dtach with invalid TERM: $ TERM=non-existing-term dtach -n s /bin/sh zsh: can't find terminal definition for non-existing-term No segfault, shell is started fine. But emacs does not work without a valid terminfo: $ TERM=non-existing-term emacs -nw emacs: Terminal type non-existing-term is not defined. If that is not the actual type of terminal you have, use the Bourne shell command `TERM=... export TERM' (C-shell: `setenv TERM ...') to specify the correct type. It may be necessary to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well. Regards, Dmitry > + "$TMP_DIRECTORY/run_emacs" \ > --no-window-system \ > --eval "(setq server-name \"$EMACS_SERVER\")" \ > --eval '(server-start)' \ > -- > 1.7.7.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch