if (ret != 0 && lerrno != expected) {
fprintf(stderr, "%s - errno was %d, but should have been %d\n",
desc, lerrno, expected);
- exit(EXIT_FAILURE);
+ igt_fail(1);
} else if (ret == 0) {
fprintf(stderr, "%s - Command succeeded, but should have failed\n",
desc);
- exit(EXIT_FAILURE);
+ igt_fail(1);
}
}
exit(77);
} else if (ret != 0) {
fprintf(stderr, "%s\n", strerror(errno));
- exit(EXIT_FAILURE);
+ igt_fail(1);
}
igt_assert(create.ctx_id != 0);
if (ret != 0 && errno != expected) {
fprintf(stderr, "%s - errno was %d, but should have been %d\n",
desc, errno, expected);
- exit(EXIT_FAILURE);
+ igt_fail(1);
} else if (ret == 0) {
fprintf(stderr, "%s - Command succeeded, but should have failed\n",
desc);
- exit(EXIT_FAILURE);
+ igt_fail(1);
}
}
reg_read.offset = 0x2358;
if (drmIoctl(fd, REG_READ_IOCTL, ®_read)) {
perror("positive test case failed: ");
- exit(EXIT_FAILURE);
+ igt_fail(1);
}
return reg_read.val;
sleep(1);
if (timer_query(fd) == reg_read.val) {
fprintf(stderr, "Timer isn't moving, probably busted\n");
- exit(EXIT_FAILURE);
+ igt_fail(1);
}
/* bad reg */
ret = gem_bo_wait_timeout(fd, dst2->handle, &timeout);
if (ret) {
fprintf(stderr, "Timed wait failed %s\n", strerror(errno));
- exit(EXIT_FAILURE);
+ igt_fail(1);
}
igt_assert(gem_bo_busy(fd, dst2->handle) == false);
igt_assert(timeout != 0);
if (diff > (SLEEP_DURATION + RC6_FUDGE)) {
fprintf(stderr, "Diff was too high. That is unpossible\n");
- exit(EXIT_FAILURE);
+ igt_fail(1);
}
if (diff < (SLEEP_DURATION - RC6_FUDGE)) {
fprintf(stderr, "GPU was not in RC6 long enough. Check that "
"the GPU is as idle as possible (ie. no X, "
"running and running no other tests)\n");
- exit(EXIT_FAILURE);
+ igt_fail(1);
}
exit(EXIT_SUCCESS);