GNU bug report logs - #16940
[PATCH] tests: Do not access /dev/tty if it does not exist

Previous Next

Package: coreutils;

Reported by: Cyril Roelandt <tipecaml <at> gmail.com>

Date: Wed, 5 Mar 2014 03:42:01 UTC

Severity: normal

Tags: fixed, patch

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Cyril Roelandt <tipecaml <at> gmail.com>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>, Pádraig Brady <P <at> draigBrady.com>
Cc: 16940 <at> debbugs.gnu.org
Subject: bug#16940: [PATCH] tests: Do not access /dev/tty if it does not exist
Date: Wed, 05 Mar 2014 16:03:34 +0100
On 03/05/2014 10:17 AM, Bernhard Voelker wrote:
> On 03/05/2014 05:20 AM, Pádraig Brady wrote:
>>     if test -w /dev/full && test -c /dev/full &&
>>        test -w /dev/tty && test -c /dev/tty; then
>
> This looks right.
> However, I'm wondering why the 'test -t 1' right after
> the exec redirection didn't already catch this:
>
>     if test -w /dev/full && test -c /dev/full; then
>     (
>       exec >/dev/tty
>       test -t 1 || exit 0
>       nohup echo hi 2> /dev/full
>       test $? = 125 || fail=1
>       test -f nohup.out || fail=1
>       test -s nohup.out && fail=1
>       rm -f nohup.out
>       exit $fail
>     ) || fail=1
>     fi
>
> Does someone have a test log file with the failure?
>

The bug was originally reported on GNU Guix, here: 
https://lists.gnu.org/archive/html/guix-devel/2014-03/msg00009.html

Cyril.




This bug report was last modified 6 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.