mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 01:46:14 +00:00
tests: roll out igt_require some more
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
5951ffb6a0
commit
23eee39489
@ -143,8 +143,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
igt_subtest("reads") {
|
igt_subtest("reads") {
|
||||||
if (!(flags & TEST_READ))
|
igt_require(flags & TEST_READ);
|
||||||
igt_skip();
|
|
||||||
|
|
||||||
printf("checking partial reads\n");
|
printf("checking partial reads\n");
|
||||||
|
|
||||||
@ -173,8 +172,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
igt_subtest("writes") {
|
igt_subtest("writes") {
|
||||||
if (!(flags & TEST_WRITE))
|
igt_require(flags & TEST_WRITE);
|
||||||
igt_skip();
|
|
||||||
|
|
||||||
printf("checking partial writes\n");
|
printf("checking partial writes\n");
|
||||||
|
|
||||||
@ -225,8 +223,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
igt_subtest("read-writes") {
|
igt_subtest("read-writes") {
|
||||||
if (!((flags & TEST_BOTH) == TEST_BOTH))
|
igt_require((flags & TEST_BOTH) == TEST_BOTH);
|
||||||
igt_skip();
|
|
||||||
|
|
||||||
printf("checking partial writes after partial reads\n");
|
printf("checking partial writes after partial reads\n");
|
||||||
|
|
||||||
|
@ -367,12 +367,7 @@ static int dfs_open(int mode)
|
|||||||
dfs_base, card_index, dfs_entry);
|
dfs_base, card_index, dfs_entry);
|
||||||
|
|
||||||
fh = open(fname, mode);
|
fh = open(fname, mode);
|
||||||
if (fh == -1) {
|
igt_require(fh >= 0);
|
||||||
fprintf(stderr,
|
|
||||||
"error %d opening '%s/%d/%s'. too old kernel?\n",
|
|
||||||
errno, dfs_base, card_index, dfs_entry);
|
|
||||||
igt_skip();
|
|
||||||
}
|
|
||||||
|
|
||||||
return fh;
|
return fh;
|
||||||
}
|
}
|
||||||
|
@ -77,10 +77,7 @@ int main(int argc, char *argv[])
|
|||||||
sleep(5);
|
sleep(5);
|
||||||
|
|
||||||
file = fopen(path, "r");
|
file = fopen(path, "r");
|
||||||
if (!file) {
|
igt_require(file);
|
||||||
printf("kernel too old or rc6 not supported on this platform.\n");
|
|
||||||
igt_skip();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* claim success if no rc6 enabled. */
|
/* claim success if no rc6 enabled. */
|
||||||
if (readit(path) == 0)
|
if (readit(path) == 0)
|
||||||
|
@ -148,10 +148,7 @@ int main(int argc, char *argv[])
|
|||||||
ret = asprintf(&path, sysfs_base_path, device, junk->name);
|
ret = asprintf(&path, sysfs_base_path, device, junk->name);
|
||||||
igt_assert(ret != -1);
|
igt_assert(ret != -1);
|
||||||
junk->filp = fopen(path, junk->mode);
|
junk->filp = fopen(path, junk->mode);
|
||||||
if (junk->filp == NULL) {
|
igt_require(junk->filp == NULL);
|
||||||
printf("Kernel is too old. GTFO\n");
|
|
||||||
igt_skip();
|
|
||||||
}
|
|
||||||
val = readval(junk->filp);
|
val = readval(junk->filp);
|
||||||
igt_assert(val >= 0);
|
igt_assert(val >= 0);
|
||||||
junk++;
|
junk++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user