From patchwork Wed Aug 18 09:02:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13385 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 E839DBD87C for ; Wed, 18 Aug 2021 09:02:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A341068895; Wed, 18 Aug 2021 11:02:57 +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="QvjuBaqS"; 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 5656D6025E for ; Wed, 18 Aug 2021 11:02:56 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.238.109.15]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4FBD3466; Wed, 18 Aug 2021 11:02:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1629277376; bh=RRvwyx3FkqrvgmXk9qEiqxCEAKpzS1jTnXvy+uypQbg=; h=From:To:Cc:Subject:Date:From; b=QvjuBaqS3P3fVJZkomqxp5F2AdOI2BFUyLvTUPG+NUmk1pV/ucv9A/5bWKiBXzeOc quUFaaOefmqaDOqTcF77NEB9dTtx9y1gTva7vtGd+CWYWr3n002mIsUAaTAo/fLGqw hcUNcQk10gSjP8COa94dnM/BrJyGFwGoXRjPwjZI= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Wed, 18 Aug 2021 14:32:45 +0530 Message-Id: <20210818090247.33838-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/2] Fd leak test 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" 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