summaryrefslogtreecommitdiff
path: root/test/pthread-show-text.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-02-06 20:41:58 -0800
committerCarl Worth <cworth@cworth.org>2007-02-06 20:41:58 -0800
commitfc3ce1e80a89aab4f1ec75946771f6c2a79f0b90 (patch)
tree634c81579a8e42a54aae7648f58c4aca97fc8799 /test/pthread-show-text.c
parentd07827ba2a225f880f4bbf6980872f5ae8898288 (diff)
downloadcairo-fc3ce1e80a89aab4f1ec75946771f6c2a79f0b90.tar.gz
test/pthread-show-text: Increease iterations to expose locking bug
With 50 iterations I'm seeing the following assertion failure: cairo-hash.c:477: _cairo_hash_table_insert: Assertion `NOT_REACHED' failed. Thanks to Jan Slupski <jslupski@juljas.net> for pointing out this bug.
Diffstat (limited to 'test/pthread-show-text.c')
-rw-r--r--test/pthread-show-text.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/pthread-show-text.c b/test/pthread-show-text.c
index d04de8b4a..94724c776 100644
--- a/test/pthread-show-text.c
+++ b/test/pthread-show-text.c
@@ -39,6 +39,9 @@
#include <fontconfig/fontconfig.h>
#endif
+#define NUM_THREADS_DEFAULT 20
+#define NUM_ITERATIONS 50
+
static void *
start (void *closure)
{
@@ -58,7 +61,7 @@ start (void *closure)
cairo_move_to (cr, 1, 1);
- for (i=0; i < 10; i++) {
+ for (i=0; i < NUM_ITERATIONS; i++) {
cairo_set_font_size (cr, 8 + i);
cairo_show_text (cr, "Hello world.\n");
}
@@ -79,7 +82,7 @@ main (int argc, char *argv[])
if (argc > 1) {
num_threads = atoi (argv[1]);
} else {
- num_threads = 20;
+ num_threads = NUM_THREADS_DEFAULT;
}
cairo_test_init ("pthread-show-text");