Re: [PATCH igt] igt/kms_frontbuffer_tracking: Make assert(false) more informative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 20, 2017 at 09:42:57AM +0000, Chris Wilson wrote:
> When reading CI failure reports seeing an "assertion false failed" is
> confusing as you then have to look for the preceding explanation. Show
> the actual condition that fails in the assert report. Note that this
> give the system a chance at a reprieve and avoids conflicting
> information such as:
> 
> (kms_frontbuffer_tracking:1649) DEBUG: Test requirement passed: !fbc_not_enough_stolen()
> (kms_frontbuffer_tracking:1649) DEBUG: Test requirement passed: !fbc_stride_not_supported()
> (kms_frontbuffer_tracking:1649) INFO: FBC status:
> FBC disabled: FBC enabled (active or scheduled)
> 
> (kms_frontbuffer_tracking:1649) CRITICAL: Test assertion failure function do_status_assertions, file kms_frontbuffer_tracking.c:1714:
> (kms_frontbuffer_tracking:1649) CRITICAL: Failed asserti
> 
> Where the fbc status tells us that it was indeed enabled, but the assertion still failed.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

> ---
>  tests/kms_frontbuffer_tracking.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index a6f5f3773..1601cab45 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -1711,7 +1711,7 @@ static void do_status_assertions(int flags)
>  		igt_require(!fbc_stride_not_supported());
>  		if (!fbc_wait_until_enabled()) {
>  			fbc_print_status();
> -			igt_assert_f(false, "FBC disabled\n");
> +			igt_assert_f(fbc_is_enabled(), "FBC disabled\n");
>  		}
>  
>  		if (opt.fbc_check_compression)
> @@ -1723,7 +1723,7 @@ static void do_status_assertions(int flags)
>  	if (flags & ASSERT_PSR_ENABLED) {
>  		if (!psr_wait_until_enabled()) {
>  			psr_print_status();
> -			igt_assert_f(false, "PSR disabled\n");
> +			igt_assert_f(psr_is_enabled(), "PSR disabled\n");
>  		}
>  	} else if (flags & ASSERT_PSR_DISABLED) {
>  		igt_assert(!psr_wait_until_enabled());
> -- 
> 2.15.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux