libcheck / check

A unit testing framework for C
GNU Lesser General Public License v2.1
1.08k stars 209 forks source link

Feedback: it feels like libcheck's default setup is hostile to debuggers #350

Open ell1e opened 1 year ago

ell1e commented 1 year ago

Bug Report

First of all, maybe I'm just doing it wrong. But I don't quite get why libcheck is set up the way it is by default, and it continues to bite me. I always forget to disable the forking, so there's always that moment where I run the unit test in a graphical debugger and the debugger just exits when the fork happens. And now I just tested and realized ck_assert doesn't cause SIGABRT like assert, and then the debugger also just exits instead of showing me the line, the assertion failure, letting me poke everything etc. I think libcheck forking by default, and apparently not using SIGABRT by default with ck_assert, is bad for newcomers and still kind of a recurring trap for longer term users and might be worth changing? But maybe that's just me.

Seen with libcheck version: check-0.15.2-150400.1.6.src as provided by OpenSUSE repositories

Seen on operating system: OpenSUSE Leap 15.5.

Compiler used: gcc 12.3.0 as provided by OpenSUSE repositories

Checklist

Please do your best to include the following items with your bug report.

The Bare Minimum

Remember that this is the minimum required information. More is always more helpful.

Additional Information

Please be sure to include any additional information you think may be helpful in helping us diagnose, understand, or replicate the problem.