diff options
Diffstat (limited to 'deps/uv/test/test-tty.c')
-rw-r--r-- | deps/uv/test/test-tty.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/deps/uv/test/test-tty.c b/deps/uv/test/test-tty.c index eb5d5df526..f3003efa6a 100644 --- a/deps/uv/test/test-tty.c +++ b/deps/uv/test/test-tty.c @@ -30,6 +30,9 @@ # include <unistd.h> #endif +#include <string.h> +#include <errno.h> + TEST_IMPL(tty) { int r, width, height; @@ -62,7 +65,12 @@ TEST_IMPL(tty) { #else /* unix */ ttyin_fd = open("/dev/tty", O_RDONLY, 0); + if (ttyin_fd < 0) + LOGF("Cannot open /dev/tty as read-only: %s\n", strerror(errno)); + ttyout_fd = open("/dev/tty", O_WRONLY, 0); + if (ttyout_fd < 0) + LOGF("Cannot open /dev/tty as write-only: %s\n", strerror(errno)); #endif ASSERT(ttyin_fd >= 0); |