Results for builtin-trap-err.test.sh

statusbashmkshashosh
pass 129108
ok 0001
N-I 1220
BUG 0210
FAIL 0004
total13131313
casebashmkshashoshdescription
0pass pass pass pass trap can use original $LINENO
1pass pass pass pass trap ERR and set -o errexit
2pass pass pass pass trap ERR and errexit disabled context
3pass pass pass pass trap ERR and if statement
4pass pass pass FAIL trap ERR does not run in errexit situations
details
5pass BUG BUG FAIL trap ERR pipeline (also errexit)
detailsdetailsdetails
6pass pass pass pass trap ERR subprogram - subshell, command sub, async
7pass N-I pass pass trap ERR not active in shell functions in (bash behavior)
details
8pass BUG pass FAIL trap ERR shell function - with errtrace
detailsdetails
9N-I N-I N-I FAIL trap ERR with YSH proc
detailsdetailsdetailsdetails
10pass pass pass pass trap ERR
11pass pass N-I ok trap ERR and pipelines (lastpipe and PIPESTATUS difference)
detailsdetails
12pass pass pass pass error in trap ERR (recursive)
39 passed, 1 OK, 5 not implemented, 3 BUG, 4 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

osh4 trap ERR does not run in errexit situations

[osh stdout] Expected 'until\nline=16\nline=20\nline=20\nline=20\nok\n' Got 'until\nline=16\nline=16\nline=20\nline=20\nline=20\nok\n'

stdout:
until
line=16
line=16
line=20
line=20
line=20
ok
stderr:
mksh5 trap ERR pipeline (also errexit)

stdout:
line=1
line=1
stderr:
ash5 trap ERR pipeline (also errexit)

stdout:
line=1
line=1
stderr:
osh5 trap ERR pipeline (also errexit)

[osh stdout] Expected 'line=3\nline=5\n', got 'line=3\nline=3\nline=5\nline=5\n'

stdout:
line=3
line=3
line=5
line=5
stderr:
mksh7 trap ERR not active in shell functions in (bash behavior)

stdout:
line=4
stderr:
mksh8 trap ERR shell function - with errtrace

stdout:
line=4
line=10
stderr:
mksh: <stdin>[16]: set: errtrace: bad option
osh8 trap ERR shell function - with errtrace

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

stdout:
line=10
line=16
now with errtrace
line=10
ok
stderr:
  set -o errtrace
  ^~~
[ stdin ]:16: 'set' got invalid option 'errtrace'
bash9 trap ERR with YSH proc

stdout:
stderr: 
mksh9 trap ERR with YSH proc

stdout:
stderr: 
ash9 trap ERR with YSH proc

stdout:
stderr: 
osh9 trap ERR with YSH proc

[osh stdout] Expected 'abc\n', got ''

stdout:
stderr: 
ash11 trap ERR and pipelines (lastpipe and PIPESTATUS difference)

stdout:
stderr: 
osh11 trap ERR and pipelines (lastpipe and PIPESTATUS difference)

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