diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-03 07:06:42 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-03 07:06:42 +0100 |
commit | 130ac1f9453b5e746576fc4887d7e1372c1605b1 (patch) | |
tree | 6c336a211bf01bfca3660709b7bf15daee3fbe9b | |
parent | de7270cb1e9510cb230e80045c812fa68fcfa585 (diff) | |
download | cairo-130ac1f9453b5e746576fc4887d7e1372c1605b1.tar.gz |
[test] Sync with memfault headers.
Update the macros to reflect the current version of memfault.
-rw-r--r-- | test/cairo-test.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c index 12fc3ad17..61ea63dae 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -128,7 +128,7 @@ _cairo_test_init (cairo_test_context_t *ctx, { char *log_name; - MF (VALGRIND_DISABLE_FAULTS ()); + MF (MEMFAULT_DISABLE_FAULTS ()); #if HAVE_FEENABLEEXCEPT feenableexcept (FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); @@ -191,7 +191,7 @@ cairo_test_init_thread (cairo_test_context_t *ctx, cairo_test_context_t *master, int thread) { - MF (VALGRIND_DISABLE_FAULTS ()); + MF (MEMFAULT_DISABLE_FAULTS ()); *ctx = *master; ctx->thread = thread; @@ -631,11 +631,11 @@ cairo_test_for_target (cairo_test_context_t *ctx, REPEAT: #if HAVE_MEMFAULT - VALGRIND_CLEAR_FAULTS (); - VALGRIND_RESET_LEAKS (); + MEMFAULT_CLEAR_FAULTS (); + MEMFAULT_RESET_LEAKS (); ctx->last_fault_count = 0; - last_fault_count = VALGRIND_COUNT_FAULTS (); - VALGRIND_ENABLE_FAULTS (); + last_fault_count = MEMFAULT_COUNT_FAULTS (); + MEMFAULT_ENABLE_FAULTS (); #endif have_output = FALSE; have_result = FALSE; @@ -660,7 +660,7 @@ REPEAT: goto REPEAT; if (cairo_surface_status (surface)) { - MF (VALGRIND_PRINT_FAULTS ()); + MF (MEMFAULT_PRINT_FAULTS ()); cairo_test_log (ctx, "Error: Created an error surface\n"); ret = CAIRO_TEST_FAILURE; goto UNWIND_STRINGS; @@ -668,7 +668,7 @@ REPEAT: /* Check that we created a surface of the expected type. */ if (cairo_surface_get_type (surface) != target->expected_type) { - MF (VALGRIND_PRINT_FAULTS ()); + MF (MEMFAULT_PRINT_FAULTS ()); cairo_test_log (ctx, "Error: Created surface is of type %d (expected %d)\n", cairo_surface_get_type (surface), target->expected_type); ret = CAIRO_TEST_FAILURE; @@ -681,7 +681,7 @@ REPEAT: expected_content = cairo_boilerplate_content (target->content); if (cairo_surface_get_content (surface) != expected_content) { - MF (VALGRIND_PRINT_FAULTS ()); + MF (MEMFAULT_PRINT_FAULTS ()); cairo_test_log (ctx, "Error: Created surface has content %d (expected %d)\n", cairo_surface_get_content (surface), expected_content); ret = CAIRO_TEST_FAILURE; @@ -736,11 +736,11 @@ REPEAT: } #if HAVE_MEMFAULT - VALGRIND_DISABLE_FAULTS (); + MEMFAULT_DISABLE_FAULTS (); /* repeat test after malloc failure injection */ if (ctx->malloc_failure && - VALGRIND_COUNT_FAULTS () - last_fault_count > 0 && + MEMFAULT_COUNT_FAULTS () - last_fault_count > 0 && (status == CAIRO_TEST_NO_MEMORY || cairo_status (cr) == CAIRO_STATUS_NO_MEMORY || cairo_surface_status (surface) == CAIRO_STATUS_NO_MEMORY)) @@ -754,9 +754,9 @@ REPEAT: #if HAVE_FCFINI FcFini (); #endif - if (VALGRIND_COUNT_LEAKS () > 0) { - VALGRIND_PRINT_FAULTS (); - VALGRIND_PRINT_LEAKS (); + if (MEMFAULT_COUNT_LEAKS () > 0) { + MEMFAULT_PRINT_FAULTS (); + MEMFAULT_PRINT_LEAKS (); } } @@ -779,9 +779,9 @@ REPEAT: } #if HAVE_MEMFAULT - if (VALGRIND_COUNT_FAULTS () - last_fault_count > 0) { + if (MEMFAULT_COUNT_FAULTS () - last_fault_count > 0) { VALGRIND_PRINTF ("Unreported memfaults..."); - VALGRIND_PRINT_FAULTS (); + MEMFAULT_PRINT_FAULTS (); } #endif @@ -983,7 +983,7 @@ UNWIND_CAIRO: #if HAVE_MEMFAULT if (ret == CAIRO_TEST_FAILURE && ctx->expectation != CAIRO_TEST_FAILURE) - VALGRIND_PRINT_FAULTS (); + MEMFAULT_PRINT_FAULTS (); #endif cairo_destroy (cr); UNWIND_SURFACE: @@ -1000,13 +1000,13 @@ UNWIND_SURFACE: FcFini (); #endif - if (VALGRIND_COUNT_LEAKS () > 0) { + if (MEMFAULT_COUNT_LEAKS () > 0) { if (ret != CAIRO_TEST_FAILURE || ctx->expectation == CAIRO_TEST_FAILURE) { - VALGRIND_PRINT_FAULTS (); + MEMFAULT_PRINT_FAULTS (); } - VALGRIND_PRINT_LEAKS (); + MEMFAULT_PRINT_LEAKS (); } } @@ -1481,7 +1481,7 @@ cairo_test_malloc_failure (const cairo_test_context_t *ctx, #if HAVE_MEMFAULT /* prevent infinite loops... */ - n_faults = VALGRIND_COUNT_FAULTS (); + n_faults = MEMFAULT_COUNT_FAULTS (); if (n_faults == ctx->last_fault_count) return FALSE; |