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

Replace some kill_srun calls with slow_kill pid

parent 5a1d1d57
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ if {$got_login_grps == 0} {
# Submit a slurm job that will execute 'id'
#
set timeout $max_job_delay
spawn $srun -N1 -t1 $bin_id
set srun_pid [spawn $srun -N1 -t1 $bin_id]
expect {
-re "(uid=.*\n)" {
set job_grp_info $expect_out(1,string)
......@@ -79,7 +79,7 @@ expect {
}
timeout {
send_user "\nFAILURE: srun not responding\n"
kill_srun
slow_kill $srun_pid
set exit_code 1
exp_continue
}
......
......@@ -43,7 +43,7 @@ print_header $test_id
# Submit a slurm job that will execute 'id' on 1 node and over task_cnt tasks
#
set timeout $max_job_delay
spawn $srun -N1 -n$task_cnt --overcommit -l -t1 $bin_id
set srun_pid [spawn $srun -N1 -n$task_cnt --overcommit -l -t1 $bin_id]
expect {
-re "uid=" {
incr tasks
......@@ -51,7 +51,7 @@ expect {
}
timeout {
send_user "\nFAILURE: srun not responding\n"
kill_srun
slow_kill $srun_pid
set exit_code 1
exp_continue
}
......
......@@ -40,7 +40,7 @@ print_header $test_id
#
# Report the srun version number
#
spawn $srun -V
set srun_pid [spawn $srun -V]
expect {
-re "(slurm ($number)\.($number)\.($number).*\n)" {
incr version
......@@ -48,7 +48,7 @@ expect {
}
timeout {
send_user "\nFAILURE: srun not responding\n"
kill_srun
slow_kill $srun_pid
set exit_code 1
exp_continue
}
......
......@@ -40,7 +40,7 @@ print_header $test_id
#
# Report the srun usage format
#
spawn $srun --usage
set srun_pid [spawn $srun --usage]
expect {
-re "Usage: .* executable .*" {
incr matches
......@@ -48,7 +48,7 @@ expect {
}
timeout {
send_user "\nFAILURE: srun not responding\n"
kill_srun
slow_kill $srun_pid
set exit_code 1
exp_continue
}
......
......@@ -40,7 +40,7 @@ print_header $test_id
#
# Report the srun help message
#
spawn $srun --help
set srun_pid [spawn $srun --help]
expect {
-re "Usage:" {
incr matches
......@@ -56,7 +56,7 @@ expect {
}
timeout {
send_user "\nFAILURE: srun not responding\n"
kill_srun
slow_kill $srun_pid
set exit_code 1
exp_continue
}
......
......@@ -45,7 +45,7 @@ print_header $test_id
# Change working directory on execute line and then print where jobs runs
#
set timeout $max_job_delay
spawn $srun --chdir=$tmp_dir -t1 $bin_pwd
set srun_pid [spawn $srun --chdir=$tmp_dir -t1 $bin_pwd]
expect {
-re "$tmp_dir$end_of_line" {
set matches 1
......@@ -57,7 +57,7 @@ expect {
}
timeout {
send_user "\nFAILURE: srun not responding\n"
kill_srun
slow_kill $srun_pid
set exit_code 1
exp_continue
}
......
......@@ -84,11 +84,10 @@ expect {
}
timeout {
send_user "\nFAILURE: salloc not responding\n"
if {$job_id == 0} {
slow_kill $salloc_pid
} else {
if {$job_id != 0} {
cancel_job $job_id
}
slow_kill $salloc_pid
set exit_code 1
exp_continue
}
......
......@@ -116,11 +116,10 @@ expect {
}
timeout {
send_user "\nFAILURE: salloc not responding\n"
if {$job_id == 0} {
slow_kill $salloc_pid
} else {
if {$job_id != 0} {
cancel_job $job_id
}
slow_kill $salloc_pid
set exit_code 1
exp_continue
}
......@@ -143,11 +142,10 @@ expect {
}
timeout {
send_user "\nFAILURE: salloc not responding\n"
if {$job_id == 0} {
slow_kill $salloc_pid
} else {
if {$job_id != 0} {
cancel_job $job_id
}
slow_kill $salloc_pid
set exit_code 1
exp_continue
}
......
......@@ -60,11 +60,10 @@ expect {
}
timeout {
send_user "\nFAILURE: salloc not responding\n"
if {$job_id == 0} {
slow_kill $salloc_pid
} else {
if {$job_id != 0} {
cancel_job $job_id
]
}
slow_kill $salloc_pid
set exit_code 1
exp_continue
}
......
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