Commit graph

29 commits

Author SHA1 Message Date
ad59049ed0 disable broken Thread-joining test. See Ticket #803 2011-05-21 06:52:50 +02:00
Christian Thaeter
4fee3d85cf testsuite update, new test.h to be in sync with nobug
test.h introduces a PLANNED_TEST() macro for C code, shows what tests
are provided and so on (the nobug version did that since some time).

test names are now passed as identifers and translated to strings by the
macros.

A lot fixes for existing tests, replace some printfs with ECHO, cosmetics.

one threadpool (sync_many) test is broken and set to PLANNED, this needs
further testsuite support for dispatching output.

add a TEST nobug flag to test.h
2010-07-21 04:49:18 +02:00
Michael Ploujnikov
d80ae17ea4 test simple-sync: avoid a race condition in output checking by using an assert 2010-02-10 20:53:44 -05:00
Michael Ploujnikov
62b70bfd7e test sync-joinable: use asserts instead of checking the program output 2010-02-10 20:53:32 -05:00
Michael Ploujnikov
5d929f1522 test sync-many: replace output checking with asserts
Also modify the input value right after passing to a worker thread. This is a better test of synchronization.
2010-02-10 20:53:13 -05:00
Michael Ploujnikov
48829bc9ad basic joinable thread test 2010-02-03 17:06:27 -05:00
Michael Ploujnikov
bd6ed5aa88 joinable thread sync test
Right now causes 32bytes to be lost
2010-02-03 08:02:41 -05:00
Michael Ploujnikov
73f1bbae2a added two sync tests
one with a single thread and one with 100 randomly sleeping ones
2010-02-02 20:44:35 -05:00
Michael Ploujnikov
f69006aa54 test spawning a bunch of short sleeping threads 2010-01-29 22:42:20 -05:00
Michael Ploujnikov
b87db7eb8f re-add a test message that I forgot 2010-01-29 22:01:48 -05:00
Michael Ploujnikov
9d7f6a1fce don't test the kind anymore (too simple)
Conflicts:

	tests/30backend-threadpool.tests
2010-01-29 21:52:12 -05:00
Michael Ploujnikov
dc87e78590 add a two-thread acquire test
currently this results in a deadlock between lumiera_threadpool_destroy() and thread_loop()
2010-01-26 17:02:31 -05:00
Michael Ploujnikov
fca6cd786b fix the prime test algorithm
actually test for the output of the function
2010-01-20 07:54:26 -05:00
Michael Ploujnikov
ffdbc7083b use the largest prime that can fit in an it
don't hard-code the number in the test
2010-01-18 12:16:45 -05:00
Michael Ploujnikov
045311db49 don't expect a message about waiting anymore 2010-01-18 12:07:17 -05:00
Christian Thaeter
d659b1e8e7 fix a PLANNED test glitch 2010-01-17 17:34:23 +01:00
Michael Ploujnikov
02c9ee33c7 fix the code by re-merging some of cehteh's changes
test still fails
2010-01-16 11:48:48 -05:00
Michael Ploujnikov
b679bfa236 don't expect any more output from the basic test 2010-01-08 07:33:25 -05:00
Michael Ploujnikov
f2406c23a1 bork bork bork
by pulling this you agree to...
2009-12-23 13:10:31 -05:00
Michael Ploujnikov
eedfafb0d0 convert lumiera_thread_state to using the enum string trick and use it in a test 2009-11-29 18:06:14 -05:00
Michael Ploujnikov
fc16de332f convert lumiera_thread_class to using the enum string trick and use it in a test 2009-11-29 17:55:20 -05:00
Michael Ploujnikov
98519c57da reduce the number of threads spawned in tests to avoid EAGAIN errors from pthread_create (at least on my 2.6.31.5-127.fc12.x86_64 Core2Duo T9600 system) 2009-11-27 11:39:23 -05:00
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
Michael Ploujnikov
bd076e4210 reduce the number of threads spawned in a test 2009-11-26 10:24:18 -05:00
Michael Ploujnikov
085216fd61 remove "allocated thread*" messages from lumiera_thread_new() and update tests 2009-11-26 10:24:17 -05:00
Michael Ploujnikov
07962b5314 add comments about locking in lumiera_threadpool_release_thread()
output the size of the created thread struct
don't print "destroying thread" (lets tests become shorter with repeated matching)
add a test which spans many threads in all pools
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
8e3d4e7b7a fixed lumiera_threadpool_destroy() by using LLIST_FOREACH
added some checks to lumiera_threadpool_release_thread(), maybe too much
modified thread_loop() to return a known value - 0
added checks to lumiera_thread_new()
added a check to lumiera_thread_destroy()
made lumiera_thread_destroy() unlink the thread from a pool list
updated test case to match new debug messages
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
75696986e4 test passes 2009-11-26 10:24:17 -05:00
Christian Thaeter
ac5c09f278 TDD? TDB! Test-Driven-Brainstorming 2007-08-21 17:33:19 +02:00