[Intel-gfx] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Correctly handle debugfs errors
Chris Wilson
chris at chris-wilson.co.uk
Tue Nov 28 17:29:50 UTC 2017
Quoting Michal Wajdeczko (2017-11-28 17:01:15)
> In commit 3f6ae7b19 ("igt/kms_frontbuffer_tracking: Keep the debugfs
> dir around") we introduced custom variant of __igt_debugfs_read function
> that fires assert when debugfs returns an error. Replace that assert
> with proper error handling to allow use of errors like -ENODEV.
Like ENODEV or just ENODEV?
Oh, it appears I goofed in c5da0662d1c0 and didn't change the open error
from a bool to an int error code. You could also take the opportunity to
then return -errno.
And here we can debate whether you want to use
if (len < 0) {
igt_assert_eq(len, -ENODEV);
len = 0;
}
Other than the topic of whether we want to flag any other error here
(e.g. one could imagine a surprising EPERM, EACCES or ENFILE), looks ok.
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list