[libcamera-devel] [PATCH] libcamera: test: Fixed the compilation issue
Madhavan Krishnan
madhavan.krishnan at linaro.org
Thu May 28 14:30:05 CEST 2020
In write() function, return value is not handled and stored.
So, we faced the compilation issue regarding this.
Handled to store the return value of write() function, and
modified the test execution based on the return values.
Signed-off-by: Madhavan Krishnan <madhavan.krishnan at linaro.org>
---
test/file.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/file.cpp b/test/file.cpp
index 6262a6f..85eacb5 100644
--- a/test/file.cpp
+++ b/test/file.cpp
@@ -27,10 +27,15 @@ protected:
{
fileName_ = "/tmp/libcamera.test.XXXXXX";
int fd = mkstemp(&fileName_.front());
+ ssize_t ret;
+
if (fd == -1)
return TestFail;
- write(fd, "libcamera", 9);
+ ret = write(fd, "libcamera", 9);
+ if(ret == -1)
+ return TestFail;
+
close(fd);
return TestPass;
--
2.7.4
More information about the libcamera-devel
mailing list