From: Daniel Vetter <daniel@ffwll.ch>
To: "Michał Winiarski" <michal.winiarski@intel.com>
Cc: dri-devel@lists.freedesktop.org, linux-kselftest@vger.kernel.org,
"Brendan Higgins" <brendanhiggins@google.com>,
"Daniel Latypov" <dlatypov@google.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@linux.ie>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Petri Latvala" <petri.latvala@intel.com>,
"Arkadiusz Hiler" <arek@hiler.eu>,
"André Almeida" <andrealmeid@riseup.net>,
"Melissa Wen" <melissa.srw@gmail.com>,
"Rodrigo Siqueira" <rodrigosiqueiramelo@gmail.com>
Subject: Re: [RFC 00/10] drm: selftests: Convert to KUnit
Date: Wed, 19 Jan 2022 17:11:59 +0100 [thread overview]
Message-ID: <Yeg4Tx3VFlWVzohI@phenom.ffwll.local> (raw)
In-Reply-To: <20220117232259.180459-1-michal.winiarski@intel.com>
On Tue, Jan 18, 2022 at 12:22:49AM +0100, Michał Winiarski wrote:
> KUnit unifies the test structure and provides helper tools that simplify
> the development. Basic use case allows running tests as regular processes,
> leveraging User Mode Linux.
> For example, to execute all DRM unit tests:
> ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm
> (the tool also allows using QEMU instead of UML by adding e.g. --arch=x86_64)
>
> For developers - it means that it's easier to run unit tests on the development
> machine, tightening the feedback loop. When using UML, it also simplifies using
> gdb for debug (since the kernel is just a regular process).
> For CI systems - DRM tests can be moved from being executed on device under
> test (that's also running IGTs and so on) to being executed on buildsystem
> during build (just like checkpatch.pl).
>
> All tests were renamed - IGT prefix is no longer used.
>
> Compared to selftests executed by CI using IGT, there's one functional
> regression - KUnit test runner is not catching WARNs.
> To solve this, we could either go in the similar direction that UBSAN went in:
> 1195505 ("kunit: ubsan integration")
> Or we could expand the test runner to catch WARN signature in dmesg.
I think catching WARN signature in dmesg makes sense, assuming Kunit has a
standard WARN format. It would be nice to be consistent here.
I haven't looked at any details, but yes so much I want to see this done.
I'll cc a bunch of people I've talked with about this conversion,
hopefully I got them all. Maybe they can help with review and getting this
all landed!
Cheers, Daniel
> Pastebin to preview the output and execution times:
> https://gitlab.freedesktop.org/-/snippets/4139
>
> -Michał
>
> Michał Winiarski (10):
> drm: test-drm_cmdline_parser: Convert to KUnit
> drm: test-drm_plane_helper: Convert to KUnit
> drm: test-drm_format: Convert to KUnit
> drm: test-drm_framebuffer: Convert to KUnit
> drm: test-drm_damage_helper: Convert to KUnit
> drm: test-drm_dp_mst_helper: Convert to KUnit
> drm: test-drm_rect: Convert to KUnit
> drm: test-drm_mm: Convert to KUnit
> drm: selftests: Convert to KUnit
> drm: test: Simplify testing on UML with kunit.py
>
> drivers/gpu/drm/.kunitconfig | 3 +
> drivers/gpu/drm/Kconfig | 22 +-
> drivers/gpu/drm/Makefile | 2 +-
> drivers/gpu/drm/i915/Kconfig.debug | 1 -
> drivers/gpu/drm/selftests/Makefile | 7 -
> .../gpu/drm/selftests/drm_cmdline_selftests.h | 68 -
> drivers/gpu/drm/selftests/drm_mm_selftests.h | 28 -
> .../gpu/drm/selftests/drm_modeset_selftests.h | 40 -
> drivers/gpu/drm/selftests/drm_selftest.c | 109 -
> drivers/gpu/drm/selftests/drm_selftest.h | 41 -
> .../drm/selftests/test-drm_cmdline_parser.c | 1141 --------
> .../drm/selftests/test-drm_damage_helper.c | 667 -----
> .../drm/selftests/test-drm_dp_mst_helper.c | 273 --
> drivers/gpu/drm/selftests/test-drm_format.c | 280 --
> drivers/gpu/drm/selftests/test-drm_mm.c | 2487 -----------------
> .../drm/selftests/test-drm_modeset_common.c | 32 -
> .../drm/selftests/test-drm_modeset_common.h | 52 -
> .../gpu/drm/selftests/test-drm_plane_helper.c | 223 --
> drivers/gpu/drm/selftests/test-drm_rect.c | 223 --
> drivers/gpu/drm/test/Makefile | 7 +
> .../gpu/drm/test/test-drm_cmdline_parser.c | 1027 +++++++
> drivers/gpu/drm/test/test-drm_damage_helper.c | 667 +++++
> drivers/gpu/drm/test/test-drm_dp_mst_helper.c | 429 +++
> drivers/gpu/drm/test/test-drm_format.c | 356 +++
> .../test-drm_framebuffer.c | 109 +-
> drivers/gpu/drm/test/test-drm_mm.c | 2426 ++++++++++++++++
> drivers/gpu/drm/test/test-drm_plane_helper.c | 312 +++
> drivers/gpu/drm/test/test-drm_rect.c | 249 ++
> drivers/video/Kconfig | 4 +
> 29 files changed, 5558 insertions(+), 5727 deletions(-)
> create mode 100644 drivers/gpu/drm/.kunitconfig
> delete mode 100644 drivers/gpu/drm/selftests/Makefile
> delete mode 100644 drivers/gpu/drm/selftests/drm_cmdline_selftests.h
> delete mode 100644 drivers/gpu/drm/selftests/drm_mm_selftests.h
> delete mode 100644 drivers/gpu/drm/selftests/drm_modeset_selftests.h
> delete mode 100644 drivers/gpu/drm/selftests/drm_selftest.c
> delete mode 100644 drivers/gpu/drm/selftests/drm_selftest.h
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_cmdline_parser.c
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_damage_helper.c
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_format.c
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_mm.c
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_modeset_common.c
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_modeset_common.h
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_plane_helper.c
> delete mode 100644 drivers/gpu/drm/selftests/test-drm_rect.c
> create mode 100644 drivers/gpu/drm/test/Makefile
> create mode 100644 drivers/gpu/drm/test/test-drm_cmdline_parser.c
> create mode 100644 drivers/gpu/drm/test/test-drm_damage_helper.c
> create mode 100644 drivers/gpu/drm/test/test-drm_dp_mst_helper.c
> create mode 100644 drivers/gpu/drm/test/test-drm_format.c
> rename drivers/gpu/drm/{selftests => test}/test-drm_framebuffer.c (91%)
> create mode 100644 drivers/gpu/drm/test/test-drm_mm.c
> create mode 100644 drivers/gpu/drm/test/test-drm_plane_helper.c
> create mode 100644 drivers/gpu/drm/test/test-drm_rect.c
>
> --
> 2.34.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2022-01-19 16:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 23:22 [RFC 00/10] drm: selftests: Convert to KUnit Michał Winiarski
2022-01-17 23:22 ` [RFC 01/10] drm: test-drm_cmdline_parser: " Michał Winiarski
2022-01-17 23:22 ` [RFC 02/10] drm: test-drm_plane_helper: " Michał Winiarski
2022-01-17 23:22 ` [RFC 03/10] drm: test-drm_format: " Michał Winiarski
2022-01-17 23:22 ` [RFC 04/10] drm: test-drm_framebuffer: " Michał Winiarski
2022-01-17 23:22 ` [RFC 05/10] drm: test-drm_damage_helper: " Michał Winiarski
2022-01-17 23:22 ` [RFC 06/10] drm: test-drm_dp_mst_helper: " Michał Winiarski
2022-01-19 0:28 ` Daniel Latypov
2022-01-21 0:48 ` Michał Winiarski
2022-01-21 1:00 ` Daniel Latypov
2022-01-17 23:22 ` [RFC 07/10] drm: test-drm_rect: " Michał Winiarski
2022-01-17 23:22 ` [RFC 09/10] drm: selftests: " Michał Winiarski
2022-01-17 23:22 ` [RFC 10/10] drm: test: Simplify testing on UML with kunit.py Michał Winiarski
2022-01-18 23:58 ` [RFC 00/10] drm: selftests: Convert to KUnit Daniel Latypov
2022-01-20 22:20 ` Michał Winiarski
2022-01-21 0:20 ` Daniel Latypov
2022-01-19 16:11 ` Daniel Vetter [this message]
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=Yeg4Tx3VFlWVzohI@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=andrealmeid@riseup.net \
--cc=arek@hiler.eu \
--cc=brendanhiggins@google.com \
--cc=dlatypov@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=melissa.srw@gmail.com \
--cc=michal.winiarski@intel.com \
--cc=mripard@kernel.org \
--cc=petri.latvala@intel.com \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=tzimmermann@suse.de \
/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