Skip to content
Snippets Groups Projects
Commit ab1c065a authored by Nathan Yee's avatar Nathan Yee Committed by Morris Jette
Browse files

test suite bug fixes

I just ran the test suite for slurm 14.04.7, and have a few suggestions
and bugfixes:

Test 1.35 fails on our system (probably because we limit memory with
cgroups).  Changing job_mem_opt from "--mem-per-cpu=64" to
"--mem-per-cpu=192" in line 61 fixes the problem for us.

Test 1.84 fails to recognise node names like "something1-2", ending up
with node names "something1" instead.  Changing NodeName=(\w+) to
NodeName=([^\s]+) fixes the problem.

Test 1.97 reports FAILURE when it discovers that SelectTypeParameters is
not CR_PACK_NODES.  Having "exit 0" instead of "exit 1" in line 50 is
perhaps preferable.

Test 2.18 fails because the variable $partition never gets set, so no
idle nodes are found in line 215.  Setting $partition in globals.local
helps, but should not be needed, IMO.  There is a function
"default_partition" in globals that could perhaps be used.  The same
applies to test 2.19.

Test 12.2 fails on our system because the jobs get killed due to memory
limit.  Increasing the "slack" in job_mem_limit from 4 to 10 in line 269
fixes the problem for us.

Tests 21.30, 21.31 and 21.32 fails when run as a non-privileged user.
Perhaps they should test for it and exit with a warning instead, like
many other tests.

Test 22.1 fails on our system because the time zone is different from
where the test was written.  The problem is that

set midnight 1201766400

is only correct in one time zone (and unfortunately for us, not in
our :).  Perhaps one could use the GNU date command to get the correct
seconds-since-epoch regardless of time zone.  Something like

date +%s --date=2008-01-31

should do it.  Unfortunately, I don't know enough Expect (tcl?) to
suggest how to implement that.

--
Regards,
Bjørn-Helge Mevik, dr. scient,
Department for Research Computing, University of Oslo
parent 137c53ef
No related branches found
No related tags found
No related merge requests found
...@@ -42,10 +42,13 @@ proc inc22_1_1 {} { ...@@ -42,10 +42,13 @@ proc inc22_1_1 {} {
global exit_code wc_key_track wckey1 sql_rem global exit_code wc_key_track wckey1 sql_rem
# Mon Dec 31 23:00:00 2007 # Mon Dec 31 23:00:00 2007
set period_start 1199170800 set start_time "Mon Dec 31 23:00:00 2007"
set period_start [exec date +%s --date=$start_time]
# Tue Jan 1 00:00:00 2008 # Tue Jan 1 00:00:00 2008
set period_end 1199174400 set end_time "Tue Jan 1 00:00:00 2008"
set period_end [exec date +%s --date=$end_time]
set start_str [timestamp -format %Y-%m-%dT%X -seconds $period_start] set start_str [timestamp -format %Y-%m-%dT%X -seconds $period_start]
set end_str [timestamp -format %Y-%m-%dT%X -seconds $period_end] set end_str [timestamp -format %Y-%m-%dT%X -seconds $period_end]
set reported [expr ($period_end - $period_start) * $cluster_cpus] set reported [expr ($period_end - $period_start) * $cluster_cpus]
......
...@@ -40,13 +40,16 @@ proc inc22_1_2 {} { ...@@ -40,13 +40,16 @@ proc inc22_1_2 {} {
global node0_down_end node0_cpus node1_cpus cluster sreport global node0_down_end node0_cpus node1_cpus cluster sreport
global my_pid accounts users cluster_cpus global my_pid accounts users cluster_cpus
global job1_end job1_cpus job2_elig job2_cpus account1 user1 global job1_end job1_cpus job2_elig job2_cpus account1 user1
global wckey1 wc_key_track exit_code global sql_rem wckey1 wc_key_track exit_code
# Tue Jan 1 00:00:00 2008 # Tue Jan 1 00:00:00 2008
set period_start 1199174400 set start_time "Tue Jan 1 00:00:00 2008"
set period_start [exec date +%s --date=$start_time]
# Tue Jan 1 01:00:00 2008 # Tue Jan 1 01:00:00 2008
set period_end 1199178000 set end_time "Tue Jan 1 01:00:00 2008"
set period_end [exec date +%s --date=$end_time]
set start_str [timestamp -format %Y-%m-%dT%X -seconds $period_start] set start_str [timestamp -format %Y-%m-%dT%X -seconds $period_start]
set end_str [timestamp -format %Y-%m-%dT%X -seconds $period_end] set end_str [timestamp -format %Y-%m-%dT%X -seconds $period_end]
...@@ -71,7 +74,7 @@ proc inc22_1_2 {} { ...@@ -71,7 +74,7 @@ proc inc22_1_2 {} {
set idle [format "%d\\\(%.2f%%\\\)" $idle [expr double($idle * 100)/$reported]] set idle [format "%d\\\(%.2f%%\\\)" $idle [expr double($idle * 100)/$reported]]
set reported [format "%d\\\(%.2f%%\\\)" $reported 100] set reported [format "%d\\\(%.2f%%\\\)" $reported 100]
send_user "\nTesting sreport for second hour\n" send_user "\nTesting sreport for second hour (Within: inc22.1.2)\n"
set matches 0 set matches 0
set my_pid [eval spawn $sreport cluster utilization cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,idle,down,alloc,res,reported] set my_pid [eval spawn $sreport cluster utilization cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,idle,down,alloc,res,reported]
expect { expect {
...@@ -94,8 +97,8 @@ proc inc22_1_2 {} { ...@@ -94,8 +97,8 @@ proc inc22_1_2 {} {
} }
if {$matches != 1} { if {$matches != 1} {
send_user "\nFAILURE: sreport didn't give good info 9 $matches. (Within: inc21.1.2)\n" send_user "\nFAILURE: sreport didn't give good info 9 $matches. (Within: inc22.1.2)\n"
send_user "we are looking for $cluster.$idle.$down.$alloc.$resv.$reported. (Within inc21.1.2)\n" send_user "we are looking for $cluster.$idle.$down.$alloc.$resv.$reported. (Within inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -112,7 +115,7 @@ proc inc22_1_2 {} { ...@@ -112,7 +115,7 @@ proc inc22_1_2 {} {
set my_pid [eval spawn $sreport cluster AccountUtilizationByUser cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,account,login,used] set my_pid [eval spawn $sreport cluster AccountUtilizationByUser cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,account,login,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.2)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.root..$alloc." { -re "$cluster.root..$alloc." {
...@@ -128,7 +131,7 @@ proc inc22_1_2 {} { ...@@ -128,7 +131,7 @@ proc inc22_1_2 {} {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.2)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.2)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -138,7 +141,7 @@ proc inc22_1_2 {} { ...@@ -138,7 +141,7 @@ proc inc22_1_2 {} {
} }
if {$matches != 3} { if {$matches != 3} {
send_user "\nFAILURE: sreport didn't give good info 11. (Within: inc21.1.2)\n" send_user "\nFAILURE: sreport didn't give good info 11. (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -155,7 +158,7 @@ proc inc22_1_2 {} { ...@@ -155,7 +158,7 @@ proc inc22_1_2 {} {
set my_pid [eval spawn $sreport cluster UserUtilizationByWckey cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,login,wckey,used] set my_pid [eval spawn $sreport cluster UserUtilizationByWckey cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,login,wckey,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.2)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$user1.$wckey1.$alloc." { -re "$cluster.$user1.$wckey1.$alloc." {
...@@ -163,7 +166,7 @@ proc inc22_1_2 {} { ...@@ -163,7 +166,7 @@ proc inc22_1_2 {} {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.2)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.2)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -173,7 +176,7 @@ proc inc22_1_2 {} { ...@@ -173,7 +176,7 @@ proc inc22_1_2 {} {
} }
if {$wc_key_track == 1 && $matches != 1} { if {$wc_key_track == 1 && $matches != 1} {
send_user "\nFAILURE: sreport didn't give good info 12. (Within: inc21.1.2)\n" send_user "\nFAILURE: sreport didn't give good info 12. (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -190,7 +193,7 @@ proc inc22_1_2 {} { ...@@ -190,7 +193,7 @@ proc inc22_1_2 {} {
set my_pid [eval spawn $sreport cluster WckeyUtilizationByUser cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,wckey,login,used] set my_pid [eval spawn $sreport cluster WckeyUtilizationByUser cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,wckey,login,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.2)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$wckey1..$alloc." { -re "$cluster.$wckey1..$alloc." {
...@@ -202,7 +205,7 @@ proc inc22_1_2 {} { ...@@ -202,7 +205,7 @@ proc inc22_1_2 {} {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.2)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.2)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -212,7 +215,7 @@ proc inc22_1_2 {} { ...@@ -212,7 +215,7 @@ proc inc22_1_2 {} {
} }
if {$wc_key_track == 1 && $matches != 2} { if {$wc_key_track == 1 && $matches != 2} {
send_user "\nFAILURE: sreport didn't give good info 13. (Within: inc21.1.2)\n" send_user "\nFAILURE: sreport didn't give good info 13. (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -229,7 +232,7 @@ proc inc22_1_2 {} { ...@@ -229,7 +232,7 @@ proc inc22_1_2 {} {
set my_pid [eval spawn $sreport user top cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,account,login,used] set my_pid [eval spawn $sreport user top cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,account,login,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.2)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$account1.$user1.$alloc." { -re "$cluster.$account1.$user1.$alloc." {
...@@ -237,7 +240,7 @@ proc inc22_1_2 {} { ...@@ -237,7 +240,7 @@ proc inc22_1_2 {} {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.2)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.2)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -247,7 +250,7 @@ proc inc22_1_2 {} { ...@@ -247,7 +250,7 @@ proc inc22_1_2 {} {
} }
if {$matches != 1} { if {$matches != 1} {
send_user "\nFAILURE: sreport didn't give good info 14. (Within: inc21.1.2)\n" send_user "\nFAILURE: sreport didn't give good info 14. (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -264,7 +267,7 @@ proc inc22_1_2 {} { ...@@ -264,7 +267,7 @@ proc inc22_1_2 {} {
set my_pid [eval spawn $sreport job size grouping=2,4 cluster='$cluster' start=$start_str end=$end_str -tsec -p -n] set my_pid [eval spawn $sreport job size grouping=2,4 cluster='$cluster' start=$start_str end=$end_str -tsec -p -n]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.2)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$account1.0.$alloc_sec.0." { -re "$cluster.$account1.0.$alloc_sec.0." {
...@@ -272,7 +275,7 @@ proc inc22_1_2 {} { ...@@ -272,7 +275,7 @@ proc inc22_1_2 {} {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.2)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.2)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -282,7 +285,7 @@ proc inc22_1_2 {} { ...@@ -282,7 +285,7 @@ proc inc22_1_2 {} {
} }
if {$matches != 1} { if {$matches != 1} {
send_user "\nFAILURE: sreport didn't give good info 15 $matches. (Within: inc21.1.2)\n" send_user "\nFAILURE: sreport didn't give good info 15 $matches. (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -299,7 +302,7 @@ proc inc22_1_2 {} { ...@@ -299,7 +302,7 @@ proc inc22_1_2 {} {
set my_pid [eval spawn $sreport job sizesbywckey grouping=2,4 cluster='$cluster' start=$start_str end=$end_str -tsec -p -n] set my_pid [eval spawn $sreport job sizesbywckey grouping=2,4 cluster='$cluster' start=$start_str end=$end_str -tsec -p -n]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.2)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$wckey1.0.$wckey_alloc_sec.0." { -re "$cluster.$wckey1.0.$wckey_alloc_sec.0." {
...@@ -307,7 +310,7 @@ proc inc22_1_2 {} { ...@@ -307,7 +310,7 @@ proc inc22_1_2 {} {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.2)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.2)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -317,7 +320,7 @@ proc inc22_1_2 {} { ...@@ -317,7 +320,7 @@ proc inc22_1_2 {} {
} }
if {$matches != 1} { if {$matches != 1} {
send_user "\nFAILURE: sreport didn't give good info 16 $matches. (Within: inc21.1.2)\n" send_user "\nFAILURE: sreport didn't give good info 16 $matches. (Within: inc22.1.2)\n"
incr exit_code 1 incr exit_code 1
} }
......
...@@ -44,13 +44,16 @@ proc inc22_1_3 { } { ...@@ -44,13 +44,16 @@ proc inc22_1_3 { } {
global job3_end job3_cpus job3_alloc job3_elig acct1_alloc acct2_alloc global job3_end job3_cpus job3_alloc job3_elig acct1_alloc acct2_alloc
global acct3_alloc total_alloc wckey1_alloc user1_wckey1_alloc global acct3_alloc total_alloc wckey1_alloc user1_wckey1_alloc
global user2_wckey1_alloc user1 user2 account1 account2 account3 global user2_wckey1_alloc user1 user2 account1 account2 account3
global wckey1 wc_key_track global sql_rem wckey1 wc_key_track
# Mon Dec 31 23:00:00 2007 # Mon Dec 31 23:00:00 2007
set period_start 1199170800 set start_time "Mon Dec 31 23:00:00 2007"
set period_start [exec date +%s --date=$start_time]
# Tue Jan 3 00:00:00 2008 # Tue Jan 3 00:00:00 2008
set period_end 1199347200 set end_time "Tue Jan 3 00:00:00 2008"
set period_end [exec date +%s --date=$end_time]
set start_str [timestamp -format %Y-%m-%dT%X -seconds $period_start] set start_str [timestamp -format %Y-%m-%dT%X -seconds $period_start]
set end_str [timestamp -format %Y-%m-%dT%X -seconds $period_end] set end_str [timestamp -format %Y-%m-%dT%X -seconds $period_end]
...@@ -96,12 +99,12 @@ proc inc22_1_3 { } { ...@@ -96,12 +99,12 @@ proc inc22_1_3 { } {
set reported [format "%d\\\(%.2f%%\\\)" $reported 100] set reported [format "%d\\\(%.2f%%\\\)" $reported 100]
send_user "\nTesting sreport for 3 days (Within: inc21.1.3)\n" send_user "\nTesting sreport for 3 days (Within: inc22.1.3)\n"
set matches 0 set matches 0
set my_pid [eval spawn $sreport cluster utilization cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,idle,down,alloc,res,over,reported] set my_pid [eval spawn $sreport cluster utilization cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,idle,down,alloc,res,over,reported]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$idle.$down.$alloc.$resv.$over.$reported." { -re "$cluster.$idle.$down.$alloc.$resv.$over.$reported." {
...@@ -109,7 +112,7 @@ proc inc22_1_3 { } { ...@@ -109,7 +112,7 @@ proc inc22_1_3 { } {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.3)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.3)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -119,8 +122,8 @@ proc inc22_1_3 { } { ...@@ -119,8 +122,8 @@ proc inc22_1_3 { } {
} }
if {$matches != 1} { if {$matches != 1} {
send_user "\nFAILURE: sreport didn't give good info 17 $matches. (Within: inc21.1.2)\n" send_user "\nFAILURE: sreport didn't give good info 17 $matches. (Within: inc22.1.3)\n"
send_user "we are looking for $cluster.$idle.$down.$alloc.$resv.$over.$reported. (Within: inc21.1.3)\n" send_user "we are looking for $cluster.$idle.$down.$alloc.$resv.$over.$reported. (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -137,7 +140,7 @@ proc inc22_1_3 { } { ...@@ -137,7 +140,7 @@ proc inc22_1_3 { } {
set my_pid [eval spawn $sreport cluster UserUtilizationByAccount cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,login,account,used] set my_pid [eval spawn $sreport cluster UserUtilizationByAccount cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,login,account,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$user2.$account3.$job2_alloc_str." { -re "$cluster.$user2.$account3.$job2_alloc_str." {
...@@ -156,7 +159,7 @@ proc inc22_1_3 { } { ...@@ -156,7 +159,7 @@ proc inc22_1_3 { } {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.3)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.3)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -166,7 +169,7 @@ proc inc22_1_3 { } { ...@@ -166,7 +169,7 @@ proc inc22_1_3 { } {
} }
if {$matches != 3} { if {$matches != 3} {
send_user "\nFAILURE: sreport didn't give good info 18 $matches. (Within: inc21.1.3)\n" send_user "\nFAILURE: sreport didn't give good info 18 $matches. (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -183,7 +186,7 @@ proc inc22_1_3 { } { ...@@ -183,7 +186,7 @@ proc inc22_1_3 { } {
set my_pid [eval spawn $sreport cluster AccountUtilizationByUser cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,account,login,used] set my_pid [eval spawn $sreport cluster AccountUtilizationByUser cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,account,login,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.root..$total_alloc_str." { -re "$cluster.root..$total_alloc_str." {
...@@ -215,7 +218,7 @@ proc inc22_1_3 { } { ...@@ -215,7 +218,7 @@ proc inc22_1_3 { } {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.3)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.3)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -225,7 +228,7 @@ proc inc22_1_3 { } { ...@@ -225,7 +228,7 @@ proc inc22_1_3 { } {
} }
if {$matches != 7} { if {$matches != 7} {
send_user "\nFAILURE: sreport didn't give good info 19 $matches. (Within: inc21.1.3)\n" send_user "\nFAILURE: sreport didn't give good info 19 $matches. (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -242,7 +245,7 @@ proc inc22_1_3 { } { ...@@ -242,7 +245,7 @@ proc inc22_1_3 { } {
set my_pid [eval spawn $sreport cluster UserUtilizationByWckey cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,login,wckey,used] set my_pid [eval spawn $sreport cluster UserUtilizationByWckey cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,login,wckey,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$user2.$wckey1.$user2_wckey1_alloc_str." { -re "$cluster.$user2.$wckey1.$user2_wckey1_alloc_str." {
...@@ -266,7 +269,7 @@ proc inc22_1_3 { } { ...@@ -266,7 +269,7 @@ proc inc22_1_3 { } {
} }
if {$wc_key_track == 1 && $matches != 2} { if {$wc_key_track == 1 && $matches != 2} {
send_user "\nFAILURE: sreport didn't give good info 20 $matches. (Within: inc21.1.3)\n" send_user "\nFAILURE: sreport didn't give good info 20 $matches. (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -283,7 +286,7 @@ proc inc22_1_3 { } { ...@@ -283,7 +286,7 @@ proc inc22_1_3 { } {
set my_pid [eval spawn $sreport cluster WckeyUtilizationByUser cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,wckey,login,used] set my_pid [eval spawn $sreport cluster WckeyUtilizationByUser cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,wckey,login,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$wckey1..$wckey1_alloc_str." { -re "$cluster.$wckey1..$wckey1_alloc_str." {
...@@ -299,7 +302,7 @@ proc inc22_1_3 { } { ...@@ -299,7 +302,7 @@ proc inc22_1_3 { } {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.3)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.3)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -309,7 +312,7 @@ proc inc22_1_3 { } { ...@@ -309,7 +312,7 @@ proc inc22_1_3 { } {
} }
if {$wc_key_track == 1 && $matches != 3} { if {$wc_key_track == 1 && $matches != 3} {
send_user "\nFAILURE: sreport didn't give good info 21 $matches. (Within: inc21.1.3)\n" send_user "\nFAILURE: sreport didn't give good info 21 $matches. (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -326,7 +329,7 @@ proc inc22_1_3 { } { ...@@ -326,7 +329,7 @@ proc inc22_1_3 { } {
set my_pid [eval spawn $sreport user top cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,account,login,used] set my_pid [eval spawn $sreport user top cluster='$cluster' start=$start_str end=$end_str -tsecper -p -n format=cluster,account,login,used]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$account3.$user2.$job2_alloc_str." { -re "$cluster.$account3.$user2.$job2_alloc_str." {
...@@ -342,7 +345,7 @@ proc inc22_1_3 { } { ...@@ -342,7 +345,7 @@ proc inc22_1_3 { } {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.3)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.3)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -352,7 +355,7 @@ proc inc22_1_3 { } { ...@@ -352,7 +355,7 @@ proc inc22_1_3 { } {
} }
if {$matches != 3} { if {$matches != 3} {
send_user "\nFAILURE: sreport didn't give good info 22 $matches. (Within: inc21.1.3)\n" send_user "\nFAILURE: sreport didn't give good info 22 $matches. (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -369,7 +372,7 @@ proc inc22_1_3 { } { ...@@ -369,7 +372,7 @@ proc inc22_1_3 { } {
set my_pid [eval spawn $sreport job size grouping=2,4 cluster='$cluster' start=$start_str end=$end_str -tsec -p -n] set my_pid [eval spawn $sreport job size grouping=2,4 cluster='$cluster' start=$start_str end=$end_str -tsec -p -n]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$account1.0.$job1_alloc.0." { -re "$cluster.$account1.0.$job1_alloc.0." {
...@@ -381,7 +384,7 @@ proc inc22_1_3 { } { ...@@ -381,7 +384,7 @@ proc inc22_1_3 { } {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.3)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.3)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -391,7 +394,7 @@ proc inc22_1_3 { } { ...@@ -391,7 +394,7 @@ proc inc22_1_3 { } {
} }
if {$matches != 2} { if {$matches != 2} {
send_user "\nFAILURE: sreport didn't give good info 23 $matches. (Within: inc21.1.3)\n" send_user "\nFAILURE: sreport didn't give good info 23 $matches. (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -408,7 +411,7 @@ proc inc22_1_3 { } { ...@@ -408,7 +411,7 @@ proc inc22_1_3 { } {
set my_pid [eval spawn $sreport job size grouping=2,4 cluster='$cluster' account='$account2' start=$start_str end=$end_str -tsec -p -n] set my_pid [eval spawn $sreport job size grouping=2,4 cluster='$cluster' account='$account2' start=$start_str end=$end_str -tsec -p -n]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$account3.0.0.$job2_alloc." { -re "$cluster.$account3.0.0.$job2_alloc." {
...@@ -416,7 +419,7 @@ proc inc22_1_3 { } { ...@@ -416,7 +419,7 @@ proc inc22_1_3 { } {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc21.1.3)\n" send_user "\nFAILURE: sacctmgr archive load not responding (Within: inc22.1.3)\n"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
...@@ -426,7 +429,7 @@ proc inc22_1_3 { } { ...@@ -426,7 +429,7 @@ proc inc22_1_3 { } {
} }
if {$matches != 1} { if {$matches != 1} {
send_user "\nFAILURE: sreport didn't give good info 24 $matches. (Within: inc21.1.3)\n" send_user "\nFAILURE: sreport didn't give good info 24 $matches. (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
...@@ -443,7 +446,7 @@ proc inc22_1_3 { } { ...@@ -443,7 +446,7 @@ proc inc22_1_3 { } {
set my_pid [eval spawn $sreport job sizesbywckey grouping=2,4 cluster='$cluster' start=$start_str end=$end_str -tsec -p -n] set my_pid [eval spawn $sreport job sizesbywckey grouping=2,4 cluster='$cluster' start=$start_str end=$end_str -tsec -p -n]
expect { expect {
-re "There was a problem" { -re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc21.1.3)\n" send_user "FAILURE: there was a problem with the sacctmgr command (Within: inc22.1.3)\n"
incr exit_code 1 incr exit_code 1
} }
-re "$cluster.$wckey1.0.$wckey_alloc_sec1.$wckey_alloc_sec2." { -re "$cluster.$wckey1.0.$wckey_alloc_sec1.$wckey_alloc_sec2." {
...@@ -451,7 +454,7 @@ proc inc22_1_3 { } { ...@@ -451,7 +454,7 @@ proc inc22_1_3 { } {
exp_continue exp_continue
} }
timeout { timeout {
send_user "\nFAILURE: sacctmgr archive load not responding\n (Within: inc21.1.3)" send_user "\nFAILURE: sacctmgr archive load not responding\n (Within: inc22.1.3)"
slow_kill $my_pid slow_kill $my_pid
incr exit_code 1 incr exit_code 1
} }
......
...@@ -58,7 +58,7 @@ set step_mem_opt "--comment=no_mem" ...@@ -58,7 +58,7 @@ set step_mem_opt "--comment=no_mem"
spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep SelectTypeParameters" spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep SelectTypeParameters"
expect { expect {
-re "MEMORY" { -re "MEMORY" {
set job_mem_opt "--mem-per-cpu=64" set job_mem_opt "--mem-per-cpu=256"
set step_mem_opt "--mem-per-cpu=2" set step_mem_opt "--mem-per-cpu=2"
exp_continue exp_continue
} }
...@@ -102,7 +102,7 @@ if { [test_xcpu] } { ...@@ -102,7 +102,7 @@ if { [test_xcpu] } {
set srun_pid [spawn $sbatch -N$node_cnt --output=$file_out --error=$file_err -t1 $job_mem_opt $file_in] set srun_pid [spawn $sbatch -N$node_cnt --output=$file_out --error=$file_err -t1 $job_mem_opt $file_in]
expect { expect {
-re "Requested node configuration is not available" { -re "Requested node configuration is not available" {
send_user "\nFAILURE: Memory is allocated, but your nodes don't have even 32MB configured\n" send_user "\nFAILURE: Memory is allocated, but your nodes don't have even 256MB configured\n"
set exit_code 1 set exit_code 1
} }
-re "Submitted batch job ($number)" { -re "Submitted batch job ($number)" {
......
...@@ -121,7 +121,7 @@ sleep 2 ...@@ -121,7 +121,7 @@ sleep 2
set fd [open "|$scontrol --oneliner show node $def_hostlist"] set fd [open "|$scontrol --oneliner show node $def_hostlist"]
exp_internal 1 exp_internal 1
while {[gets $fd line] != -1} { while {[gets $fd line] != -1} {
if {[regexp {NodeName=(\w+).*CPUTot=(\d+)(K?).*State=IDLE ThreadsPerCore=(\d+)} $line frag host cpu_cnt units threads_per_core] == 1} { if {[regexp {NodeName=([^\s]+).*CPUTot=(\d+)(K?).*State=IDLE ThreadsPerCore=(\d+)} $line frag host cpu_cnt units threads_per_core] == 1} {
break break
} }
} }
......
...@@ -266,7 +266,7 @@ make_bash_script $file_in " ...@@ -266,7 +266,7 @@ make_bash_script $file_in "
# #
set config_prob 0 set config_prob 0
set timeout [expr $max_job_delay + $sleep_time] set timeout [expr $max_job_delay + $sleep_time]
set job_mem_limit [expr ($mem_size + $max_mem_error) / 1024 + 4] set job_mem_limit [expr ($mem_size + $max_mem_error) / 1024 + 10]
set sbatch_pid [spawn $sbatch --mem-per-cpu=$job_mem_limit --output=$file_out --error=$file_err -t2 $file_in] set sbatch_pid [spawn $sbatch --mem-per-cpu=$job_mem_limit --output=$file_out --error=$file_err -t2 $file_in]
expect { expect {
-re "Requested node configuration is not available" { -re "Requested node configuration is not available" {
......
...@@ -206,6 +206,10 @@ if { [test_limits_enforced] == 0 } { ...@@ -206,6 +206,10 @@ if { [test_limits_enforced] == 0 } {
send_user "\nWARNING: This test can't be run without enforcing limits\n" send_user "\nWARNING: This test can't be run without enforcing limits\n"
exit 0 exit 0
} }
if {[test_super_user] == 0} {
send_user "\nWARNING Test can only be ran as SlurmUser\n"
exit 0
}
# #
# Some tests will not work properly when allocating whole nodes to jobs # Some tests will not work properly when allocating whole nodes to jobs
......
...@@ -68,6 +68,14 @@ if { [test_account_storage] == 0 } { ...@@ -68,6 +68,14 @@ if { [test_account_storage] == 0 } {
exit 0 exit 0
} }
#
# Check that current user is root or SlurmUser
#
if {[test_super_user] == 0} {
send_user "\nWARNING: Test can only be ran as SlurmUser\n"
exit 0
}
#if { [string compare [check_accounting_admin_level] "Administrator"] } { #if { [string compare [check_accounting_admin_level] "Administrator"] } {
# send_user "\nWARNING: This test can't be run without being an Accounting administrator.\nUse sacctmgr mod user \$USER_NAME admin=admin.\n" # send_user "\nWARNING: This test can't be run without being an Accounting administrator.\nUse sacctmgr mod user \$USER_NAME admin=admin.\n"
# exit 0 # exit 0
......
...@@ -134,6 +134,14 @@ proc check_pre { preempt_qos } { ...@@ -134,6 +134,14 @@ proc check_pre { preempt_qos } {
######################### Test Begins ######################### ######################### Test Begins #########################
#
# Check that current user is root or SlurmUser
#
if {[test_super_user] == 0} {
send_user "\nWARNING: Test can only be ran as SlurmUser\n"
exit 0
}
# clean it up (and check to make sure we can do this test # clean it up (and check to make sure we can do this test
remove_qos $qos_names_str remove_qos $qos_names_str
if {$access_err != 0} { if {$access_err != 0} {
......
...@@ -69,12 +69,16 @@ set timeout 120 ...@@ -69,12 +69,16 @@ set timeout 120
print_header $test_id print_header $test_id
# Fri Thu Jan 31 00:00:00 2008 - Needed only for the 00:00:00 for timing purposes # Fri Thu Jan 31 00:00:00 2008 - Needed only for the 00:00:00 for timing purposes
set midnight 1201766400 set midnight_time "Thu Jan 31 00:00:00 2008"
set midnight [exec date +%s --date=$midnight_time]
# Mon Dec 31 23:00:00 2007 # Mon Dec 31 23:00:00 2007
set period_start 1199170800 set start_date "Mon Dec 31 23:00:00 2007"
set period_start [exec date +%s --date=$start_date]
# Thu Jan 31 23:59:59 2008 # Thu Jan 31 23:59:59 2008
set period_end 1201852799 set end_date "Thu Jan 31 23:59:59 2008"
set period_end [exec date +%s --date=$end_date]
set start_str [timestamp -format %Y-%m-%dT%X -seconds $period_start] set start_str [timestamp -format %Y-%m-%dT%X -seconds $period_start]
set end_str [timestamp -format %Y-%m-%dT%X -seconds $period_end] set end_str [timestamp -format %Y-%m-%dT%X -seconds $period_end]
......
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