From f33053023b2a3f42ba7d87e3ed58b58673bf08ad Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Tue, 21 May 2019 23:17:02 +0300 Subject: [PATCH] test: redirect STDIN from /dev/null Without this stdin may be anything that parent process provided for it. Test processes might have tried to read something from it, which would have caused undeterministic behavior. E.g. gdb(1) tries to do tty related ioctls on fd 0 (and fd 1 and fd 2, but those are redirected to 'test.output' before test runs). --- test/test-lib.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-lib.sh b/test/test-lib.sh index 507886ba..7b49fc97 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -55,6 +55,9 @@ done,*) ;; esac +# STDIN from /dev/null. EOF for readers (and ENOTTY for tty related ioctls). +exec &1 7>&2 # Make xtrace debugging (when used) use redirected STDERR, with verbose lead: -- 2.43.0