* [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
@ 2017-12-14 0:48 Antonio Argenziano
2017-12-14 1:07 ` ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev2) Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Antonio Argenziano @ 2017-12-14 0:48 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)
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 | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
index edc40767..0c36a7eb 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();
@@ -619,6 +616,11 @@ static void test_reset_count(const struct intel_execution_engine *e,
close(fd);
}
+static int __get_reset_stats(int fd, struct local_drm_i915_reset_stats *rs)
+{
+ return drmIoctl(fd, GET_RESET_STATS_IOCTL, &rs);
+}
+
static int _test_params(int fd, int ctx, uint32_t flags, uint32_t pad)
{
struct local_drm_i915_reset_stats rs;
@@ -644,10 +646,17 @@ 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) {
+ struct local_drm_i915_reset_stats rs;
+ rs.ctx_id = ctx;
+ rs.reset_count = rand();
+ rs.batch_active = rand();
+ rs.batch_pending = rand();
+ igt_assert(__get_reset_stats(fd, &rs));
+ igt_assert(rs.reset_count != 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] 5+ messages in thread
* ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev2)
2017-12-14 0:48 [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
@ 2017-12-14 1:07 ` Patchwork
2017-12-14 1:52 ` ✗ Fi.CI.IGT: warning " Patchwork
2018-01-16 18:44 ` [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-12-14 1:07 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: intel-gfx
== Series Details ==
Series: tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev2)
URL : https://patchwork.freedesktop.org/series/35101/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
ea7015f1fabbdfdd52a145162c658d2e90161ec5 lib/core: Don't leak dummyloads between subtests
with latest DRM-Tip kernel build CI_DRM_3512
ad17a7aa7ae2 drm-tip: 2017y-12m-13d-21h-59m-15s UTC integration manifest
No testlist changes.
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
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:445s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:438s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:386s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:512s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:280s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:503s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:509s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:488s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:475s
fi-elk-e7500 total:224 pass:163 dwarn:15 dfail:0 fail:0 skip:45
fi-gdg-551 total:288 pass:179 dwarn:1 dfail:0 fail:0 skip:108 time:268s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:540s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:405s
fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:416s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:395s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:481s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:430s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:483s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:527s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:475s
fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:536s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:592s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:450s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:539s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:569s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:492s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:452s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:554s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:416s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:601s
fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:628s
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:488s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_667/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.IGT: warning for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev2)
2017-12-14 0:48 [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
2017-12-14 1:07 ` ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev2) Patchwork
@ 2017-12-14 1:52 ` Patchwork
2018-01-16 18:44 ` [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-12-14 1:52 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: intel-gfx
== Series Details ==
Series: tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev2)
URL : https://patchwork.freedesktop.org/series/35101/
State : warning
== Summary ==
Test kms_draw_crc:
Subgroup draw-method-rgb565-mmap-wc-untiled:
skip -> PASS (shard-snb)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail -> PASS (shard-snb) fdo#101623
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-busy-crc-atomic:
skip -> PASS (shard-hsw)
Subgroup flip-vs-cursor-varying-size:
skip -> PASS (shard-hsw) fdo#102670
Test pm_rc6_residency:
Subgroup rc6-accuracy:
pass -> SKIP (shard-snb)
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
shard-hsw total:2712 pass:1537 dwarn:1 dfail:0 fail:10 skip:1164 time:9538s
shard-snb total:2712 pass:1309 dwarn:1 dfail:0 fail:11 skip:1391 time:8107s
Blacklisted hosts:
shard-apl total:2694 pass:1668 dwarn:1 dfail:0 fail:22 skip:1001 time:13518s
shard-kbl total:2712 pass:1774 dwarn:32 dfail:0 fail:25 skip:881 time:11285s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_667/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
2017-12-14 0:48 [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
2017-12-14 1:07 ` ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev2) Patchwork
2017-12-14 1:52 ` ✗ Fi.CI.IGT: warning " Patchwork
@ 2018-01-16 18:44 ` Antonio Argenziano
2018-01-16 19:11 ` Michel Thierry
2 siblings, 1 reply; 5+ messages in thread
From: Antonio Argenziano @ 2018-01-16 18:44 UTC (permalink / raw)
To: intel-gfx
On 13/12/17 16:48, 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)
>
> 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>
Ping.
> ---
> tests/gem_reset_stats.c | 25 +++++++++++++++++--------
> 1 file changed, 17 insertions(+), 8 deletions(-)
>
> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
> index edc40767..0c36a7eb 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();
> @@ -619,6 +616,11 @@ static void test_reset_count(const struct intel_execution_engine *e,
> close(fd);
> }
>
> +static int __get_reset_stats(int fd, struct local_drm_i915_reset_stats *rs)
> +{
> + return drmIoctl(fd, GET_RESET_STATS_IOCTL, &rs);
> +}
> +
> static int _test_params(int fd, int ctx, uint32_t flags, uint32_t pad)
> {
> struct local_drm_i915_reset_stats rs;
> @@ -644,10 +646,17 @@ 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) {
> + struct local_drm_i915_reset_stats rs;
> + rs.ctx_id = ctx;
> + rs.reset_count = rand();
> + rs.batch_active = rand();
> + rs.batch_pending = rand();
> + igt_assert(__get_reset_stats(fd, &rs));
> + igt_assert(rs.reset_count != 0);
> + }
> }
>
> igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation
2018-01-16 18:44 ` [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
@ 2018-01-16 19:11 ` Michel Thierry
0 siblings, 0 replies; 5+ messages in thread
From: Michel Thierry @ 2018-01-16 19:11 UTC (permalink / raw)
To: Antonio Argenziano, intel-gfx
On 1/16/2018 10:44 AM, Antonio Argenziano wrote:
> On 13/12/17 16:48, 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)
>>
>> 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>
>
> Ping.
>
>> ---
>> tests/gem_reset_stats.c | 25 +++++++++++++++++--------
>> 1 file changed, 17 insertions(+), 8 deletions(-)
>>
>> diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
>> index edc40767..0c36a7eb 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();
>> @@ -619,6 +616,11 @@ static void test_reset_count(const struct
>> intel_execution_engine *e,
>> close(fd);
>> }
>> +static int __get_reset_stats(int fd, struct
>> local_drm_i915_reset_stats *rs)
>> +{
>> + return drmIoctl(fd, GET_RESET_STATS_IOCTL, &rs);
>> +}
>> +
>> static int _test_params(int fd, int ctx, uint32_t flags, uint32_t pad)
>> {
>> struct local_drm_i915_reset_stats rs;
>> @@ -644,10 +646,17 @@ 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) {
>> + struct local_drm_i915_reset_stats rs;
>> + rs.ctx_id = ctx;
>> + rs.reset_count = rand();
>> + rs.batch_active = rand();
>> + rs.batch_pending = rand();
>> + igt_assert(__get_reset_stats(fd, &rs));
>> + igt_assert(rs.reset_count != 0);
>> + }
Probably you only care about reset_count == 0, so I would just reuse
existing code like this:
if (cap != root)
igt_assert(get_reset_count(fd, cxt) == 0);
>> }
>> igt_assert_eq(_test_params(fd, ctx, 0, bad), -EINVAL);
>>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-16 19:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 0:48 [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
2017-12-14 1:07 ` ✓ Fi.CI.BAT: success for tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation (rev2) Patchwork
2017-12-14 1:52 ` ✗ Fi.CI.IGT: warning " Patchwork
2018-01-16 18:44 ` [PATCH i-g-t v2] tests/gem_reset_stats: Fix retrieval of hangcheck stats expectation Antonio Argenziano
2018-01-16 19:11 ` Michel Thierry
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.