[Intel-gfx] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Correctly handle debugfs errors

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Mon Dec 4 10:45:13 UTC 2017


On Tue, 2017-11-28 at 17:29 +0000, Chris Wilson wrote:
> 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;
> }

Let's be explicit at this time, can you resend (with the R-b and this
change), Michal. I'll then merge this and the kernel patch.

Regards, Joonas

> 
> 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
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list