From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: Krzysztof Niemiec <krzysztof.niemiec@intel.com>,
igt-dev@lists.freedesktop.org
Cc: Andi Shyti <andi.shyti@linux.intel.com>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Krzysztof Karas <krzysztof.karas@intel.com>,
Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Subject: Re: [PATCH i-g-t v2 2/3] tests/dmabuf: Port dmabuf tests to KUnit
Date: Fri, 26 Jun 2026 11:17:18 +0200 [thread overview]
Message-ID: <0d62d104e73668fcb972a39b86b0879968f43e05.camel@linux.intel.com> (raw)
In-Reply-To: <20260625192850.56004-3-krzysztof.niemiec@intel.com>
On Thu, 2026-06-25 at 21:28 +0200, Krzysztof Niemiec wrote:
> The dmabuf tests have been moved out of the selftest mechanism into
> KUnit in these commits in the kernel:
>
> 126c50bc2fb6 dma-buf: Remove the old selftest
> 6055c9e333cf dma-buf: Change st-dma-fence-chain.c to use kunit
> 465f3934381c dma-buf: Change st-dma-fence-unwrap.c to use kunit
> 9baa35a39939 dma-buf: Change st-dma-fence.c to use kunit
> 15b9bde78bad dma-buf: Change st-dma-resv.c to use kunit
>
> Launch dmabuf tests as KUnit tests instead of selftests from IGT's side
> to reflect the kernel changes.
>
> Signed-off-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>
> Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> ---
> tests/dmabuf.c | 35 +++++++++++++++++++----------------
> 1 file changed, 19 insertions(+), 16 deletions(-)
>
> diff --git a/tests/dmabuf.c b/tests/dmabuf.c
> index 322981473..1baefb299 100644
> --- a/tests/dmabuf.c
> +++ b/tests/dmabuf.c
> @@ -25,7 +25,7 @@
> #include "igt_kmod.h"
> /**
> * TEST: dmabuf
> - * Description: Kernel selftests for the dmabuf API
> + * Description: KUnit tests for the dmabuf API
> * Category: Core
> * Mega feature: General Core features
> * Functionality: drm_mm
> @@ -33,14 +33,16 @@
> * Feature: mapping, prime
> * Test category: GEM_Legacy
> *
> - * SUBTEST: all-tests
> + * SUBTEST: dma-buf-resv
> *
> - * SUBTEST: all-tests@dma_fence
> + * SUBTEST: dma-buf-fence
> *
> - * SUBTEST: all-tests@sanitycheck
> + * SUBTEST: dma-buf-fence-unwrap
> + *
> + * SUBTEST: dma-buf-fence-chain
> */
>
> -IGT_TEST_DESCRIPTION("Kernel selftests for the dmabuf API");
> +IGT_TEST_DESCRIPTION("KUnit tests for the dmabuf API");
>
> static unsigned int bogomips(void)
> {
> @@ -76,23 +78,24 @@ static unsigned int bogomips(void)
> return igt_debug_on(!bogomips) ? UINT_MAX : ret;
> }
>
> -static int wrapper(const char *dynamic_name,
> - struct igt_ktest *tst,
> - struct igt_kselftest_list *tl)
> +int igt_main()
> {
> + igt_kunit("dmabuf_kunit", "dma-buf-resv", NULL);
> + igt_kunit("dmabuf_kunit", "dma-buf-fence", NULL);
> +
> /*
> - * Test case wait-backward of dma_fence_chain selftest can trigger soft
> + * Test case wait-backward of dma_fence_chain test can trigger soft
> * lockups on slow machines. Since that slowness is not recognized as
> * a bug on the kernel side, the issue is not going to be fixed. Based
> - * on analysis of CI results, skip that selftest on machines slower than
> + * on analysis of CI results, skip that test on machines slower than
> * 25000 BogoMIPS to avoid ever returning CI reports on that failure.
> */
> - igt_skip_on(!strcmp(dynamic_name, "dma_fence_chain") && bogomips() < 25000);
>
> - return igt_kselftest_execute(tst, tl, NULL, NULL);
> -}
> + if (bogomips() >= 25000)
> + igt_kunit("dmabuf_kunit", "dma-buf-fence-chain", NULL);
> + else
> + igt_subtest("dma-buf-fence-chain")
> + igt_skip("BogoMips < 25000 - test is not supported\n");
>
> -int igt_main()
> -{
> - igt_kselftests("dmabuf_selftests", NULL, NULL, NULL, wrapper);
> + igt_kunit("dmabuf_kunit", "dma-buf-fence-unwrap", NULL);
> }
next prev parent reply other threads:[~2026-06-26 9:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 19:28 [PATCH i-g-t v2 0/3] Treat new/moved KUnit tests as such Krzysztof Niemiec
2026-06-25 19:28 ` [PATCH i-g-t v2 1/3] tests/intel-ci: Remove dmabuf tests from i915 fast feedback Krzysztof Niemiec
2026-06-26 9:16 ` Janusz Krzysztofik
2026-06-25 19:28 ` [PATCH i-g-t v2 2/3] tests/dmabuf: Port dmabuf tests to KUnit Krzysztof Niemiec
2026-06-26 9:17 ` Janusz Krzysztofik [this message]
2026-06-25 19:28 ` [PATCH i-g-t v2 3/3] tests/gpu_buddy: Rename the KUnit buddy allocator test Krzysztof Niemiec
2026-06-26 10:28 ` Janusz Krzysztofik
2026-06-25 21:41 ` ✗ Xe.CI.BAT: failure for Treat new/moved KUnit tests as such (rev3) Patchwork
2026-06-25 22:10 ` ✓ i915.CI.BAT: success " Patchwork
2026-06-26 1:36 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-06-26 7:10 ` ✗ i915.CI.Full: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d62d104e73668fcb972a39b86b0879968f43e05.camel@linux.intel.com \
--to=janusz.krzysztofik@linux.intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=krzysztof.karas@intel.com \
--cc=krzysztof.niemiec@intel.com \
--cc=sebastian.brzezinka@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox