diff options
Diffstat (limited to 'test/log/log_api.cpp')
-rw-r--r-- | test/log/log_api.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp index 33622f84..0b999738 100644 --- a/test/log/log_api.cpp +++ b/test/log/log_api.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * log.cpp - log API test + * log API test */ #include <algorithm> @@ -16,9 +16,10 @@ #include <sys/types.h> #include <unistd.h> +#include <libcamera/base/log.h> + #include <libcamera/logging.h> -#include "log.h" #include "test.h" using namespace std; @@ -86,6 +87,7 @@ protected: if (logSetFile(path) < 0) { cerr << "Failed to set log file" << endl; + close(fd); return TestFail; } @@ -96,6 +98,7 @@ protected: lseek(fd, 0, SEEK_SET); if (read(fd, buf, sizeof(buf)) < 0) { cerr << "Failed to read tmp log file" << endl; + close(fd); return TestFail; } close(fd); |