Skip to content
Snippets Groups Projects
Commit f1da92a5 authored by Michael Hinton's avatar Michael Hinton Committed by Albert Gil
Browse files

Testsuite - Improve test1.68 to play nice with other running srun jobs

Run the srun job in the background initially to get pid.
Directly pass in the pid of the srun job instead of grabbing the first
srun pid found on the system.
Check that bg and fg actually succeed.

Bug 7022
parent 8640b96b
No related branches found
No related tags found
No related merge requests found
......@@ -55,19 +55,27 @@ echo \"Test finished\"
make_bash_script $stop_srun "
$bin_sleep 15
srun_proc=\$(ps -C srun -o pid=)
echo \"sending job to the background, pid=\$srun_proc\"
srun_proc=\$1
echo \"suspending job, pid=\$srun_proc\"
kill -s stop \$srun_proc
"
make_bash_script $test_srun "
set -m
./$stop_srun &
$srun -v -t1 ./$test_timer
$srun -v -t1 ./$test_timer &
./$stop_srun \$! &
wait
echo \"sending job to the background\"
bg
if \[ \$? != 0 \]; then
echo \"BG Failed\"
fi
$bin_sleep 25
echo \"sending job to foreground\"
fg
if \[ \$? != 0 \]; then
echo \"FG Failed\"
fi
"
make_bash_script $file_in "
......@@ -107,6 +115,16 @@ expect {
set fini_match 1
exp_continue
}
-re "BG Failed" {
send_user "\nFAILURE: Failed to find suspended srun job in background\n"
set exit_code 1
exp_continue
}
-re "FG Failed" {
send_user "\nFAILURE: Failed to find background srun job to put in foreground\n"
set exit_code 1
exp_continue
}
timeout {
send_user "\nFAILURE: srun is not responding\n"
set exit_code 1
......
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