[igt-dev] [PATCH v4 1/8] tests/fbdev: Move existing tests into separate subgroups

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 17 13:41:48 UTC 2020


Quoting Thomas Zimmermann (2020-11-17 12:52:50)
> +static void framebuffer_tests(int fd)
> +{
> +       struct fb_fix_screeninfo fix_info;
> +
> +       igt_fixture {
> +               igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);

igt_info("Testing fbdev: %s\n", fix_info.id);

would be a useful addition.

> +       }
>  
> +       igt_describe("Check mmap operations on framebuffer memory");
>         igt_subtest("mmap") {
>                 void *map;
>  
> @@ -77,11 +76,39 @@ igt_main
>  
>                 map = mmap(NULL, fix_info.smem_len,
>                            PROT_WRITE, MAP_SHARED, fd, 0);
> -               igt_assert(map != MAP_FAILED);
> +               igt_require(map != MAP_FAILED);

Under what conditions do we want to allow a driver to fail to provide
mmap()? I haven't spotted anything in uapi/fb.h to indicate what bits of
the iface are optional, or other rules userspace needs to follow.

igt_skip_on(!fix_info.smem_len)?

If mmap() failing is the only true indicator that its not supported, so
be it. In which case is errno significant?
-Chris


More information about the igt-dev mailing list