{"id":1670,"url":"https://patchwork.libcamera.org/api/patches/1670/?format=json","web_url":"https://patchwork.libcamera.org/patch/1670/","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":"<20190712082909.3811-2-paul.elder@ideasonboard.com>","date":"2019-07-12T08:29:09","name":"[libcamera-devel,2/2] test: logging: fix compilation on Chromium OS","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"6388526913a5568649e1c280d37e450c3bc17518","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/1670/mbox/","series":[{"id":422,"url":"https://patchwork.libcamera.org/api/series/422/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=422","date":"2019-07-12T08:29:08","name":"[libcamera-devel,1/2] libcamera: process: fix compilation on Chromium OS","version":1,"mbox":"https://patchwork.libcamera.org/series/422/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1670/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1670/checks/","tags":{},"headers":{"Return-Path":"<paul.elder@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B30F86156A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Jul 2019 10:29:21 +0200 (CEST)","from neptunite.amanokami.net (softbank126209254147.bbtec.net\n\t[126.209.254.147])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1897852A;\n\tFri, 12 Jul 2019 10:29:18 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1562920160;\n\tbh=tqrNVGUplzNOpm2wPT/uJe1gzjnNd+3EWdhGzwfJg9M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=VR35x9mECQV71l+bLNthFFJzhHsp5o9vxCGKGUg8FR5fs74N3Wfjvds46c6b+DpnA\n\twCjy80CBdm5tRgMdVAhFNL3PYcHAeLUBqpuFIVEMLxomoYiCvrrMk8l1rNDrm4Wn6/\n\tyrpmH/orxx+UVOmtnOmRib/QCCIP3B/sBhlgjO3U=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 12 Jul 2019 17:29:09 +0900","Message-Id":"<20190712082909.3811-2-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20190712082909.3811-1-paul.elder@ideasonboard.com>","References":"<20190712082909.3811-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 2/2] test: logging: fix compilation on\n\tChromium OS","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Fri, 12 Jul 2019 08:29:22 -0000"},"content":"Commit a25c937f8afe (\"test: add logging API test\") causes the build to\nfail in the Chromium OS build environment, because the return value of a\nsystem call is ignored. Fix this.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n test/log.cpp | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)","diff":"diff --git a/test/log.cpp b/test/log.cpp\nindex bc64325..89fb5ca 100644\n--- a/test/log.cpp\n+++ b/test/log.cpp\n@@ -59,7 +59,10 @@ protected:\n \t\tchar buf[1000];\n \t\tmemset(buf, 0, sizeof(buf));\n \t\tlseek(fd, 0, SEEK_SET);\n-\t\tread(fd, buf, sizeof(buf));\n+\t\tif (read(fd, buf, sizeof(buf)) < 0) {\n+\t\t\tcerr << \"Failed to read tmp log file\" << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n \t\tclose(fd);\n \n \t\tstd::list<int> goodList = { 1, 3, 5 };\n","prefixes":["libcamera-devel","2/2"]}