Commit graph

2 commits

Author SHA1 Message Date
Jacopo Mondi
a3122eecea test: fence: Check write return value
The ::write() function used to signal a framebuffer fence in the unit
test is marked with the 'warn_unused_result'.

When building in debugoptimized mode not checking for the return
value causes issues at build time:
/test/fence.cpp:254:2: error: ignoring return value of function declared with 'warn_unused_result' attribute

Fix that by checking the ::write() return value and emitting an
error message in case the write fails.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reported-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
2021-12-13 19:31:02 +01:00
Jacopo Mondi
a71834e1a0 test: fence: Add test for the Fence class
Add a test for the Fence class by testing a Fence failure case, and
by testing a successfully signalled fence capture cycle.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-12-11 17:53:40 +01:00