From: Tomi Ollila Date: Tue, 21 May 2019 20:17:02 +0000 (+0300) Subject: test: redirect STDIN from /dev/null X-Git-Tag: archive/debian/0.29_rc0-1~45 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=f33053023b2a3f42ba7d87e3ed58b58673bf08ad 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). --- 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: