36 | | = Beyond Object Code Coverage = |
37 | | |
38 | | = Statement Coverage = |
39 | | |
40 | | |
41 | | This requires knowing which source files are involved (which we do) and which lines in those files can produce assembly code (which I don't think we do 100%). We can easily know which lines are comments and blank but beyond that will require some thought. |
42 | | |
43 | | The current object coverage utility ''covmerge'' can be modified to generate a report of which source lines were covered. It could generate a bitmap per source file where the bit index indicates if a source line in that file was executed or not. If we can generate a similar bit map from the source code which marks comments and other non-executable source lines as covered, then the union of the two bitmaps can be used to generate a report showing which source lines are not covered or represented in the object code. This may indicate dead code or weaknesses in the tests. |
44 | | |
45 | | This is definitely an open project at this point. |
46 | | = MC/DC = |
47 | | |
48 | | |
49 | | From the RTEMS testing perspective, this is to verify that every branch instruction in the generated object has been both taken and not taken. We cannot determine this without help from a simulator or hardware debugger which gathers this information. |
50 | | |
51 | | QEMU -- project to do MC/DC .. update here |
52 | | = Coding Advice = |
53 | | |
54 | | = Reasons Code is Not Executed = |
| 35 | = Resolving Uncovered Code = |
| 87 | = Beyond Object Code Coverage = |
| 88 | |
| 89 | = Statement Coverage = |
| 90 | |
| 91 | |
| 92 | This requires knowing which source files are involved (which we do) and which lines in those files can produce assembly code (which I don't think we do 100%). We can easily know which lines are comments and blank but beyond that will require some thought. |
| 93 | |
| 94 | The current object coverage utility ''covmerge'' can be modified to generate a report of which source lines were covered. It could generate a bitmap per source file where the bit index indicates if a source line in that file was executed or not. If we can generate a similar bit map from the source code which marks comments and other non-executable source lines as covered, then the union of the two bitmaps can be used to generate a report showing which source lines are not covered or represented in the object code. This may indicate dead code or weaknesses in the tests. |
| 95 | |
| 96 | This is definitely an open project at this point. |
| 97 | = Condition/Decision Coverage = |
| 98 | |
| 99 | |
| 100 | TBD |
| 101 | = MC/DC = |
| 102 | |
| 103 | |
| 104 | From the RTEMS testing perspective, this is to verify that every branch instruction in the generated object has been both taken and not taken. We cannot determine this without help from a simulator or hardware debugger which gathers this information. |
| 105 | |
| 106 | QEMU -- project to do MC/DC .. update here |
| 107 | = Test Procedure = |
| 108 | |
| 109 | |
| 110 | The scripts, tools, and patches are currently in the CVS module gcc-testing in the subdirectory rtems-coverage in the RTEMS CVS Repository. |