public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* Re: [igt-dev] [PATCH] tests/kms_cursor_legacy: Add missing munmap
  2019-03-01 19:49 [igt-dev] [PATCH] tests/kms_cursor_legacy: Add missing munmap Nischala Yelchuri
@ 2019-03-01 19:17 ` Chris Wilson
  2019-03-01 19:53 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2019-03-01 19:17 UTC (permalink / raw)
  To: Nischala Yelchuri, igt-dev

Quoting Nischala Yelchuri (2019-03-01 19:49:00)
> Added munmap, removed extra assert in two_screens_flip_vs_cursor().
> Replaced hard-coded values with PAGE_SIZE macro.
> 
> Cc: Easwar Hariharan <easwar.hariharan@intel.com>
> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Signed-off-by: Nischala Yelchuri <nischala.yelchuri@intel.com>
> ---
>  tests/kms_cursor_legacy.c | 26 ++++++++++++++------------
>  1 file changed, 14 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> index 79df79a3..770e8f14 100644
> --- a/tests/kms_cursor_legacy.c
> +++ b/tests/kms_cursor_legacy.c
> @@ -43,6 +43,8 @@
>  #define DRM_CAP_CURSOR_HEIGHT 0x9
>  #endif
>  
> +#define PAGE_SIZE      4096

When the time comes to do s/4096/sysconf(_SC_PAGE_SIZE)/ I apologise.

> @@ -870,7 +872,7 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
>                 igt_require(drmGetCap(display->drm_fd, DRM_CAP_CRTC_IN_VBLANK_EVENT, &val) == 0);
>         }
>  
> -       shared = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
> +       shared = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
>         igt_assert(shared != MAP_FAILED);
>  
>         igt_fail_on(modeset && !atomic);
> @@ -932,7 +934,6 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
>  
>                                 igt_set_timeout(35, "Stuck modeset");
>                                 igt_assert_eq(read(display->drm_fd, &vbl, sizeof(vbl)), sizeof(vbl));
> -                               igt_assert_eq(read(display->drm_fd, &vbl, sizeof(vbl)), sizeof(vbl));
>                                 igt_reset_timeout();
>  
>                                 if (!nloops)
> @@ -1020,6 +1021,7 @@ done:
>         igt_remove_fb(display->drm_fd, &fb_info);
>         igt_remove_fb(display->drm_fd, &fb2_info);
>         igt_remove_fb(display->drm_fd, &cursor_fb);
> +       munmap((void *)shared, PAGE_SIZE);
>  }

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
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

* [igt-dev] [PATCH] tests/kms_cursor_legacy: Add missing munmap
@ 2019-03-01 19:49 Nischala Yelchuri
  2019-03-01 19:17 ` Chris Wilson
  2019-03-01 19:53 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Nischala Yelchuri @ 2019-03-01 19:49 UTC (permalink / raw)
  To: igt-dev

Added munmap, removed extra assert in two_screens_flip_vs_cursor().
Replaced hard-coded values with PAGE_SIZE macro.

Cc: Easwar Hariharan <easwar.hariharan@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Nischala Yelchuri <nischala.yelchuri@intel.com>
---
 tests/kms_cursor_legacy.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 79df79a3..770e8f14 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -43,6 +43,8 @@
 #define DRM_CAP_CURSOR_HEIGHT 0x9
 #endif
 
+#define PAGE_SIZE	4096
+
 IGT_TEST_DESCRIPTION("Stress legacy cursor ioctl");
 
 igt_pipe_crc_t *pipe_crc;
@@ -63,7 +65,7 @@ static void stress(igt_display_t *display,
 		num_children = -num_children;
 	}
 
-	results = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+	results = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 	igt_assert(results != MAP_FAILED);
 
 	memset(&arg, 0, sizeof(arg));
@@ -146,7 +148,7 @@ static void stress(igt_display_t *display,
 	}
 
 	gem_close(display->drm_fd, arg.handle);
-	munmap(results, 4096);
+	munmap(results, PAGE_SIZE);
 }
 
 static igt_output_t *set_fb_on_crtc(igt_display_t *display, enum pipe pipe, struct igt_fb *fb_info)
@@ -387,7 +389,7 @@ static void flip(igt_display_t *display,
 	uint64_t *results;
 	struct igt_fb fb_info, fb_info2, argb_fb, cursor_fb, cursor_fb2;
 
-	results = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+	results = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 	igt_assert(results != MAP_FAILED);
 
 	flip_pipe = find_connected_pipe(display, !!flip_pipe);
@@ -451,7 +453,7 @@ static void flip(igt_display_t *display,
 	}
 	igt_waitchildren();
 
-	munmap(results, 4096);
+	munmap(results, PAGE_SIZE);
 
 	igt_remove_fb(display->drm_fd, &fb_info);
 	if (flip_pipe != cursor_pipe)
@@ -690,7 +692,7 @@ static void flip_vs_cursor(igt_display_t *display, enum flip_test mode, int nloo
 	 * variations caused by cpu speed changing are eliminated.
 	 */
 	if (target > 1) {
-		shared = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+		shared = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 		igt_assert(shared != MAP_FAILED);
 
 		cpu = sched_getcpu();
@@ -754,7 +756,7 @@ static void flip_vs_cursor(igt_display_t *display, enum flip_test mode, int nloo
 	if (target > 1) {
 		shared[0] = 1;
 		igt_waitchildren();
-		munmap((void *)shared, 4096);
+		munmap((void *)shared, PAGE_SIZE);
 		sched_setaffinity(0, sizeof(oldmask), &oldmask);
 	}
 
@@ -870,7 +872,7 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
 		igt_require(drmGetCap(display->drm_fd, DRM_CAP_CRTC_IN_VBLANK_EVENT, &val) == 0);
 	}
 
-	shared = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+	shared = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 	igt_assert(shared != MAP_FAILED);
 
 	igt_fail_on(modeset && !atomic);
@@ -932,7 +934,6 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
 
 				igt_set_timeout(35, "Stuck modeset");
 				igt_assert_eq(read(display->drm_fd, &vbl, sizeof(vbl)), sizeof(vbl));
-				igt_assert_eq(read(display->drm_fd, &vbl, sizeof(vbl)), sizeof(vbl));
 				igt_reset_timeout();
 
 				if (!nloops)
@@ -1020,6 +1021,7 @@ done:
 	igt_remove_fb(display->drm_fd, &fb_info);
 	igt_remove_fb(display->drm_fd, &fb2_info);
 	igt_remove_fb(display->drm_fd, &cursor_fb);
+	munmap((void *)shared, PAGE_SIZE);
 }
 
 static void cursor_vs_flip(igt_display_t *display, enum flip_test mode, int nloops)
@@ -1037,7 +1039,7 @@ static void cursor_vs_flip(igt_display_t *display, enum flip_test mode, int nloo
 	if (mode >= flip_test_atomic)
 		igt_require(display->is_atomic);
 
-	shared = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+	shared = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 	igt_assert(shared != MAP_FAILED);
 
 	igt_require((output = set_fb_on_crtc(display, pipe, &fb_info)));
@@ -1103,7 +1105,7 @@ static void cursor_vs_flip(igt_display_t *display, enum flip_test mode, int nloo
 
 	igt_remove_fb(display->drm_fd, &fb_info);
 	igt_remove_fb(display->drm_fd, &cursor_fb);
-	munmap((void *)shared, 4096);
+	munmap((void *)shared, PAGE_SIZE);
 	if (argb_fb.gem_handle)
 		igt_remove_fb(display->drm_fd, &argb_fb);
 	if (cursor_fb2.gem_handle)
@@ -1123,7 +1125,7 @@ static void two_screens_cursor_vs_flip(igt_display_t *display, int nloops, bool
 	};
 	igt_output_t *outputs[2];
 
-	shared = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+	shared = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 	igt_assert(shared != MAP_FAILED);
 
 	if (atomic)
@@ -1210,7 +1212,7 @@ static void two_screens_cursor_vs_flip(igt_display_t *display, int nloops, bool
 	igt_remove_fb(display->drm_fd, &fb_info[0]);
 	igt_remove_fb(display->drm_fd, &fb_info[1]);
 	igt_remove_fb(display->drm_fd, &cursor_fb);
-	munmap((void *)shared, 4096);
+	munmap((void *)shared, PAGE_SIZE);
 }
 
 static void flip_vs_cursor_crc(igt_display_t *display, bool atomic)
-- 
2.17.1

_______________________________________________
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/kms_cursor_legacy: Add missing munmap
  2019-03-01 19:49 [igt-dev] [PATCH] tests/kms_cursor_legacy: Add missing munmap Nischala Yelchuri
  2019-03-01 19:17 ` Chris Wilson
@ 2019-03-01 19:53 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-03-01 19:53 UTC (permalink / raw)
  To: Nischala Yelchuri; +Cc: igt-dev

== Series Details ==

Series: tests/kms_cursor_legacy: Add missing munmap
URL   : https://patchwork.freedesktop.org/series/57438/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5680 -> IGTPW_2543
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_2543 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2543, 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/57438/revisions/1/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-bsw-kefka:       PASS -> DMESG-WARN

  * igt@runner@aborted:
    - fi-bsw-kefka:       NOTRUN -> FAIL

  
Known issues
------------

  Here are the changes found in IGTPW_2543 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_create@basic-files:
    - fi-gdg-551:         NOTRUN -> SKIP [fdo#109271] +106

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         PASS -> DMESG-WARN [fdo#108622]

  * igt@kms_busy@basic-flip-c:
    - fi-gdg-551:         NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@runner@aborted:
    - fi-apl-guc:         NOTRUN -> FAIL [fdo#108622] / [fdo#109720] / [fdo#109799]

  
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
  [fdo#109799]: https://bugs.freedesktop.org/show_bug.cgi?id=109799


Participating hosts (43 -> 39)
------------------------------

  Additional (1): fi-gdg-551 
  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y 


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

    * IGT: IGT_4866 -> IGTPW_2543

  CI_DRM_5680: 348fd7b7fa6584957fa6a5143058b3fbb319806b @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2543: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2543/
  IGT_4866: 189956af183c245eb237b3be4fa22953ec93bbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2543/
_______________________________________________
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-03-01 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-01 19:49 [igt-dev] [PATCH] tests/kms_cursor_legacy: Add missing munmap Nischala Yelchuri
2019-03-01 19:17 ` Chris Wilson
2019-03-01 19:53 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

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