From patchwork Tue Sep 10 09:04:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 1954 Return-Path: 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 C4F4060BCF for ; Tue, 10 Sep 2019 11:04:25 +0200 (CEST) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 399912F9; Tue, 10 Sep 2019 11:04:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1568106265; bh=nOaCn+GQmAw6fHQZE61xy+Ey/A8xwETjtQ76ZatBOMA=; h=From:To:Cc:Subject:Date:From; b=wafoB/dO/KvLPGAgpD8BkPtPAOX9U44DGe/dRfj5BCCNYNzsr/2NF1q5+WYXoB/rv Il8JNi9BHxdrdcsHvKJj6ySxDjZvRIdkrxG0TP+wqSagmaBzfBURHYsPxQCeJ+HYtU Kj3o+9vi8yJjZmAkwBCwqx1Kqh7NtzVZzalmfHuI= From: Kieran Bingham To: LibCamera Devel Date: Tue, 10 Sep 2019 10:04:15 +0100 Message-Id: <20190910090418.30502-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] test: process: Cleanup to process test X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 09:04:25 -0000 While developing the serialisation implementation - I found I was frequently hitting failures on the Process test. The occurence of both successful runs and failed runs suggests uninitialised data and lost races. These three cleanups fix two potential races and ensures that the member variables in the test are correctly initialised. Correct initialisation of the exitStatus_ is then used to provide an earliest opportunity shutdown of the test with it's extended timeout. Kieran Bingham (3): test: process: Fix forking race test: process: Initialise member variables test: process: Extend timeout duration test/process/process_test.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)