mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
tests: s/exit(EXIT_FAILURE)/igt_fail(1)/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
907377da0e
commit
a4cb8954b2
@ -66,11 +66,11 @@ static void handle_bad(int ret, int lerrno, int expected, const char *desc)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
||||
exit(77);
|
||||
} else if (ret != 0) {
|
||||
fprintf(stderr, "%s\n", strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
igt_fail(1);
|
||||
}
|
||||
igt_assert(create.ctx_id != 0);
|
||||
|
||||
|
@ -42,11 +42,11 @@ static void handle_bad(int ret, int expected, const char *desc)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ static uint64_t timer_query(int fd)
|
||||
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;
|
||||
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
||||
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 */
|
||||
|
@ -185,7 +185,7 @@ int main(int argc, char **argv)
|
||||
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);
|
||||
|
@ -111,13 +111,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user