Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/intel: Do not error on -ECANCELED in xe_vm tests
@ 2023-11-16 23:43 Jonathan Cavitt
  2023-11-17  0:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jonathan Cavitt @ 2023-11-16 23:43 UTC (permalink / raw)
  To: igt-dev; +Cc: saurabhg.gupta, jonathan.cavitt

In the hammer class of unbind tests in xe_vm, a thread is created that
submits jobs to an exec queue initialized on a VM page that is later
unbound.  Because of the unbind, a job is timing out and marking the
exec queue as "banned", which causes all subsequent job submissions to
report as -ECANCELED (-125).

This is expected behavior.  The test should not fail when this is the
case, so use __xe_exec instead of the error-sensitive xe_exec in
hammer_thread, ignoring -ECANCELED and catching all other errors
manually.

Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
 tests/intel/xe_vm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
index f1ccd6c21d..d16bb45892 100644
--- a/tests/intel/xe_vm.c
+++ b/tests/intel/xe_vm.c
@@ -1118,6 +1118,7 @@ static void *hammer_thread(void *tdata)
 	uint32_t exec_queue = xe_exec_queue_create(t->fd, t->vm, t->eci, 0);
 	int b;
 	int i = 0;
+	int err = 0;
 
 	sync[0].handle = syncobj_create(t->fd, 0);
 	pthread_barrier_wait(t->barrier);
@@ -1140,14 +1141,15 @@ static void *hammer_thread(void *tdata)
 		exec.address = batch_addr;
 		if (i % 32) {
 			exec.num_syncs = 0;
-			xe_exec(t->fd, &exec);
+			err = __xe_exec(t->fd, &exec);
 		} else {
 			exec.num_syncs = 1;
-			xe_exec(t->fd, &exec);
+			err = __xe_exec(t->fd, &exec);
 			igt_assert(syncobj_wait(t->fd, &sync[0].handle, 1,
 						INT64_MAX, 0, NULL));
 			syncobj_reset(t->fd, &sync[0].handle, 1);
 		}
+		igt_assert(!err || err == -ECANCELED);
 		++i;
 	}
 
-- 
2.25.1

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

end of thread, other threads:[~2023-11-23  8:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-16 23:43 [igt-dev] [PATCH i-g-t] tests/intel: Do not error on -ECANCELED in xe_vm tests Jonathan Cavitt
2023-11-17  0:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2023-11-17 16:23 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/intel: Do not error on -ECANCELED in xe_vm tests (rev2) Patchwork
2023-11-17 17:15 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-18 11:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-11-23  8:46 ` [igt-dev] [PATCH i-g-t] tests/intel: Do not error on -ECANCELED in xe_vm tests Kamil Konieczny

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