[PATCH i-g-t] lib/igt_device_scan: limit fetched device attributes from udev
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Thu Jan 30 10:20:36 UTC 2025
On Wed, Jan 29, 2025 at 03:48:49PM +0100, Kamil Konieczny wrote:
> Hi Zbigniew,
> On 2025-01-28 at 09:30:14 +0100, Zbigniew Kempczyński wrote:
> > Tests don't need all attributes so default device scanning is now
> > limited to small list directly used in device filters. To be backward
> > compatible tools like lsgpu still may scan whole attribute list what
> > keeps this behavior intact.
> >
> > Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> > Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> > ---
> > lib/igt_device_scan.c | 69 ++++++++++++++++++++++++++++++-------------
> > lib/igt_device_scan.h | 1 +
> > tools/lsgpu.c | 2 +-
> > 3 files changed, 50 insertions(+), 22 deletions(-)
> >
> > diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
> > index c36b0efa90..15f6bf5728 100644
> > --- a/lib/igt_device_scan.c
> > +++ b/lib/igt_device_scan.c
> > @@ -22,6 +22,7 @@
> > *
> > */
> >
> > +#include "drmtest.h"
>
> Could you add a note here why this is needed? Something like
>
> #include "drmtest.h" /* for macro ARRAY_SIZE */
I don't think we should go this way, even if I use only ARRAY_SIZE from
this header. If someone will modify the code and start using different
macro from this header this comment will be outdated and incorrect.
--
Zbigniew
More information about the igt-dev
mailing list