Bug 3501 - testTerm(frysk.proc.TestTaskTerminateObserver) is too slow
Summary: testTerm(frysk.proc.TestTaskTerminateObserver) is too slow
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on: 3603
Blocks: 2234
  Show dependency treegraph
 
Reported: 2006-11-10 15:40 UTC by Andrew Cagney
Modified: 2006-11-27 21:47 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-11-10 15:40:21 UTC
The test:
    testTerm(frysk.proc.TestTaskTerminateObserver)
takes a noticeable amount of time, suggesting some sort of timeout is occuring.
 This shouldn't be necessary.
Comment 1 Andrew Cagney 2006-11-27 21:47:21 UTC
Changes to properly synchronize this test with its inferior:

Index: frysk-core/frysk/pkglibexecdir/ChangeLog
2006-11-27  Andrew Cagney  <cagney@redhat.com>

        * funit-threadexit.c (running_thread_can_exit): New barrier.
        (main, op_thread): Use running_thread_can_exit to block thread's
        exit until after main has opened the thread's /proc/stat file.

        * funit-threadexit.c (scan_thread): Delete
        (main): Do the scan for thread in 'X' state here, instead of in
        scan_thread.  Create only one thread.
        (condition_cond, condition_mutex): Delete.
        (thread_running_barrier): Rename "barrier".
        (thread_id): Make volatile.
        (op_thread): Simplify, use only one barrier.


Index: frysk-core/frysk/proc/ChangeLog
2006-11-27  Andrew Cagney  <cagney@redhat.com>

        * TestTaskTerminateObserver.java (TerminatingCounter.addedTo):
        Add; stop the event loop.
        (testAttachToUnJoinedTask): Rename testTerm; simplify, explicitly
        terminate the thread.