Results for errexit-oil.test.sh

statusoshosh_.pyosh_.cc
pass 1944
FAIL 21717
total212121
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL command sub: errexit is NOT inherited and outer shell keeps going
detailsdetails
1pass FAIL FAIL command sub with inherit_errexit only
detailsdetails
2FAIL FAIL FAIL strict_errexit with command sub stops program
detailsdetailsdetails
3FAIL FAIL FAIL {inherit,strict}_errexit: command sub with a single command
detailsdetailsdetails
4pass FAIL FAIL command sub with more_errexit only
detailsdetails
5pass FAIL FAIL command sub with inherit_errexit and more_errexit
detailsdetails
6pass FAIL FAIL command sub: last command fails but keeps going and exit code is 0
detailsdetails
7pass FAIL FAIL global assignment with command sub: middle command fails
detailsdetails
8pass FAIL FAIL global assignment with command sub: last command fails and it aborts
detailsdetails
9pass FAIL FAIL local: middle command fails and keeps going
detailsdetails
10pass FAIL FAIL local: last command fails and also keeps going
detailsdetails
11pass FAIL FAIL local and inherit_errexit / more_errexit
detailsdetails
12pass pass pass global assignment when last status is failure
13pass pass pass global assignment when last status is failure
14pass FAIL FAIL strict_errexit prevents errexit from being disabled in function
detailsdetails
15pass pass pass strict_errexit prevents errexit from being disabled in brace group
16pass FAIL FAIL strict_errexit prevents errexit from being disabled in subshell
detailsdetails
17pass FAIL FAIL strict_errexit and ! && || if while until
detailsdetails
18pass FAIL FAIL if pipeline doesn't fail fatally
detailsdetails
19pass FAIL FAIL if pipeline DOES fail fatally with strict_errexit
detailsdetails
20pass pass pass errexit is silent (verbose_errexit for Oil)
27 passed, 0 OK, 0 not implemented, 0 BUG, 36 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh_.py0 command sub: errexit is NOT inherited and outer shell keeps going

[osh_.py stdout] Expected 'one two\nparent status=0\n', got '\nparent status=0\n'

stdout:
parent status=0
stderr:
osh_.cc0 command sub: errexit is NOT inherited and outer shell keeps going

[osh_.cc stdout] Expected 'one two\nparent status=0\n', got '\nparent status=0\n'

stdout:
parent status=0
stderr:
osh_.py1 command sub with inherit_errexit only

[osh_.py stdout] Expected 'zero\none\nparent status=0\n', got 'zero\n\nparent status=0\n'

stdout:
zero

parent status=0
stderr:
osh_.cc1 command sub with inherit_errexit only

[osh_.cc stdout] Expected 'zero\none\nparent status=0\n', got 'zero\n\nparent status=0\n'

stdout:
zero

parent status=0
stderr:
osh2 strict_errexit with command sub stops program

[osh stdout] Expected u'', got '\nA\ndone\n'
[osh status] Expected 1, got 0

stdout:
A
done
stderr:
  if echo $( echo 1; false; echo 2); then
  ^~
[ stdin ]:4: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.CommandList)
osh_.py2 strict_errexit with command sub stops program

[osh_.py stdout] Expected u'', got '\nA\ndone\n'
[osh_.py status] Expected 1, got 0

stdout:
A
done
stderr:
osh_.cc2 strict_errexit with command sub stops program

[osh_.cc stdout] Expected u'', got '\nA\ndone\n'
[osh_.cc status] Expected 1, got 0

stdout:
A
done
stderr:
osh3 {inherit,strict}_errexit: command sub with a single command

[osh stdout] Expected u'', got '\nA\ndone\n'
[osh status] Expected 1, got 0

stdout:
A
done
stderr:
osh_.py3 {inherit,strict}_errexit: command sub with a single command

[osh_.py stdout] Expected u'', got '\nA\ndone\n'
[osh_.py status] Expected 1, got 0

stdout:
A
done
stderr:
osh_.cc3 {inherit,strict}_errexit: command sub with a single command

[osh_.cc stdout] Expected u'', got '\nA\ndone\n'
[osh_.cc status] Expected 1, got 0

stdout:
A
done
stderr:
osh_.py4 command sub with more_errexit only

[osh_.py stdout] Expected 'zero\none two\nparent status=0\n', got 'zero\n\nparent status=0\n'

stdout:
zero

parent status=0
stderr:
osh_.cc4 command sub with more_errexit only

[osh_.cc stdout] Expected 'zero\none two\nparent status=0\n', got 'zero\n\nparent status=0\n'

stdout:
zero

parent status=0
stderr:
osh_.py5 command sub with inherit_errexit and more_errexit

[osh_.py stdout] Expected 'zero\n', got 'zero\n\nparent status=0\n'
[osh_.py status] Expected 1, got 0

stdout:
zero

parent status=0
stderr:
osh_.cc5 command sub with inherit_errexit and more_errexit

[osh_.cc stdout] Expected 'zero\n', got 'zero\n\nparent status=0\n'
[osh_.cc status] Expected 1, got 0

stdout:
zero

parent status=0
stderr:
osh_.py6 command sub: last command fails but keeps going and exit code is 0

[osh_.py stdout] Expected 'one\nstatus=0\n', got '\nstatus=0\n'

stdout:
status=0
stderr:
osh_.cc6 command sub: last command fails but keeps going and exit code is 0

[osh_.cc stdout] Expected 'one\nstatus=0\n', got '\nstatus=0\n'

stdout:
status=0
stderr:
osh_.py7 global assignment with command sub: middle command fails

[osh_.py stdout] Expected 'one\ntwo\n', got '\n'

stdout:
stderr: 
osh_.cc7 global assignment with command sub: middle command fails

[osh_.cc stdout] Expected 'one\ntwo\n', got ''
[osh_.cc status] Expected 0, got -11

stdout:
stderr: 
osh_.py8 global assignment with command sub: last command fails and it aborts

[osh_.py stdout] Expected u'', got 'status=0\n'
[osh_.py status] Expected 1, got 0

stdout:
status=0
stderr:
osh_.cc8 global assignment with command sub: last command fails and it aborts

[osh_.cc stdout] Expected u'', got 'status=0\n'
[osh_.cc status] Expected 1, got 0

stdout:
status=0
stderr:
osh_.py9 local: middle command fails and keeps going

[osh_.py stdout] Expected 'good\nstatus=0\none two\n', got 'good\nstatus=0\n\n'

stdout:
good
status=0

stderr:
osh_.cc9 local: middle command fails and keeps going

[osh_.cc stdout] Expected 'good\nstatus=0\none two\n', got 'good\nstatus=0\n\n'

stdout:
good
status=0

stderr:
osh_.py10 local: last command fails and also keeps going

[osh_.py stdout] Expected 'good\nstatus=0\none\n', got 'good\nstatus=0\n\n'

stdout:
good
status=0

stderr:
osh_.cc10 local: last command fails and also keeps going

[osh_.cc stdout] Expected 'good\nstatus=0\none\n', got 'good\nstatus=0\n\n'

stdout:
good
status=0

stderr:
osh_.py11 local and inherit_errexit / more_errexit

[osh_.py stdout] Expected 'good\n', got 'good\nstatus=0\n\n'
[osh_.py status] Expected 1, got 0

stdout:
good
status=0

stderr:
osh_.cc11 local and inherit_errexit / more_errexit

[osh_.cc stdout] Expected 'good\n', got 'good\nstatus=0\n\n'
[osh_.cc status] Expected 1, got 0

stdout:
good
status=0

stderr:
osh_.py14 strict_errexit prevents errexit from being disabled in function

[osh_.py stdout] Expected 'fun\nbuiltin ok\nexternal ok\n', got "fun\nbuiltin ok\n(cmd_value.Argv argv:[env echo 'external ok'] arg_spids:[48 50 52])\n"

stdout:
fun
builtin ok
(cmd_value.Argv argv:[env echo 'external ok'] arg_spids:[48 50 52])
stderr:
Unhandled SimpleCommand
  fun || true  # this fails
  ^~~
[ stdin ]:7: fatal: can't disable errexit running a function. Maybe wrap the function in a process with the at-splice pattern.
osh_.cc14 strict_errexit prevents errexit from being disabled in function

[osh_.cc stdout] Expected 'fun\nbuiltin ok\nexternal ok\n', got "fun\nbuiltin ok\n(cmd_value.Argv argv:[env echo 'external ok'] arg_spids:[48 50 52])\n"

stdout:
fun
builtin ok
(cmd_value.Argv argv:[env echo 'external ok'] arg_spids:[48 50 52])
stderr:
Unhandled SimpleCommand
  fun || true  # this fails
  ^~~
[ stdin ]:7: fatal: can't disable errexit running a function. Maybe wrap the function in a process with the at-splice pattern.
osh_.py16 strict_errexit prevents errexit from being disabled in subshell

[osh_.py stdout] Expected 'foo\nbar\n', got ''

stdout:
stderr: 
  ( echo foo; false; echo bar; ) || echo "failed"
                                 ^~
[ stdin ]:5: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.Subshell)
osh_.cc16 strict_errexit prevents errexit from being disabled in subshell

[osh_.cc stdout] Expected 'foo\nbar\n', got ''

stdout:
stderr: 
  shopt -s strict_errexit || true
  ^~~~~
[ stdin ]:4: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.Subshell)
osh_.py17 strict_errexit and ! && || if while until

[osh_.py stdout] Expected 'bang=1\n--\nor=1\n--\nand=1\n--\nif=1\n--\nwhile=1\n--\nuntil=1\n--\n', got "(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; ! fun; echo \\'should not get here\\''\n ]\n arg_spids: [9 11]\n)\nbang=0\n--\n(cmd_value.Argv\n argv: [-c 'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; fun || true']\n arg_spids: [27 29]\n)\nor=0\n--\n(cmd_value.Argv\n argv: [-c 'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; fun && true']\n arg_spids: [45 47]\n)\nand=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; if fun; then true; fi'\n ]\n arg_spids: [63 65]\n)\nif=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; while fun; do echo while; exit; done'\n ]\n arg_spids: [81 83]\n)\nwhile=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; until fun; do echo until; exit; done'\n ]\n arg_spids: [99 101]\n)\nuntil=0\n--\n"

stdout:
(cmd_value.Argv
  argv: [
    -c
'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; ! fun; echo \'should not get here\''
  ]
  arg_spids: [9 11]
)
bang=0
--
(cmd_value.Argv
  argv: [-c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; fun || true']
  arg_spids: [27 29]
)
or=0
--
(cmd_value.Argv
  argv: [-c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; fun && true']
  arg_spids: [45 47]
)
and=0
--
(cmd_value.Argv
  argv: [
    -c
'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; if fun; then true; fi'
  ]
  arg_spids: [63 65]
)
if=0
--
(cmd_value.Argv
  argv: [
    -c
'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; while fun; do echo while; exit; done'
  ]
  arg_spids: [81 83]
)
while=0
--
(cmd_value.Argv
  argv: [
    -c
'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; until fun; do echo until; exit; done'
  ]
  arg_spids: [99 101]
)
until=0
--
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc17 strict_errexit and ! && || if while until

[osh_.cc stdout] Expected 'bang=1\n--\nor=1\n--\nand=1\n--\nif=1\n--\nwhile=1\n--\nuntil=1\n--\n', got "(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; ! fun; echo \\'should not get here\\''\n ]\n arg_spids: [9 11]\n)\nbang=0\n--\n(cmd_value.Argv\n argv: [-c 'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; fun || true']\n arg_spids: [27 29]\n)\nor=0\n--\n(cmd_value.Argv\n argv: [-c 'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; fun && true']\n arg_spids: [45 47]\n)\nand=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; if fun; then true; fi'\n ]\n arg_spids: [63 65]\n)\nif=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; while fun; do echo while; exit; done'\n ]\n arg_spids: [81 83]\n)\nwhile=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; until fun; do echo until; exit; done'\n ]\n arg_spids: [99 101]\n)\nuntil=0\n--\n"

stdout:
(cmd_value.Argv
  argv: [
    -c
'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; ! fun; echo \'should not get here\''
  ]
  arg_spids: [9 11]
)
bang=0
--
(cmd_value.Argv
  argv: [-c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; fun || true']
  arg_spids: [27 29]
)
or=0
--
(cmd_value.Argv
  argv: [-c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; fun && true']
  arg_spids: [45 47]
)
and=0
--
(cmd_value.Argv
  argv: [
    -c
'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; if fun; then true; fi'
  ]
  arg_spids: [63 65]
)
if=0
--
(cmd_value.Argv
  argv: [
    -c
'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; while fun; do echo while; exit; done'
  ]
  arg_spids: [81 83]
)
while=0
--
(cmd_value.Argv
  argv: [
    -c
'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; until fun; do echo until; exit; done'
  ]
  arg_spids: [99 101]
)
until=0
--
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py18 if pipeline doesn't fail fatally

[osh_.py stdout] Expected 'done\n', got "(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[61 63])\n(cmd_value.Argv\n argv: [\n rm\n -f\n '/alpine'\n '/bin'\n '/boot'\n '/cdrom'\n '/dev'\n '/etc'\n '/home'\n '/initrd.img'\n '/initrd.img.old'\n '/lib'\n '/lib32'\n '/lib64'\n '/libx32'\n '/lost+found'\n '/media'\n '/mnt'\n '/nix'\n '/opt'\n '/proc'\n '/root'\n '/run'\n '/sbin'\n '/snap'\n '/srv'\n '/sys'\n '/tmp'\n '/usr'\n '/var'\n '/vmlinuz'\n '/vmlinuz.old'\n ]\n arg_spids: [70 72 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74]\n)\nfoo\n\nfoo\n\ndone\n"

stdout:
(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[61 63])
(cmd_value.Argv
  argv: [
    rm
    -f
    '/alpine'
    '/bin'
    '/boot'
    '/cdrom'
    '/dev'
    '/etc'
    '/home'
    '/initrd.img'
    '/initrd.img.old'
    '/lib'
    '/lib32'
    '/lib64'
    '/libx32'
    '/lost+found'
    '/media'
    '/mnt'
    '/nix'
    '/opt'
    '/proc'
    '/root'
    '/run'
    '/sbin'
    '/snap'
    '/srv'
    '/sys'
    '/tmp'
    '/usr'
    '/var'
    '/vmlinuz'
    '/vmlinuz.old'
  ]
  arg_spids: [70 72 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74]
)
foo

foo

done
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc18 if pipeline doesn't fail fatally

[osh_.cc stdout] Expected 'done\n', got "(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[61 63])\n(cmd_value.Argv\n argv: [\n rm\n -f\n '/alpine'\n '/bin'\n '/boot'\n '/cdrom'\n '/dev'\n '/etc'\n '/home'\n '/initrd.img'\n '/initrd.img.old'\n '/lib'\n '/lib32'\n '/lib64'\n '/libx32'\n '/lost+found'\n '/media'\n '/mnt'\n '/nix'\n '/opt'\n '/proc'\n '/root'\n '/run'\n '/sbin'\n '/snap'\n '/srv'\n '/sys'\n '/tmp'\n '/usr'\n '/var'\n '/vmlinuz'\n '/vmlinuz.old'\n ]\n arg_spids: [70 72 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74]\n)\nfoo\n\nfoo\n\ndone\n"

stdout:
(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[61 63])
(cmd_value.Argv
  argv: [
    rm
    -f
    '/alpine'
    '/bin'
    '/boot'
    '/cdrom'
    '/dev'
    '/etc'
    '/home'
    '/initrd.img'
    '/initrd.img.old'
    '/lib'
    '/lib32'
    '/lib64'
    '/libx32'
    '/lost+found'
    '/media'
    '/mnt'
    '/nix'
    '/opt'
    '/proc'
    '/root'
    '/run'
    '/sbin'
    '/snap'
    '/srv'
    '/sys'
    '/tmp'
    '/usr'
    '/var'
    '/vmlinuz'
    '/vmlinuz.old'
  ]
  arg_spids: [70 72 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74]
)
foo

foo

done
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py19 if pipeline DOES fail fatally with strict_errexit

[osh_.py stdout] Expected '! false ok\n', got "(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[79 81])\n(cmd_value.Argv\n argv: [\n rm\n -f\n '/alpine'\n '/bin'\n '/boot'\n '/cdrom'\n '/dev'\n '/etc'\n '/home'\n '/initrd.img'\n '/initrd.img.old'\n '/lib'\n '/lib32'\n '/lib64'\n '/libx32'\n '/lost+found'\n '/media'\n '/mnt'\n '/nix'\n '/opt'\n '/proc'\n '/root'\n '/run'\n '/sbin'\n '/snap'\n '/srv'\n '/sys'\n '/tmp'\n '/usr'\n '/var'\n '/vmlinuz'\n '/vmlinuz.old'\n ]\n arg_spids: [88 90 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92]\n)\n"

stdout:
(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[79 81])
(cmd_value.Argv
  argv: [
    rm
    -f
    '/alpine'
    '/bin'
    '/boot'
    '/cdrom'
    '/dev'
    '/etc'
    '/home'
    '/initrd.img'
    '/initrd.img.old'
    '/lib'
    '/lib32'
    '/lib64'
    '/libx32'
    '/lost+found'
    '/media'
    '/mnt'
    '/nix'
    '/opt'
    '/proc'
    '/root'
    '/run'
    '/sbin'
    '/snap'
    '/srv'
    '/sys'
    '/tmp'
    '/usr'
    '/var'
    '/vmlinuz'
    '/vmlinuz.old'
  ]
  arg_spids: [88 90 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92]
)
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
  	if ls $dir | grep ''; then
  	^~
[ stdin ]:9: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.Pipeline)
osh_.cc19 if pipeline DOES fail fatally with strict_errexit

[osh_.cc stdout] Expected '! false ok\n', got "(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[79 81])\n(cmd_value.Argv\n argv: [\n rm\n -f\n '/alpine'\n '/bin'\n '/boot'\n '/cdrom'\n '/dev'\n '/etc'\n '/home'\n '/initrd.img'\n '/initrd.img.old'\n '/lib'\n '/lib32'\n '/lib64'\n '/libx32'\n '/lost+found'\n '/media'\n '/mnt'\n '/nix'\n '/opt'\n '/proc'\n '/root'\n '/run'\n '/sbin'\n '/snap'\n '/srv'\n '/sys'\n '/tmp'\n '/usr'\n '/var'\n '/vmlinuz'\n '/vmlinuz.old'\n ]\n arg_spids: [88 90 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92]\n)\n"

stdout:
(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[79 81])
(cmd_value.Argv
  argv: [
    rm
    -f
    '/alpine'
    '/bin'
    '/boot'
    '/cdrom'
    '/dev'
    '/etc'
    '/home'
    '/initrd.img'
    '/initrd.img.old'
    '/lib'
    '/lib32'
    '/lib64'
    '/libx32'
    '/lost+found'
    '/media'
    '/mnt'
    '/nix'
    '/opt'
    '/proc'
    '/root'
    '/run'
    '/sbin'
    '/snap'
    '/srv'
    '/sys'
    '/tmp'
    '/usr'
    '/var'
    '/vmlinuz'
    '/vmlinuz.old'
  ]
  arg_spids: [88 90 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92]
)
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
    local dir=$1
    ^~~~~
[ stdin ]:8: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.Pipeline)