diff --git a/testsuite/expect/test21.30 b/testsuite/expect/test21.30 index 48f1d34d443309a9e596cd416bcfa64d0237b87d..c796b7f20cc1b4a97c9f0cd7dfe9caaac11c941a 100755 --- a/testsuite/expect/test21.30 +++ b/testsuite/expect/test21.30 @@ -1,7 +1,7 @@ #!/usr/bin/env expect ############################################################################ # Purpose: Test of Slurm functionality -# Test that checks if the QOS limits are enforced. +# Test that checks if the QOS limits are enforced. ############################################################################ # Copyright (C) 2012 SchedMD LLC # Written by Nathan Yee <nyee32@schedmd.com> @@ -48,6 +48,38 @@ if {[param_contains [get_config_param "SchedulerParameters"] "defer"]} { skip "This test is not compatible with SchedulerParameters containing defer" } +# +# Check accounting configuration and terminate if limits not enforced. +# +if {[get_config_param "AccountingStorageType"] ne "accounting_storage/slurmdbd"} { + skip "This test can't be run without a usable AccountStorageType" +} elseif {![param_contains [get_config_param "AccountingStorageEnforce"] "limits"]} { + skip "This test can't be run without enforcing limits" +} +if {![is_super_user]} { + skip "Test can only be ran as SlurmUser" +} + +# Determine what the selecttype param is +set select_type_parameters [get_config_param "SelectTypeParameters"] +if {[param_contains $select_type_parameters "CR_SOCKET*"]} { + skip "This test is incompatible with CR_SOCKET allocations" +} +if {[param_contains $select_type_parameters "CR_CORE*"]} { + set selectparam 1 +} +if {[param_contains $select_type_parameters "CR_ONE_TASK_PER_CORE"]} { + set one_task_pc 1 +} + +# +# Some tests will not work properly when allocating sockets or whole nodes to +# jobs +# +if {[check_config_select "linear"] || [default_part_exclusive]} { + skip "This test is incompatible with exclusive node allocations" +} + set exit_code 0 set skips 0 set test_node "" @@ -163,18 +195,6 @@ if {[get_config_param "PriorityType"] eq "priority/multifactor"} { set prio_multifactor 0 } -# Determine what the selecttype param is -set select_type_parameters [get_config_param "SelectTypeParameters"] -if {[param_contains $select_type_parameters "CR_SOCKET*"]} { - skip "This test is incompatible with CR_SOCKET allocations" -} -if {[param_contains $select_type_parameters "CR_CORE*"]} { - set selectparam 1 -} -if {[param_contains $select_type_parameters "CR_ONE_TASK_PER_CORE"]} { - set one_task_pc 1 -} - set got_node 0 spawn $srun -N1 printenv SLURM_NODELIST expect { @@ -246,7 +266,7 @@ proc cleanup {} { } } - #delete account + # delete account spawn $sacctmgr -i delete account $acct expect { -re "Deleting accounts" { @@ -279,25 +299,6 @@ proc cleanup {} { } } -# -# Check accounting configuration and terminate if limits not enforced. -# -if {[get_config_param "AccountingStorageType"] ne "accounting_storage/slurmdbd"} { - skip "This test can't be run without a usable AccountStorageType" -} elseif {![param_contains [get_config_param "AccountingStorageEnforce"] "limits"]} { - skip "This test can't be run without enforcing limits" -} -if {![is_super_user]} { - skip "Test can only be ran as SlurmUser" -} - -# -# Some tests will not work properly when allocating sockets or whole nodes to jobs -# -if {[check_config_select "linear"] || [default_part_exclusive]} { - skip "This test is incompatible with exclusive node allocations" -} - # Remove any vestigial accounts or qos spawn $sacctmgr -i delete qos $qostest expect {