#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "i915_drm.h"
+#include "ioctl_wrappers.h"
#include "drmtest.h"
static void
struct drm_gem_close close_bo;
int ret;
- printf("Testing error return on bad close ioctl.\n");
+ igt_info("Testing error return on bad close ioctl.\n");
close_bo.handle = 0x10101010;
ret = ioctl(fd, DRM_IOCTL_GEM_CLOSE, &close_bo);
{
uint32_t handle;
- printf("Testing creating and closing an object.\n");
+ igt_info("Testing creating and closing an object.\n");
handle = gem_create(fd, 16*1024);
static void
test_create_fd_close(int fd)
{
- printf("Testing closing with an object allocated.\n");
+ igt_info("Testing closing with an object allocated.\n");
gem_create(fd, 16*1024);
/* leak it */
close(fd);
}
-int main(int argc, char **argv)
-{
- int fd;
-
- igt_subtest_init(argc, argv);
+int fd;
- fd = drm_open_any();
+igt_main
+{
+ igt_fixture
+ fd = drm_open_any();
igt_subtest("bad-close")
test_bad_close(fd);
test_create_close(fd);
igt_subtest("create-fd-close")
test_create_fd_close(fd);
-
- return 0;
}