Skip to content
Snippets Groups Projects
Commit e2fd607f authored by Moe Jette's avatar Moe Jette
Browse files

Tweak the test for error handling.

parent 0091d6d3
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# "FAILURE: ..." otherwise with an explanation of the failure, OR # "FAILURE: ..." otherwise with an explanation of the failure, OR
# anything else indicates a failure mode that must be investigated. # anything else indicates a failure mode that must be investigated.
############################################################################ ############################################################################
# Copyright (C) 2005 The Regents of the University of California. # Copyright (C) 2005-2006 The Regents of the University of California.
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
# Written by Morris Jette <jette1@llnl.gov> # Written by Morris Jette <jette1@llnl.gov>
# UCRL-CODE-217948. # UCRL-CODE-217948.
...@@ -40,7 +40,7 @@ print_header $test_id ...@@ -40,7 +40,7 @@ print_header $test_id
# Report the slurm network and use it to establish window parameters # Report the slurm network and use it to establish window parameters
# #
# windows_per_node - switch windows available per node # windows_per_node - switch windows available per node
# windows_interations - job steps to run after initial switch window allocation # windows_iterations - job steps to run after initial switch window allocation
# for a persistent job step # for a persistent job step
# windows_used - switch windows to use per job step # windows_used - switch windows to use per job step
# step_delay - run time of persistent job step (seconds) # step_delay - run time of persistent job step (seconds)
...@@ -51,21 +51,21 @@ spawn $scontrol show config ...@@ -51,21 +51,21 @@ spawn $scontrol show config
expect { expect {
-re "switch/elan" { -re "switch/elan" {
set windows_per_node 2048 set windows_per_node 2048
set windows_interations 50 set windows_iterations 50
set windows_used 48 set windows_used 48
set step_delay 10 set step_delay 10
exp_continue exp_continue
} }
-re "switch/federation" { -re "switch/federation" {
set windows_per_node 16 set windows_per_node 16
set windows_interations 32 set windows_iterations 32
set windows_used 2 set windows_used 2
set step_delay 10 set step_delay 10
exp_continue exp_continue
} }
-re "switch/none" { -re "switch/none" {
set windows_per_node 0 set windows_per_node 0
set windows_interations 5 set windows_iterations 5
set windows_used 4 set windows_used 4
set step_delay 5 set step_delay 5
exp_continue exp_continue
...@@ -101,23 +101,34 @@ expect -re $prompt ...@@ -101,23 +101,34 @@ expect -re $prompt
send "$srun -N1 -O -n$windows_used $bin_sleep $step_delay &\n" send "$srun -N1 -O -n$windows_used $bin_sleep $step_delay &\n"
# start more job steps to check see if any switch window conflicts occur # start more job steps to check see if any switch window conflicts occur
for {set inx 0} {$inx < $windows_interations} {incr inx} { for {set inx 0} {$inx < $windows_iterations} {incr inx} {
expect { expect {
-re "error" { -re "error" {
send_user "\nFAILURE: some error occurred\n" send_user "\nFAILURE: some error occurred\n"
set exit_code 1 set exit_code 1
exp_continue exp_continue
} }
-re $prompt -re $prompt {
} send_user "spawning step $inx\n"
send_user "got $inx\n" send "$srun -N1 -O -n$windows_used true\n"
send "$srun -N1 -O -n$windows_used true\n" }
timeout {
send_user "\nFAILURE: srun (from --allocate) not responding\n"
kill_srun
set exit_code 1
}
eof {
send_user "\nFAILURE: srun aborted\n"
set exit_code 1
wait
}
}
} }
# wait for initial job step to complete # wait for initial job step to complete
expect -re $prompt expect -re $prompt
send_user "(sleeping for $step_delay seconds) " send_user "(sleeping for $step_delay seconds, for job step zero to complete) "
#sleep $step_delay exec $bin_sleep $step_delay
send "exit\n" send "exit\n"
expect { expect {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment