[PATCH i-g-t] lib/igt_device_scan: Skip attributes in subdirectories

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Mon Jul 8 07:00:26 UTC 2024


On Fri, Jul 05, 2024 at 04:10:44PM +0200, Marcin Bernatowicz wrote:
> Skip reading attributes in subdirectories as they are not used for
> filtering. This change improves speed and reduces the impact of
> non-DRM related component bugs on testing, such as the ASPM exposed
> link/l1_aspm attribute issue. After removing a Virtual Function (VF),
> accessing the link/l1_aspm attribute on the Physical Function (PF)
> leads to NPD.
> 
> v2: removed unrelated changes, improved description (Michal)
> 
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
> ---
>  lib/igt_device_scan.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
> index 9a2da3d62..8e2297087 100644
> --- a/lib/igt_device_scan.c
> +++ b/lib/igt_device_scan.c
> @@ -448,6 +448,10 @@ static bool is_on_blacklist(const char *what)
>  	if (what == NULL)
>  		return false;
>  
> +	/* Skip attributes in subdirectories */
> +	if (strchr(what, '/') != NULL)
> +		return true;
> +
>  	while ((key = keys[i++])) {
>  		if (strcmp(key, what) == 0)
>  			return true;
> -- 
> 2.31.1
> 

Already r-b'd in first version, so copy it here:

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

--
Zbigniew


More information about the igt-dev mailing list