diff --git a/testsuite/expect/test12.2 b/testsuite/expect/test12.2 index a8691d8071e164949de06eecada43a498908e77a..5f7c75c4bd8dba1679cb665d82cb7953dc98c92d 100755 --- a/testsuite/expect/test12.2 +++ b/testsuite/expect/test12.2 @@ -95,7 +95,7 @@ make_bash_script $file_in " # Usage: test12.2.prog <exit_code> <sleep_secs> <mem_kb> # set timeout [expr $max_job_delay + $sleep_time] -spawn $srun --batch --output=$file_out --error=$file_err -t2 $file_in +set srun_pid [spawn $srun --batch --output=$file_out --error=$file_err -t2 $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -103,7 +103,7 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid exit 1 } eof { diff --git a/testsuite/expect/test13.1 b/testsuite/expect/test13.1 index a4f418eb9446eda9524881ce065d307509c9a9a3..311797d71dd30bae5948505568dc41dc00e6f98f 100755 --- a/testsuite/expect/test13.1 +++ b/testsuite/expect/test13.1 @@ -92,7 +92,7 @@ set timeout $max_job_delay set job_id 0 set matches 0 -spawn $srun --allocate -N1 --verbose -t2 +set srun_pid [spawn $srun --allocate -N1 --verbose -t2] expect -re "jobid ($number).*" set job_id $expect_out(1,string) @@ -114,8 +114,8 @@ for {set inx 0} {$inx < $windows_iterations} {incr inx} { } timeout { send_user "\nFAILURE: srun (from --allocate) not responding\n" - kill_srun - set exit_code 1 + slow_kill $srun_pid + exit 1 } eof { send_user "\nFAILURE: srun aborted\n" @@ -139,8 +139,8 @@ expect { } timeout { send_user "\nFAILURE: srun (from --allocate) not responding\n" - kill_srun - set exit_code 1 + slow_kill $srun_pid + exit 1 } eof { wait diff --git a/testsuite/expect/test14.4 b/testsuite/expect/test14.4 index 81c6f836608f43bc686740a150aa93179b497fff..05f3a3de4a18df80b5140aa78fbe9e1d113279aa 100755 --- a/testsuite/expect/test14.4 +++ b/testsuite/expect/test14.4 @@ -80,7 +80,7 @@ make_bash_script $file_in " # Spawn a srun batch job that uses stdout/err and confirm their contents # set timeout $max_job_delay -spawn $srun -N1-4 --batch --output=$file_out --error=$file_err -t1 $file_in +set srun_pid [spawn $srun -N1-4 --batch --output=$file_out --error=$file_err -t1 $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -88,9 +88,8 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid set exit_code 1 - exp_continue } eof { wait diff --git a/testsuite/expect/test14.5 b/testsuite/expect/test14.5 index 344f62a23b2f1834841833c8f58c930ba34b24b1..27d07e94ac0e2dc0715772488c27b64e50f8a97d 100755 --- a/testsuite/expect/test14.5 +++ b/testsuite/expect/test14.5 @@ -6,9 +6,6 @@ # Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR # "FAILURE: ..." otherwise with an explanation of the failure, OR # anything else indicates a failure mode that must be investigated. -# -# Note: This script generates and then deletes files in the working directory -# named test14.5.input, test14.5.output, and test14.5.error ############################################################################ # Copyright (C) 2006 The Regents of the University of California. # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -75,7 +72,7 @@ make_bash_script $file_in " # Spawn a srun batch job that uses stdout/err and confirm their contents # set timeout $max_job_delay -spawn $srun -N1-1 --batch --output=$file_out --error=$file_err -t1 $file_in +set srun_pid [spawn $srun -N1-1 --batch --output=$file_out --error=$file_err -t1 $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -83,9 +80,8 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid set exit_code 1 - exp_continue } eof { wait diff --git a/testsuite/expect/test14.6 b/testsuite/expect/test14.6 index b78ce549ee3396c6dcd730c214e62fe256a9286a..35172141e9083b2f15cd608a64ffc66f2d38f451 100755 --- a/testsuite/expect/test14.6 +++ b/testsuite/expect/test14.6 @@ -6,9 +6,6 @@ # Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR # "FAILURE: ..." otherwise with an explanation of the failure, OR # anything else indicates a failure mode that must be investigated. -# -# Note: This script generates and then deletes files in the working directory -# named test14.6.input, test14.6.output, and test14.6.error ############################################################################ # Copyright (C) 2006 The Regents of the University of California. # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -67,7 +64,7 @@ make_bash_script $file_in " # Spawn a srun batch job that uses stdout/err and confirm their contents # set timeout $max_job_delay -spawn $srun -N1-1 --batch --output=$file_out --error=$file_err -t1 $file_in +set srun_pid [spawn $srun -N1-1 --batch --output=$file_out --error=$file_err -t1 $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -75,9 +72,8 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid set exit_code 1 - exp_continue } eof { wait diff --git a/testsuite/expect/test14.7 b/testsuite/expect/test14.7 index 164d8e3f52cf3186879fea81618635d068934645..2d2705d9fa18a20f5f60b34c869bdfd6c5d0f3b9 100755 --- a/testsuite/expect/test14.7 +++ b/testsuite/expect/test14.7 @@ -6,9 +6,6 @@ # Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR # "FAILURE: ..." otherwise with an explanation of the failure, OR # anything else indicates a failure mode that must be investigated. -# -# Note: This script generates and then deletes files in the working directory -# named test14.4.input, test14.4.output, and test14.4.error ############################################################################ # Copyright (C) 2006 The Regents of the University of California. # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -80,7 +77,7 @@ make_bash_script $file_in " # Spawn a srun batch job that uses stdout/err and confirm their contents # set timeout $max_job_delay -spawn $srun -N1 --batch --output=$file_out --error=$file_err -t1 $file_in +set srun_pid [spawn $srun -N1 --batch --output=$file_out --error=$file_err -t1 $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -88,9 +85,8 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid set exit_code 1 - exp_continue } eof { wait diff --git a/testsuite/expect/test14.8 b/testsuite/expect/test14.8 index dd64f3e41c6b83601436fd5a2c846e2b46808c10..a0e0b74df6a6eb8ca9c56ded299f687dfadfc36e 100755 --- a/testsuite/expect/test14.8 +++ b/testsuite/expect/test14.8 @@ -78,7 +78,7 @@ make_bash_script $file_in " # Spawn a srun batch job that uses stdout and confirm its contents # set timeout $max_job_delay -spawn $srun -N1-4 --batch --output=$file_out -t1 $file_in +set srun_pid [spawn $srun -N1-4 --batch --output=$file_out -t1 $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -86,9 +86,8 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid set exit_code 1 - exp_continue } eof { wait diff --git a/testsuite/expect/test8.1 b/testsuite/expect/test8.1 index 0aa288065a0f5b2bbe35a07f486c87702317d4df..45fc308bbd73f9371ee7dbd5f362cd377ba189a5 100755 --- a/testsuite/expect/test8.1 +++ b/testsuite/expect/test8.1 @@ -66,7 +66,7 @@ exec $bin_chmod 700 $file_in set timeout $max_job_delay for {set inx 0} {$inx < $cycle_count} {incr inx} { - spawn $srun -N$num_nodes --geometry=$geometry --no-rotate --conn-type=$connection --batch --output=/dev/null --error=/dev/null $file_in + set srun_pid [spawn $srun -N$num_nodes --geometry=$geometry --no-rotate --conn-type=$connection --batch --output=/dev/null --error=/dev/null $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -80,7 +80,7 @@ for {set inx 0} {$inx < $cycle_count} {incr inx} { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid exit 1 } eof { @@ -136,7 +136,7 @@ exec $scancel --quiet $job_id # set job_id 0 set timeout $max_job_delay -spawn $srun -N$num_nodes --geometry=$geometry --no-rotate --conn-type=$connection --batch --output=/dev/null --error=/dev/null $file_in +set srun_pid [spawn $srun -N$num_nodes --geometry=$geometry --no-rotate --conn-type=$connection --batch --output=/dev/null --error=/dev/null $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -144,7 +144,7 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid exit 1 } eof { diff --git a/testsuite/expect/test8.2 b/testsuite/expect/test8.2 index 70451d5d2a0a2919d6efdc279c9d7f318983d6c2..b62aeb73fb5b116c201ed5913f74e6ef90fc2cbf 100755 --- a/testsuite/expect/test8.2 +++ b/testsuite/expect/test8.2 @@ -68,7 +68,7 @@ exec $bin_chmod 700 $file_in # Spawn a job via srun using these environment variables # set timeout $max_job_delay -spawn $srun --batch --output=$file_out --error=/dev/null $file_in +set srun_pid [spawn $srun --batch --output=$file_out --error=/dev/null $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -76,7 +76,7 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid exit 1 } eof { diff --git a/testsuite/expect/test8.3 b/testsuite/expect/test8.3 index 85659c04446b53f3bf88eda74fd964c9eb3804ef..c52729422dbac7c254c7d4362c17bf10b84e47d6 100755 --- a/testsuite/expect/test8.3 +++ b/testsuite/expect/test8.3 @@ -59,7 +59,7 @@ exec $bin_chmod 700 $file_in # Submit a slurm job for blue gene with geometry of 2x1x1 # set timeout $max_job_delay -spawn $srun --geometry=2x1x1 --no-rotate --nodes=1k-1k --batch --output=/dev/null --error=/dev/null $file_in +set srun_pid [spawn $srun --geometry=2x1x1 --no-rotate --nodes=1k-1k --batch --output=/dev/null --error=/dev/null $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -71,7 +71,7 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid exit 1 } eof { @@ -113,7 +113,7 @@ if {$job_id != 0} { # Submit a slurm job for blue gene with geometry of 1x2x1 # set jobid 0 -spawn $srun --geometry=1x2x1 --no-rotate --nodes=1k-1k --batch --output=/dev/null --error=/dev/null $file_in +set srun_pid [spawn $srun --geometry=1x2x1 --no-rotate --nodes=1k-1k --batch --output=/dev/null --error=/dev/null $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -125,7 +125,7 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid exit 1 } eof { @@ -164,7 +164,7 @@ if {$job_id != 0} { # Submit a slurm job for blue gene with geometry of 1x1x2 # set jobid 0 -spawn $srun --geometry=1x1x2 --no-rotate --nodes=1k-1k --batch --output=/dev/null --error=/dev/null $file_in +set srun_pid [spawn $srun --geometry=1x1x2 --no-rotate --nodes=1k-1k --batch --output=/dev/null --error=/dev/null $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -176,7 +176,7 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid exit 1 } eof { diff --git a/testsuite/expect/test8.4 b/testsuite/expect/test8.4 index dc1167976c5aee6f3f08f0c94ebd6971f4bd1747..7ca1814261718d7b2a2f1b74d849baf21ab0247e 100755 --- a/testsuite/expect/test8.4 +++ b/testsuite/expect/test8.4 @@ -89,7 +89,7 @@ exec $bin_chmod 700 $file_in # set timeout $max_job_delay set no_start 0 -spawn $srun -N1-1 --batch --output=$file_out --error=$file_err -t4 $file_in +set srun_pid [spawn $srun -N1-1 --batch --output=$file_out --error=$file_err -t4 $file_in] expect { -re "jobid ($number) submitted" { set job_id $expect_out(1,string) @@ -105,9 +105,8 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid set exit_code 1 - exp_continue } eof { wait diff --git a/testsuite/expect/test9.1 b/testsuite/expect/test9.1 index 59ffe2073da9c467ca96a50ec3aecc5436e20a0a..ddc3f8307415d7486d4244908e3ce60128edf7c1 100755 --- a/testsuite/expect/test9.1 +++ b/testsuite/expect/test9.1 @@ -59,7 +59,7 @@ proc run_cat_job { input_file output_file } { global bin_cat bin_rm srun node_cnt other_opts task_cnt timeout exec $bin_rm -f $output_file - spawn $srun --input=$input_file --output=$output_file --error=/dev/null -n$task_cnt -N$node_cnt $other_opts -t1 $bin_cat - + set srun_pid [spawn $srun --input=$input_file --output=$output_file --error=/dev/null -n$task_cnt -N$node_cnt $other_opts -t1 $bin_cat - ] expect { -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" @@ -67,7 +67,7 @@ proc run_cat_job { input_file output_file } { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid return 1 } eof { diff --git a/testsuite/expect/test9.2 b/testsuite/expect/test9.2 index 05ed5beadc0069725f4120f0d4677337886e9c99..98db729a0ea2010520e4adf8a0fe45bf9da999a5 100755 --- a/testsuite/expect/test9.2 +++ b/testsuite/expect/test9.2 @@ -58,7 +58,7 @@ proc run_hostname_job { output_file } { global bin_hostname bin_rm number srun node_cnt other_opts task_cnt timeout exec $bin_rm -f $output_file - spawn $srun --input=/dev/null --output=$output_file --error=/dev/null -n$task_cnt -N$node_cnt $other_opts -t1 $bin_hostname + set srun_pid [spawn $srun --input=/dev/null --output=$output_file --error=/dev/null -n$task_cnt -N$node_cnt $other_opts -t1 $bin_hostname] expect { -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" @@ -66,7 +66,7 @@ proc run_hostname_job { output_file } { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid return 1 } eof { diff --git a/testsuite/expect/test9.3 b/testsuite/expect/test9.3 index 20ecdcf720714eae3a6663394570f81e2447a902..bb8ce24d7c79fe00c49cf682ee3397a2ae33d952 100755 --- a/testsuite/expect/test9.3 +++ b/testsuite/expect/test9.3 @@ -59,7 +59,7 @@ proc run_cat_job { input_file output_file } { global bin_cat bin_rm number srun node_cnt other_opts task_cnt timeout exec $bin_rm -f $output_file - spawn $srun -e - -i none -o $output_file -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat $input_file + set srun_pid [spawn $srun -e - -i none -o $output_file -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat $input_file] expect { -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" @@ -67,7 +67,7 @@ proc run_cat_job { input_file output_file } { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid return 1 } eof { diff --git a/testsuite/expect/test9.4 b/testsuite/expect/test9.4 index 6d02fe7b8e395994117e5acbdc54417c8da36d39..df0a3917c1f5f3d09ff485ffc4511ae950482b7d 100755 --- a/testsuite/expect/test9.4 +++ b/testsuite/expect/test9.4 @@ -63,7 +63,7 @@ print_header $test_id # Returns 0 on successful completion, returns 1 otherwise proc run_cat_job { input_file output_file } { global bin_cat bin_rm number srun node_cnt other_opts task_cnt timeout - spawn $srun -e - -i $input_file -o $output_file -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat - + set srun_pid [spawn $srun -e - -i $input_file -o $output_file -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat - ] expect { -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" @@ -71,7 +71,7 @@ proc run_cat_job { input_file output_file } { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid return 1 } eof { @@ -91,7 +91,7 @@ set stdin_lines [get_line_cnt $file_in] # Make a text file for each task set timeout $max_job_delay -spawn $srun -e /dev/null -i $file_in -o $file_in_task -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat +set srun_pid [spawn $srun -e /dev/null -i $file_in -o $file_in_task -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat] expect { -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" @@ -99,7 +99,7 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid set exit_code 1 exp_continue } diff --git a/testsuite/expect/test9.5 b/testsuite/expect/test9.5 index 0faaa3d5ca47173113ff6b2f3cadb47d98b1253d..5590f7f041731d90a94d1f27933adcfb671b5666 100755 --- a/testsuite/expect/test9.5 +++ b/testsuite/expect/test9.5 @@ -5,9 +5,6 @@ # Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR # "FAILURE: ..." otherwise with an explanation of the failure, OR # anything else indicates a failure mode that must be investigated. -# -# Note: This script generates and then deletes files in the working directory -# named test9.5.input, test9.5.[0-9]+.input, and test9.5.output ############################################################################ # Copyright (C) 2002-2006 The Regents of the University of California. # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -60,7 +57,7 @@ proc run_cat_job { input_file output_file } { global bin_cat bin_rm number srun node_cnt other_opts task_cnt timeout exec $bin_rm -f $output_file - spawn $srun -e - -i $input_file -o $output_file -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat - + set srun_pid [spawn $srun -e - -i $input_file -o $output_file -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat - ] expect { -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" @@ -68,7 +65,7 @@ proc run_cat_job { input_file output_file } { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid return 1 } eof { @@ -89,7 +86,7 @@ set stdout_target [expr $stdin_lines * $task_cnt] # Make a text file for each task set timeout $max_job_delay -spawn $srun -e /dev/null -i $file_in -o $file_in_task -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat +set srun_pid [spawn $srun -e /dev/null -i $file_in -o $file_in_task -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat] expect { -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" @@ -97,9 +94,8 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid set exit_code 1 - exp_continue } eof { wait diff --git a/testsuite/expect/test9.6 b/testsuite/expect/test9.6 index 26d8bd3fa2a14a15fa1e8efe82ead2a0e7537f80..2cca87cae5dcffe4718cfeea45dbadd10207c7cf 100755 --- a/testsuite/expect/test9.6 +++ b/testsuite/expect/test9.6 @@ -60,7 +60,7 @@ proc run_cat_job { input_file output_file } { global bin_cat bin_rm number srun node_cnt other_opts task_cnt timeout exec $bin_rm -f $output_file - spawn $srun -e - -o $output_file -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat $input_file + set srun_pid [spawn $srun -e - -o $output_file -N$node_cnt -n$task_cnt $other_opts -t1 $bin_cat $input_file] expect { -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" @@ -68,7 +68,7 @@ proc run_cat_job { input_file output_file } { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid return 1 } eof { diff --git a/testsuite/expect/test9.8 b/testsuite/expect/test9.8 index 050de25854d23db344f9c112727b164065e9d46e..5d8bbda18ce701fe0b44bf34d03ed420d7fc81cc 100755 --- a/testsuite/expect/test9.8 +++ b/testsuite/expect/test9.8 @@ -72,7 +72,7 @@ $srun $bin_sleep $sleep_time set start_cnt 0 set timeout $delay for {set inx 0} {$inx < $job_cnt} {incr inx} { - spawn $srun --batch --output=/dev/null --error=/dev/null -t5 $file_in + set srun_pid [spawn $srun --batch --output=/dev/null --error=/dev/null -t5 $file_in] expect { -re "jobid ($number) submitted" { incr start_cnt @@ -84,7 +84,7 @@ for {set inx 0} {$inx < $job_cnt} {incr inx} { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $srun_pid exit 1 } eof {