From patchwork Tue Nov 30 01:23:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 14852 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 F3DD2BDB13 for ; Tue, 30 Nov 2021 01:23:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3D487605B4; Tue, 30 Nov 2021 02:23:35 +0100 (CET) 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="pSanqqyq"; 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 1CCFF604FC for ; Tue, 30 Nov 2021 02:23:33 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 903AB93 for ; Tue, 30 Nov 2021 02:23:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1638235412; bh=cniiac8Qikhe8alMOotAoAUAEK6T3QsZct63eS5cwu4=; h=From:To:Subject:Date:From; b=pSanqqyqn53J9tKwUMS3dBT900jesZT9WTWIFbYYvXZnJkDL4AcNw2Up4E8m8vybl 05qv4ndOgW7SeOJpadb2ZKrjPVw8zAT2uXGj+jYTHw9o2fuhjgZtTabFHzp8uInerf s7L8kCj2c8gE3jLGcUK81An1VANi0ytiRs8uR3aE= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Nov 2021 03:23:01 +0200 Message-Id: <20211130012303.10574-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 0/2] libcamera: Fix valgrind usage with tests that fork process 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" 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