2007-08-21 17:33:19 +02:00
|
|
|
|
2009-11-24 01:05:57 +01:00
|
|
|
TESTING "Thread Pools" ./test-threadpool
|
2007-08-21 17:33:19 +02:00
|
|
|
|
|
|
|
|
PLANNED "create"
|
|
|
|
|
PLANNED "yield"
|
|
|
|
|
PLANNED "cancel"
|
2009-11-24 01:05:57 +01:00
|
|
|
|
|
|
|
|
TEST "Acquire/Release test" basic-acquire-release <<END
|
|
|
|
|
err: start by initializing the threadpool
|
|
|
|
|
err: acquiring thread 1
|
|
|
|
|
err: acquiring thread 2
|
|
|
|
|
err: releasing thread 1
|
|
|
|
|
err: thread 1 has been released
|
|
|
|
|
err: releasing thread 2
|
|
|
|
|
err: thread 2 has been released
|
2009-11-25 23:43:22 +01:00
|
|
|
|
2009-11-25 17:06:53 +01:00
|
|
|
err: destroying threadpool
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #0
|
|
|
|
|
err: number of threads in the pool=1
|
|
|
|
|
err: deleting thread
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #1
|
|
|
|
|
err: number of threads in the pool=0
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #2
|
|
|
|
|
err: number of threads in the pool=0
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #3
|
|
|
|
|
err: number of threads in the pool=0
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #4
|
|
|
|
|
err: number of threads in the pool=1
|
|
|
|
|
err: deleting thread
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
2009-11-24 01:05:57 +01:00
|
|
|
END
|
|
|
|
|
|
2009-11-25 23:43:22 +01:00
|
|
|
TEST "Many Acquires/Releases test" many-acquire-release <<END
|
|
|
|
|
err: destroying threadpool
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #0
|
2009-11-26 01:58:54 +01:00
|
|
|
err: number of threads in the pool=50
|
2009-11-25 23:43:22 +01:00
|
|
|
err: deleting thread
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #1
|
2009-11-26 01:58:54 +01:00
|
|
|
err: number of threads in the pool=50
|
2009-11-25 23:43:22 +01:00
|
|
|
err: deleting thread
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #2
|
2009-11-26 01:58:54 +01:00
|
|
|
err: number of threads in the pool=50
|
2009-11-25 23:43:22 +01:00
|
|
|
err: deleting thread
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #3
|
2009-11-26 01:58:54 +01:00
|
|
|
err: number of threads in the pool=50
|
2009-11-25 23:43:22 +01:00
|
|
|
err: deleting thread
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
|
|
|
|
|
err: destroying individual pool #4
|
2009-11-26 01:58:54 +01:00
|
|
|
err: number of threads in the pool=50
|
2009-11-25 23:43:22 +01:00
|
|
|
err: deleting thread
|
|
|
|
|
err: destroying the pool mutex
|
|
|
|
|
err: pool mutex destroyed
|
|
|
|
|
END
|
2009-11-26 03:46:03 +01:00
|
|
|
|
|
|
|
|
TEST "Too Many Acquires/Releases test" toomany-acquire-release <<END
|
|
|
|
|
err: Fatal Error
|
|
|
|
|
err: .*
|
|
|
|
|
return: !0
|
|
|
|
|
END
|