mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-03 10:08:16 +02:00
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.
This commit is contained in:
parent
d07827ba2a
commit
fc3ce1e80a
1 changed files with 5 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue