Re: [igt-dev] [PATCH i-g-t] igt: Check drmModeGetResources()

Daniel Vetter
2018-10-04T13:27:09Z

On Thu, Oct 04, 2018 at 03:44:46PM +0300, Arkadiusz Hiler wrote:
> On Wed, Oct 03, 2018 at 08:43:49PM +0100, Chris Wilson wrote:
> > If KMS is not supported on the device, drmModeGetResources() will return
> > NULL, often this is an indication that we should not attempt to run the
> > test. Although it would be preferred to use something like
> > igt_require_display() as the canonical check and assert that
> > drmModeGetResources() did not hit an error, it is not always practical
> > as the tests do not utilize the common igt_display abstraction.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>
> and pushed

I still think a kmstest_require() or so, plus then removing the pile of
add-how igt_require we just sprinkled all over, would be more maintainable
long term. kmstest_require() would also allow us to drop a not-so-cryptic
message into logs.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation