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
f289b799
Commit
f289b799
authored
16 years ago
by
Joseph P. Donaghy
Browse files
Options
Downloads
Patches
Plain Diff
Refined test to only add a cluster, but with all available options.
parent
e8014a2d
No related branches found
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.5
+43
-36
43 additions, 36 deletions
testsuite/expect/test21.5
with
43 additions
and
36 deletions
testsuite/expect/test21.5
+
43
−
36
View file @
f289b799
#!/usr/bin/expect
#!/usr/bin/expect
############################################################################
############################################################################
# Purpose: Test of SLURM functionality
# Purpose: Test of SLURM functionality
# sacctmgr add
, list, and delete
a cluster
# sacctmgr add a cluster
#
#
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
# "FAILURE: ..." otherwise with an explanation of the failure, OR
# "FAILURE: ..." otherwise with an explanation of the failure, OR
...
@@ -33,16 +33,28 @@ source ./globals
...
@@ -33,16 +33,28 @@ source ./globals
set test_id "21.5"
set test_id "21.5"
set exit_code 0
set exit_code 0
set amatches
0
set amatches 0
set lmatches
0
set lmatches 0
set dmatches
0
set dmatches 0
set not_support 0
set not_support 0
set add add
set add add
set lis list
set lis list
set del delete
set del delete
set mod modify
set mod modify
set nams Names
set nam Name
set fs Fairshare
set mc MaxCPUSecs
set mj MaxJobs
set mn MaxNodes
set mw MaxWall
set clu cluster
set clu cluster
set tc1 tCluster1
set tc1 tCluster1
set fs1 2500
set mc1 1000000
set mj1 50
set mn1 300
set mw1 01:00:00
print_header $test_id
print_header $test_id
...
@@ -50,57 +62,52 @@ print_header $test_id
...
@@ -50,57 +62,52 @@ print_header $test_id
#
#
# Use sacctmgr to create a cluster
# Use sacctmgr to create a cluster
#
#
set sadd_pid [spawn $sacctmgr $add $clu $
tc
1]
set sadd_pid [spawn $sacctmgr $add $clu $
nams=$tc1 $fs=$fs1 $mc=$mc1 $mj=$mj1 $mn=$mn1 $mw=$mw
1]
expect {
expect {
-re "Adding Cluster" {
-re "Adding Cluster" {
incr amatches
incr amatches
exp_continue
exp_continue
}
}
-re "
N
am
e
*= $tc1" {
-re "
$n
am *= $tc1" {
incr amatches
incr amatches
exp_continue
exp_continue
}
}
-re "
Would you like to commit changes\\\? \\\(You have 30 seconds to decide\\\)
" {
-re "
User Defaults
" {
incr amatches
incr amatches
exp_continue
exp_continue
}
}
-re "
\\\(N\\\/y\\\):
" {
-re "
$fs *= $fs1
" {
incr amatches
incr amatches
send "Y\r"
exp_continue
exp_continue
}
}
timeout {
-re "$mc *= $mc1" {
send_user "\nFAILURE: sacctmgr add not responding\n"
incr amatches
slow_kill $sadd_pid
exp_continue
set exit_code 1
}
}
eof {
-re "$mj *= $mj1" {
wait
incr amatches
exp_continue
}
}
}
-re "$mn *= $mn1" {
incr amatches
if {$amatches != 4} {
send_user "\nFAILURE: sacctmgr had a problem adding clusters\n"
set exit_code 1
}
#
# Use sacctmgr to list the addition of cluster
#
set slist_pid [spawn $sacctmgr $lis $clu $tc1]
expect {
-re "Name" {
incr lmatches
exp_continue
exp_continue
}
}
-re "$tc1" {
-re "$mw *= $mw1" {
incr lmatches
incr amatches
exp_continue
}
-re "Would you like to commit changes\\\? \\\(You have 30 seconds to decide\\\)" {
incr amatches
exp_continue
}
-re "\\\(N\\\/y\\\):" {
incr amatches
send "Y\r"
exp_continue
exp_continue
send_user "\nFound $tc1 in database\n"
}
}
timeout {
timeout {
send_user "\nFAILURE: sacctmgr
list
not responding\n"
send_user "\nFAILURE: sacctmgr
add
not responding\n"
slow_kill $s
list
_pid
slow_kill $s
add
_pid
set exit_code 1
set exit_code 1
}
}
eof {
eof {
...
@@ -108,8 +115,8 @@ expect {
...
@@ -108,8 +115,8 @@ expect {
}
}
}
}
if {$
l
matches !=
2
} {
if {$
a
matches !=
10
} {
send_user "\nFAILURE: sacctmgr had a problem
list
ing clusters\n"
send_user "\nFAILURE: sacctmgr had a problem
add
ing clusters\n"
set exit_code 1
set exit_code 1
}
}
...
...
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