CN108614764B - IMA application software fault injection method - Google Patents
IMA application software fault injection method Download PDFInfo
- Publication number
- CN108614764B CN108614764B CN201611140194.0A CN201611140194A CN108614764B CN 108614764 B CN108614764 B CN 108614764B CN 201611140194 A CN201611140194 A CN 201611140194A CN 108614764 B CN108614764 B CN 108614764B
- Authority
- CN
- China
- Prior art keywords
- function
- address
- pile
- software
- virtual
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3644—Software debugging by instrumenting at runtime
Abstract
The fault injection method of the IMA application software is used for verifying the onboard embedded application software under the IMA framework, and can solve the problem that faults are difficult to simulate in the testing process of the onboard embedded application software under the IMA framework. By providing a group of library functions, the method can enable an IMA framework airborne embedded application software tester to easily inject faults in the testing process, realizes the test of some software error-proofing functions when the software runs normally, and improves the dynamic execution efficiency of the software function test. The method provides the pile installing function and the pile unloading function for the tester, does not need single step execution, does not influence the normal operation of the software, can ensure that a user conveniently simulates hardware faults without damaging the software operation field, improves the software execution efficiency, and provides a practical method for fault injection of IMA framework software.
Description
The technical field is as follows:
the method belongs to a software fault injection method, and particularly relates to the field of IMA framework airborne embedded application software testing.
Background art:
the development of the airborne Avionics system in China is in the process of rapidly converting a combined digital structure into Integrated Modular Avionics (IMA), airborne software has the characteristics of multitasking, integration, modularization, unified network and high integration, and new requirements are provided for the development and the test of airborne embedded software.
In the traditional software test, when a fault is injected by software, the mode of simulating the hardware fault is generally to modify the value of a certain variable (data segment) in the software under the cooperation of a single-step debugging tool; at this point, the software runs in a single step and the software fault state is not recoverable, resulting in very inefficient test execution.
In order to ensure the safety of IMA framework software, the method adopts mutual isolation among partitions, mutual isolation between partition spaces and core spaces, mutual isolation of running time among the partitions, mutual isolation of interrupt resources and faults among the partitions and mutual isolation of access between the partition spaces and the core spaces, wherein the isolation ensures that most of addresses visible to users are virtual addresses, which causes that the method of modifying the value of a certain variable (data segment) in the software to inject the fault becomes very difficult. The original conventional software fault injection method has not been adapted to IMA framework software.
The invention content is as follows:
the invention aims to solve the technical problem of providing an IMA application software fault injection method, and solves the problem that dynamic software fault injection is difficult to perform when an IMA framework airborne embedded application software is tested by using the traditional method.
The invention has the technical scheme that the fault injection method of the IMA application software uses a group of tool functions to inject the fault in a mode of piling the fault function in a code segment, modifies the calling address of the software fault function into the fault pile address, the tool functions comprise a pile function operating function and an address operating function,
the stub function operation function comprises a stub installation function and is used for replacing an original calling function into a stub function comprising a fault, and the implementation method comprises the following steps:
(1) according to the MAP file generated by compiling, searching corresponding addresses and pile function addresses according to the piled functions or variable identifications in the pile function parameters;
(2) after finding out the corresponding addresses of the function to be piled and the pile function, converting the virtual address into the physical address, and finding out the physical addresses of the function to be piled and the pile function;
(3) modifying the physical address space for calling the function to be driven into the physical address space of the pile function;
the address operation functions include a symbolic address translation function and a virtual-real address translation function,
the symbolic address conversion function is used for converting function identification or variable name into virtual address, and the realization method is as follows:
(1) corresponding the function or variable identification in the MAP file to the address thereof to generate a list, and sequencing the function or variable identification according to calling frequency in the list generating process and loading the function or variable identification to the fixed address of the target machine along with a program;
(2) when the function is called, the corresponding address is searched and returned from the list by the identifier given by the parameter;
the virtual-real address conversion function is used for converting a virtual address into a physical address, and the realization method comprises the following steps:
(1) judging whether the given address is a virtual address; if the address is a non-virtual address, directly returning, otherwise, performing the step (2);
(2) according to the corresponding relation between the virtual address and the physical address, the segment number and the page number are used for carrying out physical address conversion;
(3) and judging the validity of the converted address, if so, returning, and otherwise, reporting an error.
Further, the pile function operation function includes a pile unloading function, and is used for revising the physical address revised by the pile installation function into the address of the piled function after the fault injection test is finished, and restoring the program to the original mode.
Has the advantages that:
the method can adopt a mode of piling fault functions in the code segments to modify the function call addresses in the software code segments after the software starts to run, so that faults can be easily injected in the software testing process, and the original function call addresses in the software can be recovered after the fault related test is finished; the method provides the pile installing function and the pile unloading function for the tester, does not need single step execution, does not influence the normal operation of the software, can ensure that a user conveniently simulates hardware faults without damaging the software operation field, improves the software execution efficiency, and provides a practical method for fault injection of IMA framework software.
Description of the drawings:
fig. 1 is a schematic diagram of fault injection for IMA framework applications.
FIG. 2 is a schematic diagram of a test mode before and after fault injection of IMA framework application software.
The specific implementation mode is as follows:
a fault injection method for IMA application software comprises performing fault injection by piling fault function in code segment using a set of tool functions, dynamically modifying calling address of fault function of software as fault pile address during normal operation of software, wherein the tool functions comprise pile function operation function and address operation function,
the stub function operation function comprises a stub installation function and is used for replacing an original calling function into a stub function comprising a fault, and the implementation method comprises the following steps:
(1) according to the MAP file generated by compiling, searching corresponding addresses and pile function addresses according to the piled functions or variable identifications in the pile function parameters;
(2) after finding out the corresponding addresses of the function to be piled and the pile function, converting the virtual address into the physical address, and finding out the physical addresses of the function to be piled and the pile function;
(3) modifying the physical address space for calling the function to be driven into the physical address space of the pile function;
the address operation functions include a symbolic address translation function and a virtual-real address translation function,
the symbolic address conversion function is used for converting function identification or variable name into virtual address, and the realization method is as follows:
(1) corresponding the function or variable identification in the MAP file to the address thereof to generate a list, and sequencing the function or variable identification according to calling frequency in the list generating process and loading the function or variable identification to the fixed address of the target machine along with a program;
(2) when the function is called, the corresponding address is searched and returned from the list by the identifier given by the parameter;
the virtual-real address conversion function is used for converting a virtual address into a physical address, and the realization method comprises the following steps:
(1) judging whether the given address is a virtual address; if the address is a non-virtual address, directly returning, otherwise, performing the step (2);
(2) according to the corresponding relation between the virtual address and the physical address, the segment number and the page number are used for carrying out physical address conversion;
(3) and judging the validity of the converted address, if so, returning, and otherwise, reporting an error.
Further, the pile function operation function includes a pile unloading function, and is used for revising the physical address revised by the pile installation function into the address of the piled function after the fault injection test is finished, and restoring the program to the original mode.
The method is realized in application software using a domestic Tianmai 2 operating system, and can be easily realized in other operating systems conforming to ARINC653 standard.
Claims (2)
1. A fault injection method for IMA application software is characterized in that a set of tool functions are used, fault injection is carried out in a mode of piling a fault function in a code segment, a calling address of the software fault function is modified to be a fault pile address, the tool functions comprise pile function operating functions and address operating functions, the pile function operating functions comprise pile installation functions, and the original calling functions are replaced by pile functions comprising faults; the address operation function comprises a symbolic address conversion function and a virtual-real address conversion function, wherein the symbolic address conversion function is used for converting a function identifier or a variable name into a virtual address, and the virtual-real address conversion function is used for converting the virtual address into a physical address;
the pile installation function implementation method comprises the following steps:
(1.1) searching corresponding addresses and pile function addresses according to the compiled MAP file and the piled function or variable identification in the pile function parameters;
(1.2) after finding out the corresponding addresses of the function to be piled and the pile function, converting the virtual address into the physical address, and finding out the physical addresses of the function to be piled and the pile function;
(1.3) modifying the physical address space for calling the piled function into a pile function physical address space;
the method for realizing the symbolic address conversion function comprises the following steps:
(2.1) corresponding the function or variable identification in the MAP file with the address thereof to generate a list, and sequencing according to the calling frequency in the list generating process and loading the list to the fixed address of the target machine along with a program;
(2.2) when the function is called, searching the corresponding address in the list by the identifier given by the parameter and returning; the virtual-real address conversion function is used for converting a virtual address into a physical address, and the realization method comprises the following steps:
(2.2.1) judging whether the given address is a virtual address; if the address is a non-virtual address, directly returning, otherwise, carrying out the step (2.2.2);
(2.2.2) according to the corresponding relation between the virtual address and the physical address, using the segment number and the page number to carry out physical address translation;
(2.2.3) judging the validity of the converted address, if the converted address returns, otherwise, reporting an error.
2. An IMA application software fault injection method as in claim 1, wherein the stub function operation functions further comprise a stub uninstall function for revising the physical address modified by the stub install function to the address of the piled function after the fault injection test is completed, and restoring the program to the original pattern.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611140194.0A CN108614764B (en) | 2016-12-12 | 2016-12-12 | IMA application software fault injection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611140194.0A CN108614764B (en) | 2016-12-12 | 2016-12-12 | IMA application software fault injection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108614764A CN108614764A (en) | 2018-10-02 |
CN108614764B true CN108614764B (en) | 2021-09-14 |
Family
ID=63643287
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611140194.0A Active CN108614764B (en) | 2016-12-12 | 2016-12-12 | IMA application software fault injection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108614764B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110674028A (en) * | 2019-08-20 | 2020-01-10 | 华为技术有限公司 | Fault injection method and device and business service system thereof |
CN113157519A (en) * | 2021-03-04 | 2021-07-23 | 中国航空工业集团公司西安航空计算技术研究所 | Embedded computer system fault auxiliary positioning architecture and method |
CN117009252B (en) * | 2023-10-07 | 2024-01-02 | 之江实验室 | Fault injection testing method and device based on function replacement |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1627254A (en) * | 2003-12-10 | 2005-06-15 | 华为技术有限公司 | Method for debuging embedded system and equipment |
CN101178684A (en) * | 2006-11-06 | 2008-05-14 | 中兴通讯股份有限公司 | Symbol locating method of embedded system |
CN102354298A (en) * | 2011-07-27 | 2012-02-15 | 哈尔滨工业大学 | Software testing automation framework (STAF)-based fault injection automation testing platform and method for high-end fault-tolerant computer |
CN102541737A (en) * | 2011-11-30 | 2012-07-04 | 北京航空航天大学 | Reliability test defect injection and control method of embedded software |
KR20120080019A (en) * | 2011-01-06 | 2012-07-16 | 나종화 | System and the method for measuring dependability of embedded systems using hybrid fault injection |
CN103678129A (en) * | 2013-12-14 | 2014-03-26 | 中国航空工业集团公司第六三一研究所 | Electromechanical system software fault injection method based on time triggering |
-
2016
- 2016-12-12 CN CN201611140194.0A patent/CN108614764B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1627254A (en) * | 2003-12-10 | 2005-06-15 | 华为技术有限公司 | Method for debuging embedded system and equipment |
CN101178684A (en) * | 2006-11-06 | 2008-05-14 | 中兴通讯股份有限公司 | Symbol locating method of embedded system |
KR20120080019A (en) * | 2011-01-06 | 2012-07-16 | 나종화 | System and the method for measuring dependability of embedded systems using hybrid fault injection |
CN102354298A (en) * | 2011-07-27 | 2012-02-15 | 哈尔滨工业大学 | Software testing automation framework (STAF)-based fault injection automation testing platform and method for high-end fault-tolerant computer |
CN102541737A (en) * | 2011-11-30 | 2012-07-04 | 北京航空航天大学 | Reliability test defect injection and control method of embedded software |
CN103678129A (en) * | 2013-12-14 | 2014-03-26 | 中国航空工业集团公司第六三一研究所 | Electromechanical system software fault injection method based on time triggering |
Also Published As
Publication number | Publication date |
---|---|
CN108614764A (en) | 2018-10-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110008113B (en) | Test method and device and electronic equipment | |
CN103019928B (en) | A kind of automated testing method and system | |
CN106933609B (en) | Android application program installation package generation method and device | |
CN108614764B (en) | IMA application software fault injection method | |
CN104281518A (en) | Terminal application test method, device, system and platform and mobile terminal | |
CN102375778A (en) | Method and system for automatically testing digital signal processor (DSP) | |
CN103309800B (en) | A kind of webpage automated testing method and system | |
CN110688313B (en) | Fault injection method for software testing under VxWorks operating system | |
CN103729292A (en) | Cross-host cross-platform remote command invoking method and system | |
CN110704314B (en) | Fault injection method for embedded software test | |
CN103399814A (en) | Automated testing method and automated testing device | |
CN104881358A (en) | Program simulation testing method and system | |
CN103049601A (en) | Information system simulation modeling method | |
CN111813420A (en) | Method for carrying out automated performance test on OpenStack cluster | |
CN102331961A (en) | Method, system and dispatcher for simulating multiple processors in parallel | |
CN102541830B (en) | Method and device for generating simulation report in simulation platform | |
CN105335203A (en) | Binary translation execution method of shared libraries and device | |
CN111597115A (en) | Automatic closed-loop test system and test method for embedded operating system | |
CN113805848B (en) | Target machine control software integration method and system | |
CN115374017A (en) | Method for capturing site during simulation running of executable file and computing equipment | |
CN114692539A (en) | Method for realizing parallel verification of SOC (System on chip) chip verification architecture | |
WO2021247074A1 (en) | Resumable instruction generation | |
CN113031964A (en) | Management method, device, equipment and storage medium for big data application | |
CN102446113B (en) | Method and device for simulating bottom-layer message interface | |
CN111338761A (en) | 51 single-chip microcomputer virtual interrupt controller and implementation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |