Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/xe_pm_residency: Skip on igt_power_open failure
@ 2024-09-30 23:27 Jonathan-Cavitt
  2024-10-01  0:16 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Jonathan-Cavitt @ 2024-09-30 23:27 UTC (permalink / raw)
  To: igt-dev; +Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt

The xe_pm_residency@toggle-gt-c6 test fails when
gt_c6_power >= gt_c0_power.  These values are reported by
igt_power_get_mW, which will always report 0 in the case that
igt_power_open fails to open either the hwmon_fd or rapl.fd.  Since the
expected result will always be a failure in this case, skip the test to
end execution early.

Signed-off-by: Jonathan-Cavitt <jonathan.cavitt@intel.com>
---
 tests/intel/xe_pm_residency.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c
index 0e687558b1..36ed46cfc5 100644
--- a/tests/intel/xe_pm_residency.c
+++ b/tests/intel/xe_pm_residency.c
@@ -276,7 +276,11 @@ static void toggle_gt_c6(int fd, int n)
 	int gt;
 	struct igt_power gpu;
 
-	igt_power_open(fd, &gpu, "gpu");
+	/*
+	 * igt_power_get_mW will always return 0 if igt_power_open fails,
+	 * so skip the test in this case.
+	 */
+	igt_skip_on(igt_power_open(fd, &gpu, "gpu"));
 
 	do {
 		fw_handle = igt_debugfs_open(fd, "forcewake_all", O_RDONLY);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-04  6:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 23:27 [PATCH i-g-t] tests/intel/xe_pm_residency: Skip on igt_power_open failure Jonathan-Cavitt
2024-10-01  0:16 ` ✓ CI.xeBAT: success for " Patchwork
2024-10-01  0:44 ` ✓ Fi.CI.BAT: " Patchwork
2024-10-01 10:23 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-01 11:43 ` [PATCH i-g-t] " Kamil Konieczny
2024-10-01 12:36 ` ✗ Fi.CI.IGT: failure for " Patchwork
2024-10-03 17:04 ` ✓ Fi.CI.BAT: success for tests/intel/xe_pm_residency: Skip on igt_power_open failure (rev2) Patchwork
2024-10-03 17:12 ` ✗ CI.xeBAT: failure " Patchwork
2024-10-03 19:12 ` ✗ CI.xeFULL: " Patchwork
2024-10-04  6:28 ` [PATCH i-g-t] tests/intel/xe_pm_residency: Skip on igt_power_open failure Riana Tauro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox