LUMIERA.clone/tests/30backend-threadpool.tests
Michael Ploujnikov af80622ef5 begin implementing a 'soft' thread count limit per pool
add LUMIERA_DIE in cases where this soft limit is reached
add LUMIERA_DIE when pthread_create fails to create threads - serious
add a test which tries to break the soft limit
2009-11-26 10:24:18 -05:00

85 lines
2 KiB
Text

TESTING "Thread Pools" ./test-threadpool
PLANNED "create"
PLANNED "yield"
PLANNED "cancel"
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
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
END
TEST "Many Acquires/Releases test" many-acquire-release <<END
err: destroying threadpool
err: destroying individual pool #0
err: number of threads in the pool=50
err: deleting thread
err: destroying the pool mutex
err: pool mutex destroyed
err: destroying individual pool #1
err: number of threads in the pool=50
err: deleting thread
err: destroying the pool mutex
err: pool mutex destroyed
err: destroying individual pool #2
err: number of threads in the pool=50
err: deleting thread
err: destroying the pool mutex
err: pool mutex destroyed
err: destroying individual pool #3
err: number of threads in the pool=50
err: deleting thread
err: destroying the pool mutex
err: pool mutex destroyed
err: destroying individual pool #4
err: number of threads in the pool=50
err: deleting thread
err: destroying the pool mutex
err: pool mutex destroyed
END
TEST "Too Many Acquires/Releases test" toomany-acquire-release <<END
err: Fatal Error
err: .*
return: !0
END