All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karolina Stolarek <karolina.stolarek@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Karolina Stolarek" <karolina.stolarek@intel.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: [PATCH 0/3] Improve test coverage of TTM
Date: Thu, 31 Aug 2023 12:58:18 +0200	[thread overview]
Message-ID: <cover.1693479161.git.karolina.stolarek@intel.com> (raw)

Add tests for building blocks of the TTM subsystem, such as ttm_resource,
ttm_resource_manager, ttm_tt and ttm_buffer_object. This series covers
basic functions such as initialization, allocation and clean-up of each
struct. Testing of ttm_buffer_object also includes locking and unlocking
the object for validation, with special scenarios such as an interrupted
wait or deadlock.

Some of the test cases check the bulk move mechanism and how it interacts
with pinned buffers. This is to be seen if we want to add dedicated testing
for bulk move or not. The resource allocation subtests use ttm_sys_manager
for now. Resources that don't use system memory will be indirectly tested
via tests for ttm_bo_validate()/ttm_bo_init_validate(), using a mock
resource manager.

Use kunit_tool script to manually run all the tests:

$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/ttm/tests

To build a kernel with TTM KUnit tests, first enable CONFIG_KUNIT, and
then CONFIG_DRM_TTM_KUNIT_TEST.

Many thanks,
Karolina

Karolina Stolarek (3):
  drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man
  drm/ttm/tests: Add tests for ttm_tt
  drm/ttm/tests: Add tests for ttm_bo functions

 drivers/gpu/drm/ttm/tests/Makefile            |   3 +
 drivers/gpu/drm/ttm/tests/ttm_bo_test.c       | 616 ++++++++++++++++++
 drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c |  48 ++
 drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h |   4 +
 drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 335 ++++++++++
 drivers/gpu/drm/ttm/tests/ttm_tt_test.c       | 277 ++++++++
 6 files changed, 1283 insertions(+)
 create mode 100644 drivers/gpu/drm/ttm/tests/ttm_bo_test.c
 create mode 100644 drivers/gpu/drm/ttm/tests/ttm_resource_test.c
 create mode 100644 drivers/gpu/drm/ttm/tests/ttm_tt_test.c

-- 
2.25.1


             reply	other threads:[~2023-08-31 10:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 10:58 Karolina Stolarek [this message]
2023-08-31 10:58 ` [PATCH 1/3] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man Karolina Stolarek
2023-08-31 19:51   ` kernel test robot
2023-08-31 19:51     ` kernel test robot
2023-08-31 10:58 ` [PATCH 2/3] drm/ttm/tests: Add tests for ttm_tt Karolina Stolarek
2023-09-01  3:41   ` kernel test robot
2023-09-01  3:41     ` kernel test robot
2023-08-31 10:58 ` [PATCH 3/3] drm/ttm/tests: Add tests for ttm_bo functions Karolina Stolarek
2023-09-01 12:04   ` kernel test robot
2023-09-01 12:04     ` kernel test robot
2023-09-01 12:37     ` Karolina Stolarek
2023-09-01 12:37       ` Karolina Stolarek
2023-09-01 13:19       ` Christian König
2023-09-01 13:19         ` Christian König
2023-09-01 13:30         ` Karolina Stolarek
2023-09-01 13:30           ` Karolina Stolarek
2023-09-01 13:50           ` Christian König
2023-09-01 13:50             ` Christian König
2023-09-11  9:47             ` Karolina Stolarek

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.1693479161.git.karolina.stolarek@intel.com \
    --to=karolina.stolarek@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thomas.hellstrom@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.