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
5f9b5552
Commit
5f9b5552
authored
14 years ago
by
Don Lipari
Browse files
Options
Downloads
Patches
Plain Diff
Enhanced expect/test7.13 to test DerivedExitCode
parent
8c1db784
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/test7.13
+29
-10
29 additions, 10 deletions
testsuite/expect/test7.13
with
29 additions
and
10 deletions
testsuite/expect/test7.13
+
29
−
10
View file @
5f9b5552
...
...
@@ -50,9 +50,15 @@ exec $bin_cc -O -o $file_prog2 ${file_prog2}.c
#
# Submit a script that returns a successful exit code and confirm that
# the job record's ExitCode reflects this value. The successful and failed
# job steps should have no influence on the job's exit value.
# the job record's ExitCode reflects this value. $file_prog1 returns a
# successful error code (0) and $file_prog2 returns an unsuccessful
# error code (123).
#
# The failed job step should have no influence on the job's ExitCode
# value. However the DerivedExitCode value should be set to the
# highest value of all the job steps, in this case, 123.
#
make_bash_script $file_in "
$bin_echo 'testing successful job return code'
$srun $file_prog1
...
...
@@ -88,12 +94,16 @@ if {[wait_for_job $job_id "DONE"] != 0} {
# Confirm correct ExitCode setting in job record
#
set matches 0
spawn $scontrol show job $job_id
spawn $scontrol
--detail
show job $job_id
expect {
-re "ExitCode=0:0" {
incr matches
exp_continue
}
-re "DerivedExitCode=123:0" {
incr matches
exp_continue
}
timeout {
send_user "\nFAILURE: scontrol not responding\n"
exit 1
...
...
@@ -103,7 +113,7 @@ expect {
}
}
if {$matches !=
1
} {
if {$matches !=
2
} {
send_user "\nFAILURE: Job ExitCode incorrect\n"
exit 1
}
...
...
@@ -136,15 +146,20 @@ if {$fini != 1} {
}
#
# Now submit a script that returns a non-zero exit code and confirm that
# the job record's ExitCode reflects this value. The successful and failed
# job steps should have no influence on the job's exit value.
# Now submit a script that returns a non-zero exit code and confirm
# that the job record's ExitCode reflects this value. The two
# successful job steps ($file_prog1 from above) should have no
# influence on the job's, unsuccessful ExitCode.
#
# Here, the DerivedExitCode value should be set to the highest value
# of the two successful job steps (i.e., 0).
#
exec $bin_rm -f $file_in $file_out
make_bash_script $file_in "
$bin_echo 'testing unsuccessful job return code'
$srun $file_prog1
$srun $file_prog
2
$srun $file_prog
1
exit 33
"
...
...
@@ -176,12 +191,16 @@ if {[wait_for_job $job_id "DONE"] != 0} {
# Confirm correct ExitCode setting in job record
#
set matches 0
spawn $scontrol show job $job_id
spawn $scontrol
--detail
show job $job_id
expect {
-re "ExitCode=33:0" {
incr matches
exp_continue
}
-re "DerivedExitCode=0:0" {
incr matches
exp_continue
}
timeout {
send_user "\nFAILURE: scontrol not responding\n"
exit 1
...
...
@@ -191,7 +210,7 @@ expect {
}
}
if {$matches !=
1
} {
if {$matches !=
2
} {
send_user "\nFAILURE: Job ExitCode incorrect\n"
exit 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