CN108205490A - Software watchdog test method and device - Google Patents

Software watchdog test method and device Download PDF

Info

Publication number
CN108205490A
CN108205490A CN201611179878.1A CN201611179878A CN108205490A CN 108205490 A CN108205490 A CN 108205490A CN 201611179878 A CN201611179878 A CN 201611179878A CN 108205490 A CN108205490 A CN 108205490A
Authority
CN
China
Prior art keywords
dog
feeding
serial number
program
num
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.)
Granted
Application number
CN201611179878.1A
Other languages
Chinese (zh)
Other versions
CN108205490B (en
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.)
BYD Co Ltd
Original Assignee
BYD Co Ltd
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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201611179878.1A priority Critical patent/CN108205490B/en
Publication of CN108205490A publication Critical patent/CN108205490A/en
Application granted granted Critical
Publication of CN108205490B publication Critical patent/CN108205490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of software watchdog test method and device, wherein, method includes the following steps:Obtain simulation main program;Corresponding hello dog serial number is sequentially inserted into multiple program statements of simulation main program;The program statement that dog serial number is fed to having is modified, to generate with the simulation main program for feeding dog sequential fault;It compiles and performs with the simulation main program for feeding dog sequential fault, to test software watchdog;When software watchdog, which performs, resets operation, determine that the function of software watchdog is normal.This method in multiple program statements of simulation main program by being sequentially inserted into corresponding hello dog serial number, and the program statement that dog serial number is fed to having is modified, dog sequential fault simulation main program is fed so as to generate, and the Complied executing simulation main program, software watchdog is tested using a variety of sequential faults, can it be tested correctly protect, so that the function for monitoring of software watchdog is more comprehensively, accurately.

Description

Software watchdog test method and device
Technical field
The present invention relates to software technology field more particularly to a kind of software watchdog test method and devices.
Background technology
Watchdog technique is a kind of sequential monitoring technology, is taken anti-for preventing program mal from generating wrong output Protection mechanism.House dog can be divided into software watchdog and hardware watchdog.Wherein, when testing software watchdog, most often Method is using code simulation mode, and simulation program runs winged situation.Such as:It is added inside some monitored function While (1) code makes program perform while (1) and is absorbed in endless loop, it is impossible to and dog is normally fed, tests watchdog reset situation, if Energy proper reset, then it represents that software watchdog function is normal;If being unable to proper reset, test and do not pass through, represent that software is guarded the gate Dog function is not realized correctly.
But the above method can only test software house dog to the safeguard function of program fleet situation, and for program not The situation that execution sequence according to regulation performs, can not then determine whether software watchdog can be just using existing test method Often protection.
Invention content
The present invention is directed to solve at least some of the technical problems in related technologies.For this purpose, the present invention First purpose is to propose a kind of software watchdog test method, and this method passes through multiple program statements in simulation main program In be sequentially inserted into it is corresponding feed dog serial number, and to have feed dog serial number program statement modify, so as to generate feed dog sequence Fault simulation main program and the Complied executing simulation main program, test software watchdog using a variety of sequential faults, Can it be tested correctly protect, so that the function for monitoring of software watchdog is more comprehensively, accurately.
Second object of the present invention is to propose a kind of software watchdog test device.
To achieve these goals, first aspect present invention embodiment proposes a kind of software watchdog test method, packet It includes:Obtain simulation main program;Corresponding hello dog serial number is sequentially inserted into multiple program statements of simulation main program;It is fed to having The program statement of dog serial number is modified, to generate with the simulation main program for feeding dog sequential fault;It compiles and performs to have and feed The simulation main program of dog sequential fault, to test software watchdog;When software watchdog, which performs, resets operation, determine The function of software watchdog is normal.
The software watchdog test method of the embodiment of the present invention, by simulation main program multiple program statements in successively Corresponding hello dog serial number is inserted into, and the program statement that dog serial number is fed to having is modified, dog sequential fault mould is fed so as to generate Intend main program and the Complied executing simulation main program, software watchdog is tested using a variety of sequential faults, tests it It can correctly protect, so that the function for monitoring of software watchdog is more comprehensively, accurately.
In order to achieve the above object, second aspect of the present invention embodiment proposes a kind of software watchdog test device, including:It obtains Modulus block simulates main program for obtaining;Module is inserted into, for being sequentially inserted into pair in multiple program statements of simulation main program That answers feeds dog serial number;Modified module, the program statement for feeding dog serial number to having are modified, and are had with generation and are fed dog sequence The simulation main program of failure;Test module, for compiling and performing the simulation main program for having and feeding dog sequential fault, with to software House dog is tested;Determining module, for when software watchdog performs and resets operation, determining the function of software watchdog just Often.
The software watchdog test device of the embodiment of the present invention, by simulation main program multiple program statements in successively Corresponding hello dog serial number is inserted into, and the program statement that dog serial number is fed to having is modified, dog sequential fault mould is fed so as to generate Intend main program and the Complied executing simulation main program, software watchdog is tested using a variety of sequential faults, tests it It can correctly protect, so that the function for monitoring of software watchdog is more comprehensively, accurately.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description It obtains significantly or is recognized by the practice of the present invention.
Description of the drawings
Fig. 1 is the flow chart of software watchdog test method according to an embodiment of the invention;
Fig. 2 is the flow chart of the method for software watchdog monitoring program according to an embodiment of the invention;
Fig. 3 is the structure diagram of software watchdog test device according to an embodiment of the invention.
Specific embodiment
The embodiment of the present invention is described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached The embodiment of figure description is exemplary, it is intended to for explaining the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings the software watchdog test method and device of the embodiment of the present invention are described.
The embodiment of the present invention proposes a kind of software watchdog test method, including:Obtain simulation main program;It is led in simulation Corresponding hello dog serial number is sequentially inserted into multiple program statements of program;The program statement that dog serial number is fed to having is modified, To generate with the simulation main program for feeding dog sequential fault;It compiles and performs with the simulation main program for feeding dog sequential fault, with Software watchdog is tested;When software watchdog, which performs, resets operation, determine that the function of software watchdog is normal.
Fig. 1 is the flow chart of software watchdog test method according to an embodiment of the invention.
As shown in Figure 1, the software watchdog test method includes:
S101 obtains simulation main program.
Wherein, simulation main program is one section of program statement that certain function can be achieved.In the program statement of simulation main program After middle insertion software watchdog, then perform the simulation main program.Sequence that can be by upsetting simulation main program Program sentence etc. Can method be carried out test software house dog and it correctly protected.
In one embodiment of the invention, simulation main program can be obtained.
S102 is sequentially inserted into corresponding hello dog serial number in multiple program statements of simulation main program.
After simulation main program is obtained, multiple program statements are chosen from simulation main program, and are sequentially inserted into corresponding feed Dog serial number, to represent to send corresponding feeding-dog signal when going to corresponding program statement.For example, simulation main program shares 20 Program statement can be sequentially inserted into first, Article 3, the odd-numbered program statement such as Article 5 and feed dog serial number Num (1)、Num(2)、Num(3)、Num(4)、Num(5)、Num(6)、Num(7)、Num(8)、Num(9)、Num(10)。
Wherein, the multiple program statements for feeding dog serial number are inserted into, can be chosen according to actual needs.
S103, the program statement that dog serial number is fed to having are modified, to generate with the simulation master for feeding dog sequential fault Program.
After corresponding hello dog serial number is sequentially inserted into multiple program statements of simulation main program, dog serial number is fed to having Program statement is modified, such as deletes the sequence of program statement, sentence of reversing a procedure, and generation is with hello dog sequential fault Simulate main program.
Wherein, dog is fed to refer to, when simulating main program and going to the program statement with hello dog serial number, send out a signal. The signal can be described as feeding-dog signal.
It is understood that it is one-to-one to feed dog serial number with feeding-dog signal.For example, the program statement of simulation main program In insert feed dog serial number Num (1), Num (2), Num (3), Num (4), Num (5), Num (6), Num (7), Num (8), Num (9), Num (10) when with the program statement for feeding dog serial number are performed, can send out corresponding feeding-dog signal, can represent successively For drv_Num (1), drv_Num (2), drv_Num (3), drv_Num (4), drv_Num (5), drv_Num (6), drv_Num (7)、drv_Num(8)、drv_Num(9)、drv_Num(10).If the program statement for being inserted into hello dog serial number is deleted, will not Generate corresponding feeding-dog signal.
The program statement that dog serial number is fed to having below by specific example is modified, and generation, which has, feeds dog sequential fault Method be described in detail.Specific example is as follows:
Example one:The one or more of journeys for having and feeding dog serial number can be selected from the program statement for feeding dog serial number Sequence sentence is deleted, and when going to deleted program statement, corresponding feed cannot be sent out since program statement is deleted Dog signal so as to which feeding-dog signal be caused to lack, that is, generates feeding-dog signal miss fault.Dog serial number Num (2) is fed for example, will have Program statement delete, when the execution program statement, since program statement is deleted, so failing to send out feeding-dog signal Drv_Num (2) causes the missing of feeding-dog signal drv_Num (2), so as to generate the missing of feeding-dog signal drv_Num (2) Failure.
Example two:It can select at least two program statements from the program statement for feeding dog serial number, fed dog serial number Consistent hello dog serial number is modified as, to generate feeding-dog signal double faults.For example, it is selected from the program statement for feeding dog serial number Two program statements are selected, first program statement and Article 3 program statement in main program is respectively simulated, feeds dog serial number The dog serial number Num (2) that feeds of Article 3 program statement is revised as Num (1), makes Article 3 journey by respectively Num (1) and Num (2) Hello the dog serial number of sequence sentence is consistent with hello the dog serial number of first program statement.When first program statement is performed, send out Feeding-dog signal drv_Num (1) is Num (1) since hello the dog serial number of two program statements is identical, works as Article 3 program Sentence is performed, and is also sent out feeding-dog signal drv_Num (1), is caused the repetition of feeding-dog signal drv_Num (1), is fed so as to generate Dog signal double faults.
Example three:The reversed order that can have the program statement for feeding dog serial number by two or two or more, is fed with generation Dog signal sequence fault error.It for example, will be with the program statement for feeding dog serial number Num (1) and with hello dog serial number Num's (4) Program statement it is out of position.Since program statement is reversed, so the program statement that feeding-dog signal is Num (4) is first performed, Feeding-dog signal is is performed after the program statement of Num (1).Therefore, first send out feeding-dog signal drv_Num (4), after send out feed dog letter Number drv_Num (1) so that mistake has occurred in the sequence that sends out of feeding-dog signal drv_Num (1) and feeding-dog signal drv_Num (4), Generate feeding-dog signal sequence error failure.
Example four:Also can be from the program statement for feeding dog serial number, the selection continuous program statement of feeding-dog signal, and Dog serial number is fed in addition one in a certain program statement between the continuous program statement of feeding-dog signal.It for example, can be with hello dog sequence The program statement of number Num (2) and in the program statement between the program statement for feeding dog serial number Num (3), dog is fed in addition one Serial number such as Num (11), when program goes to the part, it is drv_Num (2), drv_Num successively that feeding-dog signal, which sends out sequence, (11), drv_Num (3) so that feeding-dog signal drv_Num (2) and drv_Num (3) sends out sequence discontinuously, generates and feeds dog letter Number sequence error failure.
Example five:It is super that sorting position can be also located to last hello the dog serial number modification with the program statement for feeding dog serial number Go out maximum hello the dog serial number upper limit.For example, in simulation main program, it is Num (9) that sorting position, which is located at last dog serial number of feeding, will be fed Dog serial number Num (9) is revised as hello the dog serial number bigger than Num (9), such as Num (10) or Num (11) so that the program statement quilt The feeding-dog signal and the feeding-dog signal of front sent out during execution is sequentially discontinuous, so as to generate feeding-dog signal failure.
It will be appreciated that it can be repaiied by the program statement that above-mentioned one or more kinds of methods feed dog serial number to having Change, to generate diversified failure, the function of software watchdog is tested comprehensively.
S104 is compiled and is performed with the simulation main program for feeding dog sequential fault, to test software watchdog.
After the program statement that dog serial number is fed to having has been changed, simulation main program is compiled.After compiling, hold Row is with the simulation main program for feeding dog sequential fault, to feed the simulation main program of dog sequential fault by having to software watchdog It is tested.
It is modified as being compiled operation to simulation main program after feeding dog serial number Num (1) for example, dog serial number Num (3) will be fed, Simulation main program has issued two identical feeding-dog signal drv_Num (1) in the process of running, that is, generates feeding-dog signal repetition Failure.Using feeding-dog signal double faults, software watchdog is tested, tests whether it can recognize that feeding-dog signal repeats Failure.
S105 when software watchdog, which performs, resets operation, determines that the function of software watchdog is normal.
During performing with the simulation main program for feeding dog sequential fault, if software watchdog, which performs, resets behaviour Make, then can determine that the function of software watchdog is normal, play due protective action.
And if simulation main program can continue to perform, it is not resetted, then illustrates software watchdog to the failure simultaneously It cannot correctly identify, not play protective action.
The software watchdog test method of the embodiment of the present invention, by simulation main program multiple program statements in successively Corresponding hello dog serial number is inserted into, and the program statement that dog serial number is fed to having is modified, dog sequential fault mould is fed so as to generate Intend main program and the Complied executing simulation main program, software watchdog is tested using a variety of sequential faults, tests it It can correctly protect, so that the function for monitoring of software watchdog is more comprehensively, accurately.
After being completed using the above method to software watchdog, if software watchdog function is normal, using soft The program that part house dog monitors needs monitors.With reference to Fig. 2 to a kind of method of software watchdog monitoring program into Row explanation.
As shown in Fig. 2, the method for the software watchdog monitoring program may include:
S201 is inserted into the main program for needing to monitor and feeds dog serial number.
For example, user wants to monitor the operation of certain main program with software watchdog.Specifically, in the main program for needing to monitor Multiple program statements are selected, and is sequentially inserted into and feeds dog serial number.Dog serial number Num (1), Num are fed to be sequentially inserted into 5 in main program (2), for Num (3), Num (4), Num (5).
S202 performs main program.
It is inserted into main program after feeding dog serial number, compiles and perform main program.
S203 judges whether the sequence of the feeding-dog signal sent out is correct.
During performing main program, when performing with the program statement for feeding dog serial number, feeding-dog signal can be sent out.Software The sequence of feeding-dog signal of the house dog to sending out judges, judges whether the sequence of feeding-dog signal is correct, that is, judges main program Whether performed according to the sequence of regulation.
S204, software watchdog, which performs, resets operation.
If during main program performs, the sequence of the feeding-dog signal sent out is not drv_Num (1), drv_Num (2), drv_Num (3), drv_Num (4), drv_Num (5), the i.e. sequence of feeding-dog signal be not corresponding with feeding dog serial number, then software House dog, which performs, resets operation.
S205, main program continue to execute.
If software watchdog monitors, the feeding-dog signal sequence sent out is corresponding with feeding dog serial number, i.e., main program is according to the rules Sequence perform, then main program continues to execute.
The software watchdog test device that the embodiment of the present invention proposes is described with reference to Fig. 3.Fig. 3 is according to this The structure diagram of the software watchdog test device of invention one embodiment.
As shown in figure 3, the software watchdog test device may include:Acquisition module 310 is inserted into module 320, modified module 330th, test module 340, determining module 350.
Wherein, acquisition module 310 simulates main program for obtaining.
Module 320 is inserted into be used in multiple program statements of simulation main program be sequentially inserted into corresponding hello dog serial number.
After simulation main program is obtained, it is inserted into module 320 and chooses multiple program statements, and insert successively from simulation main program Enter corresponding hello dog serial number, to represent to send corresponding feeding-dog signal when going to corresponding program statement.For example, simulate main journey Sequence shares 20 program statements, can be sequentially inserted into first, Article 3, the odd numbers program statement such as Article 5 and feed dog Serial number Num (1), Num (2), Num (3), Num (4), Num (5), Num (6), Num (7), Num (8), Num (9), Num (10).
Wherein, the multiple program statements for feeding dog serial number are inserted into, can be chosen according to actual needs.
Modified module 330 is used to modify to the program statement with hello dog serial number, has with generation and feeds dog sequence event The simulation main program of barrier.
Modified module 330 feeds dog letter for deleting with one or more in the program statement for feeding dog serial number, with generation Number miss fault.
Modified module 330 is used for having at least two the corresponding dog serial number of feeding of the program statement for feeding dog serial number to be modified as one It causes, to generate feeding-dog signal double faults.
Modified module 330 is used for the reversed order for having the program statement for feeding dog serial number by least two, and dog is fed with generation Signal sequence fault.
Modified module 330 is used for as the continuous two a certain program statement having between the program statement for feeding dog serial number additions One feeds dog serial number, to generate feeding-dog signal sequence error failure.
The dog serial number of feeding that modified module 330 is used to sorting position being located at the last program statement with hello dog serial number is repaiied Change and feed the dog serial number upper limit beyond maximum, to generate feeding-dog signal failure.
After corresponding hello dog serial number is sequentially inserted into multiple program statements of simulation main program, modified module 330 is to tool There is the program statement for feeding dog serial number to modify, such as delete the sequence of program statement, sentence of reversing a procedure, generation, which has, feeds The simulation main program of dog sequential fault.
Wherein, dog is fed to refer to, when simulating main program and going to the program statement with hello dog serial number, send out a signal. The signal can be described as feeding-dog signal.
It is understood that it is one-to-one to feed dog serial number with feeding-dog signal.For example, the program statement of simulation main program In insert feed dog serial number Num (1), Num (2), Num (3), Num (4), Num (5), Num (6), Num (7), Num (8), Num (9), Num (10) when with the program statement for feeding dog serial number are performed, can send out corresponding feeding-dog signal, can represent successively For drv_Num (1), drv_Num (2), drv_Num (3), drv_Num (4), drv_Num (5), drv_Num (6), drv_Num (7)、drv_Num(8)、drv_Num(9)、drv_Num(10).If the program statement for being inserted into hello dog serial number is deleted, will not Generate corresponding feeding-dog signal.
The program statement for feeding dog serial number to having to modified module 330 below by specific example is modified, generation tool There is hello dog sequential fault to be described in detail.Specific example is as follows:
Example one:Modified module 330 can be used for from the program statement for feeding dog serial number, select one or more of tools There is the program statement for feeding dog serial number to be deleted, when going to deleted program statement, since program statement is deleted not Corresponding feeding-dog signal can be sent out, feeding-dog signal is caused to lack, that is, generates feeding-dog signal miss fault.Dog is fed for example, will have The program statement of serial number Num (2) is deleted, when the execution program statement, since program statement is deleted, so failing to send out Feeding-dog signal drv_Num (2) causes the missing of feeding-dog signal drv_Num (2), so as to generate feeding-dog signal drv_Num (2) miss fault.
Example two:Modified module 330 can be used for from the program statement for feeding dog serial number, select at least two program words Sentence is fed dog serial number and is modified as consistent hello dog serial number, to generate feeding-dog signal double faults.For example, from hello dog sequence Number program statement in select two program statements, respectively simulate main program in first program statement and Article 3 program Sentence, it is respectively Num (1) and Num (2) to feed dog serial number, and the dog serial number Num (2) that feeds of Article 3 program statement is revised as Num (1), hello the dog serial number for making Article 3 program statement is consistent with hello the dog serial number of first program statement.When first program statement It is performed, sends out feeding-dog signal drv_Num (1), be Num (1) since hello the dog serial number of two program statements is identical, When Article 3 program statement is performed, feeding-dog signal drv_Num (1) is also sent out, causes the weight of feeding-dog signal drv_Num (1) It is multiple, so as to generate feeding-dog signal double faults.
Example three:Modified module 330 can be used for the suitable of the program statement for having hello dog serial number by two or two or more Sequence overturns, to generate feeding-dog signal sequential fault mistake.For example, by with feed dog serial number Num (1) program statement with hello The program statement of dog serial number Num (4) it is out of position.Since program statement is reversed, so feeding-dog signal is the journey of Num (4) Sequence sentence is first performed, and feeding-dog signal is is performed after the program statement of Num (1).Therefore, feeding-dog signal drv_Num is first sent out (4), feeding-dog signal drv_Num (1) is sent out after so that feeding-dog signal drv_Num (1) and feeding-dog signal drv_Num (4) are sent out Mistake has occurred in sequence, generates feeding-dog signal sequence error failure.
Example four:Modified module 330 can also be used for from the program statement for feeding dog serial number, select feeding-dog signal continuous Program statement, and in a certain program statement between the continuous program statement of feeding-dog signal addition one feed dog serial number.For example, It can be with the program statement for feeding dog serial number Num (2) and with the program statement between the program statement for feeding dog serial number Num (3) In, dog serial number such as Num (11) is fed in addition one, and when program goes to the part, it is drv_ successively that feeding-dog signal, which sends out sequence, Num (2), drv_Num (11), drv_Num (3) so that feeding-dog signal drv_Num (2) and drv_Num (3) sends out sequence and do not connect It is continuous, generate feeding-dog signal sequence error failure.
Example five:Modified module 330 can also be used to for sorting position to be located at the last program statement with hello dog serial number Dog serial number modification of feeding feed the dog serial number upper limit beyond maximum.For example, in simulation main program, sorting position is located at last hello dog sequence Number be Num (9), will feed dog serial number Num (9) be revised as it is bigger than Num (9) feed dog serial number, such as Num (10) or Num (11), make The program statement is performed the feeding-dog signal of the feeding-dog signal sent out and front sequentially discontinuous, fed so as to generate Dog signal fault.
Test module 340 is used to compiling and performing the simulation main program with dog sequential fault is fed, with to software watchdog It is tested.
After the program statement that dog serial number is fed to having has been changed, test module 340 is compiled simulation main program.It compiles After translating, perform with the simulation main program for feeding dog sequential fault, with by having the simulation main program for feeding dog sequential fault Software watchdog is tested.
It is modified as being compiled operation to simulation main program after feeding dog serial number Num (1) for example, dog serial number Num (3) will be fed, Simulation main program has issued two identical feeding-dog signal drv_Num (1) in the process of running, that is, generates feeding-dog signal repetition Failure.Using feeding-dog signal double faults, software watchdog is tested, tests whether it can recognize that feeding-dog signal repeats Failure.
Determining module 350 is used to, when software watchdog performs and resets operation, determine that the function of software watchdog is normal.
During performing with the simulation main program for feeding dog sequential fault, if software watchdog, which performs, resets behaviour Make, it is determined that module 350 can determine that the function of software watchdog is normal, and software watchdog plays due protective action.
And if simulation main program can continue to perform, it is not resetted, then illustrates software watchdog to the failure simultaneously It cannot correctly identify, not play protective action.
It should be noted that the aforementioned explanation to software watchdog test method embodiment is also applied for the embodiment Software watchdog test device, details are not described herein again.
In conclusion the software watchdog test device of the embodiment of the present invention, passes through multiple programs in simulation main program Corresponding hello dog serial number is sequentially inserted into sentence, and the program statement that dog serial number is fed to having is modified, dog is fed so as to generate Sequential fault simulates main program and the Complied executing simulation main program, and software watchdog is carried out using a variety of sequential faults Test, can test it correctly protect, so that the function for monitoring of software watchdog is more comprehensively, accurately.
In the description of this specification, reference term:" one embodiment ", " example ", " is specifically shown " some embodiments " The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description Point is contained at least one embodiment of the present invention or example.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It is combined in an appropriate manner in one or more embodiments or example.In addition, without conflicting with each other, the skill of this field Art personnel can tie the different embodiments or examples described in this specification and the feature of different embodiments or examples It closes and combines.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is impossible to limitation of the present invention is interpreted as, those of ordinary skill in the art within the scope of the invention can be to above-mentioned Embodiment is changed, changes, replacing and modification.

Claims (12)

1. a kind of software watchdog test method, which is characterized in that including:
Obtain simulation main program;
Corresponding hello dog serial number is sequentially inserted into multiple program statements of the simulation main program;
To having the program statement for feeding dog serial number to modify, to generate with the simulation main program for feeding dog sequential fault;
It compiles and performs the simulation main program for having and feeding dog sequential fault, to test software watchdog;
When the software watchdog, which performs, resets operation, determine that the function of the software watchdog is normal.
2. the method as described in claim 1, which is characterized in that having the program statement for feeding dog serial number to modify, To generate with the simulation main program for feeding dog sequential fault, including:
It deletes with one or more in the program statement for feeding dog serial number, to generate feeding-dog signal miss fault.
3. the method as described in claim 1, which is characterized in that having the program statement for feeding dog serial number to modify, To generate with the simulation main program for feeding dog sequential fault, including:
By at least two there is the corresponding dog serial number of feeding of the program statement for feeding dog serial number to be modified as unanimously, dog letter is fed with generation Number double faults.
4. the method as described in claim 1, which is characterized in that having the program statement for feeding dog serial number to modify, To generate with the simulation main program for feeding dog sequential fault, including:
The reversed order that there is the program statement for feeding dog serial number by least two, to generate the event of feeding-dog signal sequence error Barrier.
5. the method as described in claim 1, which is characterized in that having the program statement for feeding dog serial number to modify, To generate with the simulation main program for feeding dog sequential fault, including:
Dog serial number is fed in a certain program statement addition one having between the program statement for feeding dog serial number for continuous two, with life Into feeding-dog signal sequence error failure.
6. the method as described in claim 1, which is characterized in that having the program statement for feeding dog serial number to modify, To generate with the simulation main program for feeding dog sequential fault, including:
Sorting position is located at the last dog serial number modification of feeding with the program statement for feeding dog serial number and feeds dog beyond maximum The serial number upper limit, to generate feeding-dog signal failure.
7. a kind of software watchdog test device, which is characterized in that including:
Acquisition module simulates main program for obtaining;
Module is inserted into, for being sequentially inserted into corresponding hello dog serial number in multiple program statements of the simulation main program;
Modified module, for having the program statement for feeding dog serial number to modify, having with generation and feeding dog sequential fault Simulation main program;
Test module, for compile and perform it is described there is the simulation main program for feeding dog sequential fault, with to software watchdog into Row test;
Determining module, for when the software watchdog performs and resets operation, determining that the function of the software watchdog is normal.
8. device as claimed in claim 7, which is characterized in that the modified module is used for:
It deletes with one or more in the program statement for feeding dog serial number, to generate feeding-dog signal miss fault.
9. device as claimed in claim 7, which is characterized in that the modified module is used for:
By at least two there is the corresponding dog serial number of feeding of the program statement for feeding dog serial number to be modified as unanimously, dog letter is fed with generation Number double faults.
10. device as claimed in claim 7, which is characterized in that the modified module is used for:
The reversed order that there is the program statement for feeding dog serial number by least two, to generate the event of feeding-dog signal sequence error Barrier.
11. device as claimed in claim 7, which is characterized in that the modified module is used for:
Dog serial number is fed in a certain program statement addition one having between the program statement for feeding dog serial number for continuous two, with life Into feeding-dog signal sequence error failure.
12. device as claimed in claim 7, which is characterized in that the modified module is used for:
Sorting position is located at the last dog serial number modification of feeding with the program statement for feeding dog serial number and feeds dog beyond maximum The serial number upper limit, to generate feeding-dog signal failure.
CN201611179878.1A 2016-12-19 2016-12-19 Software watchdog test method and device Active CN108205490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611179878.1A CN108205490B (en) 2016-12-19 2016-12-19 Software watchdog test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611179878.1A CN108205490B (en) 2016-12-19 2016-12-19 Software watchdog test method and device

Publications (2)

Publication Number Publication Date
CN108205490A true CN108205490A (en) 2018-06-26
CN108205490B CN108205490B (en) 2021-05-14

Family

ID=62603076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611179878.1A Active CN108205490B (en) 2016-12-19 2016-12-19 Software watchdog test method and device

Country Status (1)

Country Link
CN (1) CN108205490B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162421A (en) * 2019-04-28 2019-08-23 北京航空航天大学 A kind of embedded software house dog test method and device containing interrupt function

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1543097A (en) * 2003-11-05 2004-11-03 中兴通讯股份有限公司 Function testing method and system for hardware watchdog
US7069543B2 (en) * 2002-09-11 2006-06-27 Sun Microsystems, Inc Methods and systems for software watchdog support
CN101794244A (en) * 2010-03-18 2010-08-04 上海乐毅信息科技有限公司 Multi-thread watch dog monitoring method
CN102629232A (en) * 2012-01-09 2012-08-08 北京航空航天大学 Software reliability verifying and testing method with test validity introduced
CN102880523A (en) * 2012-10-10 2013-01-16 北京和利时系统工程有限公司 Watchdog circuit and failure monitoring method for same
CN104572472A (en) * 2015-01-28 2015-04-29 中国农业银行股份有限公司 Program execution sequence diagnosis method and program execution sequence diagnosis system
US10248492B2 (en) * 2014-08-04 2019-04-02 Intel Corporation Method of executing programs in an electronic system for applications with functional safety comprising a plurality of processors, corresponding system and computer program product

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7069543B2 (en) * 2002-09-11 2006-06-27 Sun Microsystems, Inc Methods and systems for software watchdog support
CN1543097A (en) * 2003-11-05 2004-11-03 中兴通讯股份有限公司 Function testing method and system for hardware watchdog
CN101794244A (en) * 2010-03-18 2010-08-04 上海乐毅信息科技有限公司 Multi-thread watch dog monitoring method
CN102629232A (en) * 2012-01-09 2012-08-08 北京航空航天大学 Software reliability verifying and testing method with test validity introduced
CN102880523A (en) * 2012-10-10 2013-01-16 北京和利时系统工程有限公司 Watchdog circuit and failure monitoring method for same
US10248492B2 (en) * 2014-08-04 2019-04-02 Intel Corporation Method of executing programs in an electronic system for applications with functional safety comprising a plurality of processors, corresponding system and computer program product
CN104572472A (en) * 2015-01-28 2015-04-29 中国农业银行股份有限公司 Program execution sequence diagnosis method and program execution sequence diagnosis system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蹇彪等: ".一种VxWorks平台下的软件看门狗设计缺陷及改进方法", 《现代计算机(专业版)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162421A (en) * 2019-04-28 2019-08-23 北京航空航天大学 A kind of embedded software house dog test method and device containing interrupt function

Also Published As

Publication number Publication date
CN108205490B (en) 2021-05-14

Similar Documents

Publication Publication Date Title
Weyuker et al. Using developer information as a factor for fault prediction
Tretmans Model-based testing and some steps towards test-based modelling
Iqbal et al. Empirical investigation of search algorithms for environment model-based testing of real-time embedded software
US20080172576A1 (en) Method for enhancing the diagnostic accuracy of a vlsi chip
CN101334754A (en) Fault infusion based embedded system evaluation method
EP2975527A2 (en) A method for tracing computer software
CN104657247A (en) System and method for realizing universal type fault injection based on JTAG (Joint Test Action Group) debug mode
Svenningsson et al. Model-implemented fault injection for hardware fault simulation
Iqbal et al. Combining search-based and adaptive random testing strategies for environment model-based testing of real-time embedded systems
JP4959941B2 (en) Interactive software probing
IT8322191A1 (en) SELF-TEST SUBSYSTEM FOR NUCLEAR REACTOR PROTECTION SYSTEM
US20070266349A1 (en) Directed random verification
McCaffrey The verification of a distributed system
Serrestou et al. Functional verification of rtl designs driven by mutation testing metrics
CN108205490A (en) Software watchdog test method and device
Grenning Applying test driven development to embedded software
Lauret et al. Detection of interferences in aspect-oriented programs using executable assertions
Naslavsky et al. Using traceability to support model-based regression testing
Briones et al. A semantic framework for test coverage
Júnior et al. Preserving the exception handling design rules in software product line context: A practical approach
Garousi et al. An empirical evaluation to study benefits of visual versus textual test coverage information
Sharma et al. Model-based testing: the new revolution in software testing
Garg A study of aspect oriented testing techniques
Bozzano et al. A formal framework for the specification, verification and synthesis of diagnosers
Tóth et al. A structural decomposition-based diagnosis method for dynamic process systems using HAZID information

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