Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tty.bats: add test cases when stdin is not a tty
Note that stdout/stderr are already redirected by bats' `run` command, so the only way to get a controlling terminal is to open /dev/tty (which fails if there isn't one). Here's how I tested the failure to open /dev/tty: > [root@kir-rhat ~]# ssh -T root@localhost cat ./runme > cd /home/kir/go/src/github.com/opencontainers/runc > ./runc run -b tst xxx-$$ > echo $? > > [root@kir-rhat ~]# ssh -T root@localhost ./runme > time="2020-07-31T16:35:47-07:00" level=error msg="chdir tst: no such file or directory" > 1 If anyone knows how to obtain an tty-less environment without using ssh -T, please raise your hand. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
- Loading branch information