lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZQAU7Juw5WM1LAAM@phenom.ffwll.local>
Date:   Tue, 12 Sep 2023 09:36:12 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Maxime Ripard <mripard@...nel.org>
Cc:     Brendan Higgins <brendan.higgins@...ux.dev>,
        David Gow <davidgow@...gle.com>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        MaĆ­ra Canal <mairacanal@...eup.net>,
        linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 2/2] drm/tests: Flag slow tests as such

On Mon, Sep 11, 2023 at 11:51:06AM +0200, Maxime Ripard wrote:
> 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@...gle.com>
> Signed-off-by: Maxime Ripard <mripard@...nel.org>

Ugh ... not a fan.

igt has a really bad habit of making disastrously combinatorial tests with
impossible runtimes, and then just filtering these out so it's still fast.

Maybe some stress tests for overall system make sense like this, but
absolutely not for unit tests. And I did spot check some of these, they're
just combinatorial explosions with large repetition counts and some fun
stuff like going through prime numbers because surely that's a good idea.

Imo delete them all, and if that causes a real gap in coverage, ask the
authors to write some actual good unit tests for these corner cases.

Cheers, Sima
> ---
>  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),
>  	{}
>  };
>  
> 
> -- 
> 2.41.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ