From ff193614b29308373ff3a54266159e3e194455a2 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Sun, 17 Nov 2013 17:29:10 +0100 Subject: [PATCH] tests/gem_reset_stats: Use macros a bit more Just demonstration really. Signed-off-by: Daniel Vetter --- tests/gem_reset_stats.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c index 2040294..07dfac4 100644 --- a/tests/gem_reset_stats.c +++ b/tests/gem_reset_stats.c @@ -717,7 +717,7 @@ static void test_params(void) } -int main(int argc, char **argv) +igt_main { struct local_drm_i915_gem_context_create create; uint32_t devid; @@ -726,13 +726,11 @@ int main(int argc, char **argv) igt_skip_on_simulation(); - igt_subtest_init(argc, argv); - igt_fixture { fd = drm_open_any(); devid = intel_get_drm_devid(fd); - if (intel_gen(devid) < 4) - igt_skip("Architecture %d too old\n", intel_gen(devid)); + igt_require_f(intel_gen(devid) >= 4, + "Architecture %d too old\n", intel_gen(devid)); ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create); if (ret != 0 && (errno == ENODEV || errno == EINVAL)) @@ -765,6 +763,4 @@ int main(int argc, char **argv) igt_subtest("params") test_params(); - - igt_exit(); } -- 2.7.4