Results for errexit.test.sh

statusdashbashmkshashosh
pass 2934353034
ok 10010
N-I 20010
BUG 31030
FAIL 00001
total3535353535
casedashbashmkshashoshdescription
0pass pass pass pass pass errexit aborts early
1pass pass pass pass pass errexit for nonexistent command
2pass pass pass pass pass errexit aborts early on pipeline
3pass pass pass pass pass errexit with { }
4pass pass pass pass pass errexit with if and { }
5pass pass pass pass pass errexit with ||
6pass pass pass pass pass errexit with &&
7pass pass pass pass pass errexit test && -- from gen-module-init
8pass pass pass pass pass errexit test && and fail
9pass pass pass pass pass More && ||
10pass pass pass pass pass errexit and loop
11pass pass pass pass pass errexit and brace group { }
12pass pass pass pass pass errexit and time { }
13pass pass pass pass pass errexit with !
14pass pass pass pass pass errexit with ! and ;
15pass pass pass pass pass errexit with while/until
16N-I pass pass N-I pass errexit with (( ))
detailsdetails
17pass pass pass pass pass errexit with subshell
18pass pass pass pass pass set -o errexit while it's being ignored (moot with strict_errexit)
19pass pass pass pass pass set +o errexit while it's being ignored (moot with strict_errexit)
20pass pass pass pass pass set +o errexit with 2 levels of ignored
21pass pass pass pass pass setting errexit in a subshell works but doesn't affect parent shell
22pass pass pass pass pass set errexit while it's ignored in a subshell (moot with strict_errexit)
23pass pass pass pass pass shopt -s strict:all || true while errexit is on
24pass pass pass pass pass errexit double guard
25pass pass pass pass pass background processes respect errexit
26pass pass pass pass pass pipeline process respects errexit
27ok pass pass pass pass simple command / assign - redir failure DOES respect errexit
details
28BUG pass pass BUG pass simple command that's an alias - redir failure checked
detailsdetails
29N-I pass pass ok pass bash atoms [[ (( - redir failure checked
detailsdetails
30BUG pass pass BUG pass brace group - redir failure checked
detailsdetails
31BUG pass pass BUG pass while loop - redirect failure checked
detailsdetails
32pass pass pass pass pass set -e enabled in function (regression)
33pass BUG pass pass pass set -e in function #2
details
34pass pass pass pass FAIL Command sub exit code is lost
details
162 passed, 2 OK, 3 not implemented, 7 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

dash16 errexit with (( ))

stdout:
stderr: 
dash: 3: i++: not found
ash16 errexit with (( ))

stdout:
stderr: 
ash: i++: not found
dash27 simple command / assign - redir failure DOES respect errexit

stdout:
status=2
status=2
status=2
stderr:
dash: 3: cannot create /: Is a directory
dash: 3: cannot create /: Is a directory
dash: 3: cannot create /: Is a directory
dash28 simple command that's an alias - redir failure checked

stdout:
alias status=2
status=0
stderr:
dash: 2: shopt: not found
dash: 6: cannot create /: Is a directory
ash28 simple command that's an alias - redir failure checked

stdout:
alias status=1
status=0
stderr:
ash: shopt: not found
ash: can't create /: Is a directory
dash29 bash atoms [[ (( - redir failure checked

stdout:
stderr: 
ash29 bash atoms [[ (( - redir failure checked

stdout:
status=1
status=2
stderr:
ash: can't create /: Is a directory
ash: can't create /: Is a directory
dash30 brace group - redir failure checked

stdout:
status=2
should not get here
stderr:
dash: 3: cannot open not_exist.txt: No such file
ash30 brace group - redir failure checked

stdout:
status=1
should not get here
stderr:
ash: can't open not_exist.txt: no such file
dash31 while loop - redirect failure checked

stdout:
status=2
should not get here
stderr:
dash: 3: cannot open not_exist.txt: No such file
ash31 while loop - redirect failure checked

stdout:
status=1
should not get here
stderr:
ash: can't open not_exist.txt: no such file
bash33 set -e in function #2

stdout:
stderr: 
osh34 Command sub exit code is lost

[osh stdout] Expected 'ft\nstatus=0\nf\nstatus=0\nft\nstatus=0\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 202, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 171, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 141, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1266, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 401, in Batch2
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2285, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 2084, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1811, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1054, in _DoSimple
    allow_assign=True)
  File "/home/uke/oil/osh/word_eval.py", line 2529, in EvalWordSequence2
    self._EvalWordToParts(w, part_vals, EXTGLOB_FILES)
  File "/home/uke/oil/osh/word_eval.py", line 1983, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/uke/oil/osh/word_eval.py", line 1875, in _EvalWordPart
    quoted)  # type: part_value_t
  File "/home/uke/oil/osh/word_eval.py", line 2623, in _EvalCommandSub
    stdout_str = self.shell_ex.RunCommandSub(cs_part)
  File "/home/uke/oil/core/executor.py", line 693, in RunCommandSub
    status, stdout_str, stderr_str = self.CaptureStdout(node)
  File "/home/uke/oil/core/executor.py", line 621, in CaptureStdout
    fds = pyos.WaitForInputs([r, r2])
  File "/home/uke/oil/core/pyos.py", line 288, in WaitForInputs
    r, w, exc = select.select(fd, [], [fd])
TypeError: argument must be an int, or have a fileno() method