igt/gem_cpu_reloc: Update the memory requirements
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 12 Aug 2014 14:29:25 +0000 (15:29 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 12 Aug 2014 14:34:12 +0000 (15:34 +0100)
Use intel_check_memory() for accuracy and beautification

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tests/gem_cpu_reloc.c

index 4618323..be7028f 100644 (file)
@@ -179,13 +179,12 @@ igt_simple_main
        }
 
        aper_size = gem_mappable_aperture_size();
-       igt_skip_on_f(intel_get_total_ram_mb() < aper_size / (1024*1024) * 2,
-                     "not enough mem to run test\n");
-
        count = aper_size / 4096 * 2;
        if (igt_run_in_simulation())
                count = 10;
 
+       igt_require(intel_check_memory(1+count, 4096, CHECK_RAM));
+
        handles = malloc (count * sizeof(uint32_t));
        igt_assert(handles);