[{"id":2232,"web_url":"https://patchwork.libcamera.org/comment/2232/","msgid":"<20190712083225.GH4831@pendragon.ideasonboard.com>","date":"2019-07-12T08:32:25","subject":"Re: [libcamera-devel] [PATCH 2/2] test: logging: fix compilation on\n\tChromium OS","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Fri, Jul 12, 2019 at 05:29:09PM +0900, Paul Elder wrote:\n> Commit a25c937f8afe (\"test: add logging API test\") causes the build to\n> fail in the Chromium OS build environment, because the return value of a\n> system call is ignored. Fix this.\n\nIt's the return value of a function marked with the\n__warn_unused_result__ attribute, not of anysystem call.\n\nFixes: a25c937f8afe (\"test: add logging API test\")\n\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  test/log.cpp | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/test/log.cpp b/test/log.cpp\n> index 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 };","headers":{"Return-Path":"<laurent.pinchart@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 9A4C160E40\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Jul 2019 10:32:57 +0200 (CEST)","from pendragon.ideasonboard.com (softbank126209254147.bbtec.net\n\t[126.209.254.147])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F076B2B2;\n\tFri, 12 Jul 2019 10:32:52 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1562920374;\n\tbh=89WKDp4/PxG6mj0gurOWQAUnV1hjzjmhn2En3kPucBY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=rKSP4z/XdmBKYwQN3jywJVG7EMktHDQ4epGVr9TAwEme7CamTlYwDC0ETzl7Kq4gF\n\t+UY/vdwJoUPkg+sKpS7HpH/lBxnLAGY2rf9V8gtZd6/8WYP9bbgXLfHJ5JRtAlKAL1\n\tjqZsS2xT2YNFvrD8EjQgwQhF98ooY2L/GciX+PLU=","Date":"Fri, 12 Jul 2019 11:32:25 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190712083225.GH4831@pendragon.ideasonboard.com>","References":"<20190712082909.3811-1-paul.elder@ideasonboard.com>\n\t<20190712082909.3811-2-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190712082909.3811-2-paul.elder@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [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:32:57 -0000"}}]