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: <0729b218-53f1-4139-b165-a324794a9abd@igalia.com>
Date: Mon, 25 Mar 2024 16:05:06 -0300
From: Maíra Canal <mcanal@...lia.com>
To: Guenter Roeck <linux@...ck-us.net>, linux-kselftest@...r.kernel.org
Cc: David Airlie <airlied@...il.com>, Arnd Bergmann <arnd@...db.de>,
 Dan Carpenter <dan.carpenter@...aro.org>, Kees Cook <keescook@...omium.org>,
 Daniel Diaz <daniel.diaz@...aro.org>, David Gow <davidgow@...gle.com>,
 Arthur Grillo <arthurgrillo@...eup.net>,
 Brendan Higgins <brendan.higgins@...ux.dev>,
 Naresh Kamboju <naresh.kamboju@...aro.org>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Maxime Ripard
 <mripard@...nel.org>, Ville Syrjälä
 <ville.syrjala@...ux.intel.com>, Daniel Vetter <daniel@...ll.ch>,
 Thomas Zimmermann <tzimmermann@...e.de>, dri-devel@...ts.freedesktop.org,
 kunit-dev@...glegroups.com, linux-arch@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
 linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
 linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
 loongarch@...ts.linux.dev, netdev@...r.kernel.org,
 Linux Kernel Functional Testing <lkft@...aro.org>
Subject: Re: [PATCH v2 05/14] drm: Suppress intentional warning backtraces in
 scaling unit tests

Hi Guenter,

On 3/25/24 14:52, Guenter Roeck wrote:
> The drm_test_rect_calc_hscale and drm_test_rect_calc_vscale unit tests
> intentionally trigger warning backtraces by providing bad parameters to
> the tested functions. What is tested is the return value, not the existence
> of a warning backtrace. Suppress the backtraces to avoid clogging the
> kernel log.
> 
> Tested-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Acked-by: Dan Carpenter <dan.carpenter@...aro.org>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
> - Rebased to v6.9-rc1
> - Added Tested-by:, Acked-by:, and Reviewed-by: tags
> 
>   drivers/gpu/drm/tests/drm_rect_test.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tests/drm_rect_test.c b/drivers/gpu/drm/tests/drm_rect_test.c
> index 76332cd2ead8..75614cb4deb5 100644
> --- a/drivers/gpu/drm/tests/drm_rect_test.c
> +++ b/drivers/gpu/drm/tests/drm_rect_test.c
> @@ -406,22 +406,28 @@ KUNIT_ARRAY_PARAM(drm_rect_scale, drm_rect_scale_cases, drm_rect_scale_case_desc
>   
>   static void drm_test_rect_calc_hscale(struct kunit *test)
>   {
> +	DEFINE_SUPPRESSED_WARNING(drm_calc_scale);
>   	const struct drm_rect_scale_case *params = test->param_value;
>   	int scaling_factor;
>   
> +	START_SUPPRESSED_WARNING(drm_calc_scale);

I'm not sure if it is not that obvious only to me, but it would be nice
to have a comment here, remembering that we provide bad parameters in
some test cases.

Best Regards,
- Maíra

>   	scaling_factor = drm_rect_calc_hscale(&params->src, &params->dst,
>   					      params->min_range, params->max_range);
> +	END_SUPPRESSED_WARNING(drm_calc_scale);
>   
>   	KUNIT_EXPECT_EQ(test, scaling_factor, params->expected_scaling_factor);
>   }
>   
>   static void drm_test_rect_calc_vscale(struct kunit *test)
>   {
> +	DEFINE_SUPPRESSED_WARNING(drm_calc_scale);
>   	const struct drm_rect_scale_case *params = test->param_value;
>   	int scaling_factor;
>   
> +	START_SUPPRESSED_WARNING(drm_calc_scale);
>   	scaling_factor = drm_rect_calc_vscale(&params->src, &params->dst,
>   					      params->min_range, params->max_range);
> +	END_SUPPRESSED_WARNING(drm_calc_scale);
>   
>   	KUNIT_EXPECT_EQ(test, scaling_factor, params->expected_scaling_factor);
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ