From patchwork Tue Feb 2 17:34:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11107 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 3F1A7BD161 for ; Tue, 2 Feb 2021 17:34:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C2BC26842C; Tue, 2 Feb 2021 18:34:12 +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="p2q8FUDH"; 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 B447060307 for ; Tue, 2 Feb 2021 18:34:10 +0100 (CET) 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 52AF151B; Tue, 2 Feb 2021 18:34:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1612287249; bh=oJBwrMmkIiCytvJB3xqVozqG6ISNDfWQVlv23O1aVn4=; h=From:To:Cc:Subject:Date:From; b=p2q8FUDH4EGnAmcfvhrRj0J/go0HwoQfWxiJ7OzEd8pHqOmBJjT2eV/w98lE0YF+k hiyBGVXCF2zIG6ZmfTOKfCCKWrxSWhZY4AEuVhXdtYnrNoIRkHG6+r9D/OeKdWwjAg dgrGlqACh9oWVG/t6SseaIUNJtPgHR9Sl7rCF78U= From: Kieran Bingham To: libcamera devel Date: Tue, 2 Feb 2021 17:34:05 +0000 Message-Id: <20210202173405.1688089-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] test: buffer-import: Fix false-positive failure 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" Running the tests failed with the following error on buffer import: "Failed to capture enough frames (got 8 expected at least 8)" This indicates that the test did in fact capture enough frames as desired by the test. Update the comparison on both buffer-import and capture tests accordingly. Signed-off-by: Kieran Bingham Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund Reviewed-by: Paul Elder --- test/camera/buffer_import.cpp | 2 +- test/camera/capture.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index 7ff628269c47..61f4eb92ae95 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -138,7 +138,7 @@ protected: while (timer.isRunning()) dispatcher->processEvents(); - if (completeRequestsCount_ <= cfg.bufferCount * 2) { + if (completeRequestsCount_ < cfg.bufferCount * 2) { std::cout << "Failed to capture enough frames (got " << completeRequestsCount_ << " expected at least " << cfg.bufferCount * 2 << ")" << std::endl; diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp index 6d564fe453ac..c4bc21100777 100644 --- a/test/camera/capture.cpp +++ b/test/camera/capture.cpp @@ -142,7 +142,7 @@ protected: unsigned int nbuffers = allocator_->buffers(stream).size(); - if (completeRequestsCount_ <= nbuffers * 2) { + if (completeRequestsCount_ < nbuffers * 2) { cout << "Failed to capture enough frames (got " << completeRequestsCount_ << " expected at least " << nbuffers * 2 << ")" << endl;