Check patentability & draft patents in minutes with Patsnap Eureka AI!

Software watchdog test method and device

A software watchdog and testing method technology, applied in the software field, can solve the problems of falling into an infinite loop, unable to feed the dog normally, unable to determine the normal protection of the software watchdog, etc., and achieve the effect of comprehensive monitoring functions

Active Publication Date: 2018-06-26
BYD CO LTD
View PDF7 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example: add while (1) code inside a monitored function, so that the program executes while (1) into an infinite loop, can not feed the dog normally, test the watchdog reset situation, if it can be reset correctly, it means the software watchdog The watchdog function is normal; if it cannot be reset correctly, the test fails, indicating that the software watchdog function has not been implemented correctly
[0003] However, the above method can only test the protection function of the software watchdog for the program running away, and for the situation that the program is not executed according to the prescribed execution sequence, it is impossible to determine whether the software watchdog can normally protect the program by using the existing test method.

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
  • Software watchdog test method and device
  • Software watchdog test method and device
  • Software watchdog test method and device

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0030] Example 1: You can select one or more program statements with dog-feeding serial numbers from the program statements with dog-feeding numbers to delete. When the deleted program statement is executed, the corresponding dog-feeding cannot be issued because the program statement is deleted. signal, resulting in the absence of the dog feeding signal, that is, the failure of the lack of feeding dog signal. For example, the program statement with the dog feeding sequence number Num(2) is deleted, when the program statement should be executed, the dog feeding signal drv_Num(2) cannot be sent because the program statement is deleted, resulting in the dog feeding signal drv_Num(2 ), thus generating the missing fault of the feeding dog signal drv_Num(2).

example 2

[0031] Example 2: At least two program statements can be selected from the program statements with dog-feeding numbers, and their dog-feeding numbers can be changed to a consistent dog-feeding number, so as to generate dog-feeding signal repetition faults. For example, select two program statements from the program statements with dog feeding numbers, which are respectively the first program statement and the third program statement in the simulation main program, and their dog feeding numbers are respectively Num(1) and Num(2 ), modify the dog-feeding sequence number Num(2) of the third program statement to Num(1), so that the dog-feeding sequence number of the third program statement is consistent with the dog-feeding sequence number of the first program statement. When the first program statement is executed, the feed dog signal drv_Num(1) is issued. Since the feed sequence numbers of the two program statements are the same as Num(1), when the third program statement is exec...

example 3

[0032] Example 3: The order of two or more program statements with the dog feeding sequence number can be reversed to generate a dog feeding signal sequence failure error. For example, reverse the positions of the program statement with the feeding sequence number Num(1) and the program statement with the feeding sequence number Num(4). Because the program statement is reversed, the program statement whose feeding signal is Num(4) is executed first, and the program statement whose feeding signal is Num(1) is executed later. Therefore, the dog feeding signal drv_Num(4) is sent first, and then the dog feeding signal drv_Num(1) is sent out, so that the order of sending the dog feeding signal drv_Num(1) and dog feeding signal drv_Num(4) is wrong, and the dog feeding signal is generated Wrong sequence failure.

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 a software watchdog test method and device. The method comprises the following steps of: obtaining a simulation main program; inserting corresponding dog feeding numbers in a plurality of program statements of the simulation main program in sequence; modifying the program statements with the dog feeding numbers so as to generate a simulation main program with a dog feedingsequence fault; compiling and executing the simulation main program with the dog feeding sequence fault so as to test on a software watchdog; and when the software watchdog executes a reset operation,determining that the software watchdog functions normally. According to the method, the corresponding dog feeding numbers are inserted into the plurality of program statements of the simulation mainprogram in sequence, the program statements with the dog feeding numbers are modified to generate the simulation main program with the dog feeding sequence fault, the simulation main program is compiled and executed, and the software watchdog is tested by utilizing a plurality of sequence faults so as to test whether the software watchdog can carry out correct protection or not, so that the monitoring function of the software watchdog is more comprehensive and correct.

Description

technical field [0001] The invention relates to the technical field of software, in particular to a software watchdog testing method and device. Background technique [0002] Watchdog technology is a program monitoring technology, which is a protection mechanism used to prevent program failures from generating erroneous outputs. Watchdog can be divided into software watchdog and hardware watchdog. Among them, when testing the software watchdog, the most commonly used method is to use code simulation to simulate the situation of the program running away. For example: add while (1) code inside a monitored function, so that the program executes while (1) into an infinite loop, can not feed the dog normally, test the reset status of the watchdog, if it can be reset correctly, it means the software watchdog The watchdog function is normal; if it cannot be reset correctly, the test fails, indicating that the software watchdog function has not been implemented correctly. [0003...

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
CPCG06F11/3688
Inventor 王发平其他发明人请求不公开姓名
Owner BYD CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More