Results for builtin-trap-err.test.sh

statusoshosh-cpp
pass 2016
ok 11
FAIL 26
total2323
caseoshosh-cppdescription
0pass pass trap can use original $LINENO
1pass pass trap ERR and set -o errexit
2pass pass trap ERR and errexit disabled context
3pass pass trap ERR and if statement
4pass pass trap ERR and || conditional
5pass pass trap ERR and pipeline
6pass FAIL trap ERR pipelines without simple commands
details
7pass pass Pipeline group quirk
8pass pass trap ERR does not run in errexit situations
9pass FAIL trap ERR doesn't run in subprograms - subshell, command sub, async
details
10pass FAIL set -o errtrace: trap ERR runs in subprograms
details
11pass pass trap ERR doesn't run with &
12FAIL FAIL set -o errtrace: trap ERR with &
detailsdetails
13pass pass trap ERR not active in shell functions in (bash behavior)
14pass pass set -o errtrace - trap ERR runs in shell functions
15FAIL FAIL set -o errtrace - trap ERR runs in shell functions (LINENO)
detailsdetails
16pass FAIL trap ERR with "atoms": assignment (( [[
details
17pass pass trap ERR with for, case, { }
18pass pass trap ERR with redirect
19pass pass trap ERR with YSH proc
20pass pass trap ERR
21ok ok trap ERR and pipelines - PIPESTATUS difference
detailsdetails
22pass pass error in trap ERR (recursive)
36 passed, 2 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh-cpp6 trap ERR pipelines without simple commands

[osh-cpp stdout] Expected 'assign\ndparen\ndbracket\nsubshell\nsubshell2\ngroup\nok\n' Got ''
[osh-cpp status] Expected 0, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'IndexError*'
terminate called after throwing an instance of 'IndexError*'
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh-cpp9 trap ERR doesn't run in subprograms - subshell, command sub, async

[osh-cpp stdout] Expected 'subshell\nasync\nline=11\nok\n', got 'subshell\n'
[osh-cpp status] Expected 0, got -6

stdout:
subshell
stderr:
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh-cpp10 set -o errtrace: trap ERR runs in subprograms

[osh-cpp stdout] Expected 'line=6\nsubshell\nline=10\nok\n', got 'line=6\nsubshell\n'
[osh-cpp status] Expected 0, got -6

stdout:
line=6
subshell
stderr:
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh12 set -o errtrace: trap ERR with &

[osh stdout] Expected 'line=8\nasync\n', got 'line=6\nline=8\nasync\n'

stdout:
line=6
line=8
async
stderr:
[%1] PID 11182 Done
[%1] PID 11183 Done
osh-cpp12 set -o errtrace: trap ERR with &

[osh-cpp stdout] Expected 'line=8\nasync\n', got 'line=6\nline=8\nasync\n'

stdout:
line=6
line=8
async
stderr:
[%1] PID 11191 Done
[%1] PID 11192 Done
osh15 set -o errtrace - trap ERR runs in shell functions (LINENO)

[osh stdout] Expected 'line=14\nnow with errtrace\nline=4\nline=10\nline=20\nok\n' Got 'line=10\nnow with errtrace\nline=4\nline=10\nline=10\nok\n'

stdout:
line=10
now with errtrace
line=4
line=10
line=10
ok
stderr:
osh-cpp15 set -o errtrace - trap ERR runs in shell functions (LINENO)

[osh-cpp stdout] Expected 'line=14\nnow with errtrace\nline=4\nline=10\nline=20\nok\n' Got 'line=10\nnow with errtrace\nline=4\nline=10\nline=10\nok\n'

stdout:
line=10
now with errtrace
line=4
line=10
line=10
ok
stderr:
osh-cpp16 trap ERR with "atoms": assignment (( [[

[osh-cpp stdout] Expected 'line=3\nline=5\nline=7\nok\n', got ''
[osh-cpp status] Expected 0, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh21 trap ERR and pipelines - PIPESTATUS difference

stdout:
A
err [] status=1 []
B
err [] status=1 [0 1]
err [] status=1 [0 1 0]
ok
stderr:
osh-cpp21 trap ERR and pipelines - PIPESTATUS difference

stdout:
A
err [] status=1 []
B
err [] status=1 [0 1]
err [] status=1 [0 1 0]
ok
stderr: