Changes between Version 28 and Version 29 of TBR/UserManual/RTEMS_Coverage_Analysis


Ignore:
Timestamp:
Sep 9, 2009, 5:33:47 PM (10 years ago)
Author:
GlennHumphrey
Comment:

Just some edits

Legend:

Unmodified
Added
Removed
Modified
  • TBR/UserManual/RTEMS_Coverage_Analysis

    v28 v29  
    1818In order to achieve the 100% tested goal, it is important to define what constitutes 100% tested.  A lot of information exists about how to completely test a software application.  In general, the term [http://en.wikipedia.org/wiki/Code_coverage Code Coverage] is used to refer to the analysis that is performed to determine what portions of the software are tested by the test suite and what portions are not tested.  For some background information on Code Coverage Analysis, see [wiki:Developer/Coverage/CoverageAnalysisTheory Coverage Analysis Theory].
    1919
    20 Traditionally, Code Coverage Analysis has been performed by instrumenting the source code or object code or by using special hardware to monitor the instructions executed.  An objective of the RTEMS code coverage effort is to use existing tools and to avoid altering the code to be analyzed.  This can be accomplished by using a processor simulator that provides coverage analysis information.  The information can be processed to determine which instructions are executed.  We call this object code coverage.  Initially, we set out to achieve 100% object code coverage of the RTEMS executive.
     20Traditionally, Code Coverage Analysis has been performed by instrumenting the source code or object code or by using special hardware to monitor the instructions executed.  The objectives of the RTEMS code coverage effort are to use existing tools and to avoid altering the code to be analyzed.  This can be accomplished by using a processor simulator that provides coverage analysis information.  The information can be processed to determine which instructions are executed.  We call this object code coverage.  Initially, we set out to achieve 100% object code coverage of the RTEMS executive.
    2121
    22 It is also important to define what is actually being tested.  The RTEMS executive can contain a significant amount of code.  The concept of profiles was introduced to provide boundaries for what is actually tested.
     22In addition to defining the method for determining 100% tested, it is also important to define what is actually being tested.  The RTEMS executive is a large body of code.  In order to contain the testing effort, the concept of profiles was introduced to provide boundaries for what is actually tested.
    2323= How it was Done =
    2424
    2525
    26 Automated coverage testing is performed using a processor simulator in conjunction with a set of RTEMS specific support scripts.  The code to be analyzed is linked together as a single relocatable with special start (COVERAGE_START) and end (COVERAGE_END) symbols.  The relocatable is then linked to the same address in every test from the test suite.  Each test is then executed on a processor simulator that gathers information about which instructions were executed and produces a coverage map for the test.  After all tests have finished, the support script covmerge is used to merge all coverage maps into a unified coverage map for the entire test suite and to produce reports that identify the uncovered code.  The picture shown provides the general flow of the process.
     26The RTEMS Code Coverage Analysis process was designed to be as automated as possible.  The coverage testing is performed using a processor simulator in conjunction with a set of RTEMS specific support scripts.  The code to be analyzed is linked together as a single relocatable with special start (COVERAGE_START) and end (COVERAGE_END) symbols.  The relocatable is then linked to the same address in every test from the test suite.  Each test is then executed on a processor simulator that gathers information about which instructions were executed and produces a coverage map for the test.  After all tests have finished, the support script covmerge is used to merge all coverage maps into a unified coverage map for the entire test suite and to produce reports that identify the uncovered code.  The picture shown provides the general flow of the process.
    2727
    2828[[Image(CoverageFlow.png)]]]]