summaryrefslogtreecommitdiff
path: root/include/kunit
diff options
context:
space:
mode:
authorDavid Gow <davidgow@google.com>2024-02-28 13:27:20 +0800
committerShuah Khan <skhan@linuxfoundation.org>2024-02-28 13:07:39 -0700
commitfc9a615200d48e076af58f4309f507e500ed900d (patch)
tree0ce5d6d0707650b9cea321ab9b1ba332ab65d570 /include/kunit
parent689a930b93c5c20294df5da0407df361c5412eac (diff)
drm: tests: Fix invalid printf format specifiers in KUnit tests
The drm_buddy_test's alloc_contiguous test used a u64 for the page size, which was then updated to be an 'unsigned long' to avoid 64-bit multiplication division helpers. However, the variable is logged by some KUNIT_ASSERT_EQ_MSG() using the '%d' or '%llu' format specifiers, the former of which is always wrong, and the latter is no longer correct now that ps is no longer a u64. Fix these to all use '%lu'. Also, drm_mm_test calls KUNIT_FAIL() with an empty string as the message. gcc and clang warns if a printf format string is empty, so give these some more detailed error messages, which should be more useful anyway. Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") Fixes: fca7526b7d89 ("drm/tests/drm_buddy: fix build failure on 32-bit targets") Fixes: fc8d29e298cf ("drm: selftest: convert drm_mm selftest to KUnit") Reviewed-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Christian König <christian.koenig@amd.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'include/kunit')
0 files changed, 0 insertions, 0 deletions