diff --git a/testsuite/expect/globals b/testsuite/expect/globals index 98920eb8ada54b019198b6c363006fa7be8435a1..325eec79e747183f5c6c9f7bae6a15ee2df357a1 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -1880,6 +1880,37 @@ proc test_emulated { } { return $emulated } +################################################################ +# +# Proc: test_killonbadexit +# +# Purpose: Determine if KillOnBadExit is configured to be 1. +# +# +# Returns 1 if KillOnBadExit is 1. +# +################################################################ + +proc test_killonbadexit { } { + global scontrol bin_bash bin_grep + + log_user 0 + set killonbadexit 0 + spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep KillOnBadExit" + expect { + -re "KillOnBadExit *= *1" { + set killonbadexit 1 + exp_continue + } + eof { + wait + } + } + log_user 1 + + return $killonbadexit +} + ################################################################ # # Proc: get_cycle_count diff --git a/testsuite/expect/test2.15 b/testsuite/expect/test2.15 index 87ad3d6fd8d0fbf67bf0545916c10a15f9ecf98e..9b5b008fcce75035ea10dc830a3d15f246c2e8ab 100755 --- a/testsuite/expect/test2.15 +++ b/testsuite/expect/test2.15 @@ -52,6 +52,9 @@ if { [test_xcpu] } { } elseif {[test_launch_poe]} { send_user "\nWARNING: This test is incompatible with POE systems\n" exit 0 +} elseif {[test_killonbadexit]} { + send_user "\nWARNING: This test is incompatible with KillOnBadExit=1\n" + exit 0 } set node_cnt 2