Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v3] tests/intel/xe_pm_residency: Print execution and sleep times
@ 2024-09-20  8:33 Karthik Poosa
  2024-09-20  8:31 ` Gupta, Anshuman
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Karthik Poosa @ 2024-09-20  8:33 UTC (permalink / raw)
  To: igt-dev; +Cc: anshuman.gupta, badal.nilawar, riana.tauro, Karthik Poosa

Print the workload execution and sleep times of the test to help diagnose
timeouts.

v2: Patchwork test re-run.

v3:
 - Assert if syncobj_wait took more than 1.2 seconds, as it causes the test
   to timeout because test would sleep for more than 120 seconds which
   triggers per task timeout.

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
---
 tests/intel/xe_pm_residency.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c
index 0e687558b..343fdd694 100644
--- a/tests/intel/xe_pm_residency.c
+++ b/tests/intel/xe_pm_residency.c
@@ -139,11 +139,14 @@ static void exec_load(int fd, struct drm_xe_engine_class_instance *hwe, unsigned
 		elapsed = igt_nsec_elapsed(&tv);
 		igt_assert_eq(data->data, done[1]);
 
-		igt_debug("Execution took %.3fms (submit %.1fus, wait %.1fus)\n",
+		igt_info("Execution took %.3fms (submit %.1fus, wait %.1fus)\n",
 			  1e-6 * elapsed,
 			  1e-3 * submit,
 			  1e-3 * (elapsed - submit));
 
+		/* Assert if syncobj_wait took more than 1.2 seconds */
+		igt_assert((uint64_t)(elapsed - submit) < (uint64_t)(1.2 * NSEC_PER_SEC));
+
 		syncobj_reset(fd, &syncobj, 1);
 
 		/*
-- 
2.25.1


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

end of thread, other threads:[~2024-10-14 11:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20  8:33 [PATCH i-g-t v3] tests/intel/xe_pm_residency: Print execution and sleep times Karthik Poosa
2024-09-20  8:31 ` Gupta, Anshuman
2024-09-20 11:46   ` Riana Tauro
2024-09-23  9:16     ` Poosa, Karthik
2024-10-14 11:13   ` Kamil Konieczny
2024-09-20  9:46 ` ✓ Fi.CI.BAT: success for tests/intel/xe_pm_residency: Print execution and sleep times (rev3) Patchwork
2024-09-20  9:53 ` ✓ CI.xeBAT: " Patchwork
2024-09-20 13:47 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-21  0:24 ` ✗ Fi.CI.IGT: " Patchwork

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