CVSROOT: /cvs Module name: src Changes by: k...@cvs.openbsd.org 2022/10/16 02:49:03
Modified files: regress/bin/ksh: th Log message: Always pass the test program as PROG env var, fix synopsis The ./th perl script always runs -p prog (KSH in Makefile) as the shell, but cannot signal it other than the optional SIGKILL after `time-limit'. Implementing time-related signal handling in ./th seems overkill, so always pass the program as PROG in the environment so it can wrap itself, e.g. description: simluate interrupting a script stdin: timeout --signal SIGINT --preserve-status -- 1s $PROG -c ' actual test script getting ^C after one second... ' Avoiding hard-coded programs in tests with PROG allows testing different shells through `make KSH=/path/to/sh' without changing or adding shell specific tests. While here, make -p and -s as mandatory in usage as ./th `die's if they're not passed (allowing to always just pass -p's argument as PROG).