Skip to content

Commit

Permalink
drm/tests: Fix incorrect argument in drm_test_mm_insert_range
Browse files Browse the repository at this point in the history
While drm_mm test was converted form igt selftest to kunit, unexpected
value of "end" argument equal "start" was introduced to one of calls to a
function that executes the drm_test_mm_insert_range for specific start/end
pair of arguments.  As a consequence, DRM_MM_BUG_ON(end <= start) is
triggered.  Fix it by restoring the original value.

Fixes: fc8d29e ("drm: selftest: convert drm_mm selftest to KUnit")
Signed-off-by: Janusz Krzysztofik <[email protected]>
Cc: "Maíra Canal" <[email protected]>
Cc: Arthur Grillo <[email protected]>
Cc: Javier Martinez Canillas <[email protected]>
Cc: Daniel Latypov <[email protected]>
Cc: [email protected] # v6.1+
Reviewed-by: Maíra Canal <[email protected]>
Signed-off-by: Maíra Canal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
jkrzyszt-intel authored and mairacanal committed Sep 15, 2023
1 parent 139a278 commit 2ba1579
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/tests/drm_mm_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ static void drm_test_mm_insert_range(struct kunit *test)
KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size, 0, max - 1));
KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size, 0, max / 2));
KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size,
max / 2, max / 2));
max / 2, max));
KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size,
max / 4 + 1, 3 * max / 4 - 1));

Expand Down

0 comments on commit 2ba1579

Please sign in to comment.