From 5e25fcc285240353ab15bd4c3a0d0e02d970f45b Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 13 Aug 2013 12:56:06 +0200 Subject: tests: use igt_fail instead of exit(param != 0) Mostly a sed job with too manual fixups: - one case of using _exit instead of exit - and one case which under some conditions use 77, so convert that check to an igt_skip. Signed-off-by: Daniel Vetter --- tests/gem_write_read_ring_switch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/gem_write_read_ring_switch.c') diff --git a/tests/gem_write_read_ring_switch.c b/tests/gem_write_read_ring_switch.c index 0090f511..d8b67023 100644 --- a/tests/gem_write_read_ring_switch.c +++ b/tests/gem_write_read_ring_switch.c @@ -69,7 +69,7 @@ static void run_test(int ring, const char *testname) target_bo = drm_intel_bo_alloc(bufmgr, "target bo", 4096, 4096); if (!target_bo) { fprintf(stderr, "failed to alloc target buffer\n"); - exit(-1); + igt_fail(-1); } /* Need to map first so that we can do our own domain mangement with @@ -184,7 +184,7 @@ int main(int argc, char **argv) bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); if (!bufmgr) { fprintf(stderr, "failed to init libdrm\n"); - exit(-1); + igt_fail(-1); } /* don't enable buffer reuse!! */ //drm_intel_bufmgr_gem_enable_reuse(bufmgr); @@ -195,13 +195,13 @@ int main(int argc, char **argv) dummy_bo = drm_intel_bo_alloc(bufmgr, "dummy bo", 4096, 4096); if (!dummy_bo) { fprintf(stderr, "failed to alloc dummy buffer\n"); - exit(-1); + igt_fail(-1); } load_bo = drm_intel_bo_alloc(bufmgr, "load bo", 1024*4096, 4096); if (!load_bo) { fprintf(stderr, "failed to alloc load buffer\n"); - exit(-1); + igt_fail(-1); } for (i = 0; i < ARRAY_SIZE(tests); i++) { -- cgit v1.2.3