Kunit recently gained a speed attribute that allows to filter out slow tests. A slow test is defined in the documentation as a test taking more than a second to execute.
Let's flag the few tests that are doing so on my machine when running:
./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/tests \ --cross_compile aarch64-linux-gnu- --arch arm64
Suggested-by: David Gow davidgow@google.com Signed-off-by: Maxime Ripard mripard@kernel.org --- drivers/gpu/drm/tests/drm_buddy_test.c | 2 +- drivers/gpu/drm/tests/drm_mm_test.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c index 09ee6f6af896..6f79cde2df55 100644 --- a/drivers/gpu/drm/tests/drm_buddy_test.c +++ b/drivers/gpu/drm/tests/drm_buddy_test.c @@ -742,7 +742,7 @@ static struct kunit_case drm_buddy_tests[] = { KUNIT_CASE(drm_test_buddy_alloc_range), KUNIT_CASE(drm_test_buddy_alloc_optimistic), KUNIT_CASE(drm_test_buddy_alloc_pessimistic), - KUNIT_CASE(drm_test_buddy_alloc_smoke), + KUNIT_CASE_SLOW(drm_test_buddy_alloc_smoke), KUNIT_CASE(drm_test_buddy_alloc_pathological), {} }; diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c index 186b28dc7038..c1e662c2a76c 100644 --- a/drivers/gpu/drm/tests/drm_mm_test.c +++ b/drivers/gpu/drm/tests/drm_mm_test.c @@ -2228,23 +2228,23 @@ module_param(max_prime, uint, 0400); static struct kunit_case drm_mm_tests[] = { KUNIT_CASE(drm_test_mm_init), KUNIT_CASE(drm_test_mm_debug), - KUNIT_CASE(drm_test_mm_reserve), - KUNIT_CASE(drm_test_mm_insert), - KUNIT_CASE(drm_test_mm_replace), - KUNIT_CASE(drm_test_mm_insert_range), + KUNIT_CASE_SLOW(drm_test_mm_reserve), + KUNIT_CASE_SLOW(drm_test_mm_insert), + KUNIT_CASE_SLOW(drm_test_mm_replace), + KUNIT_CASE_SLOW(drm_test_mm_insert_range), KUNIT_CASE(drm_test_mm_frag), KUNIT_CASE(drm_test_mm_align), KUNIT_CASE(drm_test_mm_align32), KUNIT_CASE(drm_test_mm_align64), - KUNIT_CASE(drm_test_mm_evict), + KUNIT_CASE_SLOW(drm_test_mm_evict), KUNIT_CASE(drm_test_mm_evict_range), KUNIT_CASE(drm_test_mm_topdown), KUNIT_CASE(drm_test_mm_bottomup), KUNIT_CASE(drm_test_mm_lowest), KUNIT_CASE(drm_test_mm_highest), KUNIT_CASE(drm_test_mm_color), - KUNIT_CASE(drm_test_mm_color_evict), - KUNIT_CASE(drm_test_mm_color_evict_range), + KUNIT_CASE_SLOW(drm_test_mm_color_evict), + KUNIT_CASE_SLOW(drm_test_mm_color_evict_range), {} };