[PATCH 1/2] dumb_buffer: Remove invalid-bpp subtest

Rob Clark robdclark at gmail.com
Mon Aug 19 18:25:01 UTC 2024


On Mon, Aug 19, 2024 at 10:16 AM Kamil Konieczny
<kamil.konieczny at linux.intel.com> wrote:
>
> Hi Rob,
> On 2024-08-14 at 11:54:25 -0700, Rob Clark wrote:
> > From: Rob Clark <robdclark at chromium.org>
> >
> > These allocations are not necessarily invalid.
>
> Please write a little more why. Also look at gitlab log,
> you need to delete comments with this subtest name and description
> as our CI is creating testlist at build time and that info
> is there.
>
> Add also tests/ prefix in subject:
>
> [PATCH 1/2] tests/dumb_buffer: Remove invalid-bpp subtest
>
> >
> > Signed-off-by: Rob Clark <robdclark at chromium.org>
> > ---
> >  tests/dumb_buffer.c | 22 ----------------------
> >  1 file changed, 22 deletions(-)
> >
> > diff --git a/tests/dumb_buffer.c b/tests/dumb_buffer.c
> > index 1d4bf296c53e..579d2f906b6d 100644
> > --- a/tests/dumb_buffer.c
> > +++ b/tests/dumb_buffer.c
> > @@ -136,25 +136,6 @@ static void dumb_destroy(int fd, uint32_t handle)
> >       igt_assert_eq(__dumb_destroy(fd, handle), 0);
> >  }
> >
> > -static void invalid_dimensions_test(int fd)
> > -{
> > -     struct drm_mode_create_dumb create;
> > -
> > -     memset(&create, 0, sizeof(create));
> > -     create.width = 4032;
> > -     create.height = 2016;
> > -     create.bpp = 24;
> > -     igt_assert_eq(__dumb_create(fd, &create), -EINVAL);
>
> These use 3-Bytes bpp with divisible by 4 screen W x H, so here
> you could be right with removing this.

I guess I could instead create.bpp = 0, since that is the only case
that the kernel actually rejects

BR,
-R

>
> > -
> > -     create.bpp = 32;
> > -     create.width = 0;
> > -     igt_assert_eq(__dumb_create(fd, &create), -EINVAL);
>
> Why 0-width is valid?
>
> > -
> > -     create.width = 4032;
> > -     create.height = 0;
> > -     igt_assert_eq(__dumb_create(fd, &create), -EINVAL);
>
> Same here, imho looks invalid. Btw what about other settings?
> Like bpp not divisible by 8 bits?
>
> Regards,
> Kamil
>
> > -}
> > -
> >  static void valid_dumb_creation_test(int fd)
> >  {
> >       struct drm_mode_create_dumb create = {
> > @@ -397,9 +378,6 @@ igt_main
> >               fd = drm_open_driver(DRIVER_ANY);
> >       }
> >
> > -     igt_subtest("invalid-bpp")
> > -             invalid_dimensions_test(fd);
> > -
> >       igt_subtest("create-valid-dumb")
> >               valid_dumb_creation_test(fd);
> >
> > --
> > 2.46.0
> >


More information about the igt-dev mailing list