diff --git a/testsuite/expect/test1.59 b/testsuite/expect/test1.59 index 62a3237f04461774eb2fa67c32577eb8121287a0..fdc12fcb0a385fc6d739adbd526002c2e640249f 100755 --- a/testsuite/expect/test1.59 +++ b/testsuite/expect/test1.59 @@ -36,6 +36,7 @@ source ./globals set test_id "1.59" set exit_code 0 +set file_in "test$test_id.input" set num_nodes 3 set node_count 0 set task_count 0 @@ -53,7 +54,7 @@ if {[string compare [switch_type] "elan"] == 0} { send_user "\nWARNING: This test incompatible with Elan switch\n" exit $exit_code } -#find out if we have enough nodes to test functionality +# find out if we have enough nodes to test functionality set partition [default_partition] spawn $scontrol show partition $partition expect { @@ -84,8 +85,16 @@ set node2 0 set node3 0 set node4 0 +# +# Build input script file +# +make_bash_script $file_in " + export PS1=\"$prompt\" + $bin_bash --norc +" + set timeout $max_job_delay -spawn $salloc -N$num_nodes -v bash +set salloc_pid [spawn $salloc -N$num_nodes -v -t1 ./$file_in] expect { -re "salloc: Granted job allocation ($number)" { set job_id $expect_out(1,string) @@ -96,13 +105,14 @@ expect { } timeout { send_user "\nFAILURE: srun not responding\n" - kill_srun + slow_kill $salloc_pid set exit_code 1 } eof { wait } } +exec $bin_rm -f $file_in if {$job_id == 0} { send_user "\nFAILURE: salloc failure\n" exit 1 diff --git a/testsuite/expect/test24.1.prog.c b/testsuite/expect/test24.1.prog.c index 1779e39760511bca7d96e915c4b3e6d538ecf863..5a3e26290b1c1f1f0a23a5fdb18fbab1a0e8369f 100644 --- a/testsuite/expect/test24.1.prog.c +++ b/testsuite/expect/test24.1.prog.c @@ -50,6 +50,7 @@ #include "src/sshare/sshare.h" /* set up some fake system */ +void *acct_db_conn = NULL; uint32_t cluster_cpus = 50; int long_flag = 1; int exit_code = 0; diff --git a/testsuite/expect/test4.12 b/testsuite/expect/test4.12 index c6d832d0e9bdb0aa6da156f39a22af85aa638377..4adeb197af2afdba6a5cbc26b46c6417e223e542 100755 --- a/testsuite/expect/test4.12 +++ b/testsuite/expect/test4.12 @@ -213,9 +213,10 @@ proc sinfo_test_2 { node proc_cnt total_procs } { # allocate a set of nodes (node_cnt) and the quit right after proc allocate_and_quit { node proc_cnt total_procs } { - global salloc scontrol sinfo number alpha_numeric_under - global prompt select_type procs_per_node + global bin_bash salloc scontrol sinfo number alpha_numeric_under + global prompt select_type procs_per_node test_id bin_rm + set file_in "test$test_id.input" set job_id 0 set num_alloc 0 set block "" @@ -223,7 +224,12 @@ proc allocate_and_quit { node proc_cnt total_procs } { set timeout 60 set idle_cpus [expr $total_procs - $proc_cnt] - set mypid [spawn $salloc -w $node -N 1 -t 5 -n $proc_cnt bash] + make_bash_script $file_in " + export PS1=\"$prompt\" + $bin_bash --norc + " + + set mypid [spawn $salloc -w $node -N 1 -t 5 -n $proc_cnt ./$file_in] expect { -re "Granted job allocation ($number)" { set job_id $expect_out(1,string) @@ -268,6 +274,7 @@ proc allocate_and_quit { node proc_cnt total_procs } { wait } } + exec $bin_rm -f $file_in return $rc }