[Intel-gfx] [PATCH i-g-t 2/2] lib/igt_core.h: add debug messages for test requirements

Daniel Vetter daniel at ffwll.ch
Mon Nov 3 15:22:31 CET 2014


On Wed, Oct 29, 2014 at 03:20:47PM +0000, Thomas Wood wrote:
> @@ -380,6 +382,7 @@ void igt_exit(void) __attribute__((noreturn));
>   */
>  #define igt_require_f(expr, f...) do { \
>  	if (!(expr)) igt_skip_check(#expr , f); \
> +	else igt_debug("Test requirement passed: "#expr"\n"); \
>  } while (0)
>  
>  /**
> @@ -398,6 +401,7 @@ void igt_exit(void) __attribute__((noreturn));
>   */
>  #define igt_skip_on_f(expr, f...) do { \
>  	if ((expr)) igt_skip_check("!("#expr")", f); \
> +	else igt_debug("Test requirement passed: !("#expr")\n"); \

Hm, for the the _f variants, should we also print the format string? Often
I use that one when it's not clear what precise requirement failed from
the test alone. Or is the resulting output too confusing?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list