summaryrefslogtreecommitdiff
path: root/test/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/file.cpp')
-rw-r--r--test/file.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/file.cpp b/test/file.cpp
index 6262a6f0..287831f3 100644
--- a/test/file.cpp
+++ b/test/file.cpp
@@ -30,10 +30,11 @@ protected:
if (fd == -1)
return TestFail;
- write(fd, "libcamera", 9);
+ ssize_t ret = write(fd, "libcamera", 9);
+
close(fd);
- return TestPass;
+ return ret == 9 ? TestPass : TestFail;
}
int run()