Skip to content
Snippets Groups Projects
Commit 9e4ce8b8 authored by Morris Jette's avatar Morris Jette
Browse files

Modify test for partition limits enforcement changes

The slurmctld behaviour has changed slightly with respect to EnforcePartLimits
  supporting new options of ANY and ALL, which broke  2 tests. This change
  modifies the tests to only run on appropriate configurations.
parent f8644b8a
No related branches found
No related tags found
No related merge requests found
...@@ -884,6 +884,35 @@ proc test_limits_enforced { } { ...@@ -884,6 +884,35 @@ proc test_limits_enforced { } {
return $enforced return $enforced
} }
################################################################
#
# Proc: test_enforce_part_limits
#
# Purpose: Return value of EnforcePartLimits
#
# Returns EnforcePartLimits value (ALL, ANY, or NO)
#
################################################################
proc test_enforce_part_limits { } {
global alpha scontrol
log_user 0
set enforced "UNKNOWN"
spawn $scontrol show config
expect {
-re "EnforcePartLimits *= ($alpha)" {
set enforced $expect_out(1,string)
exp_continue
}
eof {
wait
}
}
log_user 1
return $enforced
}
################################################################ ################################################################
# #
# Proc: test_gang # Proc: test_gang
......
...@@ -42,6 +42,12 @@ set delay 10 ...@@ -42,6 +42,12 @@ set delay 10
print_header $test_id print_header $test_id
set enforce [test_enforce_part_limits]
if {![string compare $enforce "NO"]} {
send_user "\nWARNING: This test is incompatible EnforcePartLimits = $enforce\n"
exit 0
}
make_bash_script $file_in " make_bash_script $file_in "
#SBATCH --job-name='$job_name' #SBATCH --job-name='$job_name'
$bin_sleep $delay $bin_sleep $delay
......
...@@ -42,6 +42,12 @@ set delay 1 ...@@ -42,6 +42,12 @@ set delay 1
print_header $test_id print_header $test_id
set enforce [test_enforce_part_limits]
if {![string compare $enforce "NO"]} {
send_user "\nWARNING: This test is incompatible EnforcePartLimits = $enforce\n"
exit 0
}
make_bash_script $file_in " make_bash_script $file_in "
#SBATCH --job-name=$job_name #SBATCH --job-name=$job_name
$bin_sleep $delay $bin_sleep $delay
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment