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
2ed444c0
Commit
2ed444c0
authored
10 years ago
by
Morris Jette
Browse files
Options
Downloads
Patches
Plain Diff
More hardening of tests
parent
21586409
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testsuite/expect/test1.64
+1
-0
1 addition, 0 deletions
testsuite/expect/test1.64
testsuite/expect/test5.9
+45
-11
45 additions, 11 deletions
testsuite/expect/test5.9
with
46 additions
and
11 deletions
testsuite/expect/test1.64
+
1
−
0
View file @
2ed444c0
...
@@ -57,6 +57,7 @@ set srun_pid [spawn $srun -N1 -t1 --begin=noon -v $bin_sleep 1]
...
@@ -57,6 +57,7 @@ set srun_pid [spawn $srun -N1 -t1 --begin=noon -v $bin_sleep 1]
expect {
expect {
-re "queued and waiting for resources" {
-re "queued and waiting for resources" {
incr matches
incr matches
sleep 1
exec $bin_kill -INT $srun_pid
exec $bin_kill -INT $srun_pid
send_user "\nSent SIGINT\n"
send_user "\nSent SIGINT\n"
exp_continue
exp_continue
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test5.9
+
45
−
11
View file @
2ed444c0
...
@@ -36,10 +36,10 @@ source ./globals_accounting
...
@@ -36,10 +36,10 @@ source ./globals_accounting
set test_id "5.9"
set test_id "5.9"
set exit_code 0
set exit_code 0
set job_id 0
set job_id 0
set file_err "/tmp/test${test_id}err"
set file_err "/tmp/test${test_id}
_
err"
set file_in "test$test_id
\
_script"
set file_in "test$
{
test_id
}
_script"
set file_out "/tmp/test${test_id}out"
set file_out "/tmp/test${test_id}
_
out"
set test_acct "test${test_id}acct"
set test_acct "test${test_id}
_
acct"
############################Job Format Test############################
############################Job Format Test############################
...
@@ -230,15 +230,44 @@ expect {
...
@@ -230,15 +230,44 @@ expect {
}
}
}
}
if {[wait_for_job $job_id RUNNING] != 0} {
send_user "\nFAILURE: error waiting for job $job_id to start\n"
set exit_code 1
}
# The number of allocated CPUs can vary depending upon the allocation unit
set match 0
spawn $scontrol show job $job_id
expect {
-re "NumCPUs=($number)" {
set sq_format(3) $expect_out(1,string)
incr match 1
exp_continue
}
timeout {
send_user "\nFAILURE: scontrol is not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$match != 1} {
send_user "\nFAILURE: scontrol did not provide correct job values ($match != 1)\n"
set exit_code 1
}
set match 0
set match 0
set cpu_match 0
set cpu_match 0
set numcpus [expr $sq_format(3) * $sq_format(8)]
set numcpus [expr $sq_format(3) * $sq_format(8)]
for {set i 0} {$i<=19} {incr i 1} {
for {set i 0} {$i<=19} {incr i 1} {
set this_match 0
spawn $squeue --job=$job_id --noheader -O$sq_name($i)
spawn $squeue --job=$job_id --noheader -O$sq_name($i)
expect {
expect {
-re "$sq_format($i)" {
-re "$sq_format($i)" {
# send_user "Match $sq_name($i) with $sq_format($i)\n"
# send_user "Match $sq_name($i) with $sq_format($i)\n"
incr match 1
incr match 1
incr this_match 1
exp_continue
exp_continue
}
}
timeout {
timeout {
...
@@ -249,6 +278,10 @@ for {set i 0} {$i<=19} {incr i 1} {
...
@@ -249,6 +278,10 @@ for {set i 0} {$i<=19} {incr i 1} {
wait
wait
}
}
}
}
if {$this_match == 0} {
send_user "\nFAILURE: failed to match $sq_name($i) with $sq_format($i)\n"
set exit_code 1
}
}
}
if {$match != $i} {
if {$match != $i} {
send_user "\nFAILURE: not all squeue outputs match ($match != $i)\n"
send_user "\nFAILURE: not all squeue outputs match ($match != $i)\n"
...
@@ -329,12 +362,8 @@ set sq_step_format(8) "DUMMY"
...
@@ -329,12 +362,8 @@ set sq_step_format(8) "DUMMY"
# username
# username
set sq_step_format(9) $sq_format(16)
set sq_step_format(9) $sq_format(16)
# Wait a bit for the step to start
sleep 2
set match 0
set match 0
#spawn $scontrol show step $sq_step_format(1)
spawn $scontrol show step $sq_step_format(1)
spawn $scontrol show step
expect {
expect {
-re "State=($alpha_under)" {
-re "State=($alpha_under)" {
set sq_step_format(3) $expect_out(1,string)
set sq_step_format(3) $expect_out(1,string)
...
@@ -352,14 +381,13 @@ expect {
...
@@ -352,14 +381,13 @@ expect {
exp_continue
exp_continue
}
}
timeout {
timeout {
send_user "\nFAILURE: s
queue
is not responding\n"
send_user "\nFAILURE: s
control
is not responding\n"
set exit_code 1
set exit_code 1
}
}
eof {
eof {
wait
wait
}
}
}
}
if {$match != 3} {
if {$match != 3} {
send_user "\nFAILURE: scontrol did not provide correct step values ($match != 3)\n"
send_user "\nFAILURE: scontrol did not provide correct step values ($match != 3)\n"
set exit_code 1
set exit_code 1
...
@@ -368,11 +396,13 @@ if {$match != 3} {
...
@@ -368,11 +396,13 @@ if {$match != 3} {
set match 0
set match 0
set cpu_match 0
set cpu_match 0
for {set i 0} {$i<=9} {incr i 1} {
for {set i 0} {$i<=9} {incr i 1} {
set this_match 0
spawn $squeue --step=$sq_step_format(1) --noheader -O$sq_step_name($i)
spawn $squeue --step=$sq_step_format(1) --noheader -O$sq_step_name($i)
expect {
expect {
-re "$sq_step_format($i)" {
-re "$sq_step_format($i)" {
# send_user "Match $sq_step_name($i) with $sq_step_format($i)\n"
# send_user "Match $sq_step_name($i) with $sq_step_format($i)\n"
incr match 1
incr match 1
incr this_match 1
exp_continue
exp_continue
}
}
timeout {
timeout {
...
@@ -383,6 +413,10 @@ for {set i 0} {$i<=9} {incr i 1} {
...
@@ -383,6 +413,10 @@ for {set i 0} {$i<=9} {incr i 1} {
wait
wait
}
}
}
}
if {$this_match == 0} {
send_user "\nFAILURE: failed to match $sq_step_name($i) with $sq_step_format($i)\n"
set exit_code 1
}
}
}
if {$match != $i} {
if {$match != $i} {
...
...
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