[libcamera-devel] [PATCH v1 0/2] libcamera: Fix valgrind usage with tests that fork process

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Nov 30 02:23:01 CET 2021


Hello,

This small seris fixes unit tests to enable running tests that fork a
process under valgrind.

The issue is that those tests attempt to fork and exec themselves
through /proc/self/exe. While this works in normal circumstances, when
run under valgrind /proc/self/exe is valgrind itself, not the test
binary. 

Laurent Pinchart (2):
  test: Store path to the test executable in Test class
  test: Replace "/proc/self/exe" with path to test binary

 test/file.cpp                 |  4 ++--
 test/ipc/unixsocket.cpp       |  9 +++++----
 test/ipc/unixsocket_ipc.cpp   |  6 ++++--
 test/libtest/test.cpp         |  5 +++++
 test/libtest/test.h           | 15 ++++++++++++---
 test/log/log_process.cpp      |  6 ++++--
 test/process/process_test.cpp |  7 ++++---
 7 files changed, 36 insertions(+), 16 deletions(-)


base-commit: 8178e01b36d767e05d7bbb9dd1f752f7ede0db3d
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list