summaryrefslogtreecommitdiff
path: root/regress/bin/ksh/trap.t
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2022-10-16 08:49:04 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2022-10-16 08:49:04 +0000
commit25d437c54184a2569af6ad592656227ff507a943 (patch)
tree7b9e8cb3dd4df56d01de202f3d29ea2832900e76 /regress/bin/ksh/trap.t
parent20fff826c8f56146ea25ff5278b6b16b140d0503 (diff)
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).
Diffstat (limited to 'regress/bin/ksh/trap.t')
0 files changed, 0 insertions, 0 deletions