From patchwork Tue Sep 10 09:04:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 1957 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9183C60BCF for ; Tue, 10 Sep 2019 11:04:26 +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 36F44DAD; Tue, 10 Sep 2019 11:04:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1568106266; bh=5rcwvtbiWsOCeHPp+GvhSqGv0opTRe9bziOjq8I6b0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcoUUZ5ybevk+xRRv3KeWN1PrSsmxHoqdETdzjN6enEgjdW26c1ipa49E8/V3MuEa EjcyZVeoWJAHK6rH+Svh4019Z3mA+reRlxXfW8amNhnBn5Xnh4DgysrOSKTqkqp7x0 PiJuS8CguU9XPJDb6cr6WofeBueWxSCd936StHvs= From: Kieran Bingham To: LibCamera Devel Date: Tue, 10 Sep 2019 10:04:18 +0100 Message-Id: <20190910090418.30502-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190910090418.30502-1-kieran.bingham@ideasonboard.com> References: <20190910090418.30502-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/3] test: process: Extend timeout duration 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:26 -0000 The process test runs for just 100mS. The spawned process runs for at least 50mS. Ordinarily this should allow plenty of time for both the process to be spawned and run, but when adding extra debug instrumentation, the processes can be slowed down, leading to a false negative test failure. Extend the timeout to 2 seconds to allow the short process to be run correctly - but use the now initialised exitStatus_ to exit the event loop as soon as the process has completed. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- test/process/process_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp index f3cabe0a36c7..7e7b3c2c8bf3 100644 --- a/test/process/process_test.cpp +++ b/test/process/process_test.cpp @@ -56,8 +56,8 @@ protected: return TestFail; } - timeout.start(100); - while (timeout.isRunning()) + timeout.start(2000); + while (timeout.isRunning() && exitStatus_ == Process::NotExited) dispatcher->processEvents(); if (exitStatus_ != Process::NormalExit) {