From patchwork Wed Dec 6 21:05:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19295 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 D64D6C322E for ; Wed, 6 Dec 2023 21:05:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8289062B32; Wed, 6 Dec 2023 22:05:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701896721; bh=aUngI5o5kbXxB8j5Td2qe6Z5EqO9Gtm0OHjR2Us5XCk=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=QGbj30NlniKleLJnWmf/r2F2LiA4oYN/2HM2sv4ZiWwqWEpfySbeyRgs3p2e0xHxj skhjUmmQCpiGexSNQwqwUviZbQvof+tHmDIRgZW6Dt9ZXySn5PafAAR1CDAdl8fUEw siGqFwD/vU9N8UcM5enDtWGjllxj4veGbW/e0P+y/qI0Yy6y+7ZxEijQaS+xXu/Nlw PESKJ6EYZuTZPT4XU7TrGRsG2AQghcl+9gWVffX5oqC76GAtnVmp+meCxZiXj3TB0w yfz8XIxy8+wZ9fmoKy3LZK5pQ1q165rhUaayFNNQlvAbm7w2CGuuBm0YbEifET21io 7fsz0kyf2M89g== 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 64F3A62B30 for ; Wed, 6 Dec 2023 22:05:19 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="t7bm2L1a"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 44185556 for ; Wed, 6 Dec 2023 22:04:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701896678; bh=aUngI5o5kbXxB8j5Td2qe6Z5EqO9Gtm0OHjR2Us5XCk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t7bm2L1ag6yh64MmGvRilKJL0MaLYVH91qVfDiFs1/MgLlwKQ7t0tjbAdmLxJ3T+E VYrSZLagd7qjxQOK1pPV86trcLR2VcgCwdSBmwER7HdDWROQKmqLsm94Eo/mjhIQDk YuABts9PcINYyaIWIAX++m7sgOQfPDosCUb3MiAs= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 23:05:19 +0200 Message-ID: <20231206210524.20974-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231206210524.20974-1-laurent.pinchart@ideasonboard.com> References: <20231206210524.20974-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/6] test: log: log_process: Log an error when failing due to incorrect message 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" One of the error paths in the test returns without logging a message, which makes failures difficult to debug. Fix it by adding an error message. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- test/log/log_process.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index 966b80cf3af7..17af7d74a1d5 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -115,8 +115,11 @@ protected: close(fd); string str(buf); - if (str.find(message) == string::npos) + if (str.find(message) == string::npos) { + cerr << "Received message is not correct (received " + << str.length() << " bytes)" << endl; return TestFail; + } return TestPass; }