Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume
@ 2025-01-24 10:41 Maciej Patelczyk
  2025-01-24 10:47 ` Grzegorzek, Dominik
  2025-01-24 18:03 ` ✗ Fi.CI.BUILD: failure for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Maciej Patelczyk @ 2025-01-24 10:41 UTC (permalink / raw)
  To: igt-dev; +Cc: Maciej Patelczyk

For single tile workloads under debug are executed sequentially.
The test quickly resumes workload that hit the breakpoint without any
delay. That is then catched by the expectation that there shall be a
break between workloads.

Add sleep before resuming workload so that there is a forced gap
between workloads. If they were properly executed sequentially
then the diff between workloads shall be longer than sleep.

Additionally fix the 'ms' to 'us' typo report in case of assert.

Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
---
 tests/intel/xe_eudebug_online.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index f532387af..d58f7d65f 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -2305,6 +2305,7 @@ static void test_many_sessions_on_tiles(int fd, bool multi_tile)
 				attempt_mask |= BIT(i);
 				should_break = 1;
 
+				usleep(WORKLOAD_DELAY_US);
 				eus = (struct drm_xe_eudebug_event_eu_attention *)data[i]->exception_event;
 				eu_ctl_resume(s[i]->debugger->master_fd, s[i]->debugger->fd,
 					      eus->client_handle, eus->exec_queue_handle,
@@ -2328,11 +2329,11 @@ static void test_many_sessions_on_tiles(int fd, bool multi_tile)
 
 		if (multi_tile)
 			igt_assert_f(diff < WORKLOAD_DELAY_US,
-				     "Expected to execute workloads concurrently. Actual delay: %lu ms\n",
+				     "Expected to execute workloads concurrently. Actual delay: %lu us\n",
 				     diff);
 		else
 			igt_assert_f(diff >= WORKLOAD_DELAY_US,
-				     "Expected a serialization of workloads. Actual delay: %lu ms\n",
+				     "Expected a serialization of workloads. Actual delay: %lu us\n",
 				     diff);
 	}
 
-- 
2.43.0


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

* Re: [PATCH i-g-t] tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume
  2025-01-24 10:41 [PATCH i-g-t] tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume Maciej Patelczyk
@ 2025-01-24 10:47 ` Grzegorzek, Dominik
  2025-01-24 18:03 ` ✗ Fi.CI.BUILD: failure for " Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Grzegorzek, Dominik @ 2025-01-24 10:47 UTC (permalink / raw)
  To: Patelczyk, Maciej, igt-dev@lists.freedesktop.org

On Fri, 2025-01-24 at 11:41 +0100, Maciej Patelczyk wrote:
> For single tile workloads under debug are executed sequentially.
> The test quickly resumes workload that hit the breakpoint without any
> delay. That is then catched by the expectation that there shall be a
> break between workloads.
> 
> Add sleep before resuming workload so that there is a forced gap
> between workloads. If they were properly executed sequentially
> then the diff between workloads shall be longer than sleep.
> 
> Additionally fix the 'ms' to 'us' typo report in case of assert.
> 
> Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
> ---
>  tests/intel/xe_eudebug_online.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
> index f532387af..d58f7d65f 100644
> --- a/tests/intel/xe_eudebug_online.c
> +++ b/tests/intel/xe_eudebug_online.c
> @@ -2305,6 +2305,7 @@ static void test_many_sessions_on_tiles(int fd, bool multi_tile)
>  				attempt_mask |= BIT(i);
>  				should_break = 1;
>  
> +				usleep(WORKLOAD_DELAY_US);
Oh wow. Nice catch! Pretty sure we had that delay before. 
It had to be dropped acidentally down the road, without this below check was pointless.

Reviewed-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
>  				eus = (struct drm_xe_eudebug_event_eu_attention *)data[i]->exception_event;
>  				eu_ctl_resume(s[i]->debugger->master_fd, s[i]->debugger->fd,
>  					      eus->client_handle, eus->exec_queue_handle,
> @@ -2328,11 +2329,11 @@ static void test_many_sessions_on_tiles(int fd, bool multi_tile)
>  
>  		if (multi_tile)
>  			igt_assert_f(diff < WORKLOAD_DELAY_US,
> -				     "Expected to execute workloads concurrently. Actual delay: %lu ms\n",
> +				     "Expected to execute workloads concurrently. Actual delay: %lu us\n",
>  				     diff);
>  		else
>  			igt_assert_f(diff >= WORKLOAD_DELAY_US,
> -				     "Expected a serialization of workloads. Actual delay: %lu ms\n",
> +				     "Expected a serialization of workloads. Actual delay: %lu us\n",
>  				     diff);
>  	}
>  


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

* ✗ Fi.CI.BUILD: failure for tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume
  2025-01-24 10:41 [PATCH i-g-t] tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume Maciej Patelczyk
  2025-01-24 10:47 ` Grzegorzek, Dominik
@ 2025-01-24 18:03 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2025-01-24 18:03 UTC (permalink / raw)
  To: Maciej Patelczyk; +Cc: igt-dev

== Series Details ==

Series: tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume
URL   : https://patchwork.freedesktop.org/series/143924/
State : failure

== Summary ==

Applying: tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume
Using index info to reconstruct a base tree...
M	tests/intel/xe_eudebug_online.c
Falling back to patching base and 3-way merge...
Auto-merging tests/intel/xe_eudebug_online.c
CONFLICT (content): Merge conflict in tests/intel/xe_eudebug_online.c
Patch failed at 0001 tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



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

* [PATCH i-g-t] tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume
@ 2025-01-27 12:10 Maciej Patelczyk
  0 siblings, 0 replies; 4+ messages in thread
From: Maciej Patelczyk @ 2025-01-27 12:10 UTC (permalink / raw)
  To: igt-dev; +Cc: dominik.grzegorzek, Maciej Patelczyk

For single tile workloads under debug are executed sequentially.
The test quickly resumes workload that hit the breakpoint without any
delay. That is then catched by the expectation that there shall be a
break between workloads.

Add sleep before resuming workload so that there is a forced gap
between workloads. If they were properly executed sequentially
then the diff between workloads shall be longer than sleep.

Additionally fix the 'ms' to 'us' typo report in case of assert.

Reviewed-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
---
 tests/intel/xe_eudebug_online.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 726fc55b1..d3504b79f 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -2305,6 +2305,7 @@ static void test_many_sessions_on_tiles(int fd, bool multi_tile)
 				attempt_mask |= BIT(i);
 				should_break = 1;
 
+				usleep(WORKLOAD_DELAY_US);
 				eus = (struct drm_xe_eudebug_event_eu_attention *)data[i]->exception_event;
 				eu_ctl_resume(s[i]->debugger->master_fd, s[i]->debugger->fd,
 					      eus->client_handle, eus->exec_queue_handle,
@@ -2328,11 +2329,11 @@ static void test_many_sessions_on_tiles(int fd, bool multi_tile)
 
 		if (multi_tile)
 			igt_assert_f(diff < WORKLOAD_DELAY_US,
-				     "Expected to execute workloads concurrently. Actual delay: %" PRIu64 " ms\n",
+				     "Expected to execute workloads concurrently. Actual delay: %" PRIu64 " us\n",
 				     diff);
 		else
 			igt_assert_f(diff >= WORKLOAD_DELAY_US,
-				     "Expected a serialization of workloads. Actual delay: %" PRIu64 " ms\n",
+				     "Expected a serialization of workloads. Actual delay: %" PRIu64 " us\n",
 				     diff);
 	}
 
-- 
2.43.0


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

end of thread, other threads:[~2025-01-27 12:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-24 10:41 [PATCH i-g-t] tests/xe_eudebug_online: breakpoint-many-sessions-* add delay before resume Maciej Patelczyk
2025-01-24 10:47 ` Grzegorzek, Dominik
2025-01-24 18:03 ` ✗ Fi.CI.BUILD: failure for " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-01-27 12:10 [PATCH i-g-t] " Maciej Patelczyk

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