[PATCH i-g-t 2/2] xe_live_ktest: Use xe_live_test kernel module

Janusz Krzysztofik janusz.krzysztofik at linux.intel.com
Wed Feb 7 11:27:48 UTC 2024


On Friday, 2 February 2024 01:45:29 CET Lucas De Marchi wrote:
> https://patchwork.freedesktop.org/series/126786/ groups all the live
> tests into a single kernel module. Use that module to run any of the
> tests triggered by igt.
> 
> To make the live kunit tests work, rename the subtests so they match
> what the kernel uses.

There was some discussion on this patch on today's XE IGT status meeting, and 
the conclusion was: can we have these split into two patches, one for subtest 
renaming, and one for switching to single module?

Thanks,
Janusz

> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>  tests/intel-ci/xe-fast-feedback.testlist |  6 +++---
>  tests/intel/xe_live_ktest.c              | 25 ++++++++++--------------
>  2 files changed, 13 insertions(+), 18 deletions(-)
> 
> diff --git a/tests/intel-ci/xe-fast-feedback.testlist b/tests/intel-ci/xe-fast-feedback.testlist
> index f297fe965..797a78563 100644
> --- a/tests/intel-ci/xe-fast-feedback.testlist
> +++ b/tests/intel-ci/xe-fast-feedback.testlist
> @@ -227,9 +227,9 @@ igt at kms_psr@psr-sprite-plane-onoff
>  igt at core_hotunplug@unbind-rebind
>  
>  # Run KUnit tests at the end
> -igt at xe_live_ktest@bo
> -igt at xe_live_ktest@dmabuf
> -igt at xe_live_ktest@migrate
> +igt at xe_live_ktest@xe_bo
> +igt at xe_live_ktest@xe_dmabuf
> +igt at xe_live_ktest@xe_migrate
>  
>  # Move fault_mode tests at the end to unblock execution
>  igt at xe_exec_fault_mode@twice-basic
> diff --git a/tests/intel/xe_live_ktest.c b/tests/intel/xe_live_ktest.c
> index 5f5f1dff7..d65378858 100644
> --- a/tests/intel/xe_live_ktest.c
> +++ b/tests/intel/xe_live_ktest.c
> @@ -9,38 +9,33 @@
>   * Functionality: kunit
>   * Test category: functionality test
>   *
> - * SUBTEST: bo
> + * SUBTEST: xe_bo
>   * Description:
>   *	Kernel dynamic selftests to check if GPU buffer objects are
>   *	being handled properly.
>   * Functionality: bo
>   *
> - * SUBTEST: dmabuf
> + * SUBTEST: xe_dmabuf
>   * Description: Kernel dynamic selftests for dmabuf functionality.
>   * Functionality: dmabuf
>   *
> - * SUBTEST: migrate
> + * SUBTEST: xe_migrate
>   * Description:
>   *	Kernel dynamic selftests to check if page table migrations
>   *	are working properly.
>   * Functionality: migrate
>   *
> - * SUBTEST: mocs
> + * SUBTEST: xe_mocs
>   * Description:
>   *	Kernel dynamic selftests to check mocs configuration.
>   * Functionality: mocs
>   */
>  
> -struct kunit_tests {
> -	const char *kunit;
> -	const char *name;
> -};
> -
> -static const struct kunit_tests live_tests[] = {
> -	{ "xe_bo_test",		"bo" },
> -	{ "xe_dma_buf_test",	"dmabuf" },
> -	{ "xe_migrate_test",	"migrate" },
> -	{ "xe_mocs_test",	"mocs" },
> +static const char *live_tests[] = {
> +	"xe_bo",
> +	"xe_dmabuf",
> +	"xe_migrate",
> +	"xe_mocs"
>  };
>  
>  igt_main
> @@ -48,5 +43,5 @@ igt_main
>  	int i;
>  
>  	for (i = 0; i < ARRAY_SIZE(live_tests); i++)
> -		igt_kunit(live_tests[i].kunit, live_tests[i].name, NULL);
> +		igt_kunit("xe_live_test", live_tests[i], NULL);
>  }
> 






More information about the igt-dev mailing list