* [PATCH] drm/tests: mm: Call drm_mm_print in drm_test_mm_debug
@ 2024-01-16 17:46 Michał Winiarski
2024-01-17 9:33 ` (subset) " Maxime Ripard
0 siblings, 1 reply; 2+ messages in thread
From: Michał Winiarski @ 2024-01-16 17:46 UTC (permalink / raw)
To: dri-devel, linux-kernel
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter, Javier Martinez Canillas,
Maíra Canal, Janusz Krzysztofik, Michał Winiarski
The original intent behind the test was to sanity check whether calling
the debug iterator (drm_mm_print) doesn't cause any problems.
Unfortunately - this call got accidentally removed during KUnit
transition. Restore it.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
---
drivers/gpu/drm/tests/drm_mm_test.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c
index 4e9247cf9977f..1eb0c304f9607 100644
--- a/drivers/gpu/drm/tests/drm_mm_test.c
+++ b/drivers/gpu/drm/tests/drm_mm_test.c
@@ -188,13 +188,13 @@ static void drm_test_mm_init(struct kunit *test)
static void drm_test_mm_debug(struct kunit *test)
{
+ struct drm_printer p = drm_debug_printer(test->name);
struct drm_mm mm;
struct drm_mm_node nodes[2];
/* Create a small drm_mm with a couple of nodes and a few holes, and
* check that the debug iterator doesn't explode over a trivial drm_mm.
*/
-
drm_mm_init(&mm, 0, 4096);
memset(nodes, 0, sizeof(nodes));
@@ -209,6 +209,9 @@ static void drm_test_mm_debug(struct kunit *test)
KUNIT_ASSERT_FALSE_MSG(test, drm_mm_reserve_node(&mm, &nodes[1]),
"failed to reserve node[0] {start=%lld, size=%lld)\n",
nodes[0].start, nodes[0].size);
+
+ drm_mm_print(&mm, &p);
+ KUNIT_SUCCEED(test);
}
static bool expect_insert(struct kunit *test, struct drm_mm *mm,
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH] drm/tests: mm: Call drm_mm_print in drm_test_mm_debug
2024-01-16 17:46 [PATCH] drm/tests: mm: Call drm_mm_print in drm_test_mm_debug Michał Winiarski
@ 2024-01-17 9:33 ` Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2024-01-17 9:33 UTC (permalink / raw)
To: dri-devel, linux-kernel, Michał Winiarski
Cc: Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Daniel Vetter, Javier Martinez Canillas, Maíra Canal,
Janusz Krzysztofik
On Tue, 16 Jan 2024 18:46:02 +0100, Michał Winiarski wrote:
> The original intent behind the test was to sanity check whether calling
> the debug iterator (drm_mm_print) doesn't cause any problems.
> Unfortunately - this call got accidentally removed during KUnit
> transition. Restore it.
>
>
Applied to drm/drm-misc (drm-misc-fixes).
Thanks!
Maxime
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-17 9:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 17:46 [PATCH] drm/tests: mm: Call drm_mm_print in drm_test_mm_debug Michał Winiarski
2024-01-17 9:33 ` (subset) " Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®