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

Marcin Bernatowicz marcin.bernatowicz at linux.intel.com
Fri Jul 5 14:10:44 UTC 2024


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



More information about the igt-dev mailing list