[PATCH v2 i-g-t 2/3] tests/intel/xe_gt_freq: Skip test if 'freq0' node is missing

Marcin Bernatowicz marcin.bernatowicz at linux.intel.com
Thu Aug 1 10:27:47 UTC 2024


Add igt_require check for 'freq0' node to skip frequency tests
on VF devices where this node is not present, preventing test
failure.

v2: Use "node" instead of "attribute" for more accuracy

Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
---
 tests/intel/xe_gt_freq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
index c9d59508b..397007ebe 100644
--- a/tests/intel/xe_gt_freq.c
+++ b/tests/intel/xe_gt_freq.c
@@ -437,6 +437,7 @@ igt_main
 	igt_fixture {
 		fd = drm_open_driver(DRIVER_XE);
 
+		igt_require(xe_sysfs_gt_has_node(fd, 0, "freq0"));
 		/* The defaults are the same. Stashing the gt0 is enough */
 		stash_min = get_freq(fd, 0, "min");
 		stash_max = get_freq(fd, 0, "max");
-- 
2.31.1



More information about the igt-dev mailing list