Results for errexit-osh.test.sh

statusbashdashmkshashosh
pass 159101435
ok 14410
N-I 192221200
total3535353535
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
6pass pass pass pass pass strict_errexit with && || !
7ok ok ok ok pass strict_errexit detects proc in && || !
detailsdetailsdetailsdetails
8N-I N-I N-I N-I pass strict_errexit without errexit proc
detailsdetailsdetailsdetails
9N-I N-I N-I N-I pass strict_errexit without errexit proc / command sub
detailsdetailsdetailsdetails
10N-I N-I N-I N-I pass strict_errexit and errexit disabled
detailsdetailsdetailsdetails
11pass N-I N-I pass pass command sub with command_sub_errexit only
detailsdetails
12N-I N-I N-I N-I pass command_sub_errexit stops at first error
detailsdetailsdetailsdetails
13N-I N-I N-I N-I pass command sub with inherit_errexit and command_sub_errexit
detailsdetailsdetailsdetails
14pass pass pass pass pass command sub: last command fails but keeps going and exit code is 0
15pass ok ok pass pass global assignment with command sub: middle command fails
detailsdetails
16pass pass pass pass pass global assignment with command sub: last command fails and it aborts
17pass ok ok pass pass local: middle command fails and keeps going
detailsdetails
18pass pass pass pass pass local: last command fails and also keeps going
19N-I N-I N-I N-I pass local and inherit_errexit / command_sub_errexit
detailsdetailsdetailsdetails
20pass pass pass pass pass global assignment when last status is failure
21N-I N-I N-I N-I pass strict_errexit prevents errexit from being disabled in function
detailsdetailsdetailsdetails
22N-I N-I N-I N-I pass strict_errexit prevents errexit from being disabled in brace group
detailsdetailsdetailsdetails
23N-I N-I N-I N-I pass strict_errexit prevents errexit from being disabled in subshell
detailsdetailsdetailsdetails
24N-I N-I N-I N-I pass strict_errexit and ! && || if while until
detailsdetailsdetailsdetails
25pass N-I pass pass pass if pipeline doesn't fail fatally
details
26pass pass pass pass pass errexit is silent (verbose_errexit for Oil)
27N-I N-I N-I N-I pass command sub errexit preserves exit code
detailsdetailsdetailsdetails
28N-I N-I N-I N-I pass What's in strict:all?
detailsdetailsdetailsdetails
29N-I N-I N-I N-I pass command_sub_errexit causes local d=$(date %x) to fail
detailsdetailsdetailsdetails
30N-I N-I N-I N-I pass command_sub_errexit and command sub in array
detailsdetailsdetailsdetails
31pass N-I N-I pass pass OLD: command sub in conditional, with inherit_errexit
detailsdetails
32pass pass pass pass pass OLD: command sub in redirect in conditional
33N-I N-I N-I N-I pass Regression
detailsdetailsdetailsdetails
34N-I N-I N-I N-I pass ShAssignment used as conditional
detailsdetailsdetailsdetails
83 passed, 10 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
bash7 strict_errexit detects proc in && || !

stdout:
failing
should not get here
failing
should not get here
stderr:
bash: line 2: shopt: strict_errexit: invalid shell option name
dash7 strict_errexit detects proc in && || !

stdout:
failing
should not get here
failing
should not get here
stderr:
dash: 2: shopt: not found
mksh7 strict_errexit detects proc in && || !

stdout:
failing
should not get here
failing
should not get here
stderr:
mksh: <stdin>[2]: shopt: not found
ash7 strict_errexit detects proc in && || !

stdout:
failing
should not get here
failing
should not get here
stderr:
ash: shopt: not found
bash8 strict_errexit without errexit proc

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

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

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

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

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

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

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

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

stdout:
stderr: 
dash10 strict_errexit and errexit disabled

stdout:
stderr: 
mksh10 strict_errexit and errexit disabled

stdout:
stderr: 
ash10 strict_errexit and errexit disabled

stdout:
stderr: 
dash11 command sub with command_sub_errexit only

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

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

stdout:
stderr: 
dash12 command_sub_errexit stops at first error

stdout:
stderr: 
mksh12 command_sub_errexit stops at first error

stdout:
stderr: 
ash12 command_sub_errexit stops at first error

stdout:
stderr: 
bash13 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
dash13 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
mksh13 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
ash13 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
dash15 global assignment with command sub: middle command fails

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

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

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

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

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

stdout:
good
status=0
one
stderr:
dash: 2: shopt: not found
dash: 3: shopt: not found
mksh19 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
ash19 local and inherit_errexit / command_sub_errexit

stdout:
good
status=0
one two
stderr:
ash: shopt: not found
ash: shopt: not found
bash21 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
dash21 strict_errexit prevents errexit from being disabled in function

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

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

stdout:
fun
builtin ok
external ok
fun
stderr:
ash: shopt: not found
bash22 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
dash22 strict_errexit prevents errexit from being disabled in brace group

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

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

stdout:
foo
bar
foo
bar
stderr:
ash: shopt: not found
bash23 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
dash23 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
mksh23 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
ash23 strict_errexit prevents errexit from being disabled in subshell

stdout:
foo
bar
foo
bar
stderr:
ash: shopt: not found
ash: shopt: not found
bash24 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
dash24 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
mksh24 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
ash24 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
dash25 if pipeline doesn't fail fatally

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

stdout:
before

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

stdout:
before

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

stdout:
before

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

stdout:
before

after
stderr:
ash: shopt: not found
bash28 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’
dash28 What's in strict:all?

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

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

stdout:
one
two
should not get here
stderr:
ash: shopt: not found
date: invalid date ‘%x’
bash29 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’
dash29 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’
mksh29 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’
ash29 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’
bash30 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’
dash30 command_sub_errexit and command sub in array

stdout:
stderr: 
mksh30 command_sub_errexit and command sub in array

stdout:
stderr: 
ash30 command_sub_errexit and command sub in array

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

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

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

stdout:
stderr: 
dash33 Regression

stdout:
stderr: 
mksh33 Regression

stdout:
stderr: 
ash33 Regression

stdout:
stderr: 
bash34 ShAssignment used as conditional

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

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

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

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