jeremy-rifkin / cpptrace

Simple, portable, and self-contained stacktrace library for C++11 and newer
MIT License
621 stars 64 forks source link

cpptrace-0.6.2: Test failures #143

Closed stkw0 closed 2 months ago

stkw0 commented 2 months ago

Seems some tests are failing. I am not sure what are the cause or if there is something more on my side that I should fix.

The short log:

Running main() from /var/tmp/portage/dev-cpp/gtest-1.14.0-r1/work/googletest-1.14.0/googletest/src/gtest_main.cc [----------] Global test environment tear-down [==========] 11 tests from 3 test suites ran. (7 ms total) [ PASSED ] 6 tests. [ FAILED ] 5 tests, listed below: [ FAILED ] ObjectTrace.Resolution [ FAILED ] Stacktrace.Basic [ FAILED ] Stacktrace.MultipleFrames [ FAILED ] Stacktrace.RawTraceResolution [ FAILED ] Stacktrace.InlineResolution

5 FAILED TESTS

I am using libdwarf-0.9.2 and gtest 1.14.0. cpptrace was compiled with gcc 14.1.1 See full log here: test_fail.txt

Thank you very much.

jeremy-rifkin commented 2 months ago

Hi, the unit tests are still a WIP. I’ve been trying to setup a good tests system however it’s tricky to test a library like this. If you try the demo executable, are traces generated correctly? What operating system are you on?

stkw0 commented 2 months ago

I am on Linux. I seen that setting -ggdb flag the unit tests pass. It was more trivial than I thought. Maybe the cmake file for tests should be updated to enable debug symbols?

jeremy-rifkin commented 2 months ago

Oh, gotcha :) I always build with -DCMAKE_BUILD_TYPE=Debug or RelWithDebInfo, however, I do think it would make sense to include debug symbols unconditionally.

jeremy-rifkin commented 2 months ago

Now using -g unconditionally in dev