From 0fa312e2052e293ffca338fa0f4fa71eb3bc5239 Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Sun, 8 Jan 2017 14:36:32 +1300 Subject: [PATCH] Ensure tty device is readable before running test Unreadable tty's fail with a different permissions error instead of failing with "is a tty" error. --- testsuite/panic-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/panic-tests.sh b/testsuite/panic-tests.sh index a2dba00..00a7090 100644 --- a/testsuite/panic-tests.sh +++ b/testsuite/panic-tests.sh @@ -87,7 +87,7 @@ EOF ttydev=no-such-file type tty >/dev/null 2>&1 && ttydev=$(tty 2>/dev/null) -if test -w "$ttydev" ; then +if test -w "$ttydev" && test -r "$ttydev" ; then returns_ 4 sed -i = "$ttydev" 2>err-tty || fail=1 # remove the actual terminal device name (using sed itself...) -- 2.11.0