From e35cae067980a62b23d25792bc5176b4c554605f Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Wed, 18 Aug 2021 14:32:47 +0530 Subject: test: camera: Camera reconfiguration and fd-leak test Development and usage of isolated IPA's has identified bugs in the transmission of the file descriptors between the pipeline handler and the IPA through. Add tests to identify these bugs and prevent regressions. This tests basically checks for two things: - Camera reconfigurations without stopping CameraManager - Fd leaks across IPA IPC boundary [1] Currently, it uses vimc, but can be easily changed to using another platform (for e.g. IPU3) by changing kCamId_ and kIpaProxyName_. The test performs kNumOfReconfigures_ (currently set to 10) reconfigurations of the camera. Each reconfiguration runs start(), capture(100ms), stop() of the camera. Hence, the test runs approximately for 1 second. For checking the fd leaks, the test monitors the /proc/$PROXY_PID/fd directory for open fds. It compares the number of open fds after each run to the number of open fds before the first run. If those two are found to be mis-matched, the test shall report failure. The test validates IPA IPC code paths which are used when the IPA is run in isolated mode. The CameraTest is constructed with the isolate flag set to enforce this. [1] https://bugs.libcamera.org/show_bug.cgi?id=63 Signed-off-by: Umang Jain Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- test/camera/meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'test/camera/meson.build') diff --git a/test/camera/meson.build b/test/camera/meson.build index 002a87b5..668d5c03 100644 --- a/test/camera/meson.build +++ b/test/camera/meson.build @@ -8,6 +8,7 @@ camera_tests = [ ['buffer_import', 'buffer_import.cpp'], ['statemachine', 'statemachine.cpp'], ['capture', 'capture.cpp'], + ['camera_reconfigure', 'camera_reconfigure.cpp'], ] foreach t : camera_tests -- cgit v1.2.1