linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Maíra Canal" <mcanal@igalia.com>
Cc: loongarch@lists.linux.dev, linux-doc@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	"Brendan Higgins" <brendan.higgins@linux.dev>,
	linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org,
	"David Airlie" <airlied@gmail.com>,
	"Arthur Grillo" <arthurgrillo@riseup.net>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	linux-arch@vger.kernel.org, linux-s390@vger.kernel.org,
	"Daniel Diaz" <daniel.diaz@linaro.org>,
	"Naresh Kamboju" <naresh.kamboju@linaro.org>,
	linux-sh@vger.kernel.org,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"Linux Kernel Functional Testing" <lkft@linaro.org>,
	"Kees Cook" <keescook@chromium.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"David Gow" <davidgow@google.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	linux-arm-kernel@lists.infradead.org, kunit-dev@googlegroups.com,
	linux-parisc@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 05/14] drm: Suppress intentional warning backtraces in scaling unit tests
Date: Mon, 25 Mar 2024 12:24:40 -0700	[thread overview]
Message-ID: <e880828b-552e-488e-9f31-3989bec276ae@roeck-us.net> (raw)
In-Reply-To: <0729b218-53f1-4139-b165-a324794a9abd@igalia.com>

Hi,

On Mon, Mar 25, 2024 at 04:05:06PM -0300, Maíra Canal wrote:
> 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@linaro.org>
> > Acked-by: Dan Carpenter <dan.carpenter@linaro.org>
> > Signed-off-by: Guenter Roeck <linux@roeck-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.

Sure. Something like this ?

        /*
         * drm_rect_calc_hscale() generates a warning backtrace whenever bad
         * parameters are passed to it. This affects all unit tests with an
         * error code in expected_scaling_factor.
         */

Thanks,
Guenter

  reply	other threads:[~2024-03-25 19:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 17:52 [PATCH v2 00/14] Add support for suppressing warning backtraces Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 01/14] bug/kunit: Core " Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 02/14] kunit: bug: Count suppressed " Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 03/14] kunit: Add test cases for backtrace warning suppression Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 04/14] kunit: Add documentation for warning backtrace suppression API Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 05/14] drm: Suppress intentional warning backtraces in scaling unit tests Guenter Roeck
2024-03-25 19:05   ` Maíra Canal
2024-03-25 19:24     ` Guenter Roeck [this message]
2024-03-26  1:09       ` Maíra Canal
2024-03-26  5:02         ` Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 06/14] net: kunit: Suppress lock warning noise at end of dev_addr_lists tests Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 07/14] x86: Add support for suppressing warning backtraces Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 08/14] arm64: " Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 09/14] loongarch: " Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 10/14] parisc: " Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 11/14] s390: " Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 12/14] sh: " Guenter Roeck
2024-03-27 14:44   ` Simon Horman
2024-03-27 15:10     ` Guenter Roeck
2024-03-27 19:39       ` Simon Horman
2024-03-29 15:40         ` Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 13/14] riscv: " Guenter Roeck
2024-03-25 17:52 ` [PATCH v2 14/14] powerpc: " Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e880828b-552e-488e-9f31-3989bec276ae@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=airlied@gmail.com \
    --cc=arnd@arndb.de \
    --cc=arthurgrillo@riseup.net \
    --cc=brendan.higgins@linux.dev \
    --cc=dan.carpenter@linaro.org \
    --cc=daniel.diaz@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=davidgow@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=keescook@chromium.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=lkft@linaro.org \
    --cc=loongarch@lists.linux.dev \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mcanal@igalia.com \
    --cc=mripard@kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).