[libcamera-devel,RFC,0/1] test: Capture tests under valgrind (+RFC:TAP)
mbox series

Message ID 20201007112544.3169293-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • test: Capture tests under valgrind (+RFC:TAP)
Related show

Message

Kieran Bingham Oct. 7, 2020, 11:25 a.m. UTC
Introduce a test which checks if valgrind is available on the system,
and if it is - executes cam on each camera in the system under valgrind
to test for memory leaks.

Note that I have currently disabled the tap parsing here, but kept it
for discussion - as the output is interspersed with the 'tap' output -
so it confuses meson. I'm not sure how to deal with this - because I
don't want to get rid of the (valuable) application logs!?

The log file from meson for this test outputs as below:



 1/57 libcamera:integration / cam-capture-test         ERROR          12.70s

--- command ---
10:35:43 /home/linuxembedded/iob/libcamera/libcamera/test/cam/capture-test.sh src/cam/cam
--- stdout ---
1..3
Using camera \_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-0408:5251
Capture 10 frames
320660.720920 (0.00 fps) stream0 seq: 000005 bytesused: 502492
320660.524917 (0.00 fps) stream0 seq: 000001 bytesused: 32
320660.524922 (200000.00 fps) stream0 seq: 000003 bytesused: 581830
320660.688872 (6.10 fps) stream0 seq: 000004 bytesused: 502092
320660.788963 (9.99 fps) stream0 seq: 000007 bytesused: 542272
320660.820953 (31.26 fps) stream0 seq: 000008 bytesused: 544342
320660.852888 (31.31 fps) stream0 seq: 000009 bytesused: 544469
320660.888913 (27.76 fps) stream0 seq: 000010 bytesused: 544796
320660.920913 (31.25 fps) stream0 seq: 000011 bytesused: 537976
320660.952898 (31.26 fps) stream0 seq: 000012 bytesused: 537135
ok 1 - Camera 1 reports no leaks
Using camera \_SB_.PCI0.XHC_.RHUB.HS05-5:1.2-0408:5251
Capture 10 frames
320665.161279 (0.00 fps) stream0 seq: 000006 bytesused: 123904
320665.061277 (0.00 fps) stream0 seq: 000003 bytesused: 123904
320665.093286 (31.24 fps) stream0 seq: 000004 bytesused: 123904
320665.129277 (27.78 fps) stream0 seq: 000005 bytesused: 123904
320665.229275 (10.00 fps) stream0 seq: 000008 bytesused: 123904
320665.261281 (31.24 fps) stream0 seq: 000009 bytesused: 123904
320665.297269 (27.79 fps) stream0 seq: 000010 bytesused: 123904
320665.329277 (31.24 fps) stream0 seq: 000011 bytesused: 123904
320665.365267 (27.79 fps) stream0 seq: 000012 bytesused: 123904
320665.397268 (31.25 fps) stream0 seq: 000013 bytesused: 123904
ok 2 - Camera 2 reports no leaks
Using camera platform/vimc.0 Sensor B
Capture 10 frames
320669.169525 (0.00 fps) stream0 seq: 000000 bytesused: 6220800
320669.204844 (28.31 fps) stream0 seq: 000001 bytesused: 6220800
320669.240914 (27.72 fps) stream0 seq: 000002 bytesused: 6220800
320669.277581 (27.27 fps) stream0 seq: 000003 bytesused: 6220800
320669.312546 (28.60 fps) stream0 seq: 000004 bytesused: 6220800
320669.348842 (27.55 fps) stream0 seq: 000005 bytesused: 6220800
320669.384924 (27.71 fps) stream0 seq: 000006 bytesused: 6220800
320669.420832 (27.85 fps) stream0 seq: 000007 bytesused: 6220800
320669.491280 (14.19 fps) stream0 seq: 000008 bytesused: 6220800
320669.526459 (28.43 fps) stream0 seq: 000009 bytesused: 6220800
ok 3 - Camera 3 reports no leaks
--- stderr ---
[89:04:20.348742031] [3166933]  INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home/linuxembedded/iob/libcamera/libcamera/build/src/ipa' to the IPA search path
[89:04:20.349741529] [3166933]  INFO Camera camera_manager.cpp:287 libcamera v0.0.11+1003-9de2675a
[89:04:20.362922182] [3166936]  INFO IPAProxy ipa_proxy.cpp:122 libcamera is not installed. Loading IPA configuration from '/home/linuxembedded/iob/libcamera/libcamera/src/ipa/vimc/data'
[89:04:20.375008466] [3166938]  INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home/linuxembedded/iob/libcamera/libcamera/build/src/ipa' to the IPA search path
[89:04:20.378361783] [3166938]  INFO Camera camera_manager.cpp:287 libcamera v0.0.11+1003-9de2675a
[89:04:20.396086101] [3166939]  INFO IPAProxy ipa_proxy.cpp:122 libcamera is not installed. Loading IPA configuration from '/home/linuxembedded/iob/libcamera/libcamera/src/ipa/vimc/data'
[89:04:20.483896056] [3166938]  INFO Camera camera.cpp:811 configuring streams: (0) 1920x1080-MJPEG
[89:04:24.780201279] [3166946]  INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home/linuxembedded/iob/libcamera/libcamera/build/src/ipa' to the IPA search path
[89:04:24.781254645] [3166946]  INFO Camera camera_manager.cpp:287 libcamera v0.0.11+1003-9de2675a
[89:04:24.791631218] [3166947]  INFO IPAProxy ipa_proxy.cpp:122 libcamera is not installed. Loading IPA configuration from '/home/linuxembedded/iob/libcamera/libcamera/src/ipa/vimc/data'
[89:04:24.877779223] [3166946]  INFO Camera camera.cpp:811 configuring streams: (0) 352x352-R8
[89:04:29.134301174] [3166954]  INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home/linuxembedded/iob/libcamera/libcamera/build/src/ipa' to the IPA search path
[89:04:29.135189817] [3166954]  INFO Camera camera_manager.cpp:287 libcamera v0.0.11+1003-9de2675a
[89:04:29.145094221] [3166955]  INFO IPAProxy ipa_proxy.cpp:122 libcamera is not installed. Loading IPA configuration from '/home/linuxembedded/iob/libcamera/libcamera/src/ipa/vimc/data'
[89:04:29.146530408] [3166954]  INFO VIMC vimc.cpp:212 Skipping unsupported pixel format RGB888
[89:04:29.146685086] [3166954]  INFO Camera camera.cpp:811 configuring streams: (0) 1920x1080-BGR888

TAP parsing error: unexpected input at line (2,)
TAP parsing error: unexpected input at line (3,)
TAP parsing error: unexpected input at line (4,)
TAP parsing error: unexpected input at line (5,)
TAP parsing error: unexpected input at line (6,)
TAP parsing error: unexpected input at line (7,)
TAP parsing error: unexpected input at line (8,)
TAP parsing error: unexpected input at line (9,)
TAP parsing error: unexpected input at line (10,)
TAP parsing error: unexpected input at line (11,)
TAP parsing error: unexpected input at line (12,)
TAP parsing error: unexpected input at line (13,)
TAP parsing error: unexpected input at line (15,)
TAP parsing error: unexpected input at line (16,)
TAP parsing error: unexpected input at line (17,)
TAP parsing error: unexpected input at line (18,)
TAP parsing error: unexpected input at line (19,)
TAP parsing error: unexpected input at line (20,)
TAP parsing error: unexpected input at line (21,)
TAP parsing error: unexpected input at line (22,)
TAP parsing error: unexpected input at line (23,)
TAP parsing error: unexpected input at line (24,)
TAP parsing error: unexpected input at line (25,)
TAP parsing error: unexpected input at line (26,)
TAP parsing error: unexpected input at line (28,)
TAP parsing error: unexpected input at line (29,)
TAP parsing error: unexpected input at line (30,)
TAP parsing error: unexpected input at line (31,)
TAP parsing error: unexpected input at line (32,)
TAP parsing error: unexpected input at line (33,)
TAP parsing error: unexpected input at line (34,)
TAP parsing error: unexpected input at line (35,)
TAP parsing error: unexpected input at line (36,)
TAP parsing error: unexpected input at line (37,)
TAP parsing error: unexpected input at line (38,)
TAP parsing error: unexpected input at line (39,)
-------


Kieran Bingham (1):
  test: cam tool testing with valgrind

 test/cam/capture-test.sh | 71 ++++++++++++++++++++++++++++++++++++++++
 test/cam/meson.build     | 10 ++++++
 test/meson.build         |  1 +
 3 files changed, 82 insertions(+)
 create mode 100755 test/cam/capture-test.sh
 create mode 100644 test/cam/meson.build