abumq / easyloggingpp

C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
MIT License
3.75k stars 918 forks source link

Unit test failures and core dump #805

Open billpriest opened 2 years ago

billpriest commented 2 years ago

Ubuntu 21.10 gcc/g++ 11.2.0 also gcc/g++ 10.3 (hopefully I'm doing something wrong; but I can't guess what

easyloggingpp/test/command-line-args-test.h:50: Failure Value of: Loggers::hasFlag(LoggingFlag::NewLineForContainer) Actual: true Expected: false easyloggingpp/test/command-line-args-test.h:50: Failure Value of: Loggers::hasFlag(LoggingFlag::NewLineForContainer) Actual: true Expected: false easyloggingpp/test/helpers-test.h:15: Failure Expected equality of these values: "[1, 2, 3, 4]" strVecInt Which is: "[1\n 2\n 3\n 4]" With diff: @@ -1,1 +1,4 @@ -[1, 2, 3, 4] +[1

[ FAILED ] HelpersTest.ConvertTemplateToStdString (0 ms)

easyloggingpp/test/syslog-test.h:23: Failure Value of: Str::endsWith(actual, expectedEnd) Actual: false Expected: true [ FAILED ] SysLogTest.WriteLog (1001 ms) easyloggingpp/test/syslog-test.h:61: Failure Value of: Str::endsWith(tail(1, kSysLogFile), expected) Actual: false Expected: true easyloggingpp/test/syslog-test.h:61: Failure Value of: Str::endsWith(tail(1, kSysLogFile), expected) Actual: false Expected: true easyloggingpp/test/syslog-test.h:71: Failure Value of: Str::endsWith(tail(1, kSysLogFile), expected) Actual: false Expected: true easyloggingpp/test/syslog-test.h:76: Failure Value of: Str::endsWith(tail(1, kSysLogFile), expected) Actual: false Expected: true [ FAILED ] SysLogTest.DebugVersionLogs (8002 ms) easyloggingpp/test/typed-configurations-test.h:88: Failure Expected equality of these values: prev Which is: 0x5578d46fca30 tConf.fileStream(LevelHelper::castFromInt(lIndex)) Which is: NULL easyloggingpp/test/typed-configurations-test.h:88: Failure Expected equality of these values: prev Which is: 0x5578d46fca30 tConf.fileStream(LevelHelper::castFromInt(lIndex)) Which is: NULL easyloggingpp/test/typed-configurations-test.h:88: Failure Expected equality of these values: prev Which is: 0x5578d46fca30 tConf.fileStream(LevelHelper::castFromInt(lIndex)) Which is: NULL [ FAILED ] TypedConfigurationsTest.SharedFileStreams (8 ms) [ RUN ] TypedConfigurationsTest.NonExistentFileCreation easyloggingpp/test/typed-configurations-test.h:103: Failure Value of: tConf.toFile(Level::Global) Actual: false Expected: true easyloggingpp/test/typed-configurations-test.h:103: Failure Value of: tConf.toFile(Level::Global) Actual: false Expected: true

[ RUN ] TypedConfigurationsTest.WriteToFiles

Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7e53854 in std::__basic_file::is_open() const () from /lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt

0 0x00007ffff7e53854 in std::__basic_file::is_open() const ()

from /lib/x86_64-linux-gnu/libstdc++.so.6

1 0x00005555556c30a9 in TypedConfigurationsTest_WriteToFiles_Test::TestBody() ()

2 0x000055555572b65f in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test, void (testing::Test::)(), char const*) ()

3 0x0000555555720c56 in testing::Test::Run() ()

4 0x0000555555720db5 in testing::TestInfo::Run() ()

5 0x0000555555721269 in testing::TestSuite::Run() ()

6 0x00005555557218b2 in testing::internal::UnitTestImpl::RunAllTests() ()

7 0x000055555572bc27 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl, bool (testing::internal::UnitTestImpl::)(), char const*) ()

8 0x0000555555720e7c in testing::UnitTest::Run() ()

9 0x00005555556d97f8 in main ()