kms_rotation_crc: Remove now unnecessary defines
[platform/upstream/intel-gpu-tools.git] / tests / gem_gtt_cpu_tlb.c
index 6853370..953070c 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <assert.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
-#include <sys/mman.h>
 #include "drm.h"
-#include "i915_drm.h"
+#include "ioctl_wrappers.h"
 #include "drmtest.h"
-#include "intel_gpu_tools.h"
+#include "intel_io.h"
 
 #define OBJ_SIZE (1024*1024)
 
@@ -68,8 +66,7 @@ create_bo(int fd)
        return handle;
 }
 
-int
-main(int argc, char **argv)
+igt_simple_main
 {
        int fd;
        int i;
@@ -77,6 +74,8 @@ main(int argc, char **argv)
 
        uint32_t *ptr;
 
+       igt_skip_on_simulation();
+
        fd = drm_open_any();
 
        handle = gem_create(fd, OBJ_SIZE);
@@ -90,7 +89,7 @@ main(int argc, char **argv)
 
        /* stirr up the page allocator a bit. */
        ptr = malloc(OBJ_SIZE);
-       assert(ptr);
+       igt_assert(ptr);
        memset(ptr, 0x1, OBJ_SIZE);
 
        handle = create_bo(fd);
@@ -100,9 +99,7 @@ main(int argc, char **argv)
         */
        gem_read(fd, handle, 0, ptr, OBJ_SIZE);
        for (i = 0; i < OBJ_SIZE/4; i++)
-               assert(ptr[i] == i);
+               igt_assert(ptr[i] == i);
 
        close(fd);
-
-       return 0;
 }