status | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | |
pass | 22 | 18 | 20 | 14 | 18 | 19 | 0 | 13 | 8 | 20 | |
ok | 0 | 1 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 2 | |
N-I | 0 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
BUG | 1 | 1 | 2 | 0 | 3 | 0 | 0 | 0 | 0 | 0 | |
FAIL | 0 | 0 | 0 | 9 | 0 | 4 | 23 | 10 | 15 | 1 | |
total | 23 | 23 | 23 | 23 | 23 | 23 | 23 | 23 | 23 | 23 | |
case | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | description |
0 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | FAIL | pass | trap accepts/ignores -- |
details | details | details | |||||||||
1 | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | pass | Register invalid trap |
details | |||||||||||
2 | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | pass | Remove invalid trap |
details | |||||||||||
3 | pass | N-I | pass | FAIL | pass | pass | FAIL | pass | pass | pass | SIGINT and INT are aliases |
details | details | details | |||||||||
4 | pass | N-I | BUG | FAIL | BUG | FAIL | FAIL | pass | pass | FAIL | trap without args prints traps, like trap -p |
details | details | details | details | details | details | details | |||||
5 | pass | pass | pass | FAIL | pass | pass | FAIL | FAIL | pass | ok | trap 'echo hi' KILL (regression test, caught by smoosh suite) |
details | details | details | details | ||||||||
6 | pass | ok | ok | FAIL | BUG | FAIL | FAIL | pass | FAIL | pass | Invalid trap invocation |
details | details | details | details | details | details | details | |||||
7 | BUG | BUG | BUG | pass | BUG | FAIL | FAIL | FAIL | FAIL | pass | exit 1 when trap code string is invalid |
details | details | details | details | details | details | details | details | ||||
8 | pass | pass | pass | FAIL | pass | pass | FAIL | pass | FAIL | pass | trap EXIT calling exit |
details | details | details | |||||||||
9 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | FAIL | pass | trap EXIT return status ignored |
details | details | details | |||||||||
10 | pass | pass | pass | FAIL | ok | FAIL | FAIL | FAIL | FAIL | pass | trap EXIT with PARSE error |
details | details | details | details | details | details | ||||||
11 | pass | pass | pass | FAIL | pass | pass | FAIL | pass | FAIL | pass | trap EXIT with PARSE error and explicit exit |
details | details | details | |||||||||
12 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | FAIL | pass | trap EXIT with explicit exit |
details | details | details | |||||||||
13 | pass | pass | pass | pass | pass | pass | FAIL | pass | FAIL | pass | trap EXIT with command sub / subshell / pipeline |
details | details | ||||||||||
14 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | pass | pass | trap 0 is equivalent to EXIT |
details | details | ||||||||||
15 | pass | N-I | pass | FAIL | pass | pass | FAIL | pass | pass | pass | trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP |
details | details | details | |||||||||
16 | pass | pass | pass | pass | pass | pass | FAIL | pass | FAIL | pass | eval in the exit trap (regression for issue #293) |
details | details | ||||||||||
17 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | FAIL | pass | exit codes for traps are isolated |
details | details | details | |||||||||
18 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | FAIL | pass | traps are cleared in subshell (started with &) |
details | details | details | |||||||||
19 | pass | pass | pass | pass | pass | pass | FAIL | pass | FAIL | pass | trap USR1, sleep, SIGINT: non-interactively |
details | details | ||||||||||
20 | pass | pass | pass | pass | ok | pass | FAIL | pass | pass | ok | trap INT, sleep, SIGINT: non-interactively |
details | details | details | |||||||||
21 | pass | pass | pass | pass | pass | pass | FAIL | pass | FAIL | pass | trap EXIT, sleep, SIGINT: non-interactively |
details | details | ||||||||||
22 | pass | pass | pass | FAIL | pass | pass | FAIL | FAIL | FAIL | pass | Remove trap with an unsigned integer |
details | details | details | details |
152 passed, 6 OK, 3 not implemented, 7 BUG, 62 failed, 0 timeouts, 0 cases skipped 1 failed under osh
toysh | 0 trap accepts/ignores -- [toysh stdout] Expected 'ok\nhi\n', got 'ok\n' stdout: okstderr: sh: trap: No such file or directory |
sush | 0 trap accepts/ignores -- [sush stdout] Expected 'ok\nhi\n', got 'ok\n' stdout: okstderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: trap: echo hi: invalid signal specification |
brush | 0 trap accepts/ignores -- [brush stdout] Expected 'ok\nhi\n', got 'ok\n' stdout: okstderr: |
toysh | 1 Register invalid trap [toysh status] Expected 1, got 127 stdout: stderr: sh: trap: No such file or directory |
toysh | 2 Remove invalid trap [toysh status] Expected 1, got 127 stdout: stderr: sh: trap: No such file or directory |
dash | 3 SIGINT and INT are aliases stdout: 1 0stderr: trap: SIGINT: bad trap |
zsh | 3 SIGINT and INT are aliases [zsh stdout] Expected '0\n0\n', got '1\n1\n' stdout: 1 1stderr: trap: undefined signal: SIGINT trap: undefined signal: INT |
toysh | 3 SIGINT and INT are aliases [toysh stdout] Expected '0\n0\n', got '127\n127\n' stdout: 127 127stderr: sh: trap: No such file or directory sh: trap: No such file or directory |
dash | 4 trap without args prints traps, like trap -p stdout: stderr: |
ash | 4 trap without args prints traps, like trap -p stdout: status=0 status=1stderr: |
zsh | 4 trap without args prints traps, like trap -p [zsh stdout] Expected "status=0\ntrap -- 'true' EXIT\nstatus=0\n", got 'status=0\ntrap -- true EXIT\nstatus=0\n' stdout: status=0 trap -- true EXIT status=0stderr: |
mksh | 4 trap without args prints traps, like trap -p stdout: status=0 status=1stderr: |
ksh | 4 trap without args prints traps, like trap -p [ksh stdout] Expected "status=0\ntrap -- 'true' EXIT\nstatus=0\n", got 'status=0\nstatus=1\n' stdout: status=0 status=1stderr: |
toysh | 4 trap without args prints traps, like trap -p [toysh stdout] Expected "status=0\ntrap -- 'true' EXIT\nstatus=0\n", got '' [toysh status] Expected 0, got -6 stdout: stderr: munmap_chunk(): invalid pointer |
osh | 4 trap without args prints traps, like trap -p [osh stdout] Expected "status=0\ntrap -- 'true' EXIT\nstatus=0\n", got 'status=0\nstatus=1\n' stdout: status=0 status=1stderr: trap | grep EXIT ^~~~ [ -c flag ]:6: 'trap' requires a code string |
zsh | 5 trap 'echo hi' KILL (regression test, caught by smoosh suite) [zsh stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n', got 'status=0\nstatus=1\nstatus=0\nstatus=1\n' stdout: status=0 status=1 status=0 status=1stderr: trap: undefined signal: KILL trap: undefined signal: TERM |
toysh | 5 trap 'echo hi' KILL (regression test, caught by smoosh suite) [toysh stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n', got 'status=127\nstatus=127\nstatus=127\nstatus=127\n' stdout: status=127 status=127 status=127 status=127stderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
sush | 5 trap 'echo hi' KILL (regression test, caught by smoosh suite) [sush stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n', got 'status=1\n' [sush status] Expected 0, got 101 stdout: status=1stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: trap: 9: forbidden signal for trap thread 'main' panicked at src/signal.rs:17:10: sush(fatal): cannot ignore signal: EINVAL note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
osh | 5 trap 'echo hi' KILL (regression test, caught by smoosh suite) stdout: status=1 status=1 status=1 status=0stderr: trap 'echo hi' 9 ^ [ stdin ]:1: Signal '9' can't be handled trap 'echo hi' KILL ^~~~ [ stdin ]:4: Invalid signal or hook 'KILL' trap 'echo hi' STOP ^~~~ [ stdin ]:7: Signal 'STOP' can't be handled |
dash | 6 Invalid trap invocation stdout: status=1stderr: trap: foo: bad trap |
ash | 6 Invalid trap invocation stdout: status=1stderr: ash: trap: line 1: foo: invalid signal specification |
zsh | 6 Invalid trap invocation [zsh stdout] Expected 'status=2\n', got 'status=0\n' stdout: status=0stderr: |
mksh | 6 Invalid trap invocation stdout: status=0stderr: |
ksh | 6 Invalid trap invocation [ksh stdout] Expected 'status=2\n', got 'status=0\n' stdout: status=0stderr: |
toysh | 6 Invalid trap invocation [toysh stdout] Expected 'status=2\n', got 'status=127\n' stdout: status=127stderr: sh: trap: No such file or directory |
brush | 6 Invalid trap invocation [brush stdout] Expected 'status=2\n', got 'status=1\n' stdout: status=1stderr: [31mERROR[0m foo: invalid signal specification |
bash | 7 exit 1 when trap code string is invalid stdout: status=0stderr: bash: exit trap: line 1: syntax error near unexpected token `newline' bash: exit trap: line 1: `echo <' |
dash | 7 exit 1 when trap code string is invalid stdout: status=0stderr: dash: 1: Syntax error: end of file unexpected |
ash | 7 exit 1 when trap code string is invalid stdout: status=0stderr: ash: syntax error: unexpected end of file |
mksh | 7 exit 1 when trap code string is invalid stdout: status=0stderr: mksh: syntax error: unexpected EOF |
ksh | 7 exit 1 when trap code string is invalid [ksh stdout] Expected 'status=1\n', got 'status=0\n' [ksh status] Expected 0, got 1 stdout: status=0stderr: E: ksh: syntax error: unexpected EOF |
toysh | 7 exit 1 when trap code string is invalid [toysh stdout] Expected 'status=1\n', got 'status=127\n' stdout: status=127stderr: sh: trap: No such file or directory |
sush | 7 exit 1 when trap code string is invalid [sush stdout] Expected 'status=1\n', got 'status=0\n' [sush status] Expected 0, got 2 stdout: status=0stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: Unexpected token: < |
brush | 7 exit 1 when trap code string is invalid [brush stdout] Expected 'status=1\n', got 'status=0\n' stdout: status=0stderr: |
zsh | 8 trap EXIT calling exit [zsh status] Expected 42, got 0 stdout: cleanup [x y z]stderr: |
toysh | 8 trap EXIT calling exit [toysh stdout] Expected 'cleanup [x y z]\n', got '' [toysh status] Expected 42, got 127 stdout: stderr: sh: trap: No such file or directory |
brush | 8 trap EXIT calling exit [brush stdout] Expected 'cleanup [x y z]\n', got '' [brush status] Expected 42, got 0 stdout: stderr: |
toysh | 9 trap EXIT return status ignored [toysh stdout] Expected 'cleanup [x y z]\n', got '' [toysh status] Expected 0, got 127 stdout: stderr: sh: trap: No such file or directory |
sush | 9 trap EXIT return status ignored [sush status] Expected 0, got 42 stdout: cleanup [x y z]stderr: |
brush | 9 trap EXIT return status ignored [brush stdout] Expected 'cleanup [x y z]\n', got '' stdout: stderr: |
zsh | 10 trap EXIT with PARSE error [zsh status] Expected 2, got 1 stdout: FAILEDstderr: zsh: parse error near `\n' |
mksh | 10 trap EXIT with PARSE error stdout: FAILEDstderr: mksh: <stdin>[2]: syntax error: 'newline' unexpected |
ksh | 10 trap EXIT with PARSE error [ksh status] Expected 2, got 1 stdout: FAILEDstderr: E: ksh: <stdin>[2]: syntax error: unexpected 'newline' |
toysh | 10 trap EXIT with PARSE error [toysh stdout] Expected 'FAILED\n', got '' stdout: stderr: sh: trap: No such file or directory main: line 2: sh: syntax error: newline |
sush | 10 trap EXIT with PARSE error [sush status] Expected 2, got 0 stdout: FAILEDstderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: Unexpected token: |
brush | 10 trap EXIT with PARSE error [brush stdout] Expected 'FAILED\n', got '' stdout: stderr: [31mERROR[0m main: syntax error near token ` ' (line 1 col 4) |
zsh | 11 trap EXIT with PARSE error and explicit exit [zsh status] Expected 0, got 1 stdout: FAILEDstderr: zsh: parse error near `\n' |
toysh | 11 trap EXIT with PARSE error and explicit exit [toysh stdout] Expected 'FAILED\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: sh: trap: No such file or directory main: line 2: sh: syntax error: newline |
brush | 11 trap EXIT with PARSE error and explicit exit [brush stdout] Expected 'FAILED\n', got '' [brush status] Expected 0, got 2 stdout: stderr: [31mERROR[0m main: syntax error near token ` ' (line 1 col 4) |
toysh | 12 trap EXIT with explicit exit [toysh stdout] Expected 'IN TRAP\nFOO\n', got '' stdout: stderr: sh: trap: No such file or directory |
sush | 12 trap EXIT with explicit exit [sush status] Expected 42, got 0 stdout: IN TRAP FOOstderr: |
brush | 12 trap EXIT with explicit exit [brush stdout] Expected 'IN TRAP\nFOO\n', got '' stdout: stderr: |
toysh | 13 trap EXIT with command sub / subshell / pipeline [toysh stdout] Expected 'command sub\nsubshell\npipeline\nEXIT TRAP\n' Got 'command sub\nsubshell\npipeline\n' stdout: command sub subshell pipelinestderr: sh: trap: No such file or directory |
brush | 13 trap EXIT with command sub / subshell / pipeline [brush stdout] Expected 'command sub\nsubshell\npipeline\nEXIT TRAP\n' Got 'command sub\nsubshell\npipeline\n' stdout: command sub subshell pipelinestderr: |
toysh | 14 trap 0 is equivalent to EXIT [toysh stdout] Expected 'status=0\nstatus=0\n', got 'status=127\nstatus=127\n' stdout: status=127 status=127stderr: sh: trap: No such file or directory sh: trap: No such file or directory |
sush | 14 trap 0 is equivalent to EXIT [sush status] Expected 0, got 127 stdout: status=0 status=0stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: -: command not found |
dash | 15 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP stdout: status=1 status=0 status=0 status=0stderr: trap: SIGHUP: bad trap |
zsh | 15 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP [zsh stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n', got 'status=1\nstatus=1\nstatus=0\nstatus=1\n' stdout: status=1 status=1 status=0 status=1stderr: trap: undefined signal: SIGHUP trap: undefined signal: HUP trap: undefined signal: HUP |
toysh | 15 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP [toysh stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n', got 'status=127\nstatus=127\nstatus=127\nstatus=127\n' stdout: status=127 status=127 status=127 status=127stderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
toysh | 16 eval in the exit trap (regression for issue #293) [toysh stdout] Expected 'hi\n', got '' [toysh status] Expected 0, got 127 stdout: stderr: sh: trap: No such file or directory |
brush | 16 eval in the exit trap (regression for issue #293) [brush stdout] Expected 'hi\n', got '' stdout: stderr: |
toysh | 17 exit codes for traps are isolated [toysh stdout] Expected 'before=0\nUSR1 trap status=0\nafter=0\n', got 'before=127\n' [toysh status] Expected 0, got -10 stdout: before=127stderr: sh: trap: No such file or directory |
sush | 17 exit codes for traps are isolated [sush stdout] Expected 'before=0\nUSR1 trap status=0\nafter=0\n', got 'before=0\nafter=0\n' stdout: before=0 after=0stderr: |
brush | 17 exit codes for traps are isolated [brush stdout] Expected 'before=0\nUSR1 trap status=0\nafter=0\n', got 'before=0\n' [brush status] Expected 0, got -10 stdout: before=0stderr: |
toysh | 18 traps are cleared in subshell (started with &) [toysh stdout] Expected 'SIGURG\nbegin child\nend child\nwait status 0\n' Got 'begin child\nend child\nwait status 0\n' stdout: begin child end child wait status 0stderr: sh: trap: No such file or directory kill: missing argument (see "kill --help") |
sush | 18 traps are cleared in subshell (started with &) [sush stdout] Expected 'SIGURG\nbegin child\nend child\nwait status 0\n' Got 'begin child\nSIGURG\nend child\nwait status 0\n' stdout: begin child SIGURG end child wait status 0stderr: 3357536 |
brush | 18 traps are cleared in subshell (started with &) [brush stdout] Expected 'SIGURG\nbegin child\nend child\nwait status 0\n' Got 'begin child\nend child\nwait status 0\n' stdout: begin child end child wait status 0stderr: kill: invalid usage |
toysh | 19 trap USR1, sleep, SIGINT: non-interactively [toysh stdout] Expected 'usr1\nstatus=0\n', got 'status=0\n' stdout: status=0stderr: sh: command: No such file or directory sh: trap: No such file or directory sh: -USR1: No such file or directory |
brush | 19 trap USR1, sleep, SIGINT: non-interactively [brush stdout] Expected 'usr1\nstatus=0\n', got 'status=0\n' stdout: status=0stderr: |
mksh | 20 trap INT, sleep, SIGINT: non-interactively stdout: mkshstderr: |
toysh | 20 trap INT, sleep, SIGINT: non-interactively [toysh stdout] Expected 'status=0\n', got '' [toysh status] Expected 0, got -6 stdout: stderr: munmap_chunk(): invalid pointer |
osh | 20 trap INT, sleep, SIGINT: non-interactively stdout: int status=0stderr: |
toysh | 21 trap EXIT, sleep, SIGINT: non-interactively [toysh stdout] Expected 'on exit\nstatus=0\n', got 'status=0\n' stdout: status=0stderr: sh: command: No such file or directory sh: trap: No such file or directory sh: -INT: No such file or directory |
brush | 21 trap EXIT, sleep, SIGINT: non-interactively [brush stdout] Expected 'on exit\nstatus=0\n', got 'status=0\n' stdout: status=0stderr: |
zsh | 22 Remove trap with an unsigned integer [zsh stdout] Expected 'ok0\n\nok42space\n\nok07\n\ntrap-exit\nfailure\n' Got 'ok0\n\nok42space\n\nok07\n\nbad\nfailure\n' stdout: ok0 ok42space ok07 bad failurestderr: zsh:1: command not found: 42 zsh:1: command not found: -1 |
toysh | 22 Remove trap with an unsigned integer [toysh stdout] Expected 'ok0\n\nok42space\n\nok07\n\ntrap-exit\nfailure\n' Got '\n\n\nfailure\n' stdout: failurestderr: sh: Unknown option 'e' (see "sh --help") sh: Unknown option 'e' (see "sh --help") sh: Unknown option 'e' (see "sh --help") sh: Unknown option 'e' (see "sh --help") |
sush | 22 Remove trap with an unsigned integer [sush stdout] Expected 'ok0\n\nok42space\n\nok07\n\ntrap-exit\nfailure\n' Got 'ok0\n\nok42space\n\nok07\n\nbad\nfailure\n' stdout: ok0 ok42space ok07 bad failurestderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 0: command not found /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 42: command not found /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 07: command not found /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: -1: command not found |
brush | 22 Remove trap with an unsigned integer [brush stdout] Expected 'ok0\n\nok42space\n\nok07\n\ntrap-exit\nfailure\n' Got 'ok0\n\nok42space\n\nok07\n\nbad\n' stdout: ok0 ok42space ok07 badstderr: error: unexpected argument '-1' found tip: to pass '-1' as a value, use '-- -1' Usage: trap [OPTIONS] [ARGS]... For more information, try '--help'. |