Skip to content

Commit 3eb791c

Browse files
mwiniarsmripard
authored andcommitted
drm/tests: mm: Call drm_mm_print in drm_test_mm_debug
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> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240116174602.1019512-1-michal.winiarski@intel.com
1 parent 0a8c1fe commit 3eb791c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/gpu/drm/tests/drm_mm_test.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ static void drm_test_mm_init(struct kunit *test)
247247

248248
static void drm_test_mm_debug(struct kunit *test)
249249
{
250+
struct drm_printer p = drm_debug_printer(test->name);
250251
struct drm_mm mm;
251252
struct drm_mm_node nodes[2];
252253

253254
/* Create a small drm_mm with a couple of nodes and a few holes, and
254255
* check that the debug iterator doesn't explode over a trivial drm_mm.
255256
*/
256-
257257
drm_mm_init(&mm, 0, 4096);
258258

259259
memset(nodes, 0, sizeof(nodes));
@@ -268,6 +268,9 @@ static void drm_test_mm_debug(struct kunit *test)
268268
KUNIT_ASSERT_FALSE_MSG(test, drm_mm_reserve_node(&mm, &nodes[1]),
269269
"failed to reserve node[0] {start=%lld, size=%lld)\n",
270270
nodes[0].start, nodes[0].size);
271+
272+
drm_mm_print(&mm, &p);
273+
KUNIT_SUCCEED(test);
271274
}
272275

273276
static struct drm_mm_node *set_node(struct drm_mm_node *node,

0 commit comments

Comments
 (0)