diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-11-20 11:52:11 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-11-23 12:13:25 +0000 |
commit | 2d48e097586d771db1b5a0b26cec9cc49f344ab2 (patch) | |
tree | 8aef031ec20c95214bb43666fe11bc5aa817732f /tests | |
parent | 4a35b0ecd59b67e4cd0d329ae33512bafef3e6c4 (diff) |
tests/fbdev: Map framebuffer in igt_fixture
The mapping of the framebuffer memory will be useful for read/write
tests. Move it into an igt_fixture block.
v4:
* declare map as volatile (Petri)
* test struct fb_fix_screeninfo.smem_len with igt_assert()
* remove mmap test from CI
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fbdev.c | 12 | ||||
-rw-r--r-- | tests/intel-ci/fast-feedback.testlist | 1 |
2 files changed, 5 insertions, 8 deletions
diff --git a/tests/fbdev.c b/tests/fbdev.c index a803f445..eebd2a83 100644 --- a/tests/fbdev.c +++ b/tests/fbdev.c @@ -63,22 +63,20 @@ static void mode_tests(int fd) static void framebuffer_tests(int fd) { struct fb_fix_screeninfo fix_info; + void * volatile map; igt_fixture { igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0); - } - - igt_describe("Check mmap operations on framebuffer memory"); - igt_subtest("mmap") { - void *map; - - igt_require(fix_info.smem_len); + igt_assert(fix_info.smem_len); map = mmap(NULL, fix_info.smem_len, PROT_WRITE, MAP_SHARED, fd, 0); igt_assert(map != MAP_FAILED); memset(map, 0, fix_info.smem_len); + } + + igt_fixture { munmap(map, fix_info.smem_len); } } diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist index a40410a8..cf66b4da 100644 --- a/tests/intel-ci/fast-feedback.testlist +++ b/tests/intel-ci/fast-feedback.testlist @@ -3,7 +3,6 @@ igt@core_auth@basic-auth igt@debugfs_test@read_all_entries igt@fbdev@info -igt@fbdev@mmap igt@gem_basic@bad-close igt@gem_basic@create-close igt@gem_basic@create-fd-close |