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
82f9bf44
Commit
82f9bf44
authored
10 years ago
by
Morris Jette
Browse files
Options
Downloads
Patches
Plain Diff
test hardening
parent
b8e226ba
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
+19
-4
19 additions, 4 deletions
testsuite/expect/globals
testsuite/expect/test2.18
+5
-2
5 additions, 2 deletions
testsuite/expect/test2.18
testsuite/expect/test2.19
+8
-2
8 additions, 2 deletions
testsuite/expect/test2.19
with
32 additions
and
8 deletions
testsuite/expect/globals
+
19
−
4
View file @
82f9bf44
...
...
@@ -2652,22 +2652,37 @@ proc get_node_cnt_in_part { partition } {
################################################################
proc get_idle_node_in_part { partition } {
global s
info
alpha_numeric_under
global s
control sinfo alpha_numeric_nodelist
alpha_numeric_under
log_user 0
set
node_name
""
s
et scon_pid [spawn -noecho
$sinfo -oNAME=%
n
-h -p$partition --state=idle
]
set
host_list
""
s
pawn
$sinfo -oNAME=%
N
-h -p$partition --state=idle
expect {
-re "not found" {
send_user "\nFAILURE: partition $partition doesn't exist\n"
}
-re "NAME=($alpha_numeric_under)" {
-re "NAME=($alpha_numeric_nodelist)" {
set host_list $expect_out(1,string)
}
timeout {
send_user "\nFAILURE: sinfo not responding\n"
}
eof {
wait
}
}
set node_name ""
spawn $scontrol show hostname $host_list
expect {
-re "($alpha_numeric_under)" {
set node_name $expect_out(1,string)
}
timeout {
send_user "\nFAILURE: scontrol not responding\n"
}
eof {
wait
}
}
log_user 1
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test2.18
+
5
−
2
View file @
82f9bf44
...
...
@@ -94,8 +94,7 @@ proc cleanup { } {
spawn $scontrol delete partition=$part_name
expect {
-re "error" {
send_user "\nFAILURE: scontrol did not remove "
"partition\n"
send_user "\nFAILURE: scontrol did not remove partition $part_name\n"
set exit_code 1
exp_continue
}
...
...
@@ -213,6 +212,10 @@ expect {
}
}
if { [string length $partition] == 0 } {
set partition [default_partition]
}
set node_name [ get_idle_node_in_part $partition ]
set cluster_name [ get_cluster_name ]
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test2.19
+
8
−
2
View file @
82f9bf44
...
...
@@ -53,7 +53,8 @@ if { [test_account_storage] == 0 } {
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"
send_user "\nWARNING: This test can't be run without being an Accounting administrator.\n"
send_user "Use sacctmgr mod user \$USER_NAME set admin=admin.\n"
exit 0
}
...
...
@@ -90,7 +91,8 @@ proc cleanup { } {
}
}
send_user "Any error, except for unresponsiveness, from the previous scancel is expected and should be ignored.\n"
send_user "Any error, except for unresponsiveness, from the previous "
send_user "scancel is expected and should be ignored.\n"
spawn $scontrol delete partition=$part_name
expect {
...
...
@@ -242,6 +244,10 @@ expect {
}
}
if { [string length $partition] == 0 } {
set partition [default_partition]
}
set node_name [ get_idle_node_in_part $partition ]
set cluster_name [ get_cluster_name ]
...
...
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