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
2209288e
Commit
2209288e
authored
15 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
Additional tests for reservations added from Eric Lin (Group Bull)
parent
26c74966
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/test3.11
+89
-10
89 additions, 10 deletions
testsuite/expect/test3.11
with
89 additions
and
10 deletions
testsuite/expect/test3.11
+
89
−
10
View file @
2209288e
...
...
@@ -37,6 +37,7 @@ set test_id "3.11"
set file_in "test$test_id.input"
set exit_code 0
set res_name ""
set res_name_save ""
set user_name ""
set def_partition ""
set def_node ""
...
...
@@ -75,15 +76,7 @@ proc create_res { res_params failure_expected } {
set ret_code 1
exp_continue
}
-re "Error" {
if {!$failure_expected} {
send_user "\nFAILURE: problem creating "
send_user "reservation with args: $res_params\n"
}
set ret_code 1
exp_continue
}
-re "error" {
-nocase "Error" {
if {!$failure_expected} {
send_user "\nFAILURE: problem creating "
send_user "reservation with args: $res_params\n"
...
...
@@ -330,7 +323,7 @@ foreach test $goodtests {
}
}
spawn $scontrol show res
#
# TEST 2
# Create a reservation and update it in various ways
...
...
@@ -517,6 +510,92 @@ if {$user_name != "root"} {
}
}
#
# TEST 5
# Test node reservation conflict
#
# Make the reservation
set ret_code [create_res "StartTime=now+60minutes Duration=60 Nodes=ALL user=$user_name" 0]
if {$ret_code != 0} {
send_user "\nFAILURE: Unable to create a valid reservation\n"
exit $ret_code
}
set res_name_save $res_name
# Test for node reservation conflict
set ret_code [create_res "StartTime=now+60minutes Duration=60 NodeCnt=1 user=$user_name" 1]
if {$ret_code == 0} {
send_user "\nFAILURE: Reservation $test did not fail but should have\n"
delete_res $res_name
exit 1
} else {
send_user "Expected error. You can turn that frown upside-down.\n"
}
# Delete the reservation
set ret_code [delete_res $res_name_save]
if {$ret_code != 0} {
exit $ret_code
}
#
# TEST 6
# Test time reservation conflict
#
# Make the reservation
set ret_code [create_res "StartTime=now+60minutes Duration=60 Nodes=ALL user=$user_name" 0]
if {$ret_code != 0} {
send_user "\nFAILURE: Unable to create a valid reservation\n"
exit $ret_code
}
set res_name_save $res_name
# Test for time reservation conflict (front overlap)
set ret_code [create_res "StartTime=now+30minutes Duration=60 Nodes=ALL user=$user_name" 1]
if {$ret_code == 0} {
send_user "\nFAILURE: Reservation $test did not fail but should have\n"
delete_res $res_name
exit 1
} else {
send_user "Expected error. You can turn that frown upside-down.\n"
}
# Delete the reservation
set ret_code [delete_res $res_name_save]
if {$ret_code != 0} {
exit $ret_code
}
# Make the reservation
set ret_code [create_res "StartTime=now+30minutes Duration=60 Nodes=ALL user=$user_name" 0]
if {$ret_code != 0} {
send_user "\nFAILURE: Unable to create a valid reservation\n"
exit $ret_code
}
set res_name_save $res_name
# Test for time reservation conflict (trail overlap)
set ret_code [create_res "StartTime=now+60minutes Duration=60 Nodes=ALL user=$user_name" 1]
if {$ret_code == 0} {
send_user "\nFAILURE: Reservation $test did not fail but should have\n"
delete_res $res_name
exit 1
} else {
send_user "Expected error. You can turn that frown upside-down.\n"
}
# Delete the reservation
set ret_code [delete_res $res_name_save]
if {$ret_code != 0} {
exit $ret_code
}
#
# Remove the temporary job script
exec $bin_rm -f $file_in
...
...
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