News for hackers. Stuff that matters.
Re:Select Code_execution from * Using SQLite; (2019) by dathinab on Saturday June 13, 2020 @04:13PM (#23512303)
Many code coverage tools tell you just if a line/"statement" or similar had been executed during any test.

But that bit might have many possible variants in which you can execute it. E.g. if you have two if/else blocks in a row there are potentially 4 path of execution (if,if; if,else;else,if;else,else). Only two of them need to be hit to get what corresponds to 100% test coverage in most tools.

If you consider that you likely call functions in that if and else statements which can have further branching and similar you might understand why firstly 100% coverage doesn't say to much and secondly why a "real" 100% Coverage if all possible execution paths is normally infeasible.

(Through by using a more powerful type system combined with proofs around the type system and your usage of it you likely can massively prune the number of paths which need testing reachable, but at this point you probably should go full in with the proofs instead of using tests ;=)

Re:Select Code_execution from * Using SQLite; (2019) by moonchild on Saturday June 13, 2020 @05:45PM (#23513045)
At least with gcov, it tells you if a given line of code had all branches taken or only some.