All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
@ 2018-01-16 20:56 Antonio Argenziano
  2018-01-16 21:41 ` ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3) Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Antonio Argenziano @ 2018-01-16 20:56 UTC (permalink / raw)
  To: intel-gfx

The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
when not root. That is no longer true in the driver since commit
4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
the test was incorrectly failing.

v2:
	- Add the commit that changed the behaviour in the Driver to the
	  commit message. (Michel)

v3:
	- Reuse get_reset_count instead of implementing a new function.
	  (Michel)

Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
---
 tests/gem_reset_stats.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
index edc40767..17a9b648 100644
--- a/tests/gem_reset_stats.c
+++ b/tests/gem_reset_stats.c
@@ -605,10 +605,7 @@ static void test_reset_count(const struct intel_execution_engine *e,
 
 		c2 = get_reset_count(fd, ctx);
 
-		if (ctx == 0)
-			igt_assert(c2 == -EPERM);
-		else
-			igt_assert(c2 == 0);
+		igt_assert(c2 == 0);
 	}
 
 	igt_waitchildren();
@@ -644,10 +641,11 @@ static void _check_param_ctx(const int fd, const int ctx, const cap_t cap)
 	const uint32_t bad = rand() + 1;
 
 	if (ctx == 0) {
-		if (cap == root)
-			igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
-		else
-			igt_assert_eq(_test_params(fd, ctx, 0, 0), -EPERM);
+		igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
+
+		if (cap != root) {
+			igt_assert(get_reset_count(fd, ctx) == 0);
+		}
 	}
 
 	igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3)
  2018-01-16 20:56 [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
@ 2018-01-16 21:41 ` Patchwork
  2018-01-16 21:43 ` [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Michel Thierry
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-01-16 21:41 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: intel-gfx

== Series Details ==

Series: tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3)
URL   : https://patchwork.freedesktop.org/series/35101/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
5f5b4a65e672bd10a4422cc1cb3c466659c52db8 igt/gem_linear_blits: Compute GTT size using 4G limit

with latest DRM-Tip kernel build CI_DRM_3636
a0ca279440c8 drm-tip: 2018y-01m-16d-10h-49m-51s UTC integration manifest

No testlist changes.

Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-kbl-r) fdo#104172 +1

fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:426s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:426s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:373s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:492s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:283s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:487s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:487s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:472s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:464s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:278s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:513s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:393s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:400s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:413s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:461s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:415s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:460s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:498s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:451s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:503s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:582s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:432s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:513s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:526s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:492s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:481s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:434s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:525s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:399s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:572s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:478s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_787/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
  2018-01-16 20:56 [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
  2018-01-16 21:41 ` ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3) Patchwork
@ 2018-01-16 21:43 ` Michel Thierry
  2018-01-17  0:41 ` ✓ Fi.CI.IGT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3) Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Michel Thierry @ 2018-01-16 21:43 UTC (permalink / raw)
  To: Antonio Argenziano, intel-gfx

On 1/16/2018 12:56 PM, Antonio Argenziano wrote:
> The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
> when not root. That is no longer true in the driver since commit
> 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
> the test was incorrectly failing.
> 
> v2:
> 	- Add the commit that changed the behaviour in the Driver to the
> 	  commit message. (Michel)
> 
> v3:
> 	- Reuse get_reset_count instead of implementing a new function.
> 	  (Michel)
> 
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
> ---
>   tests/gem_reset_stats.c | 14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
> index edc40767..17a9b648 100644
> --- a/tests/gem_reset_stats.c
> +++ b/tests/gem_reset_stats.c
> @@ -605,10 +605,7 @@ static void test_reset_count(const struct intel_execution_engine *e,
>   
>   		c2 = get_reset_count(fd, ctx);
>   
> -		if (ctx == 0)
> -			igt_assert(c2 == -EPERM);
> -		else
> -			igt_assert(c2 == 0);
> +		igt_assert(c2 == 0);
>   	}
>   
>   	igt_waitchildren();
> @@ -644,10 +641,11 @@ static void _check_param_ctx(const int fd, const int ctx, const cap_t cap)
>   	const uint32_t bad = rand() + 1;
>   
>   	if (ctx == 0) {
> -		if (cap == root)
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> -		else
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), -EPERM);
> +		igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> +
> +		if (cap != root) {
> +			igt_assert(get_reset_count(fd, ctx) == 0);
> +		}
>   	}
>   
>   	igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
> 

This matches the driver's current behavior, which is better than testing 
for something that is no longer true. Based on that,

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3)
  2018-01-16 20:56 [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
  2018-01-16 21:41 ` ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3) Patchwork
  2018-01-16 21:43 ` [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Michel Thierry
@ 2018-01-17  0:41 ` Patchwork
  2018-01-17 10:05   ` Daniel Vetter
  2018-01-17 10:06   ` Daniel Vetter
  4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-01-17  0:41 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: intel-gfx

== Series Details ==

Series: tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3)
URL   : https://patchwork.freedesktop.org/series/35101/
State : success

== Summary ==

Test gem_tiled_swapping:
        Subgroup non-threaded:
                incomplete -> PASS       (shard-snb) fdo#104218 +1
Test gem_softpin:
        Subgroup noreloc-s3:
                pass       -> SKIP       (shard-snb) fdo#103375
Test kms_flip:
        Subgroup flip-vs-fences-interruptible:
                dmesg-warn -> PASS       (shard-hsw) fdo#102614
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                fail       -> PASS       (shard-snb) fdo#101623

fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

shard-hsw        total:2665 pass:1514 dwarn:1   dfail:0   fail:10  skip:1139 time:8980s
shard-snb        total:2729 pass:1318 dwarn:1   dfail:0   fail:10  skip:1400 time:7938s
Blacklisted hosts:
shard-apl        total:2657 pass:1646 dwarn:1   dfail:0   fail:24  skip:984 time:12957s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_787/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
  2018-01-16 20:56 [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
@ 2018-01-17 10:05   ` Daniel Vetter
  2018-01-16 21:43 ` [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Michel Thierry
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-01-17 10:05 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: IGT development, intel-gfx

On Tue, Jan 16, 2018 at 12:56:51PM -0800, Antonio Argenziano wrote:
> The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
> when not root. That is no longer true in the driver since commit
> 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
> the test was incorrectly failing.
> 
> v2:
> 	- Add the commit that changed the behaviour in the Driver to the
> 	  commit message. (Michel)
> 
> v3:
> 	- Reuse get_reset_count instead of implementing a new function.
> 	  (Michel)
> 
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>

Please remember to send igt patches to the new mailing list in the future.
Adding it.
-Daniel
> ---
>  tests/gem_reset_stats.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
> index edc40767..17a9b648 100644
> --- a/tests/gem_reset_stats.c
> +++ b/tests/gem_reset_stats.c
> @@ -605,10 +605,7 @@ static void test_reset_count(const struct intel_execution_engine *e,
>  
>  		c2 = get_reset_count(fd, ctx);
>  
> -		if (ctx == 0)
> -			igt_assert(c2 == -EPERM);
> -		else
> -			igt_assert(c2 == 0);
> +		igt_assert(c2 == 0);
>  	}
>  
>  	igt_waitchildren();
> @@ -644,10 +641,11 @@ static void _check_param_ctx(const int fd, const int ctx, const cap_t cap)
>  	const uint32_t bad = rand() + 1;
>  
>  	if (ctx == 0) {
> -		if (cap == root)
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> -		else
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), -EPERM);
> +		igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> +
> +		if (cap != root) {
> +			igt_assert(get_reset_count(fd, ctx) == 0);
> +		}
>  	}
>  
>  	igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
> -- 
> 2.14.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
@ 2018-01-17 10:05   ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-01-17 10:05 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: IGT development, intel-gfx

On Tue, Jan 16, 2018 at 12:56:51PM -0800, Antonio Argenziano wrote:
> The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
> when not root. That is no longer true in the driver since commit
> 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
> the test was incorrectly failing.
> 
> v2:
> 	- Add the commit that changed the behaviour in the Driver to the
> 	  commit message. (Michel)
> 
> v3:
> 	- Reuse get_reset_count instead of implementing a new function.
> 	  (Michel)
> 
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>

Please remember to send igt patches to the new mailing list in the future.
Adding it.
-Daniel
> ---
>  tests/gem_reset_stats.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
> index edc40767..17a9b648 100644
> --- a/tests/gem_reset_stats.c
> +++ b/tests/gem_reset_stats.c
> @@ -605,10 +605,7 @@ static void test_reset_count(const struct intel_execution_engine *e,
>  
>  		c2 = get_reset_count(fd, ctx);
>  
> -		if (ctx == 0)
> -			igt_assert(c2 == -EPERM);
> -		else
> -			igt_assert(c2 == 0);
> +		igt_assert(c2 == 0);
>  	}
>  
>  	igt_waitchildren();
> @@ -644,10 +641,11 @@ static void _check_param_ctx(const int fd, const int ctx, const cap_t cap)
>  	const uint32_t bad = rand() + 1;
>  
>  	if (ctx == 0) {
> -		if (cap == root)
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> -		else
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), -EPERM);
> +		igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> +
> +		if (cap != root) {
> +			igt_assert(get_reset_count(fd, ctx) == 0);
> +		}
>  	}
>  
>  	igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
> -- 
> 2.14.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
  2018-01-16 20:56 [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
@ 2018-01-17 10:06   ` Daniel Vetter
  2018-01-16 21:43 ` [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Michel Thierry
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-01-17 10:06 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: IGT development, intel-gfx

On Tue, Jan 16, 2018 at 12:56:51PM -0800, Antonio Argenziano wrote:
> The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
> when not root. That is no longer true in the driver since commit
> 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
> the test was incorrectly failing.
> 
> v2:
> 	- Add the commit that changed the behaviour in the Driver to the
> 	  commit message. (Michel)
> 
> v3:
> 	- Reuse get_reset_count instead of implementing a new function.
> 	  (Michel)
> 
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>

Please remember to send igt patches to the new mailing list in the future.
Adding it.
-Daniel
> ---
>  tests/gem_reset_stats.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
> index edc40767..17a9b648 100644
> --- a/tests/gem_reset_stats.c
> +++ b/tests/gem_reset_stats.c
> @@ -605,10 +605,7 @@ static void test_reset_count(const struct intel_execution_engine *e,
>  
>  		c2 = get_reset_count(fd, ctx);
>  
> -		if (ctx == 0)
> -			igt_assert(c2 == -EPERM);
> -		else
> -			igt_assert(c2 == 0);
> +		igt_assert(c2 == 0);
>  	}
>  
>  	igt_waitchildren();
> @@ -644,10 +641,11 @@ static void _check_param_ctx(const int fd, const int ctx, const cap_t cap)
>  	const uint32_t bad = rand() + 1;
>  
>  	if (ctx == 0) {
> -		if (cap == root)
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> -		else
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), -EPERM);
> +		igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> +
> +		if (cap != root) {
> +			igt_assert(get_reset_count(fd, ctx) == 0);
> +		}
>  	}
>  
>  	igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
> -- 
> 2.14.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
@ 2018-01-17 10:06   ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-01-17 10:06 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: IGT development, intel-gfx

On Tue, Jan 16, 2018 at 12:56:51PM -0800, Antonio Argenziano wrote:
> The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
> when not root. That is no longer true in the driver since commit
> 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
> the test was incorrectly failing.
> 
> v2:
> 	- Add the commit that changed the behaviour in the Driver to the
> 	  commit message. (Michel)
> 
> v3:
> 	- Reuse get_reset_count instead of implementing a new function.
> 	  (Michel)
> 
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>

Please remember to send igt patches to the new mailing list in the future.
Adding it.
-Daniel
> ---
>  tests/gem_reset_stats.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
> index edc40767..17a9b648 100644
> --- a/tests/gem_reset_stats.c
> +++ b/tests/gem_reset_stats.c
> @@ -605,10 +605,7 @@ static void test_reset_count(const struct intel_execution_engine *e,
>  
>  		c2 = get_reset_count(fd, ctx);
>  
> -		if (ctx == 0)
> -			igt_assert(c2 == -EPERM);
> -		else
> -			igt_assert(c2 == 0);
> +		igt_assert(c2 == 0);
>  	}
>  
>  	igt_waitchildren();
> @@ -644,10 +641,11 @@ static void _check_param_ctx(const int fd, const int ctx, const cap_t cap)
>  	const uint32_t bad = rand() + 1;
>  
>  	if (ctx == 0) {
> -		if (cap == root)
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> -		else
> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), -EPERM);
> +		igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
> +
> +		if (cap != root) {
> +			igt_assert(get_reset_count(fd, ctx) == 0);
> +		}
>  	}
>  
>  	igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
> -- 
> 2.14.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
  2018-01-17 10:06   ` Daniel Vetter
  (?)
@ 2018-01-17 17:42   ` Antonio Argenziano
  2018-01-26  0:52     ` Antonio Argenziano
  -1 siblings, 1 reply; 11+ messages in thread
From: Antonio Argenziano @ 2018-01-17 17:42 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: IGT development



On 17/01/18 02:06, Daniel Vetter wrote:
> On Tue, Jan 16, 2018 at 12:56:51PM -0800, Antonio Argenziano wrote:
>> The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
>> when not root. That is no longer true in the driver since commit
>> 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
>> the test was incorrectly failing.
>>
>> v2:
>> 	- Add the commit that changed the behaviour in the Driver to the
>> 	  commit message. (Michel)
>>
>> v3:
>> 	- Reuse get_reset_count instead of implementing a new function.
>> 	  (Michel)
>>
>> Cc: Michel Thierry <michel.thierry@intel.com>
>> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>

This revision of the patch has already been reviewed on intel-gfx, 
pasting RB here.

Reviewed-by: Michel Thierry <michel.thierry@intel.com>

> 
> Please remember to send igt patches to the new mailing list in the future.
> Adding it.
> -Daniel
>> ---
>>   tests/gem_reset_stats.c | 14 ++++++--------
>>   1 file changed, 6 insertions(+), 8 deletions(-)
>>
>> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
>> index edc40767..17a9b648 100644
>> --- a/tests/gem_reset_stats.c
>> +++ b/tests/gem_reset_stats.c
>> @@ -605,10 +605,7 @@ static void test_reset_count(const struct intel_execution_engine *e,
>>   
>>   		c2 = get_reset_count(fd, ctx);
>>   
>> -		if (ctx == 0)
>> -			igt_assert(c2 == -EPERM);
>> -		else
>> -			igt_assert(c2 == 0);
>> +		igt_assert(c2 == 0);
>>   	}
>>   
>>   	igt_waitchildren();
>> @@ -644,10 +641,11 @@ static void _check_param_ctx(const int fd, const int ctx, const cap_t cap)
>>   	const uint32_t bad = rand() + 1;
>>   
>>   	if (ctx == 0) {
>> -		if (cap == root)
>> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
>> -		else
>> -			igt_assert_eq(_test_params(fd, ctx, 0, 0), -EPERM);
>> +		igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
>> +
>> +		if (cap != root) {
>> +			igt_assert(get_reset_count(fd, ctx) == 0);
>> +		}
>>   	}
>>   
>>   	igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
>> -- 
>> 2.14.2
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
  2018-01-17 17:42   ` [igt-dev] [Intel-gfx] " Antonio Argenziano
@ 2018-01-26  0:52     ` Antonio Argenziano
  2018-01-26  9:36       ` Petri Latvala
  0 siblings, 1 reply; 11+ messages in thread
From: Antonio Argenziano @ 2018-01-26  0:52 UTC (permalink / raw)
  To: Daniel Vetter, Latvala Petri, Arkadiusz Hiler; +Cc: IGT development



On 17/01/18 09:42, Antonio Argenziano wrote:
> 
> 
> On 17/01/18 02:06, Daniel Vetter wrote:
>> On Tue, Jan 16, 2018 at 12:56:51PM -0800, Antonio Argenziano wrote:
>>> The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
>>> when not root. That is no longer true in the driver since commit
>>> 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and 
>>> therefore
>>> the test was incorrectly failing.
>>>
>>> v2:
>>>     - Add the commit that changed the behaviour in the Driver to the
>>>       commit message. (Michel)
>>>
>>> v3:
>>>     - Reuse get_reset_count instead of implementing a new function.
>>>       (Michel)
>>>
>>> Cc: Michel Thierry <michel.thierry@intel.com>
>>> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
> 
> This revision of the patch has already been reviewed on intel-gfx, 
> pasting RB here.
> 
> Reviewed-by: Michel Thierry <michel.thierry@intel.com>

Can we merge this?

Thanks,
Antonio

> 
>>
>> Please remember to send igt patches to the new mailing list in the 
>> future.
>> Adding it.
>> -Daniel
>>> ---
>>>   tests/gem_reset_stats.c | 14 ++++++--------
>>>   1 file changed, 6 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
>>> index edc40767..17a9b648 100644
>>> --- a/tests/gem_reset_stats.c
>>> +++ b/tests/gem_reset_stats.c
>>> @@ -605,10 +605,7 @@ static void test_reset_count(const struct 
>>> intel_execution_engine *e,
>>>           c2 = get_reset_count(fd, ctx);
>>> -        if (ctx == 0)
>>> -            igt_assert(c2 == -EPERM);
>>> -        else
>>> -            igt_assert(c2 == 0);
>>> +        igt_assert(c2 == 0);
>>>       }
>>>       igt_waitchildren();
>>> @@ -644,10 +641,11 @@ static void _check_param_ctx(const int fd, 
>>> const int ctx, const cap_t cap)
>>>       const uint32_t bad = rand() + 1;
>>>       if (ctx == 0) {
>>> -        if (cap == root)
>>> -            igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
>>> -        else
>>> -            igt_assert_eq(_test_params(fd, ctx, 0, 0), -EPERM);
>>> +        igt_assert_eq(_test_params(fd, ctx, 0, 0), 0);
>>> +
>>> +        if (cap != root) {
>>> +            igt_assert(get_reset_count(fd, ctx) == 0);
>>> +        }
>>>       }
>>>       igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
>>> -- 
>>> 2.14.2
>>>
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
  2018-01-26  0:52     ` Antonio Argenziano
@ 2018-01-26  9:36       ` Petri Latvala
  0 siblings, 0 replies; 11+ messages in thread
From: Petri Latvala @ 2018-01-26  9:36 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: IGT development, Daniel Vetter

On Thu, Jan 25, 2018 at 04:52:43PM -0800, Antonio Argenziano wrote:
> 
> 
> On 17/01/18 09:42, Antonio Argenziano wrote:
> > 
> > 
> > On 17/01/18 02:06, Daniel Vetter wrote:
> > > On Tue, Jan 16, 2018 at 12:56:51PM -0800, Antonio Argenziano wrote:
> > > > The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
> > > > when not root. That is no longer true in the driver since commit
> > > > 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and
> > > > therefore
> > > > the test was incorrectly failing.
> > > > 
> > > > v2:
> > > >     - Add the commit that changed the behaviour in the Driver to the
> > > >       commit message. (Michel)
> > > > 
> > > > v3:
> > > >     - Reuse get_reset_count instead of implementing a new function.
> > > >       (Michel)
> > > > 
> > > > Cc: Michel Thierry <michel.thierry@intel.com>
> > > > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > > Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
> > 
> > This revision of the patch has already been reviewed on intel-gfx,
> > pasting RB here.
> > 
> > Reviewed-by: Michel Thierry <michel.thierry@intel.com>
> 
> Can we merge this?
> 


Merged now, thanks.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-01-26  9:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 20:56 [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
2018-01-16 21:41 ` ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3) Patchwork
2018-01-16 21:43 ` [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Michel Thierry
2018-01-17  0:41 ` ✓ Fi.CI.IGT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev3) Patchwork
2018-01-17 10:05 ` [Intel-gfx] [PATCH i-g-t v3] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Daniel Vetter
2018-01-17 10:05   ` Daniel Vetter
2018-01-17 10:06 ` [Intel-gfx] " Daniel Vetter
2018-01-17 10:06   ` Daniel Vetter
2018-01-17 17:42   ` [igt-dev] [Intel-gfx] " Antonio Argenziano
2018-01-26  0:52     ` Antonio Argenziano
2018-01-26  9:36       ` Petri Latvala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.