public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/i915/query: Test invalid TOPO_INFO flags
@ 2019-06-21 19:15 Stuart Summers
  2019-06-21 19:48 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 1 reply; 3+ messages in thread
From: Stuart Summers @ 2019-06-21 19:15 UTC (permalink / raw)
  To: igt-dev

Current tests only check for invalid flags in the i915_query_ioctl
itself. A user might add invalid flags in the actual TOPO_INFO data,
though, so adding a test cast to confirm the kernel appropriately
rejects this.

Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 tests/i915/i915_query.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/tests/i915/i915_query.c b/tests/i915/i915_query.c
index ecbec3ae..8a84d867 100644
--- a/tests/i915/i915_query.c
+++ b/tests/i915/i915_query.c
@@ -33,6 +33,8 @@ IGT_TEST_DESCRIPTION("Testing the i915 query uAPI.");
  */
 #define MIN_TOPOLOGY_ITEM_SIZE (sizeof(struct drm_i915_query_topology_info) + 3)
 
+#define INVALID_FLAGS 42
+
 static int
 __i915_query(int fd, struct drm_i915_query *q)
 {
@@ -80,7 +82,7 @@ static void test_query_garbage(int fd)
 	 * change in the future.
 	 */
 	memset(&query, 0, sizeof(query));
-	query.flags = 42;
+	query.flags = INVALID_FLAGS;
 	igt_assert_eq(__i915_query(fd, &query), -EINVAL);
 
 	/* Test a couple of invalid pointers. */
@@ -96,6 +98,7 @@ static void test_query_garbage_items(int fd)
 {
 	struct drm_i915_query_item items[2];
 	struct drm_i915_query_item *items_ptr;
+	struct drm_i915_query_topology_info *topo_info;
 	int i, n_items;
 
 	/*
@@ -104,9 +107,24 @@ static void test_query_garbage_items(int fd)
 	 */
 	memset(items, 0, sizeof(items));
 	items[0].query_id = DRM_I915_QUERY_TOPOLOGY_INFO;
-	items[0].flags = 42;
+	items[0].flags = INVALID_FLAGS;
+	i915_query_items(fd, items, 1);
+	igt_assert_eq(items[0].length, -EINVAL);
+
+	/*
+	 * Currently no TopologyInfo item flags are valid.
+	 * Subject to change in the future.
+	 */
+	memset(items, 0, sizeof(items));
+	items[0].query_id = DRM_I915_QUERY_TOPOLOGY_INFO;
+	items[0].flags = 0;
+	i915_query_items(fd, items, 1);
+	topo_info = calloc(1, items[0].length);
+	topo_info->flags = INVALID_FLAGS;
+	items[0].data_ptr = to_user_pointer(topo_info);
 	i915_query_items(fd, items, 1);
 	igt_assert_eq(items[0].length, -EINVAL);
+	free(topo_info);
 
 	/*
 	 * Test an invalid query id in the second item and verify that the first
-- 
2.21.0.5.gaeb582a983

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

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

* [igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/query: Test invalid TOPO_INFO flags
  2019-06-21 19:15 [igt-dev] [PATCH i-g-t] tests/i915/query: Test invalid TOPO_INFO flags Stuart Summers
@ 2019-06-21 19:48 ` Patchwork
  2019-06-21 22:18   ` Summers, Stuart
  0 siblings, 1 reply; 3+ messages in thread
From: Patchwork @ 2019-06-21 19:48 UTC (permalink / raw)
  To: Stuart Summers; +Cc: igt-dev

== Series Details ==

Series: tests/i915/query: Test invalid TOPO_INFO flags
URL   : https://patchwork.freedesktop.org/series/62552/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6327 -> IGTPW_3188
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_3188 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_3188, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/62552/revisions/1/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_3188:

### IGT changes ###

#### Possible regressions ####

  * igt@runner@aborted:
    - fi-gdg-551:         NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3188/fi-gdg-551/igt@runner@aborted.html

  


Participating hosts (50 -> 43)
------------------------------

  Additional (1): fi-gdg-551 
  Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * IGT: IGT_5064 -> IGTPW_3188

  CI_DRM_6327: d2ee3427319b7e89e9ab49c8e4b714789b611dfe @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3188: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3188/
  IGT_5064: 22850c1906550fb97b405c019275dcfb34be8cf7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3188/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/query: Test invalid TOPO_INFO flags
  2019-06-21 19:48 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2019-06-21 22:18   ` Summers, Stuart
  0 siblings, 0 replies; 3+ messages in thread
From: Summers, Stuart @ 2019-06-21 22:18 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org


[-- Attachment #1.1: Type: text/plain, Size: 2186 bytes --]

On Fri, 2019-06-21 at 19:48 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: tests/i915/query: Test invalid TOPO_INFO flags
> URL   : https://patchwork.freedesktop.org/series/62552/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_6327 -> IGTPW_3188
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with IGTPW_3188 absolutely need to
> be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the
> changes
>   introduced in IGTPW_3188, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false
> positives in CI.
> 
>   External URL: 
> https://patchwork.freedesktop.org/api/1.0/series/62552/revisions/1/mbox/
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in
> IGTPW_3188:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@runner@aborted:
>     - fi-gdg-551:         NOTRUN -> [FAIL][1]
>    [1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3188/fi-gdg-551/igt@runner@aborted.html

Seems like something new/unrelated?
<7>[   80.892026] [drm:vgem_gem_dumb_create [vgem]] Created object of
size 1
<1>[   80.892056] BUG: kernel NULL pointer dereference, address:
0000000000000000

Thanks,
Stuart

> 
>   
> 
> 
> Participating hosts (50 -> 43)
> ------------------------------
> 
>   Additional (1): fi-gdg-551 
>   Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-
> squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 
> 
> 
> Build changes
> -------------
> 
>   * IGT: IGT_5064 -> IGTPW_3188
> 
>   CI_DRM_6327: d2ee3427319b7e89e9ab49c8e4b714789b611dfe @
> git://anongit.freedesktop.org/gfx-ci/linux
>   IGTPW_3188: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3188/
>   IGT_5064: 22850c1906550fb97b405c019275dcfb34be8cf7 @
> git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
> 
> == Logs ==
> 
> For more details see: 
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3188/

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3270 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

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

end of thread, other threads:[~2019-06-21 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-21 19:15 [igt-dev] [PATCH i-g-t] tests/i915/query: Test invalid TOPO_INFO flags Stuart Summers
2019-06-21 19:48 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-06-21 22:18   ` Summers, Stuart

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