summaryrefslogtreecommitdiff
path: root/test/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/log.cpp')
-rw-r--r--test/log.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/log.cpp b/test/log.cpp
index bc64325c..89fb5cad 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<int> goodList = { 1, 3, 5 };