[cairo-commit] 2 commits - perf/cairo-perf-report.c test/cairo-test.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Jul 28 05:03:38 PDT 2009
perf/cairo-perf-report.c | 8 ++++----
test/cairo-test.c | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit c11f369057c5ebb958bec58ef41f8ad4b43bdbee
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jul 28 13:02:10 2009 +0100
[perf] Avoid NULL derefs on broken result files.
Instead of testing for a NULL return we checked that the pointer didn't
point to NIL. Oops.
diff --git a/perf/cairo-perf-report.c b/perf/cairo-perf-report.c
index a73538b..65340a1 100644
--- a/perf/cairo-perf-report.c
+++ b/perf/cairo-perf-report.c
@@ -149,17 +149,17 @@ test_report_parse (test_report_t *report, char *line, char *configuration)
report->configuration = configuration;
parse_string (report->backend);
end = strrchr (report->backend, '.');
- if (*end)
+ if (end)
*end++ = '\0';
- report->content = end;
+ report->content = end ? end : xstrdup ("???");
skip_space ();
parse_string (report->name);
end = strrchr (report->name, '.');
- if (*end)
+ if (end)
*end++ = '\0';
- report->size = atoi (end);
+ report->size = end ? atoi (end) : 0;
skip_space ();
commit 19f44982348d247057df4481010c1e3ddc80bac2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jul 28 12:58:07 2009 +0100
[test] Wrap yet another call to get_image_surface() inside a timeout.
I missed this call to get_image_surface() that is now being hit having
restored the reference image for dash-infinite-loop.
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 67323b5..eeb8b6f 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -1176,9 +1176,12 @@ REPEAT:
}
}
+ /* be more generous as we may need to use external renderers */
+ alarm (4 * ctx->timeout);
test_image = target->get_image_surface (surface, 0,
ctx->test->width,
ctx->test->height);
+ alarm (0);
if (cairo_surface_status (test_image)) {
cairo_test_log (ctx, "Error: Failed to extract image: %s\n",
cairo_status_to_string (cairo_surface_status (test_image)));
More information about the cairo-commit
mailing list