From patchwork Wed Oct 7 11:25:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10011 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id BAC96BEEDF for ; Wed, 7 Oct 2020 11:25:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4379D605A7; Wed, 7 Oct 2020 13:25:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OJQ8uHR6"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AD7EE6055E for ; Wed, 7 Oct 2020 13:25:47 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1BCD2A08; Wed, 7 Oct 2020 13:25:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1602069947; bh=cdNJ+eTvvgG5xGCpg6dT3FRVrjWyyL6MRDg+ePmCMDs=; h=From:To:Cc:Subject:Date:From; b=OJQ8uHR6ulvO96wuu0HnvLQV8BA87mc/npVDFZyNCxibK+r8esVDZcBwtnPzb37Cf Kd65a5dD8rwegM890KRyk3NCbfo69R9hBruLssxloJ1sL+Krq3LNNnn7NncqWJphFe e9PKbxkYAhdI6MIN/96bSTwsgcoSBuLlnBgNvbgw= From: Kieran Bingham To: libcamera devel Date: Wed, 7 Oct 2020 12:25:43 +0100 Message-Id: <20201007112544.3169293-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/1] test: Capture tests under valgrind (+RFC:TAP) X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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