Instrumentation and dynamic test coverage information extraction method of C-language embedded software

A technology for embedded software and dynamic testing, applied in software testing/debugging and other directions, can solve the problems of large expansion rate of instrumentation code, low expansion rate of post-code, complicated instrumentation principle, etc., and achieve small code expansion rate and storage space. Small, does not occupy the effect of hardware resources

Inactive Publication Date: 2012-04-18
BEIJING INST OF CONTROL ENG
View PDF3 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, there are mainly two common stub insertion methods provided by test tools. One method is to output coverage information to external files. Since embedded software generally does not support file operations, this method is only applicable to non-embedded software; the other One method is to modify the first method, and replace the file output operation with the output operation to the external interface. This method can be applied to embedded systems, but it still has the complexity of the instrumentation principle (in the branch According to different types of branches, statements need to be ad

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Instrumentation and dynamic test coverage information extraction method of C-language embedded software
  • Instrumentation and dynamic test coverage information extraction method of C-language embedded software

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] Such as figure 1 As shown, the method for extracting C language embedded software instrumentation and dynamic test coverage information of the present invention consists of a software instrumentation strategy and a process for using the strategy to extract software instrumentation and dynamic test coverage information.

[0020] The software instrumentation process in the present invention refers to adding some codes after each branch point of the source program under test, and these codes output the coverage information of these branch points to the outside during the software execution process. The software instrumentation process can be completed automatically with the help of tools and instrumentation templates, or manually.

[0021] Software instrumentation strategy

[0022] From the perspective of program logic, a C language program is composed of various logical branches. Whether the true branch or the false branch of these branch conditions is satisfied determin...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an instrumentation and dynamic test coverage information extraction method of C-language embedded software. The method comprises the following steps of: regarding a C-language program as an array which is formed by all branch points, wherein each branch point corresponds to an element in the array; defining each element to be in two states, wherein 1 represents that the branch points are executed, and 0 represents that the branch points are unexecuted; defining the array in a special storage area; at each branch point of the C-language program, adding an operation code into a branch point information array which is defined in the special storage area, wherein the operation code is used for outputting information which indicates whether the branch points are executed; executing the C-language program into which the operation code is added, and then extracting the branch point information array from the special storage area; and according to the state of each element in the branch point information array, determining the execution situation of each branch point in the C-language program, and thus obtaining the dynamic test coverage of the C-language program. The instrumentation and dynamic test coverage information extraction method of the C-language embedded software has the characteristics of low code expansion rate, small storage space of branch point information, and convenience for extraction of coverage information.

Description

technical field [0001] The invention relates to a C language embedded software testing method, which is suitable for the dynamic white box test of the C language embedded software running in the DSP environment. Background technique [0002] Software instrumentation and dynamic test coverage information extraction technology are the core technologies of dynamic white-box testing, which have been widely studied and have a variety of testing tools. In aerospace, aviation and other fields that require high reliability, the coverage rate of software dynamic white box testing also puts forward high index requirements. [0003] At present, there are mainly two common stub insertion methods provided by test tools. One method is to output coverage information to external files. Since embedded software generally does not support file operations, this method is only applicable to non-embedded software; the other One method is to modify the first method, and replace the file output op...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/36
Inventor 侯成杰董燕郝伟吴瑾郭华王翼山
Owner BEIJING INST OF CONTROL ENG
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products