Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
3fc37a4e
Commit
3fc37a4e
authored
14 years ago
by
Joseph P. Donaghy
Browse files
Options
Downloads
Patches
Plain Diff
Edit for extraneous variables and error messages.
parent
97b5d2aa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testsuite/expect/test21.20
+50
-91
50 additions, 91 deletions
testsuite/expect/test21.20
with
50 additions
and
91 deletions
testsuite/expect/test21.20
+
50
−
91
View file @
3fc37a4e
...
...
@@ -34,64 +34,23 @@
source ./globals_accounting
set test_id "test21.20"
set test_nu "test21-20"
set exit_code 0
set clu cluster
set tc1 [format "%s%s" $test_nu "clus1"]
set tc2 [format "%s%s" $test_nu "clus2"]
set tc3 [format "%s%s" $test_nu "clus3"]
set fs1 2500
set fs2 1700
set fs3 1
set mc1 1000000
set mc2 700000
set mc3 1
set mj1 50
set mj2 70
set mj3 1
set mn1 300
set mn2 700
set mn3 1
set mw1 01:00:00
set mw2 00:07:00
set mw3 00:01:00
set acc account
set nams names
set nm1 [format "%s%s" $test_nu "acct1"]
set nm2 [format "%s%s" $test_nu "acct2"]
set nm3 [format "%s%s" $test_nu "acct3"]
set des Description
set ds1 testaccounta1
set ds2 testacct
set org Organization
set or1 accountorga1
set or2 acttrg
set tc1 slurm_test-cluster.1
set tc2 slurm_test-cluster.2
set tc3 slurm_test-cluster.3
set ta1 slurm_test-account.1
set ta2 slurm_test-account.2
set ta3 slurm_test-account.3
set qs QosLevel
set qs1 tnormal
set qs2 texpedite
set qs3 tstandby
set par parent
set usr user
set us1 [format "%s%s" $test_nu "user1"]
set us2 [format "%s%s" $test_nu "user2"]
set us3 [format "%s%s" $test_nu "user3"]
set al AdminLevel
set aln None
set ala Administrator
set tu1 slurm_test-user.1
set tu2 slurm_test-user.2
set tu3 slurm_test-user.3
set alo Operator
set dac DefaultAccount
set pts Partitions
set fs fairshare
set mc maxcpu
set mj maxjob
set mn maxnode
set mw maxwall
set dbu debug
set was withassoc
set access_err 0
#set user_name "id -u -n"
print_header $test_id
set timeout 60
...
...
@@ -110,8 +69,8 @@ if { [string compare [check_accounting_admin_level] "Administrator"] } {
}
#make sure we have a clean system and permission to do this work
remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"
remove_acct "" "$
nm
1,$
nm
2,$
nm
3"
remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"
remove_acct "" "$
ta
1,$
ta
2,$
ta
3"
remove_qos "$qs1,$qs2,$qs3"
remove_cluster "$tc1,$tc2,$tc3"
if {$access_err != 0} {
...
...
@@ -122,8 +81,8 @@ if {$access_err != 0} {
#add cluster
incr exit_code [add_cluster "$tc1,$tc2,$tc3" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"
remove_acct "" "$
nm
1,$
nm
2,$
nm
3"
remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"
remove_acct "" "$
ta
1,$
ta
2,$
ta
3"
remove_qos "$qs1,$qs2,$qs3"
remove_cluster "$tc1,$tc2,$tc3"
exit $exit_code
...
...
@@ -132,18 +91,18 @@ if { $exit_code } {
#add qos
incr exit_code [add_qos "$qs1,$qs2,$qs3"]
if { $exit_code } {
remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"
remove_acct "" "$
nm
1,$
nm
2,$
nm
3"
remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"
remove_acct "" "$
ta
1,$
ta
2,$
ta
3"
remove_qos "$qs1,$qs2,$qs3"
remove_cluster "$tc1,$tc2,$tc3"
exit $exit_code
}
#add accounts
incr exit_code [add_acct "$tc1,$tc2,$tc3" "" "$
nm
1,$
nm
2,$
nm
3" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
incr exit_code [add_acct "$tc1,$tc2,$tc3" "" "$
ta
1,$
ta
2,$
ta
3" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"
remove_acct "" "$
nm
1,$
nm
2,$
nm
3"
remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"
remove_acct "" "$
ta
1,$
ta
2,$
ta
3"
remove_qos "$qs1,$qs2,$qs3"
remove_cluster "$tc1,$tc2,$tc3"
exit $exit_code
...
...
@@ -152,10 +111,10 @@ if { $exit_code } {
#add users
# cluster account name part admin dacct dwckey wckey qos fairshare grpcpumin grpcpu grpjob grpnode grpsubmit grpwall maxcpumin maxcpu maxjob maxnode maxsubmit maxwall
incr exit_code [add_user "$tc1,$tc2,$tc3" "$
nm
1,$
nm
2,$
nm
3" $u
s
1,$u
s
2,$u
s
3 "" "$alo" "$
nm
2" "" "" "$qs1,$qs2" "" "" "" "" "" "" "" "" "" "" "" "" ""]
incr exit_code [add_user "$tc1,$tc2,$tc3" "$
ta
1,$
ta
2,$
ta
3" $
t
u1,$
t
u2,$
t
u3 "" "$alo" "$
ta
2" "" "" "$qs1,$qs2" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"
remove_acct "" "$
nm
1,$
nm
2,$
nm
3"
remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"
remove_acct "" "$
ta
1,$
ta
2,$
ta
3"
remove_qos "$qs1,$qs2,$qs3"
remove_cluster "$tc1,$tc2,$tc3"
exit $exit_code
...
...
@@ -165,13 +124,13 @@ if { $exit_code } {
# Use sacctmgr to list the test qos additions
#
set matches 0
set my_pid [spawn $sacctmgr -n -p list user format="User,QosLevel" names=$u
s
1,$u
s
2,$
us3 $was
]
set my_pid [spawn $sacctmgr -n -p list user format="User,QosLevel" names=$
t
u1,$
t
u2,$
tu3 withassoc
]
expect {
-re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
incr exit_code 1
}
-re "(($u
s
1|$u
s
2|$u
s
3).($qs1|$qs2))." {
-re "(($
t
u1|$
t
u2|$
t
u3).($qs1|$qs2))." {
incr matches
exp_continue
}
...
...
@@ -186,7 +145,7 @@ expect {
}
if {$matches != 27} {
send_user "\nFAILURE: Account addition
1
incorrect with only $matches.\n"
send_user "\nFAILURE: Account addition
27
incorrect with only $matches.\n"
incr exit_code 1
}
...
...
@@ -195,10 +154,10 @@ if {$matches != 27} {
# cluster account name part wadmin wdacct wdwckey qos fairshare grpcpumin grpcpu grpjob grpnode grpsubmit grpwall maxcpumin maxcpu maxjob maxnode maxsubmit maxwall admin dacct dwckey
#
incr exit_code [mod_user "$tc1,$tc2,$tc3" "$
nm
2" $u
s
1 "" "" "" "" "$qs3" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
incr exit_code [mod_user "$tc1,$tc2,$tc3" "$
ta
2" $
t
u1 "" "" "" "" "$qs3" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"
remove_acct "" "$
nm
1,$
nm
2,$
nm
3"
remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"
remove_acct "" "$
ta
1,$
ta
2,$
ta
3"
remove_qos "$qs1,$qs2,$qs3"
remove_cluster "$tc1,$tc2,$tc3"
exit $exit_code
...
...
@@ -208,17 +167,17 @@ if { $exit_code } {
# Use sacctmgr to list the test qos modifications
#
set matches 0
set my_pid [spawn $sacctmgr -n -p list user format="User,QosLevel" names=$u
s
1,$u
s
2,$
us3 $was
]
set my_pid [spawn $sacctmgr -n -p list user format="User,QosLevel" names=$
t
u1,$
t
u2,$
tu3 withassoc
]
expect {
-re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
incr exit_code 1
}
-re "$u
s
1.$qs3." {
-re "$
t
u1.$qs3." {
incr matches
exp_continue
}
-re "($u
s
2|$u
s
3).$qs2.$qs1." {
-re "($
t
u2|$
t
u3).$qs2.$qs1." {
incr matches
exp_continue
}
...
...
@@ -233,7 +192,7 @@ expect {
}
if {$matches != 21} {
send_user "\nFAILURE: Account addition 1 incorrect with only $matches.\n"
send_user "\nFAILURE: Account addition
2
1 incorrect with only $matches.\n"
incr exit_code 1
}
...
...
@@ -241,10 +200,10 @@ if {$matches != 21} {
# account adminlevel cluster defaultaccount qoslevel name
# qoslevel waccounts wcluster wnames
#
incr exit_code [mod_user "$tc1,$tc2,$tc3" "$
nm
2" $u
s
2 "" "" "" "" "+$qs3" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
incr exit_code [mod_user "$tc1,$tc2,$tc3" "$
ta
2" $
t
u2 "" "" "" "" "+$qs3" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"
remove_acct "" "$
nm
1,$
nm
2,$
nm
3"
remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"
remove_acct "" "$
ta
1,$
ta
2,$
ta
3"
remove_qos "$qs1,$qs2,$qs3"
remove_cluster "$tc1,$tc2,$tc3"
exit $exit_code
...
...
@@ -254,21 +213,21 @@ if { $exit_code } {
# Use sacctmgr to list the test qos modifications
#
set matches 0
set my_pid [spawn $sacctmgr -n -p list user format="User,QosLevel" names=$u
s
1,$u
s
2,$
us3 $was
]
set my_pid [spawn $sacctmgr -n -p list user format="User,QosLevel" names=$
t
u1,$
t
u2,$
tu3 withassoc
]
expect {
-re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
incr exit_code 1
}
-re "$u
s
1.$qs3." {
-re "$
t
u1.$qs3." {
incr matches
exp_continue
}
-re "$u
s
2.$qs2.$qs1.$qs3." {
-re "$
t
u2.$qs2.$qs1.$qs3." {
incr matches
exp_continue
}
-re "$u
s
3.$qs2.$qs1." {
-re "$
t
u3.$qs2.$qs1." {
incr matches
exp_continue
}
...
...
@@ -283,7 +242,7 @@ expect {
}
if {$matches != 15} {
send_user "\nFAILURE: Account addition 1 incorrect with only $matches.\n"
send_user "\nFAILURE: Account addition 1
5
incorrect with only $matches.\n"
incr exit_code 1
}
...
...
@@ -292,10 +251,10 @@ if {$matches != 15} {
# account adminlevel cluster defaultaccount qoslevel name
# qoslevel waccounts wcluster wnames
#
incr exit_code [mod_user "$tc1,$tc2,$tc3" "$
nm
2" $u
s
3 "" "" "" "" "-$qs2" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
incr exit_code [mod_user "$tc1,$tc2,$tc3" "$
ta
2" $
t
u3 "" "" "" "" "-$qs2" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"
remove_acct "" "$
nm
1,$
nm
2,$
nm
3"
remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"
remove_acct "" "$
ta
1,$
ta
2,$
ta
3"
remove_qos "$qs1,$qs2,$qs3"
remove_cluster "$tc1,$tc2,$tc3"
exit $exit_code
...
...
@@ -305,21 +264,21 @@ if { $exit_code } {
# Use sacctmgr to list the test qos modifications
#
set matches 0
set my_pid [spawn $sacctmgr -n -p list user format="User,QosLevel" names=$u
s
1,$u
s
2,$
us3 $was
]
set my_pid [spawn $sacctmgr -n -p list user format="User,QosLevel" names=$
t
u1,$
t
u2,$
tu3 withassoc
]
expect {
-re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
incr exit_code 1
}
-re "$u
s
1.$qs3." {
-re "$
t
u1.$qs3." {
incr matches
exp_continue
}
-re "$u
s
2.$qs2.$qs1.$qs3." {
-re "$
t
u2.$qs2.$qs1.$qs3." {
incr matches
exp_continue
}
-re "$u
s
3.$qs1." {
-re "$
t
u3.$qs1." {
incr matches
exp_continue
}
...
...
@@ -334,19 +293,19 @@ expect {
}
if {$matches != 9} {
send_user "\nFAILURE: Account addition
1
incorrect with only $matches.\n"
send_user "\nFAILURE: Account addition
9
incorrect with only $matches.\n"
incr exit_code 1
}
# This is the end below here
incr exit_code [remove_user "" "" "$u
s
1,$u
s
2,$u
s
3"]
incr exit_code [remove_acct "" "$
nm
1,$
nm
2,$
nm
3"]
incr exit_code [remove_user "" "" "$
t
u1,$
t
u2,$
t
u3"]
incr exit_code [remove_acct "" "$
ta
1,$
ta
2,$
ta
3"]
incr exit_code [remove_qos "$qs1,$qs2,$qs3"]
incr exit_code [remove_cluster "$tc1,$tc2,$tc3"]
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
print_success $test_id
} else {
send_user "\nFAILURE\n"
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment