From patchwork Fri Jul 12 08:29:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 1670 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B30F86156A for ; Fri, 12 Jul 2019 10:29:21 +0200 (CEST) Received: from neptunite.amanokami.net (softbank126209254147.bbtec.net [126.209.254.147]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1897852A; Fri, 12 Jul 2019 10:29:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1562920160; bh=tqrNVGUplzNOpm2wPT/uJe1gzjnNd+3EWdhGzwfJg9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VR35x9mECQV71l+bLNthFFJzhHsp5o9vxCGKGUg8FR5fs74N3Wfjvds46c6b+DpnA wCjy80CBdm5tRgMdVAhFNL3PYcHAeLUBqpuFIVEMLxomoYiCvrrMk8l1rNDrm4Wn6/ yrpmH/orxx+UVOmtnOmRib/QCCIP3B/sBhlgjO3U= From: Paul Elder 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 Subject: [libcamera-devel] [PATCH 2/2] test: logging: fix compilation on Chromium OS X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2019 08:29:22 -0000 Commit a25c937f8afe ("test: add logging API test") causes the build to fail in the Chromium OS build environment, because the return value of a system call is ignored. Fix this. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- test/log.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/log.cpp b/test/log.cpp index bc64325..89fb5ca 100644 --- a/test/log.cpp +++ b/test/log.cpp @@ -59,7 +59,10 @@ protected: char buf[1000]; memset(buf, 0, sizeof(buf)); lseek(fd, 0, SEEK_SET); - read(fd, buf, sizeof(buf)); + if (read(fd, buf, sizeof(buf)) < 0) { + cerr << "Failed to read tmp log file" << endl; + return TestFail; + } close(fd); std::list goodList = { 1, 3, 5 };