mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
tests/debugfs_pipe_crc: correctly skip on unsupported platforms
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
4ba97ddf96
commit
0412f32670
@ -199,6 +199,10 @@ int main(int argc, char **argv)
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
igt_fixture {
|
||||
size_t written;
|
||||
int ret;
|
||||
const char *cmd = "pipe A none";
|
||||
|
||||
data.drm_fd = drm_open_any();
|
||||
do_or_die(igt_set_vt_graphics_mode());
|
||||
do_or_die(igt_install_exit_handler(exit_handler));
|
||||
@ -208,8 +212,12 @@ int main(int argc, char **argv)
|
||||
igt_debugfs_init(&data.debugfs);
|
||||
data.ctl = igt_debugfs_fopen(&data.debugfs,
|
||||
"i915_display_crc_ctl", "r+");
|
||||
if (!data.ctl)
|
||||
igt_skip("No display_crc_ctl found, kernel too old\n");
|
||||
igt_require_f(data.ctl,
|
||||
"No display_crc_ctl found, kernel too old\n");
|
||||
written = fwrite(cmd, 1, strlen(cmd), data.ctl);
|
||||
ret = fflush(data.ctl);
|
||||
igt_require_f((written == strlen(cmd) && ret == 0) || errno != ENODEV,
|
||||
"CRCs not supported on this platform\n");
|
||||
}
|
||||
|
||||
igt_subtest("bad-pipe")
|
||||
|
Loading…
x
Reference in New Issue
Block a user