[igt-dev] [PATCH 1/5] i915/gem_mocs_settings: log the engine and MOCS index

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Fri Jul 26 23:23:25 UTC 2019



On 7/25/19 1:33 PM, Lucas De Marchi wrote:
> This helps to identify which entry is wrong in the table.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>   tests/i915/gem_mocs_settings.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_mocs_settings.c b/tests/i915/gem_mocs_settings.c
> index 1a311b8c..7b1718f4 100644
> --- a/tests/i915/gem_mocs_settings.c
> +++ b/tests/i915/gem_mocs_settings.c
> @@ -322,8 +322,10 @@ static void check_control_registers(int fd,
>   	for (int index = 0; index < table.size; index++) {
>   		if (!table.table[index].used)
>   			continue;
> -		igt_assert_eq_u32(read_regs[index],
> -				  table.table[index].control_value);
> +
> +		igt_assert_f(
> +			read_regs[index] == table.table[index].control_value,
> +			"engine=%u index=%u", engine, index);

But like this you're not printing the values anymore, which was useful. 
Also, you're missing a "\n".

Daniele

>   	}
>   
>   	munmap(read_regs, 4096);
> 


More information about the igt-dev mailing list