[libcamera-devel] [PATCH v2 0/2] Fd leak test

Umang Jain umang.jain at ideasonboard.com
Wed Aug 18 11:02:45 CEST 2021


The first commit allows CameraTest to set the 
LIBCAMERA_IPA_FORCE_ISOLATION env variable. This is necessary since
the test in 2/2 needs to run IPA in isolated mode.

The test tests two things:
- Camera reconfigurations re-runs without stopping CameraManager
- Fd leak across IPA IPA boundary.

Currently the test fails but a fix is already posted to the list:
"ipa: Use FileDescriptor instead of int in layers above IPC payload"

Changes in v2:
- In 1/1, set LIBCAMERA_IPA_FORCE_ISOLATION to "1" instead of "TRUE"
- In 2/2, include checkstyle fixes which were missing in v1,
  no code changes as such.
- A tangential issue of "runtime error" had been seen in v1. It's
  in progress of resolving via "IPC: Avoid memcpy() call with nullptr"
  i.e. as separate series instead.

Umang Jain (2):
  libtest: camera_test: Plumb constructor to set
    LIBCAMERA_IPA_FORCE_ISOLATION
  test: camera: Camera reconfiguration and fd-leak test

 test/camera/camera_reconfigure.cpp | 255 +++++++++++++++++++++++++++++
 test/camera/meson.build            |   1 +
 test/libtest/camera_test.cpp       |   5 +-
 test/libtest/camera_test.h         |   2 +-
 4 files changed, 261 insertions(+), 2 deletions(-)
 create mode 100644 test/camera/camera_reconfigure.cpp

-- 
2.31.1



More information about the libcamera-devel mailing list