100 passed, 4 OK, 0 not implemented, 4 BUG, 53 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 |
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 |
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 |
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 |
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 <' |
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: |
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: |
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) |
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 |
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: 3684687 |
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: |
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'. |