diff --git a/testsuite/expect/inc21.30.15 b/testsuite/expect/inc21.30.15 index 2267623aeceed13e3f7ed2f0b8fa0f5bf6ee817b..f12b37e1662adfa3e51f6fa1db5cac6dcae8c92e 100644 --- a/testsuite/expect/inc21.30.15 +++ b/testsuite/expect/inc21.30.15 @@ -41,7 +41,7 @@ proc inc21_30_15 { } { } -re "job ($number) queued and waiting for resources" { set job_id1 $expect_out(1,string) - send_user "\nFAILURE: Job $job_id1 show not be waiting for resources, but is not (Within: inc21.30.15)\n" + send_user "\nFAILURE: Job $job_id1 show not be waiting for resources, but is (Within: inc21.30.15)\n" set exit_code 1 } -re "error" { @@ -69,7 +69,7 @@ proc inc21_30_15 { } { send_user "\nJob $job_id2 is waiting for resource. This is expected do not worry (Within: inc21.30.15)\n" } -re "Granted job allocation ($number)" { - set job_id2$expect_out(1,string) + set job_id2 $expect_out(1,string) send_user "\nFAILURE: Job $job_id2 should be pending for resources, but is not (Within: 21.30.15)\n" set exit_code 1 } diff --git a/testsuite/expect/inc21.30.9 b/testsuite/expect/inc21.30.9 index dc4ed535561ceded33e11527c20b47770b9257a9..7fe1e2d76e754fb2984e9de6f1c917e051a1b3b3 100644 --- a/testsuite/expect/inc21.30.9 +++ b/testsuite/expect/inc21.30.9 @@ -39,7 +39,6 @@ proc inc21_30_9 { } { set job_id1 0 set job_id2 0 - set task_cnt 2 set timeout [expr $grpcpumin_num * 120] set timelimit [expr $grpcpumin_num / $nthreads] # Since GrpCpuMins is a decayed variable lets reset it to make sure @@ -73,7 +72,7 @@ proc inc21_30_9 { } { reset_qos_usage "" $qostest - spawn $salloc --account=$acct -w$test_node --qos=$qostest -n$task_cnt -t[expr $timelimit + 1] $srun $bin_sleep 1 + spawn $salloc --account=$acct -w$test_node --qos=$qostest -n$nthreads -t[expr $timelimit + 1] $srun $bin_sleep 1 expect { -re "Pending job allocation ($number)" { set job_id2 $expect_out(1,string) diff --git a/testsuite/expect/test21.30 b/testsuite/expect/test21.30 index 728ae86738c6b58e24ff8ff6d1b8528db065f742..a87de0b4a0a80f462ed2e077bce131a2bd30e8e4 100755 --- a/testsuite/expect/test21.30 +++ b/testsuite/expect/test21.30 @@ -94,6 +94,9 @@ set maxjobsub MaxSubmitJobs set maxjobsub_num 2 set time_spacing 1 +# cr_core = 1 / cr_cpu = 0 +set selectparam 0 + # mod qos array set mod_qos_vals { GrpNodes -1 @@ -170,6 +173,11 @@ proc check_state { job } { } +# Determine what the selecttype param is +if {![string compare [test_select_type_params] "CR_CORE"]} { + set selectparam 1 +} + set got_node 0 spawn $srun -N1 printenv SLURM_NODELIST expect { @@ -603,6 +611,12 @@ set mod_qos_vals(MaxWall) "-1" # # Test Max CPUs Per User # + +# If CR_CORE set maxcpuspu a multiple number of threads +if {$selectparam} { + set maxcpuspu_num [expr $maxcpuspu_num * $nthreads] +} + set mod_qos_vals(MaxCpusPerUser) $maxcpuspu_num mod_qos $qostest [array get mod_qos_vals] sleep $time_spacing diff --git a/testsuite/expect/test21.34 b/testsuite/expect/test21.34 old mode 100644 new mode 100755 index 509135ae50796235ef90827c35aacf8093bbb42a..ad4e46d8071c8bf6d6d6e43a271a267c238fc7a8 --- a/testsuite/expect/test21.34 +++ b/testsuite/expect/test21.34 @@ -150,7 +150,7 @@ proc cleanup { } { } #delete account - spawn $sacctmgr -i delete account $acct + spawn $sacctmgr -i delete account $acct expect { -re "Deleting accounts" { exp_continue @@ -179,7 +179,7 @@ proc cleanup { } { } } - if {[string compare $def_part ""]} { + if {[string length $def_part]} { spawn $scontrol update partitionname=$def_part default=yes expect { timeout { @@ -251,24 +251,10 @@ if {$tmpc == 0 || $tmpn == 0} { } # Determine what the selecttype param is -spawn $bin_bash -c "$scontrol show config | grep SelectTypeParameters" -expect { - -re "SelectTypeParameters *= ($alpha_numeric_under)" { - if {[string compare $expect_out(1,string) "CR_CORE"] == 0} { - set selectparam 1 - } - exp_continue - } - timeout { - send_user "\nFAILURE: scontrol is not responding\n" - set exit_code 1 - } - eof { - wait - } +if {![string compare [test_select_type_params] "CR_CORE"]} { + set selectparam 1 } - set got_node 0 spawn $srun -N1 printenv SLURM_NODELIST expect { @@ -324,21 +310,7 @@ if {$totcpus == 0} { } # Get the number of nodes in the default partition -set num_nodes 0 -spawn $scontrol show partition [default_partition] -expect { - -re "TotalNodes=($number)" { - set num_nodes [expr $expect_out(1,string) - 1] - exp_continue - } - timeout { - send_user "\nFAILURE: scontrol is not responding\n" - set exit_code 1 - } - eof { - wait - } -} +set num_nodes [available_nodes [default_partition] "idle"] if {$num_nodes == 0} { send_user "\nFAILURE: no cpus where found\n"