ThreadWeaver unit tests (Re: [PATCH] Fix ThreadWeaver JobCollection deletion race)

David Faure faure at kde.org
Wed Jul 2 20:05:10 BST 2008


On Wednesday 26 March 2008, Robert Knight wrote:
> [...]
> I suggest making it explicit that a Job can be safely deleted (with
> respect to ThreadWeaver itself) as soon as it emits its done(Job*)
> signal.  With the attached patch ThreadWeaver conforms to these
> semantics.

This patch enabled the unit tests for ThreadWeaver. However they don't run properly here:

./JobTests
********* Start testing of JobTests *********
Config: Using QTest library 4.4.0, Qt 4.4.0
PASS   : JobTests::initTestCase()
PASS   : JobTests::WeaverLazyThreadCreationTest()
PASS   : JobTests::SimpleJobTest()
PASS   : JobTests::SimpleJobCollectionTest()
PASS   : JobTests::EmptyJobCollectionTest()
PASS   : JobTests::ShortJobSequenceTest()
PASS   : JobTests::EmptyJobSequenceTest()
PASS   : JobTests::QueueAndDequeueSequenceTest()
PASS   : JobTests::RecursiveQueueAndDequeueSequenceTest()
PASS   : JobTests::QueueAndDequeueAllSequenceTest()
PASS   : JobTests::RecursiveQueueAndDequeueAllSequenceTest()
PASS   : JobTests::MassiveJobSequenceTest()

... and then nothing happens. All threads are waiting on a wait condition.

This obviously makes "make test" hang indefinitely.

Can someone (Mirko?) have a look at it -- or if time is lacking, give me hints about what the problem might be?

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list