tests: s/exit(77)/igt_skip()/

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2013-08-13 12:51:35 +02:00
parent c9d0378281
commit b30d95f33c
7 changed files with 7 additions and 7 deletions

View File

@ -54,7 +54,7 @@ static uint32_t context_create(int fd)
ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create); ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create);
if (ret == -1 && (errno == ENODEV || errno == EINVAL)) if (ret == -1 && (errno == ENODEV || errno == EINVAL))
exit(77); igt_skip();
else if (ret) else if (ret)
abort(); abort();

View File

@ -60,7 +60,7 @@ static uint32_t context_create(int fd)
ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create); ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create);
if (ret == -1 && (errno == ENODEV || errno == EINVAL)) { if (ret == -1 && (errno == ENODEV || errno == EINVAL)) {
exit(77); igt_skip();
} else if (ret) { } else if (ret) {
abort(); abort();
} }

View File

@ -53,7 +53,7 @@ int main(int argc, char *argv[])
if (ret != 0 && (errno == ENODEV || errno == EINVAL)) { if (ret != 0 && (errno == ENODEV || errno == EINVAL)) {
printf("Kernel is too old, or contexts not supported: %s\n", printf("Kernel is too old, or contexts not supported: %s\n",
strerror(errno)); strerror(errno));
exit(77); igt_skip();
} else if (ret != 0) { } else if (ret != 0) {
fprintf(stderr, "%s\n", strerror(errno)); fprintf(stderr, "%s\n", strerror(errno));
igt_fail(1); igt_fail(1);

View File

@ -65,7 +65,7 @@ static uint32_t context_create(int fd)
ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create); ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create);
if (ret == -1 && (errno == ENODEV || errno == EINVAL)) if (ret == -1 && (errno == ENODEV || errno == EINVAL))
exit(77); igt_skip();
else if (ret) else if (ret)
abort(); abort();

View File

@ -371,7 +371,7 @@ static int dfs_open(int mode)
fprintf(stderr, fprintf(stderr,
"error %d opening '%s/%d/%s'. too old kernel?\n", "error %d opening '%s/%d/%s'. too old kernel?\n",
errno, dfs_base, card_index, dfs_entry); errno, dfs_base, card_index, dfs_entry);
exit(77); igt_skip();
} }
return fh; return fh;

View File

@ -79,7 +79,7 @@ int main(int argc, char *argv[])
file = fopen(path, "r"); file = fopen(path, "r");
if (!file) { if (!file) {
printf("kernel too old or rc6 not supported on this platform.\n"); printf("kernel too old or rc6 not supported on this platform.\n");
exit(77); igt_skip();
} }
/* claim success if no rc6 enabled. */ /* claim success if no rc6 enabled. */

View File

@ -150,7 +150,7 @@ int main(int argc, char *argv[])
junk->filp = fopen(path, junk->mode); junk->filp = fopen(path, junk->mode);
if (junk->filp == NULL) { if (junk->filp == NULL) {
printf("Kernel is too old. GTFO\n"); printf("Kernel is too old. GTFO\n");
exit(77); igt_skip();
} }
val = readval(junk->filp); val = readval(junk->filp);
igt_assert(val >= 0); igt_assert(val >= 0);