test: controls: control_list: Add status check
Since commitfac471e812("test: Extract CameraTest class out of camera tests to libtest") the control_list is a subclass of CameraTest, and the status returned by the base class init() operation should be inspected to avoid accessing uninitialized fields during the run() operation execution. If the VIMC test module is not loaded, executing the test results in a segfault. Fix this by adding the init() operation where to status_ flag is checked for errors. Fixes:fac471e812("test: Extract CameraTest class out of camera tests to libtest") Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -29,7 +29,12 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
int run()
|
||||
int init() override
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
int run() override
|
||||
{
|
||||
CameraControlValidator validator(camera_.get());
|
||||
ControlList list(controls::controls, &validator);
|
||||
|
||||
Reference in New Issue
Block a user