From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] Add KUnit support for i915 mock selftests
Date: Thu, 1 Dec 2022 12:32:04 +0000 [thread overview]
Message-ID: <cover.1669897668.git.mchehab@kernel.org> (raw)
That's an updated version of my previous KUnit RFC series:
https://patchwork.freedesktop.org/series/110481/
While the RFC series added support for live and perf, let's start with
mock, as running tests in bare metal is not the current focus of KUnit.
So, basically patch 1 was changed to export just mock functions,
and the bare metal patches got removed from this version.
As before, running KUnit on i915 driver requires the --arch parameter:
./tools/testing/kunit/kunit.py run --arch=x86_64 --kunitconfig=drivers/gpu/drm/i915/selftests/ --jobs=`nproc --all`
[13:18:40] Configuring KUnit Kernel ...
[13:18:40] Building KUnit Kernel ...
Populating config with:
$ make ARCH=x86_64 O=.kunit olddefconfig
Building with:
$ make ARCH=x86_64 O=.kunit --jobs=8
[13:23:20] Starting KUnit Kernel (1/1)...
[13:23:20] ============================================================
Running tests with:
$ qemu-system-x86_64 -nodefaults -m 1024 -kernel .kunit/arch/x86/boot/bzImage -append 'kunit.enable=1 console=ttyS0 kunit_shutdown=reboot' -no-reboot -nographic -serial stdio
[13:23:21] ============ i915 mock selftests (18 subtests) =============
[13:23:21] [PASSED] mock_sanitycheck
[13:23:21] [PASSED] mock_shmem
[13:23:24] [PASSED] mock_fence
[13:23:25] [PASSED] mock_scatterlist
[13:23:27] [PASSED] mock_syncmap
[13:23:27] [PASSED] mock_uncore
[13:23:27] [PASSED] mock_ring
[13:23:27] [PASSED] mock_engine
[13:23:31] [PASSED] mock_timelines
[13:23:32] [PASSED] mock_requests
[13:23:32] [PASSED] mock_objects
[13:23:32] [PASSED] mock_phys
[13:23:32] [PASSED] mock_dmabuf
[13:23:38] [PASSED] mock_vma
[13:23:38] [PASSED] mock_evict
[13:23:41] [PASSED] mock_gtt
[13:23:42] [PASSED] mock_hugepages
[13:23:42] [PASSED] mock_memory_region
[13:23:42] =============== [PASSED] i915 mock selftests ===============
[13:23:42] ============================================================
[13:23:42] Testing complete. Ran 18 tests: passed: 18
[13:23:42] Elapsed time: 302.766s total, 0.003s configuring, 280.393s building, 22.341s running
Mauro Carvalho Chehab (3):
drm/i915: place selftest preparation on a separate function
drm/i915: export all mock selftest functions
drm/i915: allow running mock selftests via Kunit
drivers/gpu/drm/i915/Kconfig | 15 +++
drivers/gpu/drm/i915/Makefile | 5 +
.../gpu/drm/i915/gem/selftests/huge_pages.c | 1 +
.../drm/i915/gem/selftests/i915_gem_dmabuf.c | 1 +
.../drm/i915/gem/selftests/i915_gem_object.c | 1 +
.../drm/i915/gem/selftests/i915_gem_phys.c | 1 +
drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 1 +
drivers/gpu/drm/i915/gt/selftest_ring.c | 1 +
drivers/gpu/drm/i915/gt/selftest_timeline.c | 1 +
drivers/gpu/drm/i915/gt/st_shmem_utils.c | 1 +
drivers/gpu/drm/i915/i915_selftest.h | 2 +
drivers/gpu/drm/i915/selftests/.kunitconfig | 12 +++
.../gpu/drm/i915/selftests/i915_gem_evict.c | 1 +
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 1 +
drivers/gpu/drm/i915/selftests/i915_kunit.c | 95 +++++++++++++++++++
drivers/gpu/drm/i915/selftests/i915_request.c | 1 +
.../gpu/drm/i915/selftests/i915_selftest.c | 23 +++--
.../gpu/drm/i915/selftests/i915_sw_fence.c | 1 +
drivers/gpu/drm/i915/selftests/i915_syncmap.c | 1 +
drivers/gpu/drm/i915/selftests/i915_vma.c | 1 +
.../drm/i915/selftests/intel_memory_region.c | 1 +
drivers/gpu/drm/i915/selftests/intel_uncore.c | 1 +
drivers/gpu/drm/i915/selftests/scatterlist.c | 1 +
23 files changed, 161 insertions(+), 8 deletions(-)
create mode 100644 drivers/gpu/drm/i915/selftests/.kunitconfig
create mode 100644 drivers/gpu/drm/i915/selftests/i915_kunit.c
--
2.38.1
next reply other threads:[~2022-12-01 12:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 12:32 Mauro Carvalho Chehab [this message]
2022-12-01 12:32 ` [PATCH 1/3] drm/i915: place selftest preparation on a separate function Mauro Carvalho Chehab
2022-12-02 18:16 ` kernel test robot
2022-12-01 12:32 ` [PATCH 2/3] drm/i915: export all mock selftest functions Mauro Carvalho Chehab
2022-12-01 12:32 ` [PATCH 3/3] drm/i915: allow running mock selftests via Kunit Mauro Carvalho Chehab
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=cover.1669897668.git.mchehab@kernel.org \
--to=mchehab@kernel.org \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/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