diff --git a/src/lib/log/tests/logger_manager_unittest.cc b/src/lib/log/tests/logger_manager_unittest.cc index 6c009b2b17..3a5b76fa16 100644 --- a/src/lib/log/tests/logger_manager_unittest.cc +++ b/src/lib/log/tests/logger_manager_unittest.cc @@ -336,6 +336,11 @@ TEST_F(LoggerManagerTest, TooLargeMaxsize) { EXPECT_THROW_MSG(manager.process(spec), BadValue, "expected maxsize < 2147483647MB, but instead got " "18446744073709MB"); + + opt->maxsize = 1000000LL * (std::numeric_limits::max() + 1LL); // bytes + EXPECT_THROW_MSG(manager.process(spec), BadValue, + "expected maxsize < 2147483647MB, but instead got " + "2147483648MB"); } namespace { // begin unnamed namespace diff --git a/src/lib/process/tests/log_parser_unittests.cc b/src/lib/process/tests/log_parser_unittests.cc index f32580c4a8..96f6278dfc 100644 --- a/src/lib/process/tests/log_parser_unittests.cc +++ b/src/lib/process/tests/log_parser_unittests.cc @@ -496,9 +496,8 @@ TEST_F(LoggingTest, maxsize) { testMaxSize(TEST_MAX_SIZE, TEST_MAX_SIZE); testMaxSize(std::numeric_limits::max(), std::numeric_limits::max()); testMaxSize(std::numeric_limits::max(), std::numeric_limits::max()); - testMaxSize(std::numeric_limits::max(), std::numeric_limits::max()); - - // @todo: add a test for uint64_t when ElementPtr will allow it. + testMaxSize(1000LL * std::numeric_limits::max(), 1000LL * std::numeric_limits::max()); + testMaxSize(1000000LL * std::numeric_limits::max(), 1000000LL * std::numeric_limits::max()); } /// @todo Add tests for malformed logging configuration