mutter/src/tests/wayland-test-clients
Jonas Dreßler efb0addb62 tests/wayland: Add a test for meta-anonymous-file
Test the two modes of MetaAnonymousFile, MAPMODE_SHARED and
MAPMODE_PRIVATE and make sure they don't leak data to other FDs when
writing to an FD provided by `meta_anonymous_file_get_fd` even though
the data of both FDs is residing in the same chunk of memory.

We do all the reading tests using mmap instead of read() since using
read() on shared FDs is going to move the read cursor of the fd. That
means using read() once on the shared FD returned by
meta_anonymous_file_get_fd() in MAPMODE_PRIVATE breaks every subsequent
read() call.

Also test the fallback code of MetaAnonymousFile in case `memfd_create`
isn't used for the same issues.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1012
2020-04-21 17:52:08 +02:00
..
meson.build tests/wayland: Add a test for meta-anonymous-file 2020-04-21 17:52:08 +02:00
meta-anonymous-file.c tests/wayland: Add a test for meta-anonymous-file 2020-04-21 17:52:08 +02:00
subsurface-remap-toplevel.c tests/wayland: Test subsurface commits after parent was reset 2020-01-10 16:01:22 +00:00
test-driver.xml tests/wayland: Test subsurface commits after parent was reset 2020-01-10 16:01:22 +00:00
wayland-test-client-utils.c tests/wayland: Test subsurface commits after parent was reset 2020-01-10 16:01:22 +00:00
wayland-test-client-utils.h tests/wayland: Test subsurface commits after parent was reset 2020-01-10 16:01:22 +00:00