From: "André Almeida" <andrealmeid@riseup.net>
To: "Maíra Canal" <mairacanal@riseup.net>,
"Isabella Basso" <isabbasso@riseup.net>,
magalilemes00@gmail.com, tales.aparecida@gmail.com,
mwen@igalia.com, siqueirajordao@riseup.net,
"Trevor Woerner" <twoerner@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@linux.ie>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"José Expósito" <jose.exposito89@gmail.com>,
"David Gow" <davidgow@google.com>,
"Daniel Latypov" <dlatypov@google.com>,
brendanhiggins@google.com, "Guenter Roeck" <linux@roeck-us.net>
Cc: linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>,
dri-devel@lists.freedesktop.org, linux-kselftest@vger.kernel.org,
kunit-dev@googlegroups.com
Subject: Re: [PATCH] drm/tests: Split up test cases in igt_check_drm_format_min_pitch
Date: Thu, 28 Jul 2022 11:03:38 -0300 [thread overview]
Message-ID: <4269b585-3373-99d4-dfae-5f207575f203@riseup.net> (raw)
In-Reply-To: <20220717184336.1197723-1-mairacanal@riseup.net>
Às 15:43 de 17/07/22, Maíra Canal escreveu:
> The igt_check_drm_format_min_pitch() function had a lot of
> KUNIT_EXPECT_* calls, all of which ended up allocating and initializing
> various test assertion structures on the stack.
>
> This behavior was producing -Wframe-larger-than warnings on PowerPC, i386,
> and MIPS architectures, such as:
>
> drivers/gpu/drm/tests/drm_format_test.c: In function 'igt_check_drm_format_min_pitch':
> drivers/gpu/drm/tests/drm_format_test.c:271:1: error: the frame size of
> 3712 bytes is larger than 2048 bytes
>
> So, the igt_check_drm_format_min_pitch() test case was split into three
> smaller functions: one testing single plane formats, one testing multiple
> planes formats, and the other testing tiled formats.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Maíra Canal <mairacanal@riseup.net>
> ---
Reviewed-by: André Almeida <andrealmeid@igalia.com>
> drivers/gpu/drm/tests/drm_format_test.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/tests/drm_format_test.c b/drivers/gpu/drm/tests/drm_format_test.c
> index 056cb8599d6d..28f2b8f88818 100644
> --- a/drivers/gpu/drm/tests/drm_format_test.c
> +++ b/drivers/gpu/drm/tests/drm_format_test.c
> @@ -91,7 +91,7 @@ static void igt_check_drm_format_block_height(struct kunit *test)
> KUNIT_EXPECT_FALSE(test, drm_format_info_block_height(info, -1));
> }
>
> -static void igt_check_drm_format_min_pitch(struct kunit *test)
> +static void igt_check_drm_format_min_pitch_for_single_plane(struct kunit *test)
> {
> const struct drm_format_info *info = NULL;
>
> @@ -175,6 +175,11 @@ static void igt_check_drm_format_min_pitch(struct kunit *test)
> (uint64_t)UINT_MAX * 4);
> KUNIT_EXPECT_EQ(test, drm_format_info_min_pitch(info, 0, (UINT_MAX - 1)),
> (uint64_t)(UINT_MAX - 1) * 4);
> +}
> +
> +static void igt_check_drm_format_min_pitch_for_multiple_planes(struct kunit *test)
Minor nit: I think the wording is usually "multi-planar"
> +{
> + const struct drm_format_info *info = NULL;
>
> /* Test 2 planes format */
> info = drm_format_info(DRM_FORMAT_NV12);
> @@ -249,6 +254,11 @@ static void igt_check_drm_format_min_pitch(struct kunit *test)
> (uint64_t)(UINT_MAX - 1) / 2);
> KUNIT_EXPECT_EQ(test, drm_format_info_min_pitch(info, 2, (UINT_MAX - 1) / 2),
> (uint64_t)(UINT_MAX - 1) / 2);
> +}
> +
> +static void igt_check_drm_format_min_pitch_for_tiled_format(struct kunit *test)
> +{
> + const struct drm_format_info *info = NULL;
>
> /* Test tiled format */
> info = drm_format_info(DRM_FORMAT_X0L2);
> @@ -273,7 +283,9 @@ static void igt_check_drm_format_min_pitch(struct kunit *test)
> static struct kunit_case drm_format_tests[] = {
> KUNIT_CASE(igt_check_drm_format_block_width),
> KUNIT_CASE(igt_check_drm_format_block_height),
> - KUNIT_CASE(igt_check_drm_format_min_pitch),
> + KUNIT_CASE(igt_check_drm_format_min_pitch_for_single_plane),
> + KUNIT_CASE(igt_check_drm_format_min_pitch_for_multiple_planes),
> + KUNIT_CASE(igt_check_drm_format_min_pitch_for_tiled_format),
> { }
> };
>
next prev parent reply other threads:[~2022-07-28 17:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 18:43 [PATCH] drm/tests: Split up test cases in igt_check_drm_format_min_pitch Maíra Canal
2022-07-17 19:12 ` Guenter Roeck
2022-07-27 12:23 ` Maíra Canal
2022-07-28 14:03 ` André Almeida [this message]
2022-07-28 16:11 ` Melissa Wen
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=4269b585-3373-99d4-dfae-5f207575f203@riseup.net \
--to=andrealmeid@riseup.net \
--cc=airlied@linux.ie \
--cc=brendanhiggins@google.com \
--cc=daniel@ffwll.ch \
--cc=davidgow@google.com \
--cc=dlatypov@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=isabbasso@riseup.net \
--cc=javierm@redhat.com \
--cc=jose.exposito89@gmail.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkp@intel.com \
--cc=magalilemes00@gmail.com \
--cc=mairacanal@riseup.net \
--cc=mwen@igalia.com \
--cc=siqueirajordao@riseup.net \
--cc=tales.aparecida@gmail.com \
--cc=twoerner@gmail.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).