diff --git a/testsuite/expect/globals b/testsuite/expect/globals index 8a053a6863f6af50b3867352178366a1a2f2d178..6f86ec19dccf89e5c35076526885ce075928fdf8 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -4237,6 +4237,51 @@ proc test_pack_step { } { return $pack_step } +################################################################ +# +# Proc: reconfigure +# +# Purpose: Calls scontrol reconfigure. +# +# Input (optional) cluster - The cluster to reconfigure. +# Output global exit_code - Sets exit_code to 1 on failure. +# +# Returns void +# +################################################################ +proc reconfigure { {cluster ""} } { + global exit_code scontrol + + if { $cluster == "" } { + spawn $scontrol reconfigure + } else { + spawn $scontrol -M$cluster reconfigure + } + expect { + -re "slurm_reconfigure error: Invalid user id" { + log_error "Invalid user id" + set exit_code 1 + exp_continue + } + -re "Error|error" { + log_error "scontrol reconfigure error" + set exit_code 1 + exp_continue + } + timeout { + log_error "scontrol not responding\n" + set exit_code 1 + } + eof { + wait + } + } + # + # Wait for reconfigure to complete, then return. + # + sleep 5 +} + proc log_error {msg} { send_user "\nFAILURE: $msg\n" }