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; } From patchwork Wed Dec 6 21:05:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19296 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 2E204C32BC for ; Wed, 6 Dec 2023 21:05:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1BC93629E3; Wed, 6 Dec 2023 22:05:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701896722; bh=Sh2/l5RBOsroloGi5qyXJC0ChhAApGVlQ/WjFwco3rQ=; 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=L2svlrDGPw8zVZsyoQkvytRcVc7MyW7ra1K7VqySDH/uaIDZbjBbIuq4SxOqtBydm LW6FFwU5tTD41NVeF7fkBZPNVtKov3cAAH1jxdVNHDsRLieW52+CH6RuM/K0amz9BT ofF75IjXzJbWKXllMYJw2zO5KTk/ltBknmHVtqSv1S5ltl1l/tVzl+NL02nhtN7Q5S +Qj7WcifBykKWozfSzzUWJ2NHDWoukUGdwmkVlbGyVDEd4TMfmM6PswtqeUZqFq0Es 5oyeJDJTCzI+KgrxQlCxTTsjcX6ACkb8oHZ0eynw8WBkGIxgV+D4qvxKnvsE0D6pTd ieSAeIC1EW4eQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B4D5F61D9E for ; Wed, 6 Dec 2023 22:05:20 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nn8vOd4F"; 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 B697CE45 for ; Wed, 6 Dec 2023 22:04:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701896679; bh=Sh2/l5RBOsroloGi5qyXJC0ChhAApGVlQ/WjFwco3rQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nn8vOd4FfVqlTSoAkp/zgRR8POv0wgP7yVbD0GjmUp8BPjYynKx+puXndHq4kzo+i 9WafvCevTG/k+63hySxpi5m6iGAi9LNYOKxLZsZ+YAqggiEbh36hzwuHNL02clkwBi LaOD62mLZUlB4sKRXEH2kHssqD5T7eRoEzlnANxE= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 23:05:20 +0200 Message-ID: <20231206210524.20974-3-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 2/6] test: log: log_process: Fix uninitialized variable on process exit 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: , 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" If the process fails to exit before the timeout, the LogProcessTest::exitStatus_ variable gets used uninitialized. Fix it by initializating to Process::NotExited. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- test/log/log_process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index 17af7d74a1d5..f7635b70255c 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -139,7 +139,7 @@ private: ProcessManager processManager_; Process proc_; - Process::ExitStatus exitStatus_; + Process::ExitStatus exitStatus_ = Process::NotExited; string logPath_; int exitCode_; int num_; From patchwork Wed Dec 6 21:05:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19297 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 1F562C32BD for ; Wed, 6 Dec 2023 21:05:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C65B962B3F; Wed, 6 Dec 2023 22:05:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701896723; bh=Y0qLLmJmb7hWO3XbKSizWDexIQw5YU4gUk+zj2merFs=; 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=gDeYZCTFwifRitpTElS9giw5yjzOA5FTyVwjynGVg7HmbpRcnENZrNSqErYrmAC+m 9lAz0ztOLMMGpxJ8f/bIjcan+XscyNOTnn8IMbqNruZI74iDawHJ7NDVp7CFseRSEj KBBPLSvFhdqchNBX+ZgEAyTPTDpsyzLdU1/hYElE7hwoAG3G5Ey0v6gdI39hPBcu3F sMlgRJ9nEwuCPTXtt59/IhlMA8roL0/rx/9RzCcKwjCbD7hkg1KNJa6vSR5icpP7sY t1ZOsqMl1W8MwfcxfT5atPbDsg32xn2noWkYe02y3I1Gd7Kz1QEz9b9OJHSuAYbBFR R9/s4CBztms8A== 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 2A60062B3E for ; Wed, 6 Dec 2023 22:05:22 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="c/GubRmh"; 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 15DFB556 for ; Wed, 6 Dec 2023 22:04:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701896681; bh=Y0qLLmJmb7hWO3XbKSizWDexIQw5YU4gUk+zj2merFs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c/GubRmhNdab3SAvK+XAb0Sg+xW3I3zMcHO/4yY5HNMtABQOaL59J4ghxbeUs32Kx YMaGJEAFIS7u4bgG2hLAUXYS1iJk5HyOSFq3xzpXX4AGrSvIkkIyPe2IvKrqxpEgz2 Ljx1J+7HRlk2R5cy8XOUpQ5uCcsoSrqBpiFXaCpY= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 23:05:21 +0200 Message-ID: <20231206210524.20974-4-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 3/6] test: log: log_process: Improve debugging on process exit failures 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" When the process fails to run and exit normally, the test prints an error message that provides little information: process did not exit normally Expand the error message to print the exit status to make debugging easier. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- test/log/log_process.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index f7635b70255c..fb6635cc99aa 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -86,7 +86,8 @@ protected: dispatcher->processEvents(); if (exitStatus_ != Process::NormalExit) { - cerr << "process did not exit normally" << endl; + cerr << "process did not exit normally: " << exitStatus_ + << endl; return TestFail; } From patchwork Wed Dec 6 21:05:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19298 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 8E342C322E for ; Wed, 6 Dec 2023 21:05:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 413C362B49; Wed, 6 Dec 2023 22:05:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701896725; bh=EOmeZpeHB9ocqUdjJgaEADkR6bNa+3qZSf87p/L7Lh4=; 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=flOcvtPJsSlK4apIZzJbmcw52Rjx/SBizS+7sWPBfLz9tbWPvXtbay1jeu6FnJd9+ 7A5erj/jFrolfxFzo0XpPcOMiLwMl3l/LS3mpMGg3bPT7ZSijqJXbvWvkIXciZK6I6 tIkgZwwaumy4feAEr9w+6fcw5+y/OtmOCqXsmOV3ng5YIK3OU+QQmFWDyggsGtLsXM DIfm3cMXPO5SspNY4qVxetTfV6zsBuwKL4U2s0Uzv/0tT0sFrLCda3U2j/S1sgDof+ 6L3CwlzmIidDYqCeDKY5378BEntQFD8uBxGZ90XF0N6qoqi4cI9tiDUFcLuKEMd4dJ J8oCohmgzfHJA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9EF2162B33 for ; Wed, 6 Dec 2023 22:05:23 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="CrLU2Tz7"; 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 9DA45E45 for ; Wed, 6 Dec 2023 22:04:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701896682; bh=EOmeZpeHB9ocqUdjJgaEADkR6bNa+3qZSf87p/L7Lh4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CrLU2Tz7B/GjHQKQPr4pwYq971VLtYEMivJlR1ZxLdH6pVPWntndtBWyf7vgYL4Zn axAasGRK/EbI3pjBjWSPD47CvGMlmuPfiTb1ce6AInuhC4suh9ZvvYp4xogv4+QErd 0w72g7my8ZluEWFL0vo+nbp7TbqxQT+Yazr0SfRs= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 23:05:22 +0200 Message-ID: <20231206210524.20974-5-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 4/6] test: log: log_process: Increase process exit timeout 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" When running tests on slower devices, 200ms is too low to wait for the process to exit. Increase the timeout to 2s. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- test/log/log_process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index fb6635cc99aa..1926c56039b6 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -81,7 +81,7 @@ protected: return TestFail; } - timeout.start(200ms); + timeout.start(2s); while (timeout.isRunning()) dispatcher->processEvents(); From patchwork Wed Dec 6 21:05:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19299 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 ED24FC32BC for ; Wed, 6 Dec 2023 21:05:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A616662B31; Wed, 6 Dec 2023 22:05:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701896727; bh=b5T/V/srdsaZDndfW+ogTTPOhjXAk2J80OghXy8o3mc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=i96DR18n96QU1wrN0IuteqFVtQn85bSXgmlx/53p7Jy3gwIPXdSaibKrwDLGZSmU7 9LNdXkK3TzeiIqq8i3K+UULA5Y1XoJWYgvoNIBvO/7MwX7wYRBCCTqpOwOh+Z3O+XS op4erXBhHyC+J+YTdaxa41zMJPskqTj52es+6NVRSNWckn/lI14sjBRRdYUh68VBpa xMt6Yp79JUlLd97W1FjE6wm2j1vqEVUx3ckB2bmjFg1QhSADWe2imc9lHZl9+ZlzsA YtMUPMh+Yd7nNmD/ZyO/A1wkhls3awidkNxpWuA6bVEpG5EydLoA7OC0Sgl9ZejIDk JWfu2Av3IJzLw== 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 37F7862B40 for ; Wed, 6 Dec 2023 22:05:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tDvtS46f"; 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 00D77E45; Wed, 6 Dec 2023 22:04:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701896684; bh=b5T/V/srdsaZDndfW+ogTTPOhjXAk2J80OghXy8o3mc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tDvtS46fmtbFNe0UIkbUAkdgbYdeNVYAlRQ+v8zyRgInXt8D0LjCLePJ4AnzcZswK M2vhCA9eCGagf3uYq/k8K8MkL4COJqs9zVhJ+v+1Vuu1RCZ4kMWUaeGxKsRwiZyrOi aEUjKuc5s/kB+4LgdkXin2HfwcStWZrSp2SHGph8= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 23:05:23 +0200 Message-ID: <20231206210524.20974-6-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 5/6] test: ipc: unixsocket: Increase process exit timeout 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 Cc: Nicolas Dufresne , Vedant Paranjape Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" When running tests on slower devices, 200ms is too low to wait for the process to exit. Increase the timeout to 2s. Signed-off-by: Laurent Pinchart Reviewed-by: Nicolas Dufresne Reviewed-by: Kieran Bingham --- test/ipc/unixsocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp index 304e613bc984..1d4df28726cd 100644 --- a/test/ipc/unixsocket.cpp +++ b/test/ipc/unixsocket.cpp @@ -431,7 +431,7 @@ private: if (ret) return ret; - timeout.start(200ms); + timeout.start(2s); while (!callDone_) { if (!timeout.isRunning()) { cerr << "Call timeout!" << endl; From patchwork Wed Dec 6 21:05:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19300 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 A22CBC32BE for ; Wed, 6 Dec 2023 21:05:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3228F62B3E; Wed, 6 Dec 2023 22:05:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701896728; bh=NZkiQNMfUta8JuleftDajQUrje2fpiQJko7TJilAfEI=; 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=vgHP6EpCW3/7ACRaYcNarSEAgHJCsb4zs4ukJP0UcK3DFb3w+/4LI/bx6JkmCQa+J Ji1dUKCn/tkIHO/PxbCdBfSoVAnd6jHM+ybjwSFITaZGZerLhfg1xMSiDiWIvvwzRi VH/WP0rDjXT3UY9oYSKPZxNWA69HnFESszdVOb4dp6+oeCop7vJxmBlYgJKD/wBVbh 1hS7surRYPradOdi5tACndB4QkjCLM4rQfFPiRwGPiLBH52+uwqGlTI6Sl9Fku1KLh dPgiXhR/6J5pmv1wcwmmnXhpNy07mekbeUJs/T+ggXPGy1cfaLY8Wst16EUp2zfikZ h6rQ7LZqIj6hA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 458AC62B32 for ; Wed, 6 Dec 2023 22:05:26 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hESmuzcT"; 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 3E3FAE45 for ; Wed, 6 Dec 2023 22:04:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701896685; bh=NZkiQNMfUta8JuleftDajQUrje2fpiQJko7TJilAfEI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hESmuzcTwMfsTZ9LjF5JVFO/dfLtuJMnPX1AlK6jDhsJvXawqxjHpptLBSUzoydRL 4OoLYieeHDn0oGr2vRRFg77viujC4dpWn08fKvpQVyfiJohPHq8DHxxCxcN5avQnpq hKkTlLTr1x9cp1W1vvLoLxcAbg57mE40e7AfG7dU= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 23:05:24 +0200 Message-ID: <20231206210524.20974-7-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 6/6] test: gstreamer: Remove videoconvert element from pipeline 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" The GStreamer single stream test uses the following pipeline: libcamerasrc ! videoconvert ! fakesink The videoconvert element isn't useful as the data is thrown away by the fakesink anyway. We can shorten the pipeline to libcamerasrc ! fakesink to save CPU time and to avoid depending on the gstreamer1.0-plugins-base package to run the unit tests. The test could be further simplified by replacing gst_parse_bin_from_description_full() with gst_element_factory_make(), now that we only add one element to the bin. The extra cost incurred by the bin only impacts initialization time, and using a bin will make it easier to add other elements in the future if needed. Keep the bin, and only drop the videoconvert element. Signed-off-by: Laurent Pinchart Reviewed-by: Nicolas Dufresne Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- test/gstreamer/gstreamer_single_stream_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp index a0dd12cfea84..301e4a935a37 100644 --- a/test/gstreamer/gstreamer_single_stream_test.cpp +++ b/test/gstreamer/gstreamer_single_stream_test.cpp @@ -29,7 +29,7 @@ protected: if (status_ != TestPass) return status_; - const gchar *streamDescription = "videoconvert ! fakesink"; + const gchar *streamDescription = "fakesink"; g_autoptr(GError) error0 = NULL; stream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE, NULL,