* [PATCH i-g-t] igt/gem_exec_fence: Add subtest for invalid flags
@ 2017-11-03 11:57 Tvrtko Ursulin
2017-11-03 12:04 ` Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 11:57 UTC (permalink / raw)
To: Intel-gfx
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
We need to check that the kernel rejects attempts to pass in
unknown flags.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/gem_exec_fence.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c
index 2a6da8b074a6..6ee944ffadda 100644
--- a/tests/gem_exec_fence.c
+++ b/tests/gem_exec_fence.c
@@ -1017,6 +1017,34 @@ static void test_syncobj_invalid_wait(int fd)
syncobj_destroy(fd, fence.handle);
}
+static void test_syncobj_invalid_flags(int fd)
+{
+ const uint32_t bbe = MI_BATCH_BUFFER_END;
+ struct drm_i915_gem_exec_object2 obj;
+ struct drm_i915_gem_execbuffer2 execbuf;
+ struct local_gem_exec_fence fence = {
+ .handle = syncobj_create(fd),
+ };
+
+ memset(&execbuf, 0, sizeof(execbuf));
+ execbuf.buffers_ptr = to_user_pointer(&obj);
+ execbuf.buffer_count = 1;
+ execbuf.flags = LOCAL_EXEC_FENCE_ARRAY;
+ execbuf.cliprects_ptr = to_user_pointer(&fence);
+ execbuf.num_cliprects = 1;
+
+ memset(&obj, 0, sizeof(obj));
+ obj.handle = gem_create(fd, 4096);
+ gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
+
+ /* set all flags to hit an invalid one */
+ fence.flags = ~0;
+ igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL);
+
+ gem_close(fd, obj.handle);
+ syncobj_destroy(fd, fence.handle);
+}
+
static void test_syncobj_signal(int fd)
{
const uint32_t bbe = MI_BATCH_BUFFER_END;
@@ -1539,6 +1567,9 @@ igt_main
igt_subtest("syncobj-invalid-wait")
test_syncobj_invalid_wait(i915);
+ igt_subtest("syncobj-invalid-flags")
+ test_syncobj_invalid_flags(i915);
+
igt_subtest("syncobj-signal")
test_syncobj_signal(i915);
--
2.9.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH i-g-t] igt/gem_exec_fence: Add subtest for invalid flags
2017-11-03 11:57 [PATCH i-g-t] igt/gem_exec_fence: Add subtest for invalid flags Tvrtko Ursulin
@ 2017-11-03 12:04 ` Chris Wilson
2017-11-03 12:36 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-03 13:12 ` ✗ Fi.CI.IGT: warning " Patchwork
2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2017-11-03 12:04 UTC (permalink / raw)
To: Tvrtko Ursulin, Intel-gfx
Quoting Tvrtko Ursulin (2017-11-03 11:57:54)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> We need to check that the kernel rejects attempts to pass in
> unknown flags.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tests/gem_exec_fence.c | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c
> index 2a6da8b074a6..6ee944ffadda 100644
> --- a/tests/gem_exec_fence.c
> +++ b/tests/gem_exec_fence.c
> @@ -1017,6 +1017,34 @@ static void test_syncobj_invalid_wait(int fd)
> syncobj_destroy(fd, fence.handle);
> }
>
> +static void test_syncobj_invalid_flags(int fd)
> +{
> + const uint32_t bbe = MI_BATCH_BUFFER_END;
> + struct drm_i915_gem_exec_object2 obj;
> + struct drm_i915_gem_execbuffer2 execbuf;
> + struct local_gem_exec_fence fence = {
> + .handle = syncobj_create(fd),
> + };
> +
> + memset(&execbuf, 0, sizeof(execbuf));
> + execbuf.buffers_ptr = to_user_pointer(&obj);
> + execbuf.buffer_count = 1;
> + execbuf.flags = LOCAL_EXEC_FENCE_ARRAY;
> + execbuf.cliprects_ptr = to_user_pointer(&fence);
> + execbuf.num_cliprects = 1;
> +
> + memset(&obj, 0, sizeof(obj));
> + obj.handle = gem_create(fd, 4096);
> + gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> +
> + /* set all flags to hit an invalid one */
> + fence.flags = ~0;
> + igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL);
> +
> + gem_close(fd, obj.handle);
> + syncobj_destroy(fd, fence.handle);
Ok. All suggestions I have here end up being kcov-afl.
This applies the rule that the execbuf is correct for all but the single
invalid field,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread* ✓ Fi.CI.BAT: success for igt/gem_exec_fence: Add subtest for invalid flags
2017-11-03 11:57 [PATCH i-g-t] igt/gem_exec_fence: Add subtest for invalid flags Tvrtko Ursulin
2017-11-03 12:04 ` Chris Wilson
@ 2017-11-03 12:36 ` Patchwork
2017-11-03 13:12 ` ✗ Fi.CI.IGT: warning " Patchwork
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-11-03 12:36 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: intel-gfx
== Series Details ==
Series: igt/gem_exec_fence: Add subtest for invalid flags
URL : https://patchwork.freedesktop.org/series/33120/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
c8d1ea24d3bfaf11b223bbe22407aeca196d0d89 tests/debugfs_test: Pretty print subdirectories
with latest DRM-Tip kernel build CI_DRM_3311
2f945d948d05 drm-tip: 2017y-11m-03d-09h-28m-20s UTC integration manifest
Testlist changes:
+igt@gem_exec_fence@syncobj-invalid-flags
Test chamelium:
Subgroup dp-crc-fast:
incomplete -> PASS (fi-kbl-7500u) fdo#102514
fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:447s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:468s
fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:381s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:541s
fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:277s
fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:517s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:505s
fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:513s
fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:505s
fi-cfl-s total:289 pass:254 dwarn:3 dfail:0 fail:0 skip:32 time:565s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:439s
fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:262s
fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:588s
fi-glk-dsi total:289 pass:258 dwarn:0 dfail:0 fail:1 skip:30 time:494s
fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:432s
fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:430s
fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:433s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:462s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:495s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:574s
fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:479s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:582s
fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:572s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:455s
fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:596s
fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:653s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:529s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:508s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:470s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:581s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:425s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_472/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread* ✗ Fi.CI.IGT: warning for igt/gem_exec_fence: Add subtest for invalid flags
2017-11-03 11:57 [PATCH i-g-t] igt/gem_exec_fence: Add subtest for invalid flags Tvrtko Ursulin
2017-11-03 12:04 ` Chris Wilson
2017-11-03 12:36 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-11-03 13:12 ` Patchwork
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-11-03 13:12 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: intel-gfx
== Series Details ==
Series: igt/gem_exec_fence: Add subtest for invalid flags
URL : https://patchwork.freedesktop.org/series/33120/
State : warning
== Summary ==
Test drv_suspend:
Subgroup fence-restore-untiled-hibernate:
dmesg-fail -> FAIL (shard-hsw) fdo#103375
Test kms_busy:
Subgroup extended-modeset-hang-newfb-with-reset-render-B:
pass -> DMESG-WARN (shard-hsw)
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
shard-hsw total:2539 pass:1432 dwarn:1 dfail:0 fail:9 skip:1097 time:9322s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_472/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-03 13:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 11:57 [PATCH i-g-t] igt/gem_exec_fence: Add subtest for invalid flags Tvrtko Ursulin
2017-11-03 12:04 ` Chris Wilson
2017-11-03 12:36 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-03 13:12 ` ✗ Fi.CI.IGT: warning " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox