{"id":3466,"url":"https://patchwork.libcamera.org/api/1.1/patches/3466/?format=json","web_url":"https://patchwork.libcamera.org/patch/3466/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20200415054503.13108-3-email@uajain.com>","date":"2020-04-15T05:45:21","name":"[libcamera-devel,v2,2/2] test: v4l2_videodevice: buffer_cache: Fail the test if no hot-buffer is obtained","commit_ref":null,"pull_url":null,"state":"rejected","archived":false,"hash":"c8c06740b2d3cdb7c67fe59f4206d6e37b92d3d2","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/people/1/?format=json","name":"Umang Jain","email":"email@uajain.com"},"delegate":{"id":12,"url":"https://patchwork.libcamera.org/api/1.1/users/12/?format=json","username":"uajain","first_name":"Umang","last_name":"Jain","email":"umang.jain@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/3466/mbox/","series":[{"id":810,"url":"https://patchwork.libcamera.org/api/1.1/series/810/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=810","date":"2020-04-15T05:45:14","name":"More coverity scan fixes","version":2,"mbox":"https://patchwork.libcamera.org/series/810/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3466/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3466/checks/","tags":{},"headers":{"Return-Path":"<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>","Received":["from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 075EA62E5D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Apr 2020 07:45:22 +0200 (CEST)","by filterdrecv-p3iad2-8ddf98858-w5zgs with SMTP id\n\tfilterdrecv-p3iad2-8ddf98858-w5zgs-17-5E969F71-4F\n\t2020-04-15 05:45:21.563699619 +0000 UTC m=+1744675.858027244","from mail.uajain.com (unknown)\n\tby ismtpd0001p1maa1.sendgrid.net (SG) with ESMTP\n\tid qPeiZhENSuOU1qsn6zLgPQ Wed, 15 Apr 2020 05:45:21.091 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"ZEwvZd6E\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=from:subject:in-reply-to:references:mime-version:to:cc:\n\tcontent-transfer-encoding:content-type;\n\ts=s1; bh=o4EhX38svgTspXQfxY8ePTp5nTnDJzGWVBuo3ABRYgc=;\n\tb=ZEwvZd6EPbQodFvBIH64/Khz0SPtARu2K27wY6J6On4aVmOnWjBMqkxaMSn5FMrvaIeX\n\tJdQl1plNbxrh9jXFL1Nialc3Pd0GxfHw05M+hXWBIWoKLXGIIWf3iym3xfdjV1A2tCt9dn\n\toEtxX2mDdESX0Cu7cHKueAtuNMXjvJjds=","From":"Umang Jain <email@uajain.com>","Date":"Wed, 15 Apr 2020 05:45:21 +0000 (UTC)","Message-Id":"<20200415054503.13108-3-email@uajain.com>","In-Reply-To":"<20200415054503.13108-1-email@uajain.com>","References":"<20200415054503.13108-1-email@uajain.com>","Mime-Version":"1.0","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPc4om/Oij3lMEQBxKPi/30O44eBMubwDLmMWUm9+h6ldpyijd3CR2QLxlACsPewttWvLCUndqbmwgd0kWOpbpRJqhZq0YkYt0R3f6ZX9w4dU1QU7jU65DtJjMdpoiPN5iYS88cIK2UWByK8cQgSNSUTruGYNinRJbzatRTn4eTU5AwMF3EPIte4/L6J3jcwEyRtyU9uqCuLwa3s85GppAQsA==","To":"libcamera-devel@lists.libcamera.org","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=us-ascii","Subject":"[libcamera-devel] [PATCH v2 2/2] test: v4l2_videodevice:\n\tbuffer_cache: Fail the test if no hot-buffer is obtained","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>","X-List-Received-Date":"Wed, 15 Apr 2020 05:45:23 -0000"},"content":"Pointed out by Coverity DefectId=279090\n\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n test/v4l2_videodevice/buffer_cache.cpp | 5 +++++\n 1 file changed, 5 insertions(+)","diff":"diff --git a/test/v4l2_videodevice/buffer_cache.cpp b/test/v4l2_videodevice/buffer_cache.cpp\nindex d730e75..1870249 100644\n--- a/test/v4l2_videodevice/buffer_cache.cpp\n+++ b/test/v4l2_videodevice/buffer_cache.cpp\n@@ -90,6 +90,11 @@ public:\n \t\t/* Pick a hot buffer at random and store its index. */\n \t\tint hotBuffer = dist(generator_);\n \t\tint hotIndex = cache->get(*buffers[hotBuffer].get());\n+\t\tif (hotIndex < 0) {\n+\t\t\tstd::cout << \"Failed lookup from cache\" << std::endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n \t\tcache->put(hotIndex);\n \n \t\t/*\n","prefixes":["libcamera-devel","v2","2/2"]}