From fde4b588ab74956c0537ba4e589e0b51b3699ac0 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Thu, 28 Jul 2011 13:08:19 -0700 Subject: [PATCH] Modify test to work-around expect problem with large buffers Modify test2.8 to prevent a problem with "expect" that fails to process all of the information in a job output buffer if that buffer is large (hundreds of lines). --- testsuite/expect/test2.8 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/testsuite/expect/test2.8 b/testsuite/expect/test2.8 index 605f88d89f2..cf704c02fc5 100755 --- a/testsuite/expect/test2.8 +++ b/testsuite/expect/test2.8 @@ -97,15 +97,28 @@ if {$job_id2 == 0} { exec $bin_rm -f $file_in # -# Look at all jobs with scontrol +# Look for these jobs with scontrol +# +# NOTE: Running "scontrol show job" and looking for these job IDs +# may not work due to a bug in awk not scanning large output buffers # set matches 0 -spawn $scontrol show job +spawn $scontrol show job $job_id1 expect { -re "JobId=$job_id1 " { incr matches exp_continue } + timeout { + send_user "\nFAILURE: scontrol not responding\n" + set exit_code 1 + } + eof { + wait + } +} +spawn $scontrol show job $job_id2 +expect { -re "JobId=$job_id2 " { incr matches exp_continue -- GitLab