[igt-dev] [PATCH i-g-t v1 4/4] tests/intel/xe_create: print first opened card

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Nov 2 19:57:08 UTC 2023


On Thu, Nov 02, 2023 at 01:10:39PM +0100, Kamil Konieczny wrote:
> Use helper and allow to print message about first opened
> card, so it will be coherent with other messages. Before
> this log for multi-gpu test will miss <g:0> like:
> 
> IGT-Version: 1.28-g24b5fbcb5 (x86_64) (Linux: 6.6.0-rc3-xe-public)
> Opened device: /dev/dri/card1
> Starting subtest: multigpu-create-massive-size
> <g:1> Opened device: /dev/dri/card2
> <g:2> Opened device: /dev/dri/card3
> Subtest multigpu-create-massive-size: SUCCESS
> 
> After using helper we can see first GPU with <g:0> like:
> 
> Opened device: /dev/dri/card1
> Starting subtest: multigpu-create-massive-size
> <g:0> Opened device: /dev/dri/card1
> <g:1> Opened device: /dev/dri/card2
> <g:2> Opened device: /dev/dri/card3
> Subtest multigpu-create-massive-size: SUCCESS
> 
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
>  tests/intel/xe_create.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c
> index dc7c9502e..a882489f3 100644
> --- a/tests/intel/xe_create.c
> +++ b/tests/intel/xe_create.c
> @@ -243,6 +243,7 @@ igt_main
>  		igt_multi_fork(child, gpu_count) {
>  			int gpu_fd;
>  
> +			__drm_invalidate_opened_log();

Shouldn't this be called in the igt_core on igt subtest exit?
Such "voluntary" log cleaning might be confusing on next tests
outcome.

--
Zbigniew

>  			gpu_fd = drm_open_filtered_card(child);
>  			igt_assert_f(gpu_fd > 0, "cannot open gpu-%d, errno=%d\n", child, errno);
>  			igt_assert(is_xe_device(gpu_fd));
> -- 
> 2.42.0
> 


More information about the igt-dev mailing list