[igt-dev] [PATCH i-g-t v1 1/1] Introduce new method of device selection

Kempczynski, Zbigniew zbigniew.kempczynski at intel.com
Mon Jul 15 11:22:34 UTC 2019


On Mon, 2019-07-15 at 11:31 +0200, Daniel Vetter wrote:
> 
> The entire point of review is to create a shared understanding of the
> problems involved. Dropping that stuff is pretty crucial.
> 
> Also, I'm not really following your description. Maybe there's a gap
> between the udev library interface and what I can get at the command line.
> But if I look at
> 
> # udevadm info -e
> 
> And for a specific device, the pile of links/higher level directories,
> then I think we should be able to find everything.

Data acquired from udev database are not enough in some cases to do 
the logic I need in CI. So without following the sysattrs I'm not able
to do what I wanted to achieve with udev filtering only. 

'udevadm info -e' show properties only, sysattrs are not printed.

> Maybe another part of the misunderstanding: Imo we don't want to identify
> physical devices, we want to identify drm_devices. Module reload is very
> much the exception, and the trickery we have to let igt/lib load the
> module if it's not there is imo a bit a hack. Aside from for vgem, where
> it makes some sense at least.
> 
> So rough algorithimg I had in mind:
> 1. iterate all drm_devices in sysfs
> 2. walk the link to physical device
> 3. go up the hierarchy
> 
> Anywhere where we spot a name=value pair that matches what we filter, we
> stop, and use that device. Plus augmented with the udevadm info -e stuff,
> so you can add arbitrary additional stuff on top. Zero reinvented wheel
> needed in igt.
> 
> Aside: Maybe we should ditch the module autoload stuff again, except for
> vgem. Really no idea why that's needed.

All assumptions I made regarding patch I sent were sum of all talks with
different people. Your point of view is strictly udev/drm but other think
about devices in more (how to say it?) contextual manner. 

Could you write how do you think should igt test run should look like
when device filter could be passed by user? 

I mean: ./gem_device_test --device ??? --device ??? 

Zbigniew


More information about the igt-dev mailing list