test: camera: Fix initialisation
Three tests {capture,configuration_set,statemachine} override the CameraTest::init() function, and call it as the first action. However they were not checking the return value, and each of the tests will segfault if the VIMC camera is not obtained. Check the return value of the CameraTest base class initialisation and return any errors to the test suite if initialisation fails. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
255e583857
commit
339e9b2d97
3 changed files with 9 additions and 3 deletions
|
@ -235,7 +235,9 @@ protected:
|
|||
|
||||
int init() override
|
||||
{
|
||||
CameraTest::init();
|
||||
int ret = CameraTest::init();
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
defconf_ = camera_->generateConfiguration({ StreamRole::VideoRecording });
|
||||
if (!defconf_) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue