diff --git a/testsuite/expect/test17.34 b/testsuite/expect/test17.34 index d3afe25d5af3191adb4c70b571c7c3e70f6b18fb..e52c34828776fce8a4120aa8ca6ee3bc3372a4bf 100755 --- a/testsuite/expect/test17.34 +++ b/testsuite/expect/test17.34 @@ -62,8 +62,14 @@ proc core_spec_job {task node core_spec exp_nodes} { } else { set task_limit 1 } + + set ntasks [expr abs($task_limit + $task)] + if {$ntasks == 0} { + set ntasks 1 + } + set error_chk 0 - spawn $sbatch -t1 -w$node -S$core_spec -n[expr abs($task_limit + $task)] -o$file_out $spec_in + spawn $sbatch -t1 -w$node -S$core_spec -n$ntasks -o$file_out $spec_in expect { -re "Submitted batch job ($number)" { set job_id $expect_out(1,string) @@ -156,6 +162,19 @@ proc core_spec_job {task node core_spec exp_nodes} { print_header $test_id +set select_type [test_select_type] +if {![string compare $select_type "linear"] || ![string compare $select_type "serial"]} { + send_user "\nWARNING: This test is incompatible with select/$select_type\n" + exit 0 +} elseif {![string compare $select_type "cray"] && ![test_select_type_params "other_cons_res"]} { + send_user "\nWARNING: This test is incompatible with select/linear\n" + exit 0 +} +if {[test_select_type_params "CR_SOCKET"]} { + send_user "\nWARNING: This test is incompatible with CR_SOCKET allocations\n" + exit 0 +} + log_user 0 set allow_spec 0 spawn $scontrol show config @@ -178,16 +197,6 @@ if {$allow_spec == 0} { exit $exit_code } -set select_type [test_select_type] -if {![string compare $select_type "linear"]} { - send_user "\nWARNING: This test is incompatible with select/$select_type\n" - exit 0 -} -if {[test_select_type_params "CR_SOCKET"]} { - send_user "\nWARNING: This test is incompatible with CR_SOCKET allocations\n" - exit 0 -} - # Remove any vestigial files exec $bin_rm -f $file_in $file_out $spec_in diff --git a/testsuite/expect/test17.40 b/testsuite/expect/test17.40 index e215f68b2a121a1353aa2fc850937721ed7cb7ca..5b77633d55967307aafd744ab2420f90dca59cf6 100755 --- a/testsuite/expect/test17.40 +++ b/testsuite/expect/test17.40 @@ -156,6 +156,19 @@ proc thread_spec_job {task node thread_spec exp_nodes} { print_header $test_id +set select_type [test_select_type] +if {![string compare $select_type "linear"] || ![string compare $select_type "serial"]} { + send_user "\nWARNING: This test is incompatible with select/$select_type\n" + exit 0 +} elseif {![string compare $select_type "cray"] && ![test_select_type_params "other_cons_res"]} { + send_user "\nWARNING: This test is incompatible with select/linear\n" + exit 0 +} +if {[test_select_type_params "CR_SOCKET"]} { + send_user "\nWARNING: This test is incompatible with CR_SOCKET allocations\n" + exit 0 +} + log_user 0 set allow_spec 0 spawn $scontrol show config @@ -178,17 +191,6 @@ if {$allow_spec == 0} { exit $exit_code } -set select_type [test_select_type] -if {![string compare $select_type "linear"] || ![string compare $select_type "serial"]} { - send_user "\nWARNING: This test is incompatible with select/$select_type\n" - exit 0 -} - -if {[test_select_type_params "CR_SOCKET"]} { - send_user "\nWARNING: This test is incompatible with CR_SOCKET allocations\n" - exit 0 -} - # Remove any vestigial files exec $bin_rm -f $file_in $file_out $spec_in