Skip to content

Commit 2ba1579

Browse files
jkrzyszt-intelmairacanal
authored andcommitted
drm/tests: Fix incorrect argument in drm_test_mm_insert_range
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]
1 parent 139a278 commit 2ba1579

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/tests/drm_mm_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ static void drm_test_mm_insert_range(struct kunit *test)
939939
KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size, 0, max - 1));
940940
KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size, 0, max / 2));
941941
KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size,
942-
max / 2, max / 2));
942+
max / 2, max));
943943
KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size,
944944
max / 4 + 1, 3 * max / 4 - 1));
945945

0 commit comments

Comments
 (0)