In recent years ,many safety-critical software system have been running under domestic Linux operating sys tems , most of which are developed with C十十. As C十十 is expanding to new revision of the C十十 lSO/IEC stan dards , the existing source code instrumentation tools for coverage analysis cannot satisfy user' s requirements. In this paper , an approach to C十十 source code instrumentation for coverage analysis with Clang/LL VM was proposed. Em ploying the Clang/LL VM library in open source community, which provides C+ + source code parsing and manipula tion functions , a framework of C十+ coverage analysis for statement coverage , branch coverage and MC/DC coverage was constructed. Coverage information was collected in real-time , and was analyzed and exported to reports. Case study shows that the proposed approach is very convenient and practical in real world software testing activities.
[1]
Qian Yang,et al.
A survey of coverage based testing tools
,
2006,
AST '06.
[2]
Dong Yun-wei.
Rapidly Generating Algorithm for Minimum Test Case Set on MC/DC
,
2009
.
[3]
Daniel Mahrenholz,et al.
Program instrumentation for debugging and monitoring with AspectC++
,
2002,
Proceedings Fifth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing. ISIRC 2002.
[4]
An Jin.
Dynamic Evaluation Method Based Multi-Dimensional Test Coverage for Software Testing
,
2010
.
[5]
Olaf Spinczyk,et al.
The aspect-oriented design of the PUMA C/C++ parser framework
,
2010,
AOSD.