{"id":18072,"url":"https://patchwork.libcamera.org/api/patches/18072/?format=json","web_url":"https://patchwork.libcamera.org/patch/18072/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20221228223003.2265712-17-paul.elder@ideasonboard.com>","date":"2022-12-28T22:30:00","name":"[libcamera-devel,v10,16/19] lc-compliance: Move role to string conversion to its own function","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"e5a3663ea6948b93e2d5620dcf7615d0f43340a6","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18072/mbox/","series":[{"id":3691,"url":"https://patchwork.libcamera.org/api/series/3691/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3691","date":"2022-12-28T22:29:44","name":"lc-compliance: Add test to queue more requests than hardware depth","version":10,"mbox":"https://patchwork.libcamera.org/series/3691/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18072/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18072/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 156AEC3292\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Dec 2022 22:30:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B91A5625FD;\n\tWed, 28 Dec 2022 23:30:42 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BCAB6625F6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Dec 2022 23:30:37 +0100 (CET)","from pyrite.mediacom.info (unknown\n\t[IPv6:2604:2d80:ad8a:9000:1bf9:855b:22de:3645])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9C63225B;\n\tWed, 28 Dec 2022 23:30:36 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1672266642;\n\tbh=01pZHYVZngDe+B2HzCbcASuxSqUGF6xdmRpG+MH2Sh8=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=S95kk6NCKkontw8LPSFUFbDCzgnACYV9HYIRmaefTHbiZnuvZX4jO47yz9o1//3+w\n\t9EcDr6DOBKGzW55d+ZtLfRebywfHhviGHo8pUVr66VuKT86Y8JP0bNsDj0lqZd9uUS\n\tJoRzCi7950XvvEWxLaCrtS9i3Btq1VhknMJB1e85y31KhNqwzxxxUSY5kx7fNjY4ua\n\tXfRamfACo9dzTm1pGHY/+pNGpPHDpGzIuF5PmKr+7AHcEsdWbaNIIWgb5oQk4oPRgM\n\t5dtzjnkHlGzxJlgojm/fmMVx82ljcWZUc99Y17Cwi599xq2dv/VhVrxpozXp1SSjjx\n\tM0sE0ciS+kidg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1672266637;\n\tbh=01pZHYVZngDe+B2HzCbcASuxSqUGF6xdmRpG+MH2Sh8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=stEEz1x4BtO2DLVbnQRPPYZYR72m00Yg0G4ViwNPT7v5Hi5ps9Ob9aChXNVIprg3O\n\tPUl0okS5bI/K72tRiiHIQTjsGqXzfB6s1RV9gRDhZuhqd3SwJTs886gbVh5VMBHtt5\n\t8Yfg6n9yYn0Jci6SPmqxyJhJXEXxmbeXs9DUPNP4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"stEEz1x4\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 28 Dec 2022 16:30:00 -0600","Message-Id":"<20221228223003.2265712-17-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20221228223003.2265712-1-paul.elder@ideasonboard.com>","References":"<20221228223003.2265712-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v10 16/19] lc-compliance: Move role to\n\tstring conversion to its own function","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Paul Elder <paul.elder@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Nícolas F. R. A. Prado <nfraprado@collabora.com>\n\nThe functions that generate the test name based on the parameters need\nto convert a StreamRole to a string. Move this to a separate function to\navoid redundancy.\n\nSigned-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\n\nChanges in v8:\n- Made roleToString()'s map const and changed usage from [] operator to at()\n\nChanges in v5:\n- New\n---\n src/apps/lc-compliance/capture_test.cpp | 25 ++++++++++++++-----------\n 1 file changed, 14 insertions(+), 11 deletions(-)","diff":"diff --git a/src/apps/lc-compliance/capture_test.cpp b/src/apps/lc-compliance/capture_test.cpp\nindex 2b82443a..d62f7692 100644\n--- a/src/apps/lc-compliance/capture_test.cpp\n+++ b/src/apps/lc-compliance/capture_test.cpp\n@@ -23,6 +23,18 @@ const std::vector<StreamRole> ROLES = {\n \tStreamRole::Viewfinder\n };\n \n+static const std::string &roleToString(const StreamRole &role)\n+{\n+\tstatic const std::map<StreamRole, std::string> rolesMap = {\n+\t\t{ StreamRole::Raw, \"Raw\" },\n+\t\t{ StreamRole::StillCapture, \"StillCapture\" },\n+\t\t{ StreamRole::VideoRecording, \"VideoRecording\" },\n+\t\t{ StreamRole::Viewfinder, \"Viewfinder\" }\n+\t};\n+\n+\treturn rolesMap.at(role);\n+}\n+\n class SingleStream : public testing::TestWithParam<std::tuple<StreamRole, int>>, public CameraHolder\n {\n public:\n@@ -49,17 +61,8 @@ void SingleStream::TearDown()\n \n std::string SingleStream::nameParameters(const testing::TestParamInfo<SingleStream::ParamType> &info)\n {\n-\tstd::map<StreamRole, std::string> rolesMap = {\n-\t\t{ StreamRole::Raw, \"Raw\" },\n-\t\t{ StreamRole::StillCapture, \"StillCapture\" },\n-\t\t{ StreamRole::VideoRecording, \"VideoRecording\" },\n-\t\t{ StreamRole::Viewfinder, \"Viewfinder\" }\n-\t};\n-\n-\tstd::string roleName = rolesMap[std::get<0>(info.param)];\n-\tstd::string numRequestsName = std::to_string(std::get<1>(info.param));\n-\n-\treturn roleName + \"_\" + numRequestsName;\n+\treturn roleToString(std::get<0>(info.param)) + \"_\" +\n+\t       std::to_string(std::get<1>(info.param));\n }\n \n /*\n","prefixes":["libcamera-devel","v10","16/19"]}