All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] igt/pm_backlight: Make the actual_brightness test readable
@ 2018-09-07  8:12 Chris Wilson
  2018-09-07  8:56 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2018-09-07  8:12 UTC (permalink / raw)
  To: igt-dev

Previous horror

(pm_backlight:2947) CRITICAL: Test assertion failure function test_and_verify, file ../tests/pm_backlight.c:112:
(pm_backlight:2947) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result
(pm_backlight:2947) CRITICAL: error: 7125 > 0

References: https://bugs.freedesktop.org/show_bug.cgi?id=107847
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/pm_backlight.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/pm_backlight.c b/tests/pm_backlight.c
index e94340a2b..32808cdf6 100644
--- a/tests/pm_backlight.c
+++ b/tests/pm_backlight.c
@@ -98,8 +98,8 @@ static int backlight_write(int value, const char *fname)
 
 static void test_and_verify(struct context *context, int val)
 {
+	const int tolerance = val * TOLERANCE / 100;
 	int result;
-	int tolerance = val * TOLERANCE / 100;
 
 	igt_assert_eq(backlight_write(val, "brightness"), 0);
 	igt_assert_eq(backlight_read(&result, "brightness"), 0);
@@ -107,9 +107,11 @@ static void test_and_verify(struct context *context, int val)
 	igt_assert_eq(result, val);
 
 	igt_assert_eq(backlight_read(&result, "actual_brightness"), 0);
-	/* Some rounding may happen depending on hw. Just check that it's close enough. */
-	igt_assert_lte(result, min(context->max, val + tolerance));
-	igt_assert_lte(max(0, val - tolerance), result);
+	/* Some rounding may happen depending on hw */
+	igt_assert_f(result >= max(0, val - tolerance) &&
+		     result <= min(context->max, val + tolerance),
+		     "actual_brightness [%d] did not match expected brightness [%d +- %d]\n",
+		     result, val, tolerance);
 }
 
 static void test_brightness(struct context *context)
-- 
2.19.0.rc2

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for igt/pm_backlight: Make the actual_brightness test readable
  2018-09-07  8:12 [igt-dev] [PATCH i-g-t] igt/pm_backlight: Make the actual_brightness test readable Chris Wilson
@ 2018-09-07  8:56 ` Patchwork
  2018-09-07 13:57 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2018-09-07 14:39 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-09-07  8:56 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/pm_backlight: Make the actual_brightness test readable
URL   : https://patchwork.freedesktop.org/series/49328/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4782 -> IGTPW_1807 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@amdgpu/amd_basic@userptr:
      fi-kbl-8809g:       PASS -> INCOMPLETE (fdo#107402)

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-bsw-n3050:       PASS -> FAIL (fdo#100368)

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    
    ==== Possible fixes ====

    igt@kms_psr@primary_page_flip:
      fi-kbl-7560u:       FAIL (fdo#107336) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
  fdo#107402 https://bugs.freedesktop.org/show_bug.cgi?id=107402


== Participating hosts (52 -> 49) ==

  Additional (2): fi-byt-j1900 fi-gdg-551 
  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4632 -> IGTPW_1807

  CI_DRM_4782: 60edf94611d2374821fbe2a824cebcb425ce7b0d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1807: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1807/
  IGT_4632: 94b4e204473a7d9f49e536c8877a4a5636e0d1b2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for igt/pm_backlight: Make the actual_brightness test readable
  2018-09-07  8:12 [igt-dev] [PATCH i-g-t] igt/pm_backlight: Make the actual_brightness test readable Chris Wilson
  2018-09-07  8:56 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-09-07 13:57 ` Patchwork
  2018-09-07 14:39 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-09-07 13:57 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/pm_backlight: Make the actual_brightness test readable
URL   : https://patchwork.freedesktop.org/series/49328/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4632_full -> IGTPW_1807_full =

== Summary - WARNING ==

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

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@perf_pmu@rc6:
      shard-kbl:          PASS -> SKIP

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_eio@in-flight-1us:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@kms_color@pipe-c-ctm-max:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103558, fdo#105602) +16

    igt@kms_cursor_crc@cursor-64x21-onscreen:
      shard-kbl:          PASS -> DMESG-FAIL (fdo#103558, fdo#105602)

    igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
      shard-hsw:          PASS -> FAIL (fdo#105767)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
      shard-glk:          PASS -> FAIL (fdo#103167)

    igt@kms_setmode@basic:
      shard-apl:          PASS -> FAIL (fdo#99912)

    igt@kms_sysfs_edid_timing:
      shard-glk:          NOTRUN -> WARN (fdo#100047)

    igt@perf_pmu@rc6-runtime-pm-long:
      shard-apl:          PASS -> FAIL (fdo#105010)

    
    ==== Possible fixes ====

    igt@kms_cursor_legacy@cursor-vs-flip-toggle:
      shard-hsw:          FAIL (fdo#103355) -> PASS +1

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_plane@pixel-format-pipe-a-planes:
      shard-snb:          FAIL (fdo#107749) -> PASS

    igt@kms_rotation_crc@primary-rotation-180:
      shard-snb:          FAIL (fdo#103925) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

    
  fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#105010 https://bugs.freedesktop.org/show_bug.cgi?id=105010
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
  fdo#107749 https://bugs.freedesktop.org/show_bug.cgi?id=107749
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4632 -> IGTPW_1807
    * Linux: CI_DRM_4775 -> CI_DRM_4782

  CI_DRM_4775: 1a2bb6c061217718b972b3f4a74b96b61cf19d0c @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4782: 60edf94611d2374821fbe2a824cebcb425ce7b0d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1807: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1807/
  IGT_4632: 94b4e204473a7d9f49e536c8877a4a5636e0d1b2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t] igt/pm_backlight: Make the actual_brightness test readable
  2018-09-07  8:12 [igt-dev] [PATCH i-g-t] igt/pm_backlight: Make the actual_brightness test readable Chris Wilson
  2018-09-07  8:56 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2018-09-07 13:57 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-09-07 14:39 ` Ville Syrjälä
  2 siblings, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2018-09-07 14:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Fri, Sep 07, 2018 at 09:12:50AM +0100, Chris Wilson wrote:
> Previous horror
> 
> (pm_backlight:2947) CRITICAL: Test assertion failure function test_and_verify, file ../tests/pm_backlight.c:112:
> (pm_backlight:2947) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result
> (pm_backlight:2947) CRITICAL: error: 7125 > 0
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=107847
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/pm_backlight.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/pm_backlight.c b/tests/pm_backlight.c
> index e94340a2b..32808cdf6 100644
> --- a/tests/pm_backlight.c
> +++ b/tests/pm_backlight.c
> @@ -98,8 +98,8 @@ static int backlight_write(int value, const char *fname)
>  
>  static void test_and_verify(struct context *context, int val)
>  {
> +	const int tolerance = val * TOLERANCE / 100;
>  	int result;
> -	int tolerance = val * TOLERANCE / 100;
>  
>  	igt_assert_eq(backlight_write(val, "brightness"), 0);
>  	igt_assert_eq(backlight_read(&result, "brightness"), 0);
> @@ -107,9 +107,11 @@ static void test_and_verify(struct context *context, int val)
>  	igt_assert_eq(result, val);
>  
>  	igt_assert_eq(backlight_read(&result, "actual_brightness"), 0);
> -	/* Some rounding may happen depending on hw. Just check that it's close enough. */
> -	igt_assert_lte(result, min(context->max, val + tolerance));
> -	igt_assert_lte(max(0, val - tolerance), result);
> +	/* Some rounding may happen depending on hw */
> +	igt_assert_f(result >= max(0, val - tolerance) &&
> +		     result <= min(context->max, val + tolerance),
> +		     "actual_brightness [%d] did not match expected brightness [%d +- %d]\n",
> +		     result, val, tolerance);

Looks equivalent.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  }
>  
>  static void test_brightness(struct context *context)
> -- 
> 2.19.0.rc2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-09-07 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-07  8:12 [igt-dev] [PATCH i-g-t] igt/pm_backlight: Make the actual_brightness test readable Chris Wilson
2018-09-07  8:56 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-07 13:57 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-09-07 14:39 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä

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.