diff mbox series

[v12,10/10] drm/ttm/tests: Add TODO file

Message ID 251d347fa39ec123d4985481df8a4f7613ea8e02.1715767062.git.karolina.stolarek@intel.com (mailing list archive)
State New, archived
Headers show
Series Improve test coverage of TTM | expand

Commit Message

Karolina Stolarek May 15, 2024, 11:24 a.m. UTC
List improvements for the test suite with some notes.

Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
---
 drivers/gpu/drm/ttm/tests/TODO | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 drivers/gpu/drm/ttm/tests/TODO

Comments

Thomas Hellstrom May 24, 2024, 3:29 p.m. UTC | #1
On Wed, 2024-05-15 at 13:24 +0200, Karolina Stolarek wrote:
> List improvements for the test suite with some notes.
> 
> Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
LGTM.
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

> ---
>  drivers/gpu/drm/ttm/tests/TODO | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>  create mode 100644 drivers/gpu/drm/ttm/tests/TODO
> 
> diff --git a/drivers/gpu/drm/ttm/tests/TODO
> b/drivers/gpu/drm/ttm/tests/TODO
> new file mode 100644
> index 000000000000..b48d83b6166e
> --- /dev/null
> +++ b/drivers/gpu/drm/ttm/tests/TODO
> @@ -0,0 +1,25 @@
> +TODO
> +=====
> +
> +- Add a test case where the only evictable BO is busy
> +- Update eviction tests so they use parametrized "from" memory type
> +- Improve mock manager's implementation, e.g. allocate a block of
> +  dummy memory that can be used when testing page mapping functions
> +- Suggestion: Add test cases with external BOs
> +- Suggestion: randomize the number and size of tested buffers in
> +  ttm_bo_validate()
> +- Agree on the naming convention
> +
> +Notes and gotchas
> +=================
> +
> +- These tests are built and run with a UML kernel, because
> +  1) We are interested in hardware-independent testing
> +  2) We don't want to have actual DRM devices interacting with TTM
> +     at the same time as the test one. Getting these to work in
> +     parallel would require some time (...and that's a "todo" in
> itself!)
> +- Triggering ttm_bo_vm_ops callbacks from KUnit (i.e. kernel) might
> be
> +  a challenge, but is worth trying. Look at selftests like
> +  i915/gem/selftests/i915_gem_mman.c for inspiration
> +- The test suite uses UML where ioremap() call returns NULL, meaning
> that
> +  ttm_bo_ioremap() can't be tested, unless we find a way to stub it
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ttm/tests/TODO b/drivers/gpu/drm/ttm/tests/TODO
new file mode 100644
index 000000000000..b48d83b6166e
--- /dev/null
+++ b/drivers/gpu/drm/ttm/tests/TODO
@@ -0,0 +1,25 @@ 
+TODO
+=====
+
+- Add a test case where the only evictable BO is busy
+- Update eviction tests so they use parametrized "from" memory type
+- Improve mock manager's implementation, e.g. allocate a block of
+  dummy memory that can be used when testing page mapping functions
+- Suggestion: Add test cases with external BOs
+- Suggestion: randomize the number and size of tested buffers in
+  ttm_bo_validate()
+- Agree on the naming convention
+
+Notes and gotchas
+=================
+
+- These tests are built and run with a UML kernel, because
+  1) We are interested in hardware-independent testing
+  2) We don't want to have actual DRM devices interacting with TTM
+     at the same time as the test one. Getting these to work in
+     parallel would require some time (...and that's a "todo" in itself!)
+- Triggering ttm_bo_vm_ops callbacks from KUnit (i.e. kernel) might be
+  a challenge, but is worth trying. Look at selftests like
+  i915/gem/selftests/i915_gem_mman.c for inspiration
+- The test suite uses UML where ioremap() call returns NULL, meaning that
+  ttm_bo_ioremap() can't be tested, unless we find a way to stub it