Results for errexit-oil.test.sh

statusdashbashmkshashoshosh_ALT
pass 6117101818
ok 303000
N-I 119101000
FAIL 000022
total202020202020
casedashbashmkshashoshosh_ALTdescription
0ok pass ok pass pass pass command sub: errexit is NOT inherited and outer shell keeps going
detailsdetails
1pass pass pass N-I pass pass command sub with inherit_errexit only
details
2N-I N-I N-I N-I FAIL FAIL strict_errexit with command sub stops program
detailsdetailsdetailsdetailsdetailsdetails
3N-I N-I N-I N-I FAIL FAIL {inherit,strict}_errexit: command sub with a single command
detailsdetailsdetailsdetailsdetailsdetails
4N-I pass N-I pass pass pass command sub with more_errexit only
detailsdetails
5N-I N-I N-I N-I pass pass command sub with inherit_errexit and more_errexit
detailsdetailsdetailsdetails
6pass pass pass pass pass pass command sub: last command fails but keeps going and exit code is 0
7ok pass ok pass pass pass global assignment with command sub: middle command fails
detailsdetails
8pass pass pass pass pass pass global assignment with command sub: last command fails and it aborts
9ok pass ok pass pass pass local: middle command fails and keeps going
detailsdetails
10pass pass pass pass pass pass local: last command fails and also keeps going
11N-I N-I N-I N-I pass pass local and inherit_errexit / more_errexit
detailsdetailsdetailsdetails
12pass pass pass pass pass pass global assignment when last status is failure
13pass pass pass pass pass pass global assignment when last status is failure
14N-I N-I N-I N-I pass pass strict_errexit prevents errexit from being disabled in function
detailsdetailsdetailsdetails
15N-I N-I N-I N-I pass pass strict_errexit prevents errexit from being disabled in brace group
detailsdetailsdetailsdetails
16N-I N-I N-I N-I pass pass strict_errexit prevents errexit from being disabled in subshell
detailsdetailsdetailsdetails
17N-I N-I N-I N-I pass pass strict_errexit and ! && || if while until
detailsdetailsdetailsdetails
18N-I pass pass pass pass pass if pipeline doesn't fail fatally
details
19N-I N-I N-I N-I pass pass if pipeline DOES fail fatally with strict_errexit
detailsdetailsdetailsdetails
70 passed, 6 OK, 40 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

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
dash2 strict_errexit with command sub stops program

stdout:
1
A
done
stderr:
dash: 2: shopt: not found
dash: 3: shopt: not found
bash2 strict_errexit with command sub stops program

stdout:
1 2
A
done
stderr:
bash: line 3: shopt: strict_errexit: invalid shell option name
mksh2 strict_errexit with command sub stops program

stdout:
1
A
done
stderr:
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[3]: shopt: not found
ash2 strict_errexit with command sub stops program

stdout:
1 2
A
done
stderr:
ash: shopt: not found
ash: shopt: not found
osh2 strict_errexit with command sub stops program

[osh stdout] Expected u'', got '\nA\ndone\n'
[osh status] Expected 1, got 0

stdout:
A
done
stderr:
  if echo $( echo 1; false; echo 2); then
  ^~
[ stdin ]:4: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.CommandList)
osh_ALT2 strict_errexit with command sub stops program

[osh_ALT stdout] Expected u'', got '\nA\ndone\n'
[osh_ALT status] Expected 1, got 0

stdout:
A
done
stderr:
  if echo $( echo 1; false; echo 2); then
  ^~
[ stdin ]:4: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.CommandList)
dash3 {inherit,strict}_errexit: command sub with a single command

stdout:
A
done
stderr:
dash: 2: shopt: not found
dash: 3: shopt: not found
bash3 {inherit,strict}_errexit: command sub with a single command

stdout:
A
done
stderr:
bash: line 3: shopt: strict_errexit: invalid shell option name
mksh3 {inherit,strict}_errexit: command sub with a single command

stdout:
A
done
stderr:
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[3]: shopt: not found
ash3 {inherit,strict}_errexit: command sub with a single command

stdout:
A
done
stderr:
ash: shopt: not found
ash: shopt: not found
osh3 {inherit,strict}_errexit: command sub with a single command

[osh stdout] Expected u'', got '\nA\ndone\n'
[osh status] Expected 1, got 0

stdout:
A
done
stderr:
osh_ALT3 {inherit,strict}_errexit: command sub with a single command

[osh_ALT stdout] Expected u'', got '\nA\ndone\n'
[osh_ALT status] Expected 1, got 0

stdout:
A
done
stderr:
dash4 command sub with more_errexit only

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

stdout:
zero
one
parent status=0
stderr:
mksh: <stdin>[2]: shopt: not found
dash5 command sub with inherit_errexit and more_errexit

stdout:
zero
one
parent status=0
stderr:
dash: 2: shopt: not found
dash: 3: shopt: not found
bash5 command sub with inherit_errexit and more_errexit

stdout:
zero
one
parent status=0
stderr:
bash: line 3: shopt: more_errexit: invalid shell option name
mksh5 command sub with inherit_errexit and more_errexit

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

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

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

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

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

stdout:
good
status=0
one
stderr:
dash11 local and inherit_errexit / more_errexit

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

stdout:
foo
bar
foo
bar
stderr:
ash: shopt: not found
ash: shopt: not found
dash17 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
bash17 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 1: shopt: strict_errexit: invalid shell option name
bash: line 1: shopt: strict_errexit: invalid shell option name
bash: line 1: shopt: strict_errexit: invalid shell option name
bash: line 1: shopt: strict_errexit: invalid shell option name
bash: line 1: shopt: strict_errexit: invalid shell option name
bash: line 1: shopt: strict_errexit: invalid shell option name
mksh17 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
ash17 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
dash18 if pipeline doesn't fail fatally

stdout:
stderr: 
dash: 2: set: Illegal option -o pipefail
dash19 if pipeline DOES fail fatally with strict_errexit

stdout:
stderr: 
dash: 2: set: Illegal option -o pipefail
bash19 if pipeline DOES fail fatally with strict_errexit

stdout:
! false ok
done
stderr:
bash: line 3: shopt: strict_errexit: invalid shell option name
rmdir: failed to remove '/home/andy/git/oilshell/oil/_tmp/spec-tmp/errexit-oil.test.sh/_tmp': No such file or directory
ls: cannot access '/nonexistent': No such file or directory
mksh19 if pipeline DOES fail fatally with strict_errexit

stdout:
! false ok
done
stderr:
mksh: <stdin>[3]: shopt: not found
rmdir: failed to remove '/home/andy/git/oilshell/oil/_tmp/spec-tmp/errexit-oil.test.sh/_tmp': No such file or directory
ls: cannot access '/nonexistent': No such file or directory
ash19 if pipeline DOES fail fatally with strict_errexit

stdout:
! false ok
done
stderr:
ash: shopt: not found
rmdir: failed to remove '/home/andy/git/oilshell/oil/_tmp/spec-tmp/errexit-oil.test.sh/_tmp': No such file or directory
ls: cannot access '/nonexistent': No such file or directory