Opened on 03/07/17 at 16:16:11
Closed on 02/25/22 at 20:19:09
#2920 closed project (fixed)
Improve Coverage Analysis Toolset
Reported by: | Gedare Bloom | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | Indefinite |
Component: | tool | Version: | |
Severity: | normal | Keywords: | SoC, testing, large, small |
Cc: | cpodonnell8@…, Vijay Kumar Banerjee | Blocked By: | |
Blocking: |
Description (last modified by Gedare Bloom)
Improve Coverage Analysis
Contents
Mentors
Joel Sherrill, Gedare Bloom
Students
T.B.D.
Skills
C, C++
Difficulty
This can be a small (175-hour) or large (300-hour) project, and it is of medium difficulty.
Introduction
The in-house rtems coverage analysis tool 'covoar' works with RTEMS Tester framework to generate coverage reports on a user defined set of symbol libraries. This all resides in rtems-tools. It is close to being merged but there are still a few blockers and improvements that would be nice to implement afterwards.
Using this toolset to analyze the code coverage of RTEMS and improving that measurement is an ongoing effort with a series of incremental efforts to either add test cases or rework source code to improve coverage. Individual tickets may be filed for specific areas that need coverage improvement.
Objective
This project is to improve the tools used to perform coverage analysis and generate reports. These tools are part of the rtems-tools repository.
Prerequisites
- Ability to read/write C++ code with OOP.
- Ability to read/write Python code with OOP.
- Ability to debug C++ code.
- Ability to compile and run covoar.
- Ability to run RTEMS Tester (rtems-tools.git/tester).
- Knowledge of INI format for configuration files.
- Knowledge of HTML and XML.
Tasks
Some tasks have been captured as tickets:
Other tasks include:
- Remove the use of external tools that are not portable across platforms (Linux, BSD, Windows):
nm is used to generate a list of symbols in a file that is referenced as the symbols of interest for that set. nm is not portable and so must be removed. The fix for this is use rtemstoolkit and generate the list of symbols from the ELF files.
- addr2line is piped to dos2unix to find the source lines which match the objdump instruction lines. Again we want to limit the use of external tools that are not portable across platforms.
Improve clean-up procedures:
- The trace files that are generated by QEMU as each test is run in RTEMS Tester need to stay for later use by covoar which runs after the testsuite is finished. They are currently cleared up by a try finally statement in python, which works for Ctrl+C exit but probably not SIGTERM. This cannot be handled the same way as the other tempfiles as they are not generated by covoar. These files have a .cov ending and are currently generated beside the executable they match in the build tree.
- covoar needs to detect target architecture internally (e.g., sparc-rtems4.11), this can be done with get_exec_prefix() from rld-cc.h in rtemstoolkit.
Further Improvements:
- Generate XML reports. Currently the tools generate html and text reports.
- Generate Gcov reports. There is Gcov support in covoar that is close to working but the gcov output generated is not trusted. The fix for this would involve vaildating the Gcov output to make sure it is in a format that the Gcov program accepts.
- Combine how-to documentation below with existing covoar docs to make a ReST format doc that is integrated with the main RTEMS Tester docs.
- Ensure the gcov output is correct and use that as the basis for generating reports using tools like gcov and lcov.
- Find a way to do MCDC analysis. This is a longer term objective which may require improvements to gcc.
Change History (11)
comment:1 Changed on 05/06/17 at 08:26:56 by Cillian O'Donnell
Cc: | cpodonnell8@… added |
---|
comment:2 Changed on 08/30/17 at 14:13:40 by Joel Sherrill
Description: | modified (diff) |
---|---|
Summary: | Improve Coverage Analysis → Improve Coverage Analysis Toolset |
comment:3 Changed on 01/04/20 at 23:47:54 by Gedare Bloom
Cc: | Vijay Kumar Banerjee added |
---|---|
Component: | unspecified → tool |
Description: | modified (diff) |
Version: | 4.11 |
comment:4 Changed on 01/05/20 at 15:41:13 by Gedare Bloom
Description: | modified (diff) |
---|
comment:5 Changed on 01/06/20 at 21:31:14 by Gedare Bloom
Description: | modified (diff) |
---|
comment:6 Changed on 01/06/20 at 21:31:43 by Gedare Bloom
Description: | modified (diff) |
---|
comment:7 Changed on 01/06/20 at 21:32:51 by Gedare Bloom
Description: | modified (diff) |
---|
comment:8 Changed on 01/06/20 at 21:33:24 by Gedare Bloom
Description: | modified (diff) |
---|
comment:9 Changed on 02/03/22 at 19:33:36 by Gedare Bloom
Keywords: | large small added |
---|
comment:10 Changed on 02/25/22 at 19:00:33 by Gedare Bloom
Description: | modified (diff) |
---|
comment:11 Changed on 02/25/22 at 20:19:09 by Joel Sherrill
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The tooling has had significant work in the past 18 months. There should not be much left to do.
The active projects wiki page is https://devel.rtems.org/wiki/GSoC/2017/coveragetools