Skip to content
Snippets Groups Projects
Commit 65b2f7c8 authored by Danny Auble's avatar Danny Auble
Browse files

fixs to accounting tests with new options for no grp_wall or grp_cpu_mins for clusters

parent ba2deb29
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ set timeout 60
#
# Use sacctmgr to create a cluster
#
proc add_cluster {name qos fairshare grpcpumin grpcpu grpjob grpnode grpsubmit grpwall maxcpumin maxcpu maxjob maxnode maxsubmit maxwall} {
proc add_cluster {name qos fairshare grpcpu grpjob grpnode grpsubmit maxcpumin maxcpu maxjob maxnode maxsubmit maxwall} {
global sacctmgr timeout
set exit_code 0
......@@ -63,11 +63,6 @@ proc add_cluster {name qos fairshare grpcpumin grpcpu grpjob grpnode grpsubmit g
set assoc_stuff 1
}
if { [string length $grpcpumin] } {
set command "$command GrpCPUMins=$grpcpumin"
set assoc_stuff 1
}
if { [string length $grpcpu] } {
set command "$command GrpCPUs=$grpcpu"
set assoc_stuff 1
......@@ -88,11 +83,6 @@ proc add_cluster {name qos fairshare grpcpumin grpcpu grpjob grpnode grpsubmit g
set assoc_stuff 1
}
if { [string length $grpwall] } {
set command "$command GrpWall=$grpwall"
set assoc_stuff 1
}
if { [string length $maxcpumin] } {
set command "$command MaxCPUMins=$maxcpumin"
set assoc_stuff 1
......
......@@ -138,7 +138,7 @@ if {[wait_for_file $file_out] == 0} {
}
if {$record != 3} {
send_user "\nFAILURE: Wrong record count\n"
send_user "\nFAILURE: Wrong record count $record\n"
set exit_code 1
}
if {$preserved == 0} {
......
......@@ -249,8 +249,8 @@ if { $exit_code } {
}
#add cluster
#name QOS Fairshare GrpCPUMins GrpCPUs GrpJobs GrpNodes GrpSubmitJobs GrpWall MaxCPUMins MaxCPUs MaxJobs MaxNodes MaxSubmitJobs MaxWallDurationPerJob
incr exit_code [add_cluster "$tc3" "$qs2" "$fs6" "$gm6" "$gc6" "$gj6" "$gn6" "$gs6" "$gw6" "$mm6" "$mc6" "$mj6" "$mn6" "$ms6" "$mw6"]
#name QOS Fairshare GrpCPUs GrpJobs GrpNodes GrpSubmitJobs MaxCPUMins MaxCPUs MaxJobs MaxNodes MaxSubmitJobs MaxWallDurationPerJob
incr exit_code [add_cluster "$tc3" "$qs2" "$fs6" "$gc6" "$gj6" "$gn6" "$gs6" "$mm6" "$mc6" "$mj6" "$mn6" "$ms6" "$mw6"]
if { $exit_code } {
remove_user "" "" "$us1,$us2,$us3,$us4"
remove_acct "" "$nm1,$nm2,$nm3,$nm4"
......@@ -375,7 +375,7 @@ expect {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
incr exit_code 1
}
-re "($clu - $cl3:$fs=$fs6:$gm=$gm6:$gc=$gc6:$gj=$gj6:$gn=$gn6:$gs=$gs6:$gw=$gw6:$mp=$mm6:$mu=$mc6:$mj=$mj6:$mnj=$mn6:$ms=$ms6:$md=$mw6:$qs='$qs2')" {
-re "($clu - $cl3:$fs=$fs6:$gc=$gc6:$gj=$gj6:$gn=$gn6:$gs=$gs6:$mp=$mm6:$mu=$mc6:$mj=$mj6:$mnj=$mn6:$ms=$ms6:$md=$mw6:$qs='$qs2')" {
send_user "\nmatch 1\n"
incr matches
exp_continue
......
......@@ -45,12 +45,10 @@ set mod modify
set nams Names
set nam Name
set fs Fairshare
set gm GrpCPUMins
set gc GrpCPUs
set gj GrpJobs
set gs GrpSubmitJobs
set gn GrpNodes
set gw GrpWall
set mm MaxCPUMins
set mc MaxCPUs
set mj MaxJobs
......@@ -60,12 +58,10 @@ set mw MaxWall
set clu cluster
set tc1 tcluster1
set fs1 2500
set gm1 1000000
set gc1 50
set gj1 100
set gs1 500
set gn1 300
set gw1 00:45:00
set mc1 100
set mm1 100000
set mj1 500
......@@ -153,8 +149,8 @@ set my_pid [spawn $sacctmgr -i $del $clu $tc1]
#
# Use sacctmgr to create a cluster
#
set sadd_pid [spawn $sacctmgr -i add $clu $nams=$tc1 $fs=$fs1 $gm=$gm1 \
$gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $gw=$gw1 $mc=$mc1 $mm=$mm1 \
set sadd_pid [spawn $sacctmgr -i add $clu $nams=$tc1 $fs=$fs1 \
$gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $mc=$mc1 $mm=$mm1 \
$mj=$mj1 $ms=$ms1 $mn=$mn1 $mw=$mw1]
expect {
-re "privilege to preform this action" {
......@@ -177,10 +173,6 @@ expect {
incr amatches
exp_continue
}
-re "$gm *= $gm1" {
incr amatches
exp_continue
}
-re "$gc *= $gc1" {
incr amatches
exp_continue
......@@ -197,10 +189,6 @@ expect {
incr amatches
exp_continue
}
-re "$gw *= $gw1" {
incr amatches
exp_continue
}
-re "$mm *= $mm1" {
incr amatches
exp_continue
......@@ -238,7 +226,7 @@ if {$access_err != 0} {
send_user "\nWARNING: not authorized to perform this test\n"
exit $exit_code
}
if {$amatches != 16} {
if {$amatches != 14} {
send_user "\nFAILURE: sacctmgr had a problem adding clusters got $amatches\n"
set exit_code 1
}
......
......@@ -45,12 +45,10 @@ set mod modify
set nams Names
set nam Name
set fs Fairshare
set gm GrpCPUMins
set gc GrpCPUs
set gj GrpJobs
set gs GrpSubmitJobs
set gn GrpNodes
set gw GrpWall
set mm MaxCPUMins
set mc MaxCPUs
set mj MaxJobs
......@@ -62,12 +60,10 @@ set tc1 tcluster1
set tc2 tcluster2
set tc3 tcluster3
set fs1 2500
set gm1 1000000
set gc1 50
set gj1 100
set gs1 500
set gn1 300
set gw1 00:45:00
set mc1 100
set mm1 100000
set mj1 500
......@@ -157,7 +153,7 @@ set my_pid [spawn $sacctmgr -i $del $clu $tc1,$tc2,$tc3]
# Use sacctmgr to create a cluster
#
set sadd_pid [spawn $sacctmgr $add $clu $nams=$tc1,$tc2,$tc3 $fs=$fs1 \
$gm=$gm1 $gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $gw=$gw1 $mc=$mc1 $mm=$mm1 \
$gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $mc=$mc1 $mm=$mm1 \
$mj=$mj1 $ms=$ms1 $mn=$mn1 $mw=$mw1]
expect {
......@@ -189,10 +185,6 @@ expect {
incr amatches
exp_continue
}
-re "$gm *= $gm1" {
incr amatches
exp_continue
}
-re "$gc *= $gc1" {
incr amatches
exp_continue
......@@ -209,10 +201,6 @@ expect {
incr amatches
exp_continue
}
-re "$gw *= $gw1" {
incr amatches
exp_continue
}
-re "$mm *= $mm1" {
incr amatches
exp_continue
......@@ -259,7 +247,7 @@ if {$access_err != 0} {
send_user "\nWARNING: not authorized to perform this test\n"
exit $exit_code
}
if {$amatches != 20} {
if {$amatches != 18} {
send_user "\nFAILURE: sacctmgr had a problem adding clusters got $amatches\n"
set exit_code 1
}
......
......@@ -45,12 +45,10 @@ set mod modify
set nams Names
set nam Name
set fs Fairshare
set gm GrpCPUMins
set gc GrpCPUs
set gj GrpJobs
set gs GrpSubmitJobs
set gn GrpNodes
set gw GrpWall
set mm MaxCPUMins
set mc MaxCPUs
set mj MaxJobs
......@@ -62,12 +60,10 @@ set tc1 tcluster1
set tc2 tcluster2
set tc3 tcluster3
set fs1 2500
set gm1 1000000
set gc1 50
set gj1 100
set gs1 500
set gn1 300
set gw1 00:45:00
set mc1 100
set mm1 100000
set mj1 500
......@@ -96,7 +92,7 @@ if { [test_account_storage] == 0 } {
# Use sacctmgr to create a cluster
#
set sadd_pid [spawn $sacctmgr $add $clu $nams=$tc1,$tc2,$tc3 $fs=$fs1 \
$gm=$gm1 $gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $gw=$gw1 $mc=$mc1 $mm=$mm1 \
$gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $mc=$mc1 $mm=$mm1 \
$mj=$mj1 $ms=$ms1 $mn=$mn1 $mw=$mw1]
expect {
-re "privilege to preform this action" {
......@@ -127,10 +123,6 @@ expect {
incr amatches
exp_continue
}
-re "$gm *= $gm1" {
incr amatches
exp_continue
}
-re "$gc *= $gc1" {
incr amatches
exp_continue
......@@ -147,10 +139,6 @@ expect {
incr amatches
exp_continue
}
-re "$gw *= $gw1" {
incr amatches
exp_continue
}
-re "$mm *= $mm1" {
incr amatches
exp_continue
......@@ -197,7 +185,7 @@ if {$access_err != 0} {
send_user "\nWARNING: not authorized to perform this test\n"
exit $exit_code
}
if {$amatches != 20} {
if {$amatches != 18} {
send_user "\nFAILURE: sacctmgr had a problem adding clusters\n"
set exit_code 1
}
......@@ -209,7 +197,7 @@ if { ![check_acct_associations] } {
#
# Use sacctmgr to list the addition of cluster
#
set slist_pid [spawn $sacctmgr $lis $clu format=$fs,$gm,$gc,$gj,$gs,$gn,$gw,$mm,$mc,$mj,$ms,$mn,$mw ]
set slist_pid [spawn $sacctmgr $lis $clu format=$fs,$gc,$gj,$gs,$gn,$mm,$mc,$mj,$ms,$mn,$mw ]
expect {
-re "Cluster" {
incr lmatches
......@@ -219,7 +207,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs1 *$gm1 *$gc1 *$gj1 *$gs1 *$gn1 *$gw1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
-re "$fs1 *$gc1 *$gj1 *$gs1 *$gn1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
incr lmatches
exp_continue
}
......@@ -227,7 +215,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs1 *$gm1 *$gc1 *$gj1 *$gs1 *$gn1 *$gw1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
-re "$fs1 *$gc1 *$gj1 *$gs1 *$gn1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
incr lmatches
exp_continue
}
......@@ -235,7 +223,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs1 *$gm1 *$gc1 *$gj1 *$gs1 *$gn1 *$gw1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
-re "$fs1 *$gc1 *$gj1 *$gs1 *$gn1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
incr lmatches
exp_continue
}
......
......@@ -46,12 +46,10 @@ set mod modify
set nams Names
set nam Name
set fs Fairshare
set gm GrpCPUMins
set gc GrpCPUs
set gj GrpJobs
set gs GrpSubmitJobs
set gn GrpNodes
set gw GrpWall
set mm MaxCPUMins
set mc MaxCPUs
set mj MaxJobs
......@@ -64,24 +62,20 @@ set tc2 tcluster2
set tc3 tcluster3
set fs1 2500
set fs2 1375
set gm1 1000
set gc1 20
set gj1 100
set gs1 300
set gn1 100
set gw1 00:45:00
set mc1 200
set mm1 100000
set mj1 500
set ms1 400
set mn1 200
set mw1 01:00:00
set gm2 2000
set gc2 50
set gj2 200
set gs2 400
set gn2 150
set gw2 00:45:00
set mc2 100
set mm2 20000
set mj2 600
......@@ -110,7 +104,7 @@ if { [test_account_storage] == 0 } {
# Use sacctmgr to create a cluster
#
set sadd_pid [spawn $sacctmgr $add $clu $nams=$tc1,$tc2,$tc3 $fs=$fs1 \
$gm=$gm1 $gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $gw=$gw1 $mc=$mc1 $mm=$mm1 \
$gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $mc=$mc1 $mm=$mm1 \
$mj=$mj1 $ms=$ms1 $mn=$mn1 $mw=$mw1]
expect {
-re "privilege to preform this action" {
......@@ -141,10 +135,6 @@ expect {
incr amatches
exp_continue
}
-re "$gm *= $gm1" {
incr amatches
exp_continue
}
-re "$gc *= $gc1" {
incr amatches
exp_continue
......@@ -161,10 +151,6 @@ expect {
incr amatches
exp_continue
}
-re "$gw *= $gw1" {
incr amatches
exp_continue
}
-re "$mm *= $mm1" {
incr amatches
exp_continue
......@@ -211,7 +197,7 @@ if {$access_err != 0} {
send_user "\nWARNING: not authorized to perform this test\n"
exit $exit_code
}
if {$amatches != 20} {
if {$amatches != 18} {
send_user "\nFAILURE: sacctmgr had a problem adding clusters\n"
set exit_code 1
}
......@@ -224,7 +210,7 @@ if { ![check_acct_associations] } {
# Use sacctmgr to modify one cluster
#
set smod_pid [spawn $sacctmgr $mod $clu set $fs=$fs2 \
$gm=$gm2 $gc=$gc2 $gj=$gj2 $gn=$gn2 $gs=$gs2 $gw=$gw2 $mc=$mc2 $mm=$mm2 \
$gc=$gc2 $gj=$gj2 $gn=$gn2 $gs=$gs2 $mc=$mc2 $mm=$mm2 \
$mj=$mj2 $ms=$ms2 $mn=$mn2 $mw=$mw2 where $nams=$tc2]
expect {
-re "Setting" {
......@@ -239,10 +225,6 @@ expect {
incr mmatches
exp_continue
}
-re "$gm *= $gm2" {
incr mmatches
exp_continue
}
-re "$gc *= $gc2" {
incr mmatches
exp_continue
......@@ -259,10 +241,6 @@ expect {
incr mmatches
exp_continue
}
-re "$gw *= $gw2" {
incr mmatches
exp_continue
}
-re "$mm *= $mm2" {
incr mmatches
exp_continue
......@@ -306,7 +284,7 @@ expect {
}
}
if {$mmatches != 17} {
if {$mmatches != 15} {
send_user "\nFAILURE: sacctmgr had a problem modifying clusters\n"
set exit_code 1
}
......@@ -318,7 +296,7 @@ if { ![check_acct_associations] } {
#
# Use sacctmgr to list the addition of cluster
#
set slist_pid [spawn $sacctmgr $lis $clu format=$fs,$gm,$gc,$gj,$gs,$gn,$gw,$mm,$mc,$mj,$ms,$mn,$mw]
set slist_pid [spawn $sacctmgr $lis $clu format=$fs,$gc,$gj,$gs,$gn,$mm,$mc,$mj,$ms,$mn,$mw]
expect {
-re "Cluster" {
incr lmatches
......@@ -328,7 +306,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs1 *$gm1 *$gc1 *$gj1 *$gs1 *$gn1 *$gw1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
-re "$fs1 *$gc1 *$gj1 *$gs1 *$gn1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
incr lmatches
exp_continue
}
......@@ -336,7 +314,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs2 *$gm2 *$gc2 *$gj2 *$gs2 *$gn2 *$gw2 *$mm2 *$mc2 *$mj2 *$ms2 *$mn2 *$mw2" {
-re "$fs2 *$gc2 *$gj2 *$gs2 *$gn2 *$mm2 *$mc2 *$mj2 *$ms2 *$mn2 *$mw2" {
incr lmatches
exp_continue
}
......@@ -344,7 +322,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs1 *$gm1 *$gc1 *$gj1 *$gs1 *$gn1 *$gw1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
-re "$fs1 *$gc1 *$gj1 *$gs1 *$gn1 *$mm1 *$mc1 *$mj1 *$ms1 *$mn1 *$mw1" {
incr lmatches
exp_continue
}
......
......@@ -46,12 +46,10 @@ set mod modify
set nams Names
set nam Name
set fs Fairshare
set gm GrpCPUMins
set gc GrpCPUs
set gj GrpJobs
set gs GrpSubmitJobs
set gn GrpNodes
set gw GrpWall
set mm MaxCPUMins
set mc MaxCPUs
set mj MaxJobs
......@@ -64,24 +62,20 @@ set tc2 tcluster2
set tc3 tcluster3
set fs1 2500
set fs2 1375
set gm1 1000
set gc1 20
set gj1 100
set gs1 300
set gn1 100
set gw1 00:45:00
set mc1 200
set mm1 100000
set mj1 500
set ms1 400
set mn1 200
set mw1 01:00:00
set gm2 2000
set gc2 50
set gj2 200
set gs2 400
set gn2 150
set gw2 00:45:00
set mc2 100
set mm2 20000
set mj2 600
......@@ -110,7 +104,7 @@ if { [test_account_storage] == 0 } {
# Use sacctmgr to create a cluster
#
set sadd_pid [spawn $sacctmgr $add $clu $nams=$tc1,$tc2,$tc3 $fs=$fs1 \
$gm=$gm1 $gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $gw=$gw1 $mc=$mc1 $mm=$mm1 \
$gc=$gc1 $gj=$gj1 $gn=$gn1 $gs=$gs1 $mc=$mc1 $mm=$mm1 \
$mj=$mj1 $ms=$ms1 $mn=$mn1 $mw=$mw1]
expect {
-re "privilege to preform this action" {
......@@ -141,10 +135,6 @@ expect {
incr amatches
exp_continue
}
-re "$gm *= $gm1" {
incr amatches
exp_continue
}
-re "$gc *= $gc1" {
incr amatches
exp_continue
......@@ -161,10 +151,6 @@ expect {
incr amatches
exp_continue
}
-re "$gw *= $gw1" {
incr amatches
exp_continue
}
-re "$mm *= $mm1" {
incr amatches
exp_continue
......@@ -211,7 +197,7 @@ if {$access_err != 0} {
send_user "\nWARNING: not authorized to perform this test\n"
exit $exit_code
}
if {$amatches != 20} {
if {$amatches != 18} {
send_user "\nFAILURE: sacctmgr had a problem adding clusters\n"
set exit_code 1
}
......@@ -224,7 +210,7 @@ if { ![check_acct_associations] } {
# Use sacctmgr to modify one cluster
#
set smod_pid [spawn $sacctmgr $mod $clu set $fs=$fs2 \
$gm=$gm2 $gc=$gc2 $gj=$gj2 $gn=$gn2 $gs=$gs2 $gw=$gw2 $mc=$mc2 $mm=$mm2 \
$gc=$gc2 $gj=$gj2 $gn=$gn2 $gs=$gs2 $mc=$mc2 $mm=$mm2 \
$mj=$mj2 $ms=$ms2 $mn=$mn2 $mw=$mw2 where $nams=$tc1,$tc2,$tc3]
expect {
-re "Setting" {
......@@ -239,10 +225,6 @@ expect {
incr mmatches
exp_continue
}
-re "$gm *= $gm2" {
incr mmatches
exp_continue
}
-re "$gc *= $gc2" {
incr mmatches
exp_continue
......@@ -259,10 +241,6 @@ expect {
incr mmatches
exp_continue
}
-re "$gw *= $gw2" {
incr mmatches
exp_continue
}
-re "$mm *= $mm2" {
incr mmatches
exp_continue
......@@ -306,7 +284,7 @@ expect {
}
}
if {$mmatches != 17} {
if {$mmatches != 15} {
send_user "\nFAILURE: sacctmgr had a problem modifying clusters\n"
set exit_code 1
}
......@@ -318,7 +296,7 @@ if { ![check_acct_associations] } {
#
# Use sacctmgr to list the addition of cluster
#
set slist_pid [spawn $sacctmgr $lis $clu format=$fs,$gm,$gc,$gj,$gs,$gn,$gw,$mm,$mc,$mj,$ms,$mn,$mw]
set slist_pid [spawn $sacctmgr $lis $clu format=$fs,$gc,$gj,$gs,$gn,$mm,$mc,$mj,$ms,$mn,$mw]
expect {
-re "Cluster" {
incr lmatches
......@@ -328,7 +306,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs2 *$gm2 *$gc2 *$gj2 *$gs2 *$gn2 *$gw2 *$mm2 *$mc2 *$mj2 *$ms2 *$mn2 *$mw2" {
-re "$fs2 *$gc2 *$gj2 *$gs2 *$gn2 *$mm2 *$mc2 *$mj2 *$ms2 *$mn2 *$mw2" {
incr lmatches
exp_continue
}
......@@ -336,7 +314,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs2 *$gm2 *$gc2 *$gj2 *$gs2 *$gn2 *$gw2 *$mm2 *$mc2 *$mj2 *$ms2 *$mn2 *$mw2" {
-re "$fs2 *$gc2 *$gj2 *$gs2 *$gn2 *$mm2 *$mc2 *$mj2 *$ms2 *$mn2 *$mw2" {
incr lmatches
exp_continue
}
......@@ -344,7 +322,7 @@ expect {
incr lmatches
exp_continue
}
-re "$fs2 *$gm2 *$gc2 *$gj2 *$gs2 *$gn2 *$gw2 *$mm2 *$mc2 *$mj2 *$ms2 *$mn2 *$mw2" {
-re "$fs2 *$gc2 *$gj2 *$gs2 *$gn2 *$mm2 *$mc2 *$mj2 *$ms2 *$mn2 *$mw2" {
incr lmatches
exp_continue
}
......
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