Results for exit-status.test.sh

statusoshosh_.pyosh_.cc
pass 400
FAIL 155
total555
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL If empty command
detailsdetails
1pass FAIL FAIL If subshell true
detailsdetails
2pass FAIL FAIL If subshell true WITH OUTPUT is different
detailsdetails
3pass FAIL FAIL If subshell true WITH ARGUMENT
detailsdetails
4FAIL FAIL FAIL If subshell false -- exit code is propagated in a weird way (strict_argv prevents)
detailsdetailsdetails
4 passed, 0 OK, 0 not implemented, 0 BUG, 11 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh_.py0 If empty command

[osh_.py stdout] Expected 'FALSE\n', got "(cmd_value.Argv argv:[''] arg_spids:[2])\nTRUE\n"

stdout:
(cmd_value.Argv argv:[''] arg_spids:[2])
TRUE
stderr:
Unhandled SimpleCommand
osh_.cc0 If empty command

[osh_.cc stdout] Expected 'FALSE\n', got "(cmd_value.Argv argv:[''] arg_spids:[2])\nTRUE\n"

stdout:
(cmd_value.Argv argv:[''] arg_spids:[2])
TRUE
stderr:
Unhandled SimpleCommand
osh_.py1 If subshell true

[osh_.py stdout] Expected 'TRUE\n', got ''
[osh_.py status] Expected 0, got 1
[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 71, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 449, 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 1438, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1197, in _Dispatch
    status = self._ExecuteList(if_arm.cond)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _ExecuteList
    status = self._Execute(child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 591, in _Dispatch
    status = self._Execute(node.child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 494, in RunSimpleCommand
    arg0 = argv[0]
IndexError: list index out of range
osh_.cc1 If subshell true

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

stdout:
stderr: 
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
osh_.py2 If subshell true WITH OUTPUT is different

[osh_.py stdout] Expected 'FALSE\n', got ''
[osh_.py status] Expected 0, got 1
[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 71, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 449, 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 1438, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1197, in _Dispatch
    status = self._ExecuteList(if_arm.cond)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _ExecuteList
    status = self._Execute(child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 591, in _Dispatch
    status = self._Execute(node.child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 494, in RunSimpleCommand
    arg0 = argv[0]
IndexError: list index out of range
osh_.cc2 If subshell true WITH OUTPUT is different

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

stdout:
stderr: 
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
osh_.py3 If subshell true WITH ARGUMENT

[osh_.py stdout] Expected 'FALSE\n', got '(cmd_value.Argv argv:[X] arg_spids:[8])\nTRUE\n'

stdout:
(cmd_value.Argv argv:[X] arg_spids:[8])
TRUE
stderr:
Unhandled SimpleCommand
osh_.cc3 If subshell true WITH ARGUMENT

[osh_.cc stdout] Expected 'FALSE\n', got '(cmd_value.Argv argv:[X] arg_spids:[8])\nTRUE\n'

stdout:
(cmd_value.Argv argv:[X] arg_spids:[8])
TRUE
stderr:
Unhandled SimpleCommand
osh4 If subshell false -- exit code is propagated in a weird way (strict_argv prevents)

[osh stdout] Expected 'FALSE\n', got 'TRUE\n'

stdout:
TRUE
stderr:
osh_.py4 If subshell false -- exit code is propagated in a weird way (strict_argv prevents)

[osh_.py stdout] Expected 'FALSE\n', got ''
[osh_.py status] Expected 0, got 1
[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 71, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 449, 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 1438, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1197, in _Dispatch
    status = self._ExecuteList(if_arm.cond)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _ExecuteList
    status = self._Execute(child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 591, in _Dispatch
    status = self._Execute(node.child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 494, in RunSimpleCommand
    arg0 = argv[0]
IndexError: list index out of range
osh_.cc4 If subshell false -- exit code is propagated in a weird way (strict_argv prevents)

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

stdout:
stderr: 
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)