-
Notifications
You must be signed in to change notification settings - Fork 768
Open
Labels
Description
Problem:
In the test assertions we only print the stacktrace from s2n if it encountered any errors. This doesn't apply to EXPECT_TRUE, `EXPECT_EQ, etc. When using these macros inside of functions, it makes it difficult to know exactly why the assertion failed.
Solution:
The FAIL_MSG_PRINT should be updated to include the stack trace of the actual assertion. We can use the same backtrace function as the library:
Lines 390 to 391 in 1ff0aa8
| tl_stacktrace.trace_size = backtrace(array, MAX_BACKTRACE_DEPTH); | |
| tl_stacktrace.trace = backtrace_symbols(array, tl_stacktrace.trace_size); |
Reactions are currently unavailable