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
47772cc9
Commit
47772cc9
authored
16 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Make testing more rigorous in terms of testing for WCKey values being set
parent
fd7b4079
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
testsuite/expect/globals
+30
-0
30 additions, 0 deletions
testsuite/expect/globals
testsuite/expect/test21.23
+4
-11
4 additions, 11 deletions
testsuite/expect/test21.23
testsuite/expect/test21.24
+16
-3
16 additions, 3 deletions
testsuite/expect/test21.24
with
50 additions
and
14 deletions
testsuite/expect/globals
+
30
−
0
View file @
47772cc9
...
...
@@ -533,6 +533,36 @@ proc test_assoc_enforced { } {
return $assoc_enforced
}
################################################################
#
# Proc: test_track_wckey
#
# Purpose: Determine if we track workload characterization keys.
# This is based upon the value of TrackWCKey in the slurm.conf.
#
# Returns value of TrackWCKey
#
################################################################
proc test_track_wckey { } {
global scontrol number
log_user 0
set track_wckey 0
spawn $scontrol show config
expect {
-re "TrackWCKey *= ($number)" {
set track_wckey $expect_out(1,string)
exp_continue
}
eof {
wait
}
}
log_user 1
return $track_wckey
}
################################################################
# Proc: test_wiki_sched
#
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test21.23
+
4
−
11
View file @
47772cc9
...
...
@@ -46,6 +46,10 @@ if { [test_account_storage] == 0 } {
send_user "\nWARNING: This test can't be run without a usable AccountStorageType\n"
exit 0
}
if { [test_track_wckey] == 0} {
send_user "\nWARNING: This test can't be run without TrackWCKey being set\n"
exit 0
}
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 set admin=admin.\n"
...
...
@@ -133,7 +137,6 @@ expect {
# Spawn a job via salloc using this wckey
#
set job_id 0
set have_wckey 0
set matches 0
set timeout $max_job_delay
spawn $salloc -N1 --account=$test_acct --wckey=$wk
...
...
@@ -145,14 +148,9 @@ expect {
exp_continue
}
-re "WCKey=$wk" {
incr have_wckey
incr matches
exp_continue
}
-re "WCKey=" {
incr have_wckey
exp_continue
}
timeout {
send_user "\nFAILURE: salloc not responding\n"
set exit_code 1
...
...
@@ -161,11 +159,6 @@ expect {
wait
}
}
if {$have_wckey == 0} {
send_user "\nWARNING: TrackWCKey is disabled, can not continue test\n"
exec $sacctmgr -i delete account $test_acct
exit $exit_code
}
spawn $sacct -j $job_id --fields=wckey
expect {
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test21.24
+
16
−
3
View file @
47772cc9
...
...
@@ -220,6 +220,7 @@ if { [test_account_storage] == 0 } {
send_user "\nWARNING: This test can't be run without a usable AccountStorageType\n"
exit 0
}
set track_wckey [test_track_wckey]
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"
...
...
@@ -1435,7 +1436,11 @@ expect {
# Same as above, but without DefaultWCKey= or WCKeys=
-re "($usr - $us3:$dac='$nm3':$al='$ala':$fs=$fs3:$gm=$gm3:$gc=$gc3:$gj=$gj3:$gn=$gn3:$gs=$gs3:$gw=$gw3:$mp=$mm3:$mu=$mc3:$mj=$mj3:$mnj=$mn3:$ms=$ms3:$md=$mw3:$qs='$qs2')" {
send_user "\nmatch 5b\n"
incr matches
if {$track_wckey == 0} {
incr matches
} else {
send_user "\nFAILURE: Missing DefaultWCKey or WCKeys\n"
}
exp_continue
}
...
...
@@ -1473,7 +1478,11 @@ expect {
# Same as above but without DefaultWCKey= or WCKeys=
-re "($usr - $us1:$dac='$nm2':$fs=$fs1:$gm=$gm1:$gc=$gc1:$gj=$gj1:$gn=$gn1:$gs=$gs1:$gw=$gw1:$mp=$mm1:$mu=$mc1:$mj=$mj1:$mnj=$mn1:$ms=$ms1:$md=$mw1:$qs='$qs2')" {
send_user "\nmatch 10b\n"
incr matches
if {$track_wckey == 0} {
incr matches
} else {
send_user "\nFAILURE: Missing DefaultWCKey or WCKeys\n"
}
exp_continue
}
...
...
@@ -1486,7 +1495,11 @@ expect {
# Same as above but without DefaultWCKey= or WCKeys=
-re "($usr - $us2:$dac='$nm2':$al='$alo':$fs=$fs2:$gm=$gm2:$gc=$gc2:$gj=$gj2:$gn=$gn2:$gs=$gs2:$gw=$gw2:$mp=$mm2:$mu=$mc2:$mj=$mj2:$mnj=$mn2:$ms=$ms2:$md=$mw2:$qs='$qs2')" {
send_user "\nmatch 11b\n"
incr matches
if {$track_wckey == 0} {
incr matches
} else {
send_user "\nFAILURE: Missing DefaultWCKey or WCKeys\n"
}
exp_continue
}
...
...
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