I'm trying to put together a solution that requires CD/DC statistics of some (ancient) C99 code. I've no money for commercial products and the solutions for open source seem to be pretty much "use CUnit with gcov and hope" with the odd "did you try clang" thrown in. Gcov does work for determining the basic block/branch coverage I need, got some scripts to gather what CD results I can, but it's not great (especially since the stats on the conditions aren't actually the T/F that's needed, just 'hit' or not). Rewriting by hand through clang sort of works but the docs aren't great and I constantly seem to find known issues during the rewrite phase. Does anyone know of anything, library/script/excerpt from the Necrotelicomnicon, that actually gets condition coverage and is open? Source or binary instrumentation doesn't really matter since the code does compile.
For those that'll ask, trying to port a code base for a friend's dad but it's such a mess that I need to kill anything that's not actually being used in either "The Test" that was made for it or in operation, and port from there; He's going to be using a PI with Raspbian as the dedicated analysis machine (not FreeBSD but it's a start and he got it running on his own). No requirements and it was written in the early 90s (think gcc 2.9x is listed as the "most recent version" in some comments and Borland Turbo C++ was the original compiler). It's a science suite so I've got the notes from him about what's supposed to be happening and the doxygen for building up a tree but the many gotos employed means that "spaghetti" doesn't really cover it. Knowing what's hit (gcov) is a help but I gotta find out and plug what's actually needed for the calculations (hence the condition coverage). I know the original authors plugged a lot of miscellany in there to get the 'right' results for "The Test" so I'd love to be able to fix things up so that way he's got the 9 digits of precision needed rather than the 5 that everything was massaged to (so it could fit in printf per the comments--yeah, that bad).
Asked here as it's not really related to FreeBSD but who knows, maybe someone could put together a better test framework for package/system use from the results
For those that'll ask, trying to port a code base for a friend's dad but it's such a mess that I need to kill anything that's not actually being used in either "The Test" that was made for it or in operation, and port from there; He's going to be using a PI with Raspbian as the dedicated analysis machine (not FreeBSD but it's a start and he got it running on his own). No requirements and it was written in the early 90s (think gcc 2.9x is listed as the "most recent version" in some comments and Borland Turbo C++ was the original compiler). It's a science suite so I've got the notes from him about what's supposed to be happening and the doxygen for building up a tree but the many gotos employed means that "spaghetti" doesn't really cover it. Knowing what's hit (gcov) is a help but I gotta find out and plug what's actually needed for the calculations (hence the condition coverage). I know the original authors plugged a lot of miscellany in there to get the 'right' results for "The Test" so I'd love to be able to fix things up so that way he's got the 9 digits of precision needed rather than the 5 that everything was massaged to (so it could fit in printf per the comments--yeah, that bad).
Asked here as it's not really related to FreeBSD but who knows, maybe someone could put together a better test framework for package/system use from the results