(setjmp(igt_subtest_jmpbuf) == 0); \
igt_success())
const char *igt_subtest_name(void);
+#define igt_main \
+ static void igt_tokencat(__real_main, __LINE__)(void); \
+ int main(int argc, char **argv) { \
+ igt_subtest_init(argc, argv); \
+ igt_tokencat(__real_main, __LINE__)(); \
+ igt_exit(); \
+ } \
+ static void igt_tokencat(__real_main, __LINE__)(void) \
+
+
/**
* igt_skip - subtest aware test skipping
*
}
-int main(int argc, char **argv)
+igt_main
{
data_t data = {0, };
- igt_subtest_init(argc, argv);
-
igt_skip_on_simulation();
igt_fixture {
display_fini(&data);
fclose(data.ctl);
}
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture
fd = drm_open_any();
test_create_close(fd);
igt_subtest("create-fd-close")
test_create_fd_close(fd);
-
- igt_exit();
}
#define TEST_READ 0x1
#define TEST_WRITE 0x2
#define TEST_BOTH (TEST_READ | TEST_WRITE)
-int main(int argc, char **argv)
+igt_main
{
unsigned flags = TEST_BOTH;
int i, j;
uint8_t *cpu_ptr;
uint8_t *gtt_ptr;
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
close(fd);
}
-
- igt_exit();
}
return 0;
}
-int main(int argc, char *argv[])
+igt_main
{
igt_skip_on_simulation();
- igt_subtest_init(argc, argv);
sprintf(device, "/dev/dri/card%d", drm_get_card());
{
close(data->fds[n]);
free(data);
}
-
- igt_exit();
}
run_basic_modes(mode, src, dst, dummy, "-forked", run_forked);
}
-int
-main(int argc, char **argv)
+igt_main
{
int max, i;
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
for (i = 0; i < ARRAY_SIZE(access_modes); i++)
run_modes(&access_modes[i]);
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
igt_fixture
close(fd);
-
- igt_exit();
}
uint32_t ctx_id;
int fd;
-int main(int argc, char *argv[])
+igt_main
{
igt_skip_on_simulation();
- igt_subtest_init(argc, argv);
igt_fixture {
fd = drm_open_any_render();
igt_subtest("vebox")
igt_assert(exec(fd, handle, I915_EXEC_VEBOX, ctx_id) != 0);
#endif
-
- igt_exit();
}
int devid;
int num_rings;
-int main(int argc, char **argv)
+igt_main
{
-
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
close(fd);
}
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
int size, count;
- igt_subtest_init(argc, argv);
-
igt_skip_on_simulation();
igt_fixture
igt_fixture
close(fd);
-
- igt_exit();
}
free(bo);
}
-int main(int argc, char **argv)
+igt_main
{
int size, count, fd;
size = count = 0;
fd = -1;
- igt_subtest_init(argc, argv);
-
igt_skip_on_simulation();
igt_fixture {
igt_fixture {
close(fd);
}
-
- igt_exit();
}
int fd;
drm_intel_bo *tmp;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture {
fd = drm_open_any();
close(fd);
}
-
- igt_exit();
}
close(fd);
}
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_subtest("normal")
run(OBJECT_SIZE);
igt_subtest("no-prefault") {
run(OBJECT_SIZE);
igt_enable_prefault();
}
-
- igt_exit();
}
uint32_t handle;
int fd;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture {
fd = drm_open_any();
close(fd);
}
-
- igt_exit();
}
return 0;
}
-int
-main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_subtest("bo-write-verify-none")
igt_subtest("bo-copy")
igt_assert(run_test(1, bo_copy, I915_TILING_X, 1) == 0);
-
- igt_exit();
}
int fd;
int num_fences;
-int
-main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_skip_on_simulation();
igt_fixture {
igt_fixture
close(fd);
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture
fd = drm_open_any();
test_bad_open(fd);
igt_subtest("flink-lifetime")
test_flink_lifetime(fd);
-
- igt_exit();
}
igt_assert(obj_count == 0);
}
-int main(int argc, char **argv)
+igt_main
{
igt_skip_on_simulation();
- igt_subtest_init(argc, argv);
-
igt_subtest("flink_name")
test_flink_name();
igt_subtest("flink_close")
test_flink_close();
-
- igt_exit();
}
int fd;
int handle;
-int main(int argc, char **argv)
+igt_main
{
struct drm_i915_gem_mmap arg;
uint8_t expected[OBJECT_SIZE];
uint8_t *addr;
int ret;
- igt_subtest_init(argc, argv);
-
igt_fixture
fd = drm_open_any();
igt_fixture
close(fd);
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
if (igt_run_in_simulation())
OBJECT_SIZE = 1 * 1024 * 1024;
- igt_subtest_init(argc, argv);
-
igt_fixture
fd = drm_open_any();
igt_fixture
close(fd);
-
- igt_exit();
}
test_partial_read_writes();
}
-int main(int argc, char **argv)
+igt_main
{
srandom(0xdeadbeef);
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
close(fd);
}
-
- igt_exit();
}
int fd;
#define MAX_BLT_SIZE 128
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
memset(blob, 'A', sizeof(blob));
close(fd);
}
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture {
fd = drm_open_any();
devid = intel_get_drm_devid(fd);
close(fd);
}
-
- igt_exit();
}
drm_intel_bo *src[2], *dst[2];
int fd;
-int
-main(int argc, char **argv)
+igt_main
{
const uint32_t start[2] = {0, 1024 * 1024 / 4};
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
}
close(fd);
-
- igt_exit();
}
int fd;
uint32_t handle;
-int main(int argc, char **argv)
+igt_main
{
uint8_t expected[OBJECT_SIZE];
uint8_t buf[OBJECT_SIZE];
int ret;
igt_skip_on_simulation();
- igt_subtest_init(argc, argv);
igt_fixture {
fd = drm_open_any();
igt_fixture
close(fd);
-
- igt_exit();
}
}
}
-int main(int argc, char *argv[])
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture {
int ring;
uint32_t batch_data [2] = { MI_NOOP, MI_BATCH_BUFFER_END };
gem_close(fd, batch_handle);
close(fd);
}
-
- igt_exit();
}
int fd;
#define MAX_BLT_SIZE 128
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
memset(blob, 'A', sizeof(blob));
close(fd);
}
-
- igt_exit();
}
render_copyfunc_t copy;
int fd;
-int main(int argc, char **argv)
+igt_main
{
-
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
close(fd);
}
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
int i;
uint32_t tiling, tiling_after;
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
igt_assert(tiling == I915_TILING_X);
igt_assert(tiling_after == I915_TILING_X);
}
-
- igt_exit();
}
int fd;
int devid;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
close(fd);
}
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_skip_on_simulation();
igt_fixture
igt_fixture
close(fd);
-
- igt_exit();
}
}
}
-int main(int argc, char **argv)
+igt_main
{
uint32_t tiling_mode = I915_TILING_X;
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
srandom(0xdeadbeef);
close(fd);
}
-
- igt_exit();
}
drm_intel_bo_unreference(target_bo);
}
-int main(int argc, char **argv)
+igt_main
{
static const struct {
const char *name;
};
int i;
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
close(fd);
}
-
- igt_exit();
}
int fd;
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture
fd = drm_open_any();
igt_fixture
close(fd);
-
- igt_exit();
}
igt_assert(cairo_status(cr) == 0);
}
-int main(int argc, char **argv)
+igt_main
{
data_t data = {};
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
display_fini(&data);
fclose(data.ctl);
}
-
- igt_exit();
}
return 1;
}
-int main(int argc, char **argv)
+igt_main
{
struct {
enum test_flags flags;
};
int i;
- igt_subtest_init(argc, argv);
igt_skip_on_simulation();
igt_fixture {
igt_fixture
close(drm_fd);
-
- igt_exit();
}
return 0;
}
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture {
igt_assert(find_and_open_devices() == 0);
close(intel_fd);
close(nouveau_fd);
}
-
- igt_exit();
}
return ret;
}
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture {
igt_assert(find_and_open_devices() == 0);
close(intel_fd);
close(nouveau_fd);
}
-
- igt_exit();
}
/* test 9 nouveau copy engine?? */
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture {
igt_assert(find_and_open_devices() == 0);
close(intel_fd);
close(nouveau_fd);
}
-
- igt_exit();
}
close(fd);
}
-int main(int argc, char **argv)
+igt_main
{
struct {
const char *name;
};
int i;
- igt_subtest_init(argc, argv);
-
for (i = 0; i < ARRAY_SIZE(tests); i++) {
igt_subtest(tests[i].name)
tests[i].fn();
}
-
- igt_exit();
}