On Mon, 19 Aug 2024 at 16:27:24 +0000, Thorsten Glaser wrote: > mksh actually does things inside script(1) that use the tty
For the purposes of having a test-case for schroot that doesn't require mksh, perhaps a good approximation to this would be asserting that tty(1) from coreutils exits successfully and prints the path to a char device that exists and is rw? For a manual smoke-test for this change, having a known-good version of mksh build and pass its test suite seems like a better indicator that the terminal is indeed working, but I think that's too large and involved to make a reasonable autopkgtest for schroot to guard against this maybe regressing. > case $(script -c 'echo true | env -i /bin/mksh-static -i' 2>&1) in > *[!\ \#\$]*) echo fail ;; > esac I assume this is basically testing a code path inside mksh that calls isatty(3) on one or more of the standard fds 0-2, because mksh -i should set the prompt to (something that will expand to) "# " or "$ " if running on a pty or tty, or produce some other output if not? For schroot's purposes, it seems close enough to assert that any single tty ioctl or termios function call works successfully (indicating that, yes, it genuinely is a working tty). smcv