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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> 
> Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux