Improve test coverage of TTM
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v14 Latest12 patches 3 repliesIn review
- v1312 patches 3 repliesSuperseded
- v1210 patches 9 repliesSuperseded
Earlier versions · 12
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v11 | 10 patches | 4 replies | Superseded | |
| v10 | 9 patches | 15 replies | Superseded | |
| v9 posting 2/2 | 8 patches | 3 replies | Superseded | |
| v9 posting 1/2 | 8 patches | 0 replies | Superseded | |
| v8 | 8 patches | 8 replies | Superseded | |
| v7 | 8 patches | 10 replies | Superseded | |
| v6 | 8 patches | 3 replies | Superseded | |
| v5 | 4 patches | 11 replies | Superseded | |
| v4 | 4 patches | 0 replies | Superseded | |
| v3 | 4 patches | 5 replies | Superseded | |
| v2 | 5 patches | 7 replies | Superseded | |
| v1 | 3 patches | 5 replies | Superseded |
Changes in v14 from the cover letter
- Merge checks for system <-> TT move into one (Thomas)
Patches in v14 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulkdrivers/ drivers/ drivers/ +3 more | +45 | 0 replies | |
| 2/12 | drm/ttm/tests: Delete unnecessary config optiondrivers/ | +0 | 0 replies | |
| 3/12 | drm/ttm/tests: Set DMA mask in KUnit devicedrivers/ | +3 | 0 replies | |
| 4/12 | drm/ttm/tests: Use an init function from the helpers libdrivers/ drivers/ drivers/ | +16 | 0 replies | |
| 5/12 | drm/ttm/tests: Test simple BO creation and validationdrivers/ drivers/ drivers/ +1 more | +228 | 0 replies | |
| 6/12 | drm/ttm/tests: Add tests with mock resource managersdrivers/ drivers/ drivers/ +3 more | +535 | 0 replies | |
| 7/12 | drm/ttm/tests: Add test cases dependent on fence signalingdrivers/ | +305 | 0 replies | |
| 8/12 | drm/ttm/tests: Add eviction testingdrivers/ drivers/ drivers/ +2 more | +568 | 0 replies | |
| 9/12 | drm/ttm/tests: Add tests for ttm_tt_populatedrivers/ drivers/ | +122 | 0 replies | |
| 10/12 | drm/ttm/tests: Add TODO filedrivers/ | +27 | 0 replies | |
| 11/12 | drm/ttm/tests: Correct modules' licensesdrivers/ drivers/ drivers/ +3 more | +6 | 0 replies | |
| 12/12 | drm/ttm/tests: Use u32 and u64 over uint*_t typesdrivers/ drivers/ drivers/ +3 more | +25 | 0 replies |
Reviews trailers per patch
All 12 patches have a Reviewed-by or Acked-by.
| Patch | Thomas Hellström | Nirmoy Das | Matthew Auld | Somalapuram, Amaranath |
|---|---|---|---|---|
| 1/12 | R-b | |||
| 2/12 | R-b | |||
| 3/12 | R-b | |||
| 4/12 | R-b | R-b | ||
| 5/12 | R-b | R-b T-b | ||
| 6/12 | R-b | T-b | ||
| 7/12 | R-b T-b | |||
| 8/12 | R-b T-b | |||
| 9/12 | R-b T-b | |||
| 10/12 | R-b | |||
| 11/12 | R-b | |||
| 12/12 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v14 00/12] Improve test coverage of TTM
Introduce tests for ttm_bo_validate()/ttm_bo_init_validate() that exercise simple BO placement as well as eviction (including the case where the evict domain also requires eviction to fit the incoming buffer). Prepare KUnit helpers to handle such scenarios and add a mock VRAM manager. This series also includes some updates to the helpers and more definitions used to define "special" memory domains (e.g., one that can't allocate resources or is busy), as well as drive-by fixes for the tests.
There are a couple of areas in which this test suite can be improved. Suggestions for future work can be found in the TODO file.
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, use a UML configuration, enable CONFIG_KUNIT, and then select CONFIG_DRM_TTM_KUNIT_TEST.
Many thanks,
Karolina
v14:
- Merge checks for system <-> TT move into one (Thomas)
v13 (all suggestions by Thomas):
- Drop CONFIG_DRM_BUDDY=y from .kunitconfig
- Remove ttm_bo_wait_ctx(bo, ctx) call from the mock move, it's not needed
- Update MODULE_LICENSE descriptions (also respectively, 11/12)
- Use u32 and u64 types instead uint(32|64)_t (also respectively, 12/12)
- Update TODO to describe how the mock manager can be rewritten
v12:
- Rewrite "drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk" patch to extend ttm_bo_kunit_init() helper to accept a dma_resv object and update calls to that helper (Christian)
- Update drm_buddy_free_list() calls with an extra argument
Karolina Stolarek (12):
drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk drm/ttm/tests: Delete unnecessary config option drm/ttm/tests: Set DMA mask in KUnit device drm/ttm/tests: Use an init function from the helpers lib drm/ttm/tests: Test simple BO creation and validation drm/ttm/tests: Add tests with mock resource managers drm/ttm/tests: Add test cases dependent on fence signaling drm/ttm/tests: Add eviction testing drm/ttm/tests: Add tests for ttm_tt_populate drm/ttm/tests: Add TODO file
drm/ttm/tests: Correct modules' licenses drm/ttm/tests: Use u32 and u64 over uint*_t types
drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/ttm/tests/.kunitconfig | 1 - drivers/gpu/drm/ttm/tests/Makefile | 2 + drivers/gpu/drm/ttm/tests/TODO | 27 + drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 54 +- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 1224 +++++++++++++++++ drivers/gpu/drm/ttm/tests/ttm_device_test.c | 2 +- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 175 ++- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 17 +- drivers/gpu/drm/ttm/tests/ttm_mock_manager.c | 233 ++++ drivers/gpu/drm/ttm/tests/ttm_mock_manager.h | 30 + drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 8 +- drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 20 +- drivers/gpu/drm/ttm/tests/ttm_tt_test.c | 168 ++- drivers/gpu/drm/ttm/ttm_tt.c | 3 + 15 files changed, 1877 insertions(+), 88 deletions(-) create mode 100644 drivers/gpu/drm/ttm/tests/TODO create mode 100644 drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c create mode 100644 drivers/gpu/drm/ttm/tests/ttm_mock_manager.c create mode 100644 drivers/gpu/drm/ttm/tests/ttm_mock_manager.h
Signature · 1 line
2.34.1