Skip to content

Commit

Permalink
drm/tests: Add back seed value information
Browse files Browse the repository at this point in the history
As reported by Michał the drm_mm and drm_buddy unit tests lost the
printk with seed value after they being refactored into kunit. This
patch adds back this important information to assure reproducibility
converting them to use the kunit api.

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Reported-by: Michał Winiarski <michal.winiarski@intel.com>
  • Loading branch information
Grillo-0 authored and intel-lab-lkp committed Oct 26, 2022
1 parent e1e7bc4 commit d4760e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/tests/drm_buddy_test.c
Expand Up @@ -731,6 +731,9 @@ static int drm_buddy_init_test(struct kunit *test)
while (!random_seed)
random_seed = get_random_u32();

kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
random_seed);

return 0;
}

Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/tests/drm_mm_test.c
Expand Up @@ -2214,6 +2214,9 @@ static int drm_mm_init_test(struct kunit *test)
while (!random_seed)
random_seed = get_random_u32();

kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
random_seed, max_iterations, max_prime);

return 0;
}

Expand Down Expand Up @@ -2251,6 +2254,5 @@ static struct kunit_suite drm_mm_test_suite = {
};

kunit_test_suite(drm_mm_test_suite);

MODULE_AUTHOR("Intel Corporation");
MODULE_LICENSE("GPL");

0 comments on commit d4760e9

Please sign in to comment.