Results for errexit-osh.test.sh

statusbashdashmkshashosh
pass 14891333
ok 03300
N-I 192221200
total3333333333
casebashdashmkshashoshdescription
0pass ok ok pass pass command sub: errexit is NOT inherited and outer shell keeps going
detailsdetails
1pass pass pass N-I pass command sub with inherit_errexit only
details
2N-I N-I N-I N-I pass strict_errexit and assignment builtins (local, export, readonly ...)
detailsdetailsdetailsdetails
3N-I N-I N-I N-I pass strict_errexit and command sub in export / readonly
detailsdetailsdetailsdetails
4N-I N-I N-I N-I pass strict_errexit disallows pipeline
detailsdetailsdetailsdetails
5pass pass pass pass pass strict_errexit allows singleton pipeline
6N-I N-I N-I N-I pass strict_errexit without errexit proc
detailsdetailsdetailsdetails
7N-I N-I N-I N-I pass strict_errexit without errexit proc / command sub
detailsdetailsdetailsdetails
8N-I N-I N-I N-I pass strict_errexit and errexit disabled
detailsdetailsdetailsdetails
9pass N-I N-I pass pass command sub with command_sub_errexit only
detailsdetails
10N-I N-I N-I N-I pass command_sub_errexit stops at first error
detailsdetailsdetailsdetails
11N-I N-I N-I N-I pass command sub with inherit_errexit and command_sub_errexit
detailsdetailsdetailsdetails
12pass pass pass pass pass command sub: last command fails but keeps going and exit code is 0
13pass ok ok pass pass global assignment with command sub: middle command fails
detailsdetails
14pass pass pass pass pass global assignment with command sub: last command fails and it aborts
15pass ok ok pass pass local: middle command fails and keeps going
detailsdetails
16pass pass pass pass pass local: last command fails and also keeps going
17N-I N-I N-I N-I pass local and inherit_errexit / command_sub_errexit
detailsdetailsdetailsdetails
18pass pass pass pass pass global assignment when last status is failure
19N-I N-I N-I N-I pass strict_errexit prevents errexit from being disabled in function
detailsdetailsdetailsdetails
20N-I N-I N-I N-I pass strict_errexit prevents errexit from being disabled in brace group
detailsdetailsdetailsdetails
21N-I N-I N-I N-I pass strict_errexit prevents errexit from being disabled in subshell
detailsdetailsdetailsdetails
22N-I N-I N-I N-I pass strict_errexit and ! && || if while until
detailsdetailsdetailsdetails
23pass N-I pass pass pass if pipeline doesn't fail fatally
details
24pass pass pass pass pass errexit is silent (verbose_errexit for Oil)
25N-I N-I N-I N-I pass command sub errexit preserves exit code
detailsdetailsdetailsdetails
26N-I N-I N-I N-I pass What's in strict:all?
detailsdetailsdetailsdetails
27N-I N-I N-I N-I pass command_sub_errexit causes local d=$(date %x) to fail
detailsdetailsdetailsdetails
28N-I N-I N-I N-I pass command_sub_errexit and command sub in array
detailsdetailsdetailsdetails
29pass N-I N-I pass pass OLD: command sub in conditional, with inherit_errexit
detailsdetails
30pass pass pass pass pass OLD: command sub in redirect in conditional
31N-I N-I N-I N-I pass Regression
detailsdetailsdetailsdetails
32N-I N-I N-I N-I pass ShAssignment used as conditional
detailsdetailsdetailsdetails
77 passed, 6 OK, 82 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

dash0 command sub: errexit is NOT inherited and outer shell keeps going

stdout:
one
parent status=0
stderr:
mksh0 command sub: errexit is NOT inherited and outer shell keeps going

stdout:
one
parent status=0
stderr:
ash1 command sub with inherit_errexit only

stdout:
zero
one two
parent status=0
stderr:
ash: shopt: not found
bash2 strict_errexit and assignment builtins (local, export, readonly ...)

stdout:
x=hi
---
stderr:
bash: line 2: shopt: strict_errexit: invalid shell option name
dash2 strict_errexit and assignment builtins (local, export, readonly ...)

stdout:
x=hi
---
stderr:
dash: 2: shopt: not found
mksh2 strict_errexit and assignment builtins (local, export, readonly ...)

stdout:
x=hi
---
stderr:
mksh: <stdin>[2]: shopt: not found
ash2 strict_errexit and assignment builtins (local, export, readonly ...)

stdout:
x=hi
---
stderr:
ash: shopt: not found
bash3 strict_errexit and command sub in export / readonly

stdout:
stderr: 
dash3 strict_errexit and command sub in export / readonly

stdout:
stderr: 
mksh3 strict_errexit and command sub in export / readonly

stdout:
stderr: 
ash3 strict_errexit and command sub in export / readonly

stdout:
stderr: 
bash4 strict_errexit disallows pipeline

stdout:
1
one
stderr:
bash: line 2: shopt: strict_errexit: invalid shell option name
dash4 strict_errexit disallows pipeline

stdout:
1
one
stderr:
dash: 2: shopt: not found
mksh4 strict_errexit disallows pipeline

stdout:
1
one
stderr:
mksh: <stdin>[2]: shopt: not found
ash4 strict_errexit disallows pipeline

stdout:
1
one
stderr:
ash: shopt: not found
bash6 strict_errexit without errexit proc

stdout:
myproc
myproc
stderr:
bash: line 6: shopt: strict_errexit: invalid shell option name
dash6 strict_errexit without errexit proc

stdout:
myproc
myproc
stderr:
dash: 6: shopt: not found
mksh6 strict_errexit without errexit proc

stdout:
myproc
myproc
stderr:
mksh: <stdin>[6]: shopt: not found
ash6 strict_errexit without errexit proc

stdout:
myproc
myproc
stderr:
ash: shopt: not found
bash7 strict_errexit without errexit proc / command sub

stdout:
before
x=
ok
stderr:
bash: line 1: shopt: strict_errexit: invalid shell option name
dash7 strict_errexit without errexit proc / command sub

stdout:
before
x=
ok
stderr:
dash: 1: shopt: not found
mksh7 strict_errexit without errexit proc / command sub

stdout:
before
x=
ok
stderr:
mksh: <stdin>[1]: shopt: not found
ash7 strict_errexit without errexit proc / command sub

stdout:
before
x=
ok
stderr:
ash: shopt: not found
bash8 strict_errexit and errexit disabled

stdout:
stderr: 
dash8 strict_errexit and errexit disabled

stdout:
stderr: 
mksh8 strict_errexit and errexit disabled

stdout:
stderr: 
ash8 strict_errexit and errexit disabled

stdout:
stderr: 
dash9 command sub with command_sub_errexit only

stdout:
zero
one
parent status=0
stderr:
dash: 2: shopt: not found
mksh9 command sub with command_sub_errexit only

stdout:
zero
one
parent status=0
stderr:
mksh: <stdin>[2]: shopt: not found
bash10 command_sub_errexit stops at first error

stdout:
stderr: 
dash10 command_sub_errexit stops at first error

stdout:
stderr: 
mksh10 command_sub_errexit stops at first error

stdout:
stderr: 
ash10 command_sub_errexit stops at first error

stdout:
stderr: 
bash11 command sub with inherit_errexit and command_sub_errexit

stdout:
zero
one
parent status=0
stderr:
bash: line 4: shopt: command_sub_errexit: invalid shell option name
dash11 command sub with inherit_errexit and command_sub_errexit

stdout:
zero
one
parent status=0
stderr:
dash: 3: shopt: not found
dash: 4: shopt: not found
mksh11 command sub with inherit_errexit and command_sub_errexit

stdout:
zero
one
parent status=0
stderr:
mksh: <stdin>[3]: shopt: not found
mksh: <stdin>[4]: shopt: not found
ash11 command sub with inherit_errexit and command_sub_errexit

stdout:
zero
one two
parent status=0
stderr:
ash: shopt: not found
ash: shopt: not found
dash13 global assignment with command sub: middle command fails

stdout:
stderr: 
mksh13 global assignment with command sub: middle command fails

stdout:
stderr: 
dash15 local: middle command fails and keeps going

stdout:
good
status=0
one
stderr:
mksh15 local: middle command fails and keeps going

stdout:
good
status=0
one
stderr:
bash17 local and inherit_errexit / command_sub_errexit

stdout:
good
status=0
one
stderr:
bash: line 3: shopt: command_sub_errexit: invalid shell option name
dash17 local and inherit_errexit / command_sub_errexit

stdout:
good
status=0
one
stderr:
dash: 2: shopt: not found
dash: 3: shopt: not found
mksh17 local and inherit_errexit / command_sub_errexit

stdout:
good
status=0
one
stderr:
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[3]: shopt: not found
ash17 local and inherit_errexit / command_sub_errexit

stdout:
good
status=0
one two
stderr:
ash: shopt: not found
ash: shopt: not found
bash19 strict_errexit prevents errexit from being disabled in function

stdout:
fun
builtin ok
external ok
fun
stderr:
bash: line 6: shopt: strict_errexit: invalid shell option name
dash19 strict_errexit prevents errexit from being disabled in function

stdout:
fun
builtin ok
external ok
fun
stderr:
dash: 6: shopt: not found
mksh19 strict_errexit prevents errexit from being disabled in function

stdout:
fun
builtin ok
external ok
fun
stderr:
mksh: <stdin>[6]: shopt: not found
ash19 strict_errexit prevents errexit from being disabled in function

stdout:
fun
builtin ok
external ok
fun
stderr:
ash: shopt: not found
bash20 strict_errexit prevents errexit from being disabled in brace group

stdout:
foo
bar
foo
bar
stderr:
bash: line 4: shopt: strict_errexit: invalid shell option name
dash20 strict_errexit prevents errexit from being disabled in brace group

stdout:
foo
bar
foo
bar
stderr:
dash: 4: shopt: not found
mksh20 strict_errexit prevents errexit from being disabled in brace group

stdout:
foo
bar
foo
bar
stderr:
mksh: <stdin>[4]: shopt: not found
ash20 strict_errexit prevents errexit from being disabled in brace group

stdout:
foo
bar
foo
bar
stderr:
ash: shopt: not found
bash21 strict_errexit prevents errexit from being disabled in subshell

stdout:
foo
bar
foo
bar
stderr:
bash: line 6: shopt: strict_errexit: invalid shell option name
dash21 strict_errexit prevents errexit from being disabled in subshell

stdout:
foo
bar
foo
bar
stderr:
dash: 2: shopt: not found
dash: 6: shopt: not found
mksh21 strict_errexit prevents errexit from being disabled in subshell

stdout:
foo
bar
foo
bar
stderr:
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[6]: shopt: not found
ash21 strict_errexit prevents errexit from being disabled in subshell

stdout:
foo
bar
foo
bar
stderr:
ash: shopt: not found
ash: shopt: not found
bash22 strict_errexit and ! && || if while until

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
fun
until=0
--
stderr:
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
dash22 strict_errexit and ! && || if while until

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
fun
until=0
--
stderr:
dash: 2: shopt: not found
dash: 2: shopt: not found
dash: 2: shopt: not found
dash: 2: shopt: not found
dash: 2: shopt: not found
dash: 2: shopt: not found
mksh22 strict_errexit and ! && || if while until

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
fun
until=0
--
stderr:
mksh: shopt: not found
mksh: shopt: not found
mksh: shopt: not found
mksh: shopt: not found
mksh: shopt: not found
mksh: shopt: not found
ash22 strict_errexit and ! && || if while until

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
fun
until=0
--
stderr:
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
dash23 if pipeline doesn't fail fatally

stdout:
stderr: 
dash: 2: set: Illegal option -o pipefail
bash25 command sub errexit preserves exit code

stdout:
before

after
stderr:
bash: line 2: shopt: command_sub_errexit: invalid shell option name
dash25 command sub errexit preserves exit code

stdout:
before

after
stderr:
dash: 2: shopt: not found
mksh25 command sub errexit preserves exit code

stdout:
before

after
stderr:
mksh: <stdin>[2]: shopt: not found
ash25 command sub errexit preserves exit code

stdout:
before

after
stderr:
ash: shopt: not found
bash26 What's in strict:all?

stdout:
one
two
should not get here
stderr:
bash: line 2: shopt: strict:all: invalid shell option name
date: invalid date ‘%x’
dash26 What's in strict:all?

stdout:
one
two
should not get here
stderr:
dash: 2: shopt: not found
date: invalid date ‘%x’
mksh26 What's in strict:all?

stdout:
one
two
should not get here
stderr:
mksh: <stdin>[2]: shopt: not found
date: invalid date ‘%x’
ash26 What's in strict:all?

stdout:
one
two
should not get here
stderr:
ash: shopt: not found
date: invalid date ‘%x’
bash27 command_sub_errexit causes local d=$(date %x) to fail

stdout:
hi
stderr:
bash: line 3: shopt: command_sub_errexit: invalid shell option name
date: invalid date ‘%x’
dash27 command_sub_errexit causes local d=$(date %x) to fail

stdout:
hi
stderr:
dash: 2: shopt: not found
dash: 3: shopt: not found
date: invalid date ‘%x’
mksh27 command_sub_errexit causes local d=$(date %x) to fail

stdout:
hi
stderr:
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[3]: shopt: not found
date: invalid date ‘%x’
ash27 command_sub_errexit causes local d=$(date %x) to fail

stdout:
hi
stderr:
ash: shopt: not found
ash: shopt: not found
date: invalid date ‘%x’
bash28 command_sub_errexit and command sub in array

stdout:
['one', '', 'two']
stderr:
bash: line 5: shopt: command_sub_errexit: invalid shell option name
date: invalid date ‘%x’
dash28 command_sub_errexit and command sub in array

stdout:
stderr: 
mksh28 command_sub_errexit and command sub in array

stdout:
stderr: 
ash28 command_sub_errexit and command sub in array

stdout:
stderr: 
dash29 OLD: command sub in conditional, with inherit_errexit

stdout:
1
A
done
stderr:
dash: 2: shopt: not found
mksh29 OLD: command sub in conditional, with inherit_errexit

stdout:
1
A
done
stderr:
mksh: <stdin>[2]: shopt: not found
bash31 Regression

stdout:
stderr: 
dash31 Regression

stdout:
stderr: 
mksh31 Regression

stdout:
stderr: 
ash31 Regression

stdout:
stderr: 
bash32 ShAssignment used as conditional

stdout:
yes
yes
yes
stderr:
bash: line 33: shopt: strict_errexit: invalid shell option name
dash32 ShAssignment used as conditional

stdout:
yes
yes
yes
stderr:
dash: 33: shopt: not found
mksh32 ShAssignment used as conditional

stdout:
yes
yes
yes
stderr:
mksh: <stdin>[33]: shopt: not found
ash32 ShAssignment used as conditional

stdout:
yes
yes
yes
stderr:
ash: shopt: not found