Results for errexit-oil.test.sh

statusoshosh_.pyosh_.cc
pass 20174
FAIL 2518
total222222
caseoshosh_.pyosh_.ccdescription
0pass pass FAIL command sub: errexit is NOT inherited and outer shell keeps going
details
1pass pass FAIL command sub with inherit_errexit only
details
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 pass FAIL command sub with more_errexit only
details
5pass pass FAIL command sub with inherit_errexit and more_errexit
details
6pass pass FAIL command sub: last command fails but keeps going and exit code is 0
details
7pass pass FAIL global assignment with command sub: middle command fails
details
8pass pass FAIL global assignment with command sub: last command fails and it aborts
details
9pass pass FAIL local: middle command fails and keeps going
details
10pass pass FAIL local: last command fails and also keeps going
details
11pass pass FAIL local and inherit_errexit / more_errexit
details
12pass pass pass global assignment when last status is failure
13pass pass FAIL global assignment when last status is failure
details
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 pass pass strict_errexit prevents errexit from being disabled in subshell
17pass FAIL FAIL strict_errexit and ! && || if while until
detailsdetails
18pass FAIL FAIL if pipeline doesn't fail fatally
detailsdetails
19pass pass pass if pipeline DOES fail fatally with strict_errexit
20pass pass FAIL errexit is silent (verbose_errexit for Oil)
details
21pass pass FAIL command sub errexit preserves exit code
details
41 passed, 0 OK, 0 not implemented, 0 BUG, 25 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

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

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

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc1 command sub with inherit_errexit only

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

stdout:
zero
stderr:
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
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:
  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_.cc2 strict_errexit with command sub stops program

[osh_.cc status] Expected 1, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
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 status] Expected 1, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc4 command sub with more_errexit only

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

stdout:
zero
stderr:
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc5 command sub with inherit_errexit and more_errexit

[osh_.cc status] Expected 1, got -6

stdout:
zero
stderr:
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc6 command sub: last command fails but keeps going and exit code is 0

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

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc7 global assignment with command sub: middle command fails

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

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc8 global assignment with command sub: last command fails and it aborts

[osh_.cc status] Expected 1, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc9 local: middle command fails and keeps going

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

stdout:
good
stderr:
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc10 local: last command fails and also keeps going

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

stdout:
good
stderr:
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc11 local and inherit_errexit / more_errexit

[osh_.cc status] Expected 1, got -6

stdout:
good
stderr:
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc13 global assignment when last status is failure

[osh_.cc stdout] Expected 'status=0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
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'

stdout:
fun
builtin ok
stderr:
  env echo 'external ok' || true
  ^~~
[ stdin ]:6: 'env' not found
  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'

stdout:
fun
builtin ok
stderr:
  env echo 'external ok' || true
  ^~~
[ stdin ]:6: 'env' not found
  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_.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 'bang=127\n--\nor=127\n--\nand=127\n--\nif=127\n--\nwhile=127\n--\nuntil=127\n--\n'

stdout:
bang=127
--
or=127
--
and=127
--
if=127
--
while=127
--
until=127
--
stderr:
  $SH -c "$prelude; ! fun; echo 'should not get here'"
      ^~
[ stdin ]:4: '-c' not found
  $SH -c "$prelude; fun || true"
      ^~
[ stdin ]:7: '-c' not found
  $SH -c "$prelude; fun && true"
      ^~
[ stdin ]:10: '-c' not found
  $SH -c "$prelude; if fun; then true; fi"
      ^~
[ stdin ]:13: '-c' not found
  $SH -c "$prelude; while fun; do echo while; exit; done"
      ^~
[ stdin ]:16: '-c' not found
  $SH -c "$prelude; until fun; do echo until; exit; done"
      ^~
[ stdin ]:19: '-c' not found
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 'bang=127\n--\nor=127\n--\nand=127\n--\nif=127\n--\nwhile=127\n--\nuntil=127\n--\n'

stdout:
bang=127
--
or=127
--
and=127
--
if=127
--
while=127
--
until=127
--
stderr:
  $SH -c "$prelude; ! fun; echo 'should not get here'"
      ^~
[ stdin ]:4: '-c' not found
  $SH -c "$prelude; fun || true"
      ^~
[ stdin ]:7: '-c' not found
  $SH -c "$prelude; fun && true"
      ^~
[ stdin ]:10: '-c' not found
  $SH -c "$prelude; if fun; then true; fi"
      ^~
[ stdin ]:13: '-c' not found
  $SH -c "$prelude; while fun; do echo while; exit; done"
      ^~
[ stdin ]:16: '-c' not found
  $SH -c "$prelude; until fun; do echo until; exit; done"
      ^~
[ stdin ]:19: '-c' not found
osh_.py18 if pipeline doesn't fail fatally

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

stdout:
stderr: 
rmdir: failed to remove '/_tmp': No such file or directory
rm: cannot remove '/alpine': Is a directory
rm: cannot remove '/bin': Is a directory
rm: cannot remove '/boot': Is a directory
rm: cannot remove '/cdrom': Is a directory
rm: cannot remove '/dev': Is a directory
rm: cannot remove '/etc': Is a directory
rm: cannot remove '/home': Is a directory
rm: cannot remove '/initrd.img': Permission denied
rm: cannot remove '/initrd.img.old': Permission denied
rm: cannot remove '/lib': Is a directory
rm: cannot remove '/lib32': Is a directory
rm: cannot remove '/lib64': Is a directory
rm: cannot remove '/libx32': Is a directory
rm: cannot remove '/lost+found': Is a directory
rm: cannot remove '/media': Is a directory
rm: cannot remove '/mnt': Is a directory
rm: cannot remove '/nix': Is a directory
rm: cannot remove '/opt': Is a directory
rm: cannot remove '/proc': Is a directory
rm: cannot remove '/root': Is a directory
rm: cannot remove '/run': Is a directory
rm: cannot remove '/sbin': Is a directory
rm: cannot remove '/snap': Is a directory
rm: cannot remove '/srv': Is a directory
rm: cannot remove '/sys': Is a directory
rm: cannot remove '/tmp': Is a directory
rm: cannot remove '/usr': Is a directory
rm: cannot remove '/var': Is a directory
rm: cannot remove '/vmlinuz': Permission denied
rm: cannot remove '/vmlinuz.old': Permission denied
  rm -f $TMP/*
  ^~
[ stdin ]:11: fatal: Exiting with status 1 (command in PID 7842)
osh_.cc18 if pipeline doesn't fail fatally

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

stdout:
stderr: 
rmdir: failed to remove '/_tmp': No such file or directory
rm: cannot remove '/alpine': Is a directory
rm: cannot remove '/bin': Is a directory
rm: cannot remove '/boot': Is a directory
rm: cannot remove '/cdrom': Is a directory
rm: cannot remove '/dev': Is a directory
rm: cannot remove '/etc': Is a directory
rm: cannot remove '/home': Is a directory
rm: cannot remove '/initrd.img': Permission denied
rm: cannot remove '/initrd.img.old': Permission denied
rm: cannot remove '/lib': Is a directory
rm: cannot remove '/lib32': Is a directory
rm: cannot remove '/lib64': Is a directory
rm: cannot remove '/libx32': Is a directory
rm: cannot remove '/lost+found': Is a directory
rm: cannot remove '/media': Is a directory
rm: cannot remove '/mnt': Is a directory
rm: cannot remove '/nix': Is a directory
rm: cannot remove '/opt': Is a directory
rm: cannot remove '/proc': Is a directory
rm: cannot remove '/root': Is a directory
rm: cannot remove '/run': Is a directory
rm: cannot remove '/sbin': Is a directory
rm: cannot remove '/snap': Is a directory
rm: cannot remove '/srv': Is a directory
rm: cannot remove '/sys': Is a directory
rm: cannot remove '/tmp': Is a directory
rm: cannot remove '/usr': Is a directory
rm: cannot remove '/var': Is a directory
rm: cannot remove '/vmlinuz': Permission denied
rm: cannot remove '/vmlinuz.old': Permission denied
  rm -f $TMP/*
  ^~
[ stdin ]:11: fatal: Exiting with status 1 (command in PID 7875)
osh_.cc20 errexit is silent (verbose_errexit for Oil)

[osh_.cc stderr] Expected u'', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n"
[osh_.cc status] Expected 1, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.
osh_.cc21 command sub errexit preserves exit code

[osh_.cc status] Expected 42, got -6

stdout:
before
stderr:
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.