This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/testsuite] attach.exp: Add small delay in busy loop...


Hello,

The attach.exp sometimes fails on certain platforms (eg mips-irix),
and causes an attach process to be left behind. Since it is doing a busy
loop, this runaway process left behind consumes 99.9% of the CPU,
and considerably slows down the execution of the rest of the testsuite.

I suggest the following change to add a small delay at each iteration
of the busy loop. I had to make some adjustments to attach.exp:

  a. Line number 19 became line 32.
     Just like Elena recently upgraded a test to avoid hard-coded
     line number, we should probably clean this up, someday. This can
     be a separate patch, however.

  b. The program was attached to while inside the busy loop, so the
     test was expecting the debugger to report that the inferior was
     inside function main() after the attach command was performed.
     This is no longer the case, since the inferior is most likely
     inside a system call, doing the delay. I felt that it was not
     a necessity to checke where the debugger thought the inferior
     was stopped, so removed that part of the expected output. What
     I can do is add an extra test that does a backtrace and verifies
     that it contains a frame for function main().

2003-11-18  J. Brobecker  <brobecker@gnat.com>

        * gdb.base/attach.c: Add small delay in busy loop.
        * gdb.base/attach.exp: Make some associated adjustments.

OK to apply?

Thanks,
-- 
Joel

Attachment: attach.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]