diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-16 13:47:27 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-17 22:52:47 +0100 |
commit | bccfdf7d93c2a92a342127fc212770f4053cb2cf (patch) | |
tree | 25f80496c9bc38a2b9ac218659167ceefef28f40 /test/cairo-test.h | |
parent | 974fabfe059f9744116d20fd9f8b59f1b8c34b70 (diff) |
[test] Add support for memfault.
Add the core support to cairo-test for running the test-suite under a
malloc fault injector. This commit contains the adjustments to
cairo_test_run() to repeat the test if it detects a failure due to fault
injection and complains if it detects unreported faults or memory leaks.
Diffstat (limited to 'test/cairo-test.h')
-rw-r--r-- | test/cairo-test.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/cairo-test.h b/test/cairo-test.h index 69b3d854..79a5d719 100644 --- a/test/cairo-test.h +++ b/test/cairo-test.h @@ -61,6 +61,7 @@ typedef unsigned __int64 uint64_t; typedef enum cairo_test_status { CAIRO_TEST_SUCCESS = 0, + CAIRO_TEST_NO_MEMORY, CAIRO_TEST_FAILURE, CAIRO_TEST_CRASHED, CAIRO_TEST_UNTESTED = 77 /* match automake's skipped exit status */ @@ -128,6 +129,9 @@ struct _cairo_test_context { cairo_bool_t limited_targets; cairo_boilerplate_target_t **targets_to_test; + int malloc_failure; + int last_fault_count; + int thread; }; @@ -175,7 +179,7 @@ cairo_pattern_t * cairo_test_create_pattern_from_png (const cairo_test_context_t *ctx, const char *filename); -cairo_status_t +void cairo_test_paint_checkered (cairo_t *cr); #define CAIRO_TEST_DOUBLE_EQUALS(a,b) (fabs((a)-(b)) < 0.00001) @@ -184,6 +188,10 @@ cairo_bool_t cairo_test_is_target_enabled (const cairo_test_context_t *ctx, const char *target); +cairo_bool_t +cairo_test_malloc_failure (const cairo_test_context_t *ctx, + cairo_status_t status); + char * cairo_test_reference_image_filename (const cairo_test_context_t *ctx, const char *base_name, |