summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-10 09:21:15 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-10 09:24:33 +0100
commitcb9e8376fac2c96c2e6bffa511b3087d916286d0 (patch)
tree35342714fdfb9ad61b1e6a9abe972c217e0a214a /tests
parent7775fca2df815dfee18b181de6fe13df27bb9867 (diff)
tests: fixup igt_simple_main fallout
Oops, I should look at compilier warnings a bit better. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_cs_prefetch.c6
-rw-r--r--tests/gem_double_irq_loop.c6
-rw-r--r--tests/gem_exec_lut_handle.c3
-rw-r--r--tests/gem_lut_handle.c3
-rw-r--r--tests/gem_pin.c3
5 files changed, 7 insertions, 14 deletions
diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
index ef0cdf14..9ff65732 100644
--- a/tests/gem_cs_prefetch.c
+++ b/tests/gem_cs_prefetch.c
@@ -107,10 +107,8 @@ igt_simple_main
aper_size = gem_aperture_size(fd);
/* presume a big per-bo overhead */
- if (intel_get_total_ram_mb() < (aper_size / (1024*1024)) * 3 / 2) {
- fprintf(stderr, "not enough mem to run test\n");
- return 77;
- }
+ igt_skip_on_f(intel_get_total_ram_mb() < (aper_size / (1024*1024)) * 3 / 2,
+ "not enough mem to run test\n");
count = aper_size / 4096;
diff --git a/tests/gem_double_irq_loop.c b/tests/gem_double_irq_loop.c
index d4d2efef..47784add 100644
--- a/tests/gem_double_irq_loop.c
+++ b/tests/gem_double_irq_loop.c
@@ -100,10 +100,8 @@ igt_simple_main
fd = drm_open_any();
devid = intel_get_drm_devid(fd);
- if (!HAS_BLT_RING(devid)) {
- fprintf(stderr, "not (yet) implemented for pre-snb\n");
- return 77;
- }
+ igt_require_f(HAS_BLT_RING(devid),
+ "not (yet) implemented for pre-snb\n");
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
igt_assert(bufmgr);
diff --git a/tests/gem_exec_lut_handle.c b/tests/gem_exec_lut_handle.c
index 05aece15..c27e4d58 100644
--- a/tests/gem_exec_lut_handle.c
+++ b/tests/gem_exec_lut_handle.c
@@ -143,8 +143,7 @@ igt_simple_main
gem_exec[n].handle = gem_create(fd, 4096);
gem_write(fd, gem_exec[n].handle, 0, batch, sizeof(batch));
- if (exec(fd, 1, 0, USE_LUT))
- return 77;
+ igt_skip_on(exec(fd, 1, 0, USE_LUT));
for (p = pass; p->name != NULL; p++) {
for (n = 1; n <= MAX_NUM_EXEC; n *= 2) {
diff --git a/tests/gem_lut_handle.c b/tests/gem_lut_handle.c
index 4bf88b35..10fa22bd 100644
--- a/tests/gem_lut_handle.c
+++ b/tests/gem_lut_handle.c
@@ -189,8 +189,7 @@ igt_simple_main
do_or_die(exec(fd, handle, NORMAL));
fail(exec(fd, handle, BROKEN));
- if (exec(fd, handle, USE_LUT))
- return 77;
+ igt_skip_on(exec(fd, handle, USE_LUT));
do_or_die(exec(fd, handle, USE_LUT));
fail(exec(fd, handle, USE_LUT | BROKEN));
diff --git a/tests/gem_pin.c b/tests/gem_pin.c
index 06360c36..860e5652 100644
--- a/tests/gem_pin.c
+++ b/tests/gem_pin.c
@@ -209,8 +209,7 @@ igt_simple_main
fd = drm_open_any();
- if (!test_can_pin(fd))
- return 77;
+ igt_require(test_can_pin(fd));
handle = malloc(sizeof(uint32_t)*100);
offset = malloc(sizeof(uint32_t)*100);