Results for errexit.test.sh

statusoshosh_.pyosh_.cc
pass 271612
FAIL 11216
total282828
caseoshosh_.pyosh_.ccdescription
0pass pass pass errexit aborts early
1pass FAIL FAIL errexit for nonexistent command
detailsdetails
2pass FAIL FAIL errexit aborts early on pipeline
detailsdetails
3pass pass pass errexit with { }
4pass pass pass errexit with if and { }
5pass FAIL FAIL errexit with ||
detailsdetails
6pass FAIL FAIL errexit with &&
detailsdetails
7pass pass pass errexit test && -- from gen-module-init
8pass pass FAIL errexit test && and fail
details
9pass pass pass errexit and loop
10pass pass pass errexit and brace group { }
11pass pass FAIL errexit and time { }
details
12pass pass pass errexit with !
13pass pass pass errexit with ! and ;
14pass pass pass errexit with while/until
15pass pass pass errexit with (( ))
16pass FAIL FAIL errexit with subshell
detailsdetails
17pass pass FAIL set -o errexit while it's being ignored (moot with strict_errexit)
details
18pass pass pass set +o errexit while it's being ignored (moot with strict_errexit)
19pass FAIL FAIL setting errexit in a subshell works but doesn't affect parent shell
detailsdetails
20pass FAIL FAIL set errexit while it's ignored in a subshell (moot with strict_errexit)
detailsdetails
21pass pass FAIL shopt -s strict:all || true while errexit is on
details
22pass pass FAIL errexit double guard
details
23pass FAIL FAIL background processes respect errexit
detailsdetails
24pass FAIL FAIL pipeline process respects errexit
detailsdetails
25pass FAIL FAIL compound command
detailsdetails
26pass FAIL FAIL while loop
detailsdetails
27FAIL FAIL pass set -e enabled in function (regression)
detailsdetails
55 passed, 0 OK, 0 not implemented, 0 BUG, 29 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh_.py1 errexit for nonexistent command

[osh_.py status] Expected 127, got 1

stdout:
stderr: 
Error running ['nonexistent__ZZ']: [Errno 2] No such file or directory
  nonexistent__ZZ
  ^~~~~~~~~~~~~~~
[ stdin ]:2: fatal: Exiting with status 1 (command in PID 25330)
osh_.cc1 errexit for nonexistent command

[osh_.cc stdout] Expected u'', got '(cmd_value.Argv argv:[nonexistent__ZZ] arg_spids:[6])\ndone\n'
[osh_.cc status] Expected 127, got 0

stdout:
(cmd_value.Argv argv:[nonexistent__ZZ] arg_spids:[6])
done
stderr:
Unhandled SimpleCommand
osh_.py2 errexit aborts early on pipeline

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

stdout:
two
stderr:
osh_.cc2 errexit aborts early on pipeline

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

stdout:
two
stderr:
osh_.py5 errexit with ||

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

stdout:
stderr: 
osh_.cc5 errexit with ||

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

stdout:
stderr: 
osh_.py6 errexit with &&

[osh_.py status] Expected 1, got 0

stdout:
ok
stderr:
osh_.cc6 errexit with &&

[osh_.cc status] Expected 1, got 0

stdout:
ok
stderr:
osh_.cc8 errexit test && and fail

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

stdout:
status=1
stderr:
osh_.cc11 errexit and time { }

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

stdout:
stderr: 
osh_eval.dbg: cpp/core_passwd.h:29: Tuple3<double, double, double> passwd::Time(): Assertion `0' failed.
osh_.py16 errexit with subshell

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

stdout:
three
stderr:
osh_.cc16 errexit with subshell

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

stdout:
three
stderr:
osh_.cc17 set -o errexit while it's being ignored (moot with strict_errexit)

[osh_.cc stdout] Expected '1\n2\n3\n4\n5\n6\n', got '1\n2\n3\n4\n5\n6\n7\n'
[osh_.cc status] Expected 1, got 0

stdout:
1
2
3
4
5
6
7
stderr:
osh_.py19 setting errexit in a subshell works but doesn't affect parent shell

[osh_.py stdout] Expected '1\n2\n3\n5\n6\n', got '5\n6\n'

stdout:
5
6
stderr:
osh_.cc19 setting errexit in a subshell works but doesn't affect parent shell

[osh_.cc stdout] Expected '1\n2\n3\n5\n6\n', got '5\n6\n'

stdout:
5
6
stderr:
osh_.py20 set errexit while it's ignored in a subshell (moot with strict_errexit)

[osh_.py stdout] Expected '1\n2\n3\n4\n5\n6\n', got '5\n6\n'

stdout:
5
6
stderr:
  false
  ^~~~~
[ stdin ]:6: fatal: Exiting with status 1 (command in PID 26696)
osh_.cc20 set errexit while it's ignored in a subshell (moot with strict_errexit)

[osh_.cc stdout] Expected '1\n2\n3\n4\n5\n6\n', got '5\n6\n7\n'
[osh_.cc status] Expected 1, got 0

stdout:
5
6
7
stderr:
osh_.cc21 shopt -s strict:all || true while errexit is on

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

stdout:
one
two
stderr:
osh_.cc22 errexit double guard

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

stdout:
true
done
stderr:
osh_.py23 background processes respect errexit

[osh_.py stdout] Expected 'one\n', got ''
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 580, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 488, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 388, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 351, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 32
osh_.cc23 background processes respect errexit

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

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py24 pipeline process respects errexit

[osh_.py stdout] Expected 'one\n[three]\n', got 'four\n'
[osh_.py status] Expected 1, got 0

stdout:
four
stderr:
osh_.cc24 pipeline process respects errexit

[osh_.cc stdout] Expected 'one\n[three]\n', got 'four\n'
[osh_.cc status] Expected 1, got 0

stdout:
four
stderr:
osh_.py25 compound command

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

stdout:
status=0
should not get here
stderr:
osh_.cc25 compound command

[osh_.cc stdout] Expected u'', got '(cmd_value.Argv argv:[cat] arg_spids:[8])\nstatus=0\nshould not get here\n'
[osh_.cc status] Expected 1, got 0

stdout:
(cmd_value.Argv argv:[cat] arg_spids:[8])
status=0
should not get here
stderr:
Unhandled SimpleCommand
osh_.py26 while loop

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

stdout:
status=0
should not get here
stderr:
osh_.cc26 while loop

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

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:94: Str *posix::read(int, int): Assertion `0' failed.
osh27 set -e enabled in function (regression)

[osh stdout] Expected 'should be executed\nshould be executed\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
    false
    ^~~~~
[ stdin ]:4: fatal: Exiting with status 1 (command in PID 27258)
osh_.py27 set -e enabled in function (regression)

[osh_.py stdout] Expected 'should be executed\nshould be executed\n', got ''
[osh_.py status] Expected 0, got 1

stdout:
stderr: 
    false
    ^~~~~
[ stdin ]:4: fatal: Exiting with status 1 (command in PID 27285)