CN107025171A - A kind of method for realizing virtual checking system failure injection - Google Patents

A kind of method for realizing virtual checking system failure injection Download PDF

Info

Publication number
CN107025171A
CN107025171A CN201710141019.1A CN201710141019A CN107025171A CN 107025171 A CN107025171 A CN 107025171A CN 201710141019 A CN201710141019 A CN 201710141019A CN 107025171 A CN107025171 A CN 107025171A
Authority
CN
China
Prior art keywords
fault
address
triggering
failure
user
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.)
Pending
Application number
CN201710141019.1A
Other languages
Chinese (zh)
Inventor
吴翔虎
陶永超
曲明成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Academy of Aerospace Technology
Original Assignee
Shenzhen Academy of Aerospace Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Academy of Aerospace Technology filed Critical Shenzhen Academy of Aerospace Technology
Priority to CN201710141019.1A priority Critical patent/CN107025171A/en
Publication of CN107025171A publication Critical patent/CN107025171A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Abstract

It is of the invention that a kind of method for realizing virtual checking system failure injection, including 1, the operation of reading user, the fault type for selecting this failure use-case targeted are provided;2nd, for the fault type, the triggering pattern configuration information of user is read, judgement is time triggered, also address triggering;3rd, according to fault type and failure the triggering form read, the fault data information of user is read, specific command word is generated;4th, the command word of generation is transmitted to GDB modules by particular command pipeline;5th, GDB modules are parsed to command word, are packaged into the private data structures that virtual checking system can be recognized;6th, by virtually verifying the case mechanism of system, fault diagnosis example is injected among system;7th, the injection of a fault diagnosis example is completed.The parameters such as fault triggering condition, type, fault value can be set to complete direct fault location operation, the troubleshooting capability for testing code is tested easily by the fault injector of system the invention enables user.

Description

A kind of method for realizing virtual checking system failure injection
Technical field
The present invention relates to virtual checking technical field of system simulation, more particularly to a kind of virtual checking system failure note of realization The method entered.
Background technology
Virtual checking system is that the software systems of full simulation can be carried out to embedded hardware system.User can be at this Dry run embedded software in system, can be tested and be debugged to embedded software without corresponding hardware.By making With virtual checking system, user not only can greatly shorten the embedded software lead time, and can avoid high auxiliary Help test hardware development expense, greatly reduce system cost.Product can be widely applied to Aeronautics and Astronautics, weaponry, vapour The embedded system development such as car, robot, Industry Control field, lifts the labor productivity of these industries, reduces cost, increasing The competitiveness of strong product.
There is provided substantial amounts of auxiliary on the basis of pure software analog board level hardware test environment is provided for virtual checking system Means of testing is debugged, including pause is emulated, breakpoint setup, next step perform (4 kinds of forms), check variable, simulation hardware Information and direct fault location, data acquisition, coverage rate analysis function.Wherein, the major function of direct fault location is in generation to be tested Among code simulation run process, the failure specified of user is produced at any time, function tests the fault-tolerant ability of code to be tested whereby.
The content of the invention
It is an object of the invention to provide a kind of method for realizing virtual checking system failure injection so that user can be convenient Ground sets the parameters such as fault triggering condition, fault type, fault value to complete direct fault location behaviour by the fault injector of system Make, the troubleshooting capability for testing code is tested.
For up to above-mentioned purpose, the present invention is achieved through the following technical solutions:
A kind of method for realizing virtual checking system failure injection, methods described includes:
S1, the operation for reading user, the fault type for selecting this failure use-case targeted is register failure, variable Failure or internal storage data failure;
S2, the fault type for this, read the triggering pattern configuration information of user, judgement is time triggered, also Trigger location;
Fault type and failure triggering form that S3, basis have been read, read the fault data information of user, generation is special Use command word;
S4, the command word of generation transmitted to GDB modules by particular command pipeline;
S5, GDB module are parsed to command word, are packaged into the private data structures that virtual checking system can be recognized;
S6, the case mechanism by virtually verifying system, fault diagnosis example is injected among system;
S7, the injection for completing a fault diagnosis example.
Brief description of the drawings
Fig. 1 is the direct fault location user interface schematic diagram of the present invention;
Fig. 2 is direct fault location interacts schematic diagram with virtual checking system;
Fig. 3 is the method flow diagram that the present invention realizes virtual checking system failure injection.
Specific embodiment
The present invention is described in further detail below by embodiment combination accompanying drawing.
The direct fault location ability to be protected of the present invention is under virtual checking system, to provide a variety of for virtual emulation operation The direct fault location of triggering pattern, various faults type, including:1) the specified register direct fault location of time triggered;2) time touches The specifying variable direct fault location of hair;3) the specified memory segment data direct fault location of time triggered;4) the specified deposit of address triggering Device direct fault location;5) the specifying variable direct fault location of address triggering;6) the specified memory segment data direct fault location of address triggering.
It is soft flat that virtual checking system provides test by being simulated to embedded hardware system, for embedded software Platform, can be tested and be debugged to software without corresponding hardware.Using system originally, user is needed according to hsrdware requirements, Corresponding virtual processor model, virtual unit model are chosen in system component storehouse, is configured by relevant parameter, needed for building Plate level hardware virtual system example.After the completion of system configuration, compiled executable file can be passed through system tool by user Chain is loaded into virtual execution in system example, and is held by register access, internal storage data access, variables access, breakpoint, single step The debugging functions such as row, carry out the debugging efforts to testing code.During virtual execution, user can be noted by the failure of system Enter device, set the parameters such as fault triggering condition, fault type, fault value to complete direct fault location operation, the failure to testing code Disposal ability is tested.
In virtual checking system, direct fault location module is present as system supplymentary test module.It includes two Major part:
1) there is provided user interface for user oriented.User can select triggering pattern:If time triggered, then need to set Put initial time, time interval and triggering times;If address is triggered, then need to set initial address, termination address and reading Write triggering form.Afterwards, user needs to set fault object and fault value:If register failure, then need mask register Numbering, and the fault value of 10 systems or 16 systems is set;If variable failure, then need select variable name, and set 10 systems or The fault value of 16 systems;If memory failure, then continue initial address, the length that application heap is set, and select pre-injected failure Data file.
Several configuration steps more than, you can to complete the configuration of a direct fault location example.User can be according to need Ask, configure multiple fault diagnosis examples, configuration interface is as shown in Figure 1.
2) direct fault location module can convert thereof into command word after it have received the fault configuration information of user, lead to The GDB modules that exclusive data pipeline passes to virtual checking system are crossed, command word are parsed by GDB modules and event envelope Turn, be finally injected into virtual checking example.The definition of command word is shown in Table 1.
The direct fault location of table 1 and the interactive command word specification of virtual checking system
In virtually checking example carries out code emulation implementation procedure, the trigger condition of direct fault location, one can be detected in real time Denier meets the injection that fault value is carried out according to the description in corresponding event, completes the direct fault location ability that user is expected.Therefore Barrier injection module is interacted as shown in Figure 2 with virtual checking system.
The present invention realizes the method flow of virtual checking system failure injection as shown in Figure 3, mainly including the following steps:
1) operation of user is read, the fault type for selecting this failure use-case targeted is register failure, variable event Barrier or internal storage data failure;
2) this fault type is directed to, the triggering pattern configuration information of user is read, judgement is time triggered, or ground Trigger location;
3) according to fault type and failure the triggering form read, the fault data information of user is read, according to " therefore Barrier injection and the interactive command word of virtual checking system " specification, generates specific command word;
4) command word of generation is transmitted to GDB modules by particular command pipeline;
5) GDB modules are parsed to command word, are packaged into the private data structures that virtual checking system can be recognized, institute State data structure definition as shown in table 2:
The private data structures that the virtual checking system of table 2 can be recognized
6) by virtually verifying the case mechanism of system, fault diagnosis example is injected among system.It is used herein virtual Verify that system event grouting socket function and related data structures definition are as shown in table 3:
Virtually checking system event grouting socket function and the related data structures definition of table 3
7) injection of a fault diagnosis example is completed.Next matching somebody with somebody for next example can be restarted according to user's request Put, injection process, until all meeting the demands of user;
8) in virtually checking system example carries out code emulation implementation procedure, the triggering bar of direct fault location can be detected in real time Part, once meeting the injection that fault value is carried out according to the description in corresponding event, completes the direct fault location energy that user is expected Power.
Above content is to combine specific preferred embodiment further description made for the present invention, it is impossible to assert The specific implementation of the present invention is confined to these explanations.For general technical staff of the technical field of the invention, On the premise of not departing from present inventive concept, some simple deduction or replace can also be made, should all be considered as belonging to the present invention's Protection domain.

Claims (7)

1. a kind of method for realizing virtual checking system failure injection, it is characterised in that methods described includes:
S1, the operation for reading user, the fault type for selecting this failure use-case targeted is register failure, variable failure Or internal storage data failure;
S2, the fault type for this, read the triggering pattern configuration information of user, judgement is time triggered, and also address is touched Hair;
Fault type and failure triggering form that S3, basis have been read, read the fault data information of user, generate special life Make word;
S4, the command word of generation transmitted to GDB modules by particular command pipeline;
S5, GDB module are parsed to command word, are packaged into the private data structures that virtual checking system can be recognized;
S6, the case mechanism by virtually verifying system, fault diagnosis example is injected among system;
S7, the injection for completing a fault diagnosis example.
2. according to the method described in claim 1, it is characterised in that:Methods described is additionally included in after step S7 according to user's need The configuration for restarting next example, injection process are asked, until all meeting the demand of user.
3. according to the method described in claim 1, it is characterised in that:Methods described is additionally included in virtual checking system example and carried out In code emulation implementation procedure, the trigger condition of direct fault location is detected in real time, once meet i.e. according to the description in corresponding event The injection of fault value is carried out, the direct fault location ability that user is expected is completed.
4. according to the method described in claim 1, it is characterised in that:Methods described also includes user oriented, and there is provided user's operation Interface, user selects triggering pattern on the user interface:If time triggered, then need to set initial time, time Interval and triggering times;If address is triggered, then need to set initial address, termination address and read-write triggering form;Afterwards, User needs to set fault object and fault value:If register failure, then need mask register to number, and sets 10 systems Or 16 system fault value;If variable failure, then need to select variable name, and set the fault value of 10 systems or 16 systems;If For memory failure, then continue initial address, the length that application heap is set, and select pre-injected fault data file.
5. according to the method described in claim 1, it is characterised in that:The generation specific command word is specially according to " failure is noted Enter the interactive command word with virtually verifying system " specification, generate specific command word.
6. method according to claim 5, it is characterised in that:It is described that " direct fault location interacts life with virtual checking system Making word " specification includes:The specified register direct fault location RegInj-TimeTrig of time triggered:Register number+fault value+ Initial time+time interval+number of stoppages;The specifying variable direct fault location VarInj-TimeTrig of time triggered:Variable name+ Types of variables+fault value+initial time+time interval+number of stoppages;The specified memory segment data direct fault location of time triggered MemInj-TimeTrig:Internal memory initial address+internal memory segment length+fault data file+initial time+time interval+failure time Number;The specified register direct fault location RegInj-AddrTrig of address triggering:Register number+fault value+start trigger address + terminate triggering address+read-write form;The specifying variable direct fault location VarInj-AddrTrig of address triggering:Variable name+variable Type+fault value+start trigger address+termination triggering address+read-write form;The specified memory segment data failure note of address triggering Enter MemInj-AddrTrig:Internal memory initial address+internal memory segment length+fault data file+start trigger address+termination triggering Address+read-write form.
7. according to the method described in claim 1, it is characterised in that:The direct fault location, including:1) the specified of time triggered is posted Storage direct fault location;2) the specifying variable direct fault location of time triggered;3) the specified memory segment data direct fault location of time triggered; 4) the specified register direct fault location of address triggering;5) the specifying variable direct fault location of address triggering;6) address triggering is specified Application heap data fault injects.
CN201710141019.1A 2017-03-10 2017-03-10 A kind of method for realizing virtual checking system failure injection Pending CN107025171A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710141019.1A CN107025171A (en) 2017-03-10 2017-03-10 A kind of method for realizing virtual checking system failure injection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710141019.1A CN107025171A (en) 2017-03-10 2017-03-10 A kind of method for realizing virtual checking system failure injection

Publications (1)

Publication Number Publication Date
CN107025171A true CN107025171A (en) 2017-08-08

Family

ID=59526277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710141019.1A Pending CN107025171A (en) 2017-03-10 2017-03-10 A kind of method for realizing virtual checking system failure injection

Country Status (1)

Country Link
CN (1) CN107025171A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729231A (en) * 2017-09-19 2018-02-23 北京东土科技股份有限公司 A kind of fault filling method and device based on operating system
CN109271306A (en) * 2018-09-30 2019-01-25 深圳中广核工程设计有限公司 Life test method, device, equipment and medium based on direct fault location
CN110687901A (en) * 2019-10-31 2020-01-14 重庆长安汽车股份有限公司 Simulation test platform
CN112542209A (en) * 2020-12-29 2021-03-23 深圳市芯天下技术有限公司 Nonvolatile chip error injection verification method and device, storage medium and terminal
WO2023230883A1 (en) * 2022-05-31 2023-12-07 华为技术有限公司 Testing method, system and apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080016396A1 (en) * 2003-02-14 2008-01-17 Advantest Corporation Test emulator, test module emulator and record medium storing program therein
CN102789416B (en) * 2012-06-13 2014-12-31 北京航空航天大学 Memory fault injection method and simulator thereof for software built-in test (BIT)
CN106155883A (en) * 2015-03-30 2016-11-23 华为技术有限公司 A kind of virtual machine method for testing reliability and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080016396A1 (en) * 2003-02-14 2008-01-17 Advantest Corporation Test emulator, test module emulator and record medium storing program therein
CN102789416B (en) * 2012-06-13 2014-12-31 北京航空航天大学 Memory fault injection method and simulator thereof for software built-in test (BIT)
CN106155883A (en) * 2015-03-30 2016-11-23 华为技术有限公司 A kind of virtual machine method for testing reliability and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729231A (en) * 2017-09-19 2018-02-23 北京东土科技股份有限公司 A kind of fault filling method and device based on operating system
CN109271306A (en) * 2018-09-30 2019-01-25 深圳中广核工程设计有限公司 Life test method, device, equipment and medium based on direct fault location
CN110687901A (en) * 2019-10-31 2020-01-14 重庆长安汽车股份有限公司 Simulation test platform
CN112542209A (en) * 2020-12-29 2021-03-23 深圳市芯天下技术有限公司 Nonvolatile chip error injection verification method and device, storage medium and terminal
WO2023230883A1 (en) * 2022-05-31 2023-12-07 华为技术有限公司 Testing method, system and apparatus

Similar Documents

Publication Publication Date Title
CN107025171A (en) A kind of method for realizing virtual checking system failure injection
CN104657247B (en) Universal fault injection system and fault filling method are realized based on JTAG debud modes
CN105185413B (en) For the automatic verification platform and method of on piece MMU memory management unit fault-tolerant architecture
US7756695B2 (en) Accelerated simulation and verification of a system under test (SUT) using cache and replacement management tables
CN108710551B (en) SPARC processor-based single event upset fault injection test method and system
CN104536303A (en) Fault injection method
CN101334754A (en) Fault infusion based embedded system evaluation method
Svenningsson et al. Model-implemented fault injection for hardware fault simulation
CN104598373B (en) A kind of embedded software test method of multi-technical fusion
Woskowski Applying industrial-strength testing techniques to critical care medical equipment
Da Silva et al. LEON3 ViP: a virtual platform with fault injection capabilities
Kantrowitz et al. Functional Verification of a Multiple-issue, Pipelined, Superscalar Alpha Processor - the Alpha 21164 CPU Chip
Barbosa et al. Verification and validation of (real time) COTS products using fault injection techniques
CN110704315B (en) Fault injection device for embedded software test
Tsai et al. FTAPE-A fault injection tool to measure fault tolerance
Schulze et al. Model-based testing of NASA's OSAL API—An experience report
Tsai et al. Rapid verification of embedded systems using patterns
CN106959883A (en) A kind of method for realizing virtual checking system data acquisition
Aponte-Moreno et al. An experimental comparison of fault injection tools for microprocessor-based systems
Ballerini et al. Software rejuvenation impacts on a phased-mission system for Mars exploration
Kim et al. Scalable distributed concolic testing: a case study on a flash storage platform
CN109739774A (en) EDAC direct fault location and detection method
Yu et al. The use of UML sequence diagram for system-on-chip system level transaction-based functional verification
An et al. FIG-QEMU: A Fault Inject Platform Supporting Full System Simulation
Derenthal et al. Virtualized hardware environments for supporting digital i&C verification

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170808