CN111324527B - Device and method for testing interrupt program in data acquisition mode - Google Patents

Device and method for testing interrupt program in data acquisition mode Download PDF

Info

Publication number
CN111324527B
CN111324527B CN201911248983.XA CN201911248983A CN111324527B CN 111324527 B CN111324527 B CN 111324527B CN 201911248983 A CN201911248983 A CN 201911248983A CN 111324527 B CN111324527 B CN 111324527B
Authority
CN
China
Prior art keywords
program
data acquisition
subprogram
interrupt
interrupt program
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
Application number
CN201911248983.XA
Other languages
Chinese (zh)
Other versions
CN111324527A (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.)
Wuhan Binhu Electronic Co ltd
Original Assignee
Wuhan Binhu Electronic 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 Wuhan Binhu Electronic Co ltd filed Critical Wuhan Binhu Electronic Co ltd
Priority to CN201911248983.XA priority Critical patent/CN111324527B/en
Publication of CN111324527A publication Critical patent/CN111324527A/en
Application granted granted Critical
Publication of CN111324527B publication Critical patent/CN111324527B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention relates to the technical field of software testing, in particular to a device and a method for testing interrupt programs in a data acquisition mode. The invention can identify the number of times of executing the interrupt program in the normal execution program according to certain logic, and adds the trigger signal in the interrupt program, and collect the output point signal by the test data collecting device, so that the test personnel can find the defects of the program in time.

Description

Device and method for testing interrupt program in data acquisition mode
Technical Field
The invention relates to the technical field of software testing, in particular to a device and a method for testing interrupt programs in a data acquisition mode.
Background
The interrupt program can be divided into soft interrupt and hard interrupt, the soft interrupt is generated randomly during the software running process, for example, a timer reaches a certain data, communication is sent and received, a high-speed counter reaches a certain value, the hard interrupt is caused by external input data, for example, a certain interrupt trigger is caused by the falling edge of an external certain acquisition signal, and the trigger of the interrupt program is caused when the signal is changed from 1 to 0. The soft interrupt and the hard interrupt can be executed in any part of normal program operation, so that after the soft interrupt program and the hard interrupt program are operated, memory data which is possibly operated are disturbed, and bug is easy to occur. Meanwhile, because of randomness, the method can be executed in any logic segment, if a hard interrupt program needs to close a certain output point, and after execution, a statement behind the hard interrupt program is to open the output point, which is equivalent to that the interrupt program is not executed, and great hidden danger easily occurs.
However, due to the randomness of the interrupt program, during testing, even if the program is executed by continuous triggering, the tester does not know how many times the executed random program is verified or verified in those parts of the program, and it is difficult for the tester to quantitatively analyze the test result. Meanwhile, because the running speed of the program is high, if the program has an output error of only a few seconds or a few milliseconds, but an important ignition command can be sent, a tester can hardly find that the program is executed abnormally, but serious consequences and losses are caused.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a device and a method for testing an interrupt program in a data acquisition mode. The invention can identify the number of times of executing the interrupt program in the normal execution program according to certain logic, and adds the trigger signal in the interrupt program, and the test data acquisition device acquires the output point signal, so that a tester can find the defects of the program in time.
The technical scheme of the invention is as follows: a method for testing interrupt program by data acquisition mode is characterized in that: the method comprises the steps of adding an entrance marker bit on a main program and/or a subprogram to be tested, wherein the specific adding mode is that the entrance marker bit is set when the subprogram is entered, the entrance marker bit is cleared when the subprogram is exited, an execution logic identification module and an output trigger signal are added in an interrupt program, and the specific process of executing the logic identification module is as follows: reading an entry flag bit of each subprogram in the interrupt program, and increasing 1 on a corresponding subprogram executed times counter when the entry flag bit of the subprogram is set; after the interrupt program gives out the trigger signal, the test data acquisition device acquires the output point signal, and the acquisition of the output point signal is carried out in a communication mode of the tested device and the test data acquisition device or through the acquisition of the output I/Q signal.
A method for testing an interrupt program by means of data acquisition as described above, characterized by: when a plurality of interrupts are tested under different subroutine running conditions, the interrupt program entry is provided with an interrupt flag bit, and the interrupt flag bit is cleared at the exit.
A method for testing an interrupt program by means of data acquisition as described above, characterized by: the method comprises the steps of adding an entrance marker bit on a tested main program and/or subprogram, wherein the specific adding mode is that the entrance marker bit is set before a certain section of program of a subprogram, the entrance marker bit is cleared after the section of program, an execution logic identification module and an output trigger signal are added in an interrupt program, and the specific process of executing the logic identification module is as follows: reading an entry flag bit of each subprogram in the interrupt program, and increasing 1 on a corresponding subprogram executed times counter when the entry flag bit of the subprogram is set; the interrupt program outputs a trigger signal to enable the test data acquisition device to acquire an output signal of the tested device.
A method for testing an interrupt program by means of data acquisition as described above, characterized by: the method also comprises the step of executing the monitoring step, wherein the step of executing the monitoring controls the input of the tested software.
The invention also discloses a device for testing the interrupt program in a data acquisition mode, which comprises a tested device and a test data acquisition device, wherein the test data acquisition device acquires a trigger signal and an output point signal of the tested device, and is characterized in that: when the trigger signal is triggered, the test data acquisition device acquires an output point signal at 10s, the test data acquisition device comprises tested software, an entrance marker bit is added on a main program and/or a subprogram of the tested software, the specific adding mode is that the entrance marker bit is set when the subprogram is entered, the entrance marker bit is cleared when the subprogram is exited, an execution logic identification module and an output trigger signal are added in an interrupt program of the tested software, and the specific process of executing the logic identification module is as follows: reading an entry flag bit of each subprogram in the interrupt program, and increasing 1 on a corresponding subprogram executed times counter when the entry flag bit of the subprogram is set; after the interrupt program gives out the trigger signal, the test data acquisition device acquires the output point signal, and the acquisition of the output point signal is carried out in a communication mode of the tested device and the test data acquisition device or through the acquisition of the output I/Q signal.
The beneficial effects of the invention are as follows: firstly, as long as the program is executed abnormally (bug appears), the tester can find out in time no matter how long. Secondly, the tester knows how many times the executed interrupt program was verified or verified in those parts of the program. Thirdly, the test result can be quantitatively analyzed by a tester. And fourthly, the targeted bootstrap program can enter the subprogram to be tested, the probability of executing the interrupt program on the part to be tested is increased, the test time is shortened, and the test efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of a hardware interface of the present invention.
Fig. 2 is a schematic diagram of a subroutine modification.
FIG. 3 is a schematic diagram of another modification of the main routine or the subroutine.
FIG. 4 is a schematic diagram of an interrupt routine.
FIG. 5 is a schematic diagram of another configuration of the interrupt routine.
Detailed Description
The technical scheme of the invention is further described below with reference to the accompanying drawings.
As shown in fig. 1, the device for testing an interrupt program in a data collection manner of the present invention includes a tested device and a test data collection device, the test data collection device collects a trigger signal and an output point signal of the tested device, the tested device includes tested software, an entrance flag bit is added on a main program and/or a subprogram of the tested software, the specific addition manner is that when the subprogram is entered, the entrance flag bit is set, when the subprogram is exited, the entrance flag bit is cleared, an execution logic identification module is added in the interrupt program of the tested software, and the trigger signal is output, and the specific process of executing the logic identification module is as follows: reading an entry flag bit of each subprogram in the interrupt program, and increasing 1 on a corresponding subprogram executed times counter when the entry flag bit of the subprogram is set; after the interrupt program gives out the trigger signal, the test data acquisition device acquires the output point signal, and the acquisition of the output point signal is carried out in a communication mode of the tested device and the test data acquisition device or through the acquisition of the output I/Q signal. When the trigger signal is triggered, the test data acquisition device can acquire an output point signal within a period of time according to a preset setting. In a few program execution periods after the execution of the interrupt program, the software program is most likely to have abnormal conditions, so that the acquisition time of the output point signal can be within 10s, and thus the influence of the interrupt program on other programs is basically eliminated after the general program has performed a plurality of or hundreds of periods.
As shown in fig. 2 or fig. 3, in the method for testing an interrupt program by using a data collection manner, an access flag bit is added to a main program and/or a sub-program to be tested (and/or indicates that only one or both of the access flag bits can be taken), specifically, the addition mode is that when a sub-program is entered, the access flag bit is set to 1, and when the sub-program is exited, the access flag bit is set to 0, so that whether the sub-program is entered or not can be known through the access flag bit, and whether the sub-program is executed or not can be known. If a certain segment of the program needs to be tested, as shown in fig. 3, a label can be added to the certain segment of the program. If it is determined that the interrupt program does not affect some subroutines, such as a subroutine that is only displayed, the content of the data execution of the subroutine does not intersect the content in the interrupt program, then the interrupt program may not be marked, and accordingly the condition of the tested execution in the program cannot be known; for the cross content of the interrupt program and the subprogram, if the flag bit cleared immediately by the interrupt program needs to be started in the subprogram, the subprogram needs to be tested for a plurality of times.
As shown in FIG. 4, the addition of an execution logic identification module and trigger signal to the interrupt program ensures that each time the interrupt program is executed, the tester knows where the program was executed. The method comprises the following steps: and reading an entry flag bit of each subprogram in the interrupt program, if the entry flag bit is 1, indicating that the interrupt program is executed in the subprogram, and increasing 1 on an execution time counter of the subprogram, so that the number of times that the interrupt program is tested in each subprogram can be conveniently counted through the execution time counter. And simultaneously, when the interrupt program is executed, a trigger signal is output, so that the test data acquisition device acquires the output signal of the tested device. As shown in FIG. 5, if multiple interrupts are required to be tested under different subroutine running conditions, the interrupt flag bit is set at the interrupt program entry, the interrupt flag bit is cleared at the exit, and for some hardware interrupts, the interrupt flag bit is automatically set, and the interrupt execution condition can be obtained by reading the flag bit.
As shown in fig. 1, fig. 4 and fig. 5, after the interrupt program of the present invention gives a trigger signal, the test data acquisition device starts to acquire an output point signal, and the acquisition of the output point signal may be performed in a communication manner between the tested device and the test data acquisition device or through the acquisition of an output I/Q signal, so as to automatically acquire a change of important output data after the interrupt program. The testing device of the invention can be independent of the connection of external hardware in the running process, and the ignition control software of a special device can generate danger if abnormal occurrence occurs after ignition, after the device of the invention is adopted, the output signal can be collected by the testing data collecting device, and in the testing process, even if the ignition signal lasts for a few milliseconds, the ignition signal can be found and identified by a tester, thereby being particularly convenient for testing the safety and danger related interrupt program.
After the test is completed, the method can systematically analyze the times of executing the interrupt program in different subroutines, namely the times of being tested, and if some subroutines are not tested or the times of being tested are less, the test personnel can increase the times of being tested. Because the method of the invention can definitely give the tested times of the subprogram, a tester can guide the corresponding interrupt program to run on the subprogram which is not tested in the subsequent testing process.
The invention can also comprise an execution monitoring step, wherein the execution monitoring step mainly controls the input of the tested software, such as external key input and external data (communication, analog, digital and the like) input, so that the tested software operates according to the conception of testers and guides the test of the program. For example, in the test process, if the interrupt program is found not to be executed on the automatic precision adjustment subprogram, a tester can guide the interrupt program to enter the automatic precision adjustment subprogram through an external factor, and correspondingly improve the precision or realize external intervention precision, so that the automatic precision adjustment subprogram is repeated continuously for a plurality of times, the execution probability of the interrupt program on the automatic precision adjustment subprogram is greatly increased, the test time is further reduced, and the test efficiency is improved.

Claims (1)

1. The utility model provides a device through data acquisition mode test interrupt procedure, includes by test device and test data acquisition device, and test data acquisition device gathers by test device's trigger signal and output point signal, its characterized in that: when the trigger signal is triggered, the test data acquisition device acquires an output point signal at 10s, the test data acquisition device comprises tested software, an entrance marker bit is added on a main program and/or a subprogram of the tested software, the specific adding mode is that the entrance marker bit is set when the subprogram is entered, the entrance marker bit is cleared when the subprogram is exited, an execution logic identification module is added in an interrupt program and the trigger signal is output, and the specific process of executing the logic identification module is as follows: reading an entry flag bit of each subprogram in the interrupt program, and increasing 1 on a corresponding subprogram executed times counter when the entry flag bit of the subprogram is set; after the interrupt program gives out the trigger signal, the test data acquisition device acquires the output point signal, and the acquisition of the output point signal is carried out by the tested device and the test data acquisition device in a communication mode or data are acquired by outputting the I/Q signal.
CN201911248983.XA 2019-12-09 2019-12-09 Device and method for testing interrupt program in data acquisition mode Active CN111324527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911248983.XA CN111324527B (en) 2019-12-09 2019-12-09 Device and method for testing interrupt program in data acquisition mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911248983.XA CN111324527B (en) 2019-12-09 2019-12-09 Device and method for testing interrupt program in data acquisition mode

Publications (2)

Publication Number Publication Date
CN111324527A CN111324527A (en) 2020-06-23
CN111324527B true CN111324527B (en) 2023-08-11

Family

ID=71171536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911248983.XA Active CN111324527B (en) 2019-12-09 2019-12-09 Device and method for testing interrupt program in data acquisition mode

Country Status (1)

Country Link
CN (1) CN111324527B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112859738A (en) * 2020-12-31 2021-05-28 沈机(上海)智能系统研发设计有限公司 Data acquisition method, medium, electronic equipment and machine tool

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5437047A (en) * 1991-06-28 1995-07-25 Fujitsu Limited System for gathering and safeguarding program run information of each individual processor by transferring information to an external storage
US6167479A (en) * 1998-08-03 2000-12-26 Unisys Corporation System and method for testing interrupt processing logic within an instruction processor
US6385743B1 (en) * 1998-01-08 2002-05-07 Infineon Technologies Ag Method of synchronizing an electronic device for monitoring the operation of a microprocessor, and an electronic device for carrying out the method
JP2009230350A (en) * 2008-03-21 2009-10-08 Fuji Xerox Co Ltd Integrated abnormality-detecting data acquisition device
CN101937392A (en) * 2010-08-27 2011-01-05 华南理工大学 Dynamic defect detection method for embedded software
CN103838899A (en) * 2012-11-27 2014-06-04 上海华虹集成电路有限责任公司 Simulation verification system and method for interrupt controller of hard-core MCU
CN105740120A (en) * 2014-12-11 2016-07-06 中国科学院软件研究所 Shared memory based real-time monitoring and control method and system for software running process
CN106547694A (en) * 2016-10-25 2017-03-29 浙江大学 A kind of on-line debugging system based on ARM CortexM4 core processors
CN107038108A (en) * 2015-08-20 2017-08-11 腾讯科技(深圳)有限公司 The method of testing and device of software

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5437047A (en) * 1991-06-28 1995-07-25 Fujitsu Limited System for gathering and safeguarding program run information of each individual processor by transferring information to an external storage
US6385743B1 (en) * 1998-01-08 2002-05-07 Infineon Technologies Ag Method of synchronizing an electronic device for monitoring the operation of a microprocessor, and an electronic device for carrying out the method
US6167479A (en) * 1998-08-03 2000-12-26 Unisys Corporation System and method for testing interrupt processing logic within an instruction processor
JP2009230350A (en) * 2008-03-21 2009-10-08 Fuji Xerox Co Ltd Integrated abnormality-detecting data acquisition device
CN101937392A (en) * 2010-08-27 2011-01-05 华南理工大学 Dynamic defect detection method for embedded software
CN103838899A (en) * 2012-11-27 2014-06-04 上海华虹集成电路有限责任公司 Simulation verification system and method for interrupt controller of hard-core MCU
CN105740120A (en) * 2014-12-11 2016-07-06 中国科学院软件研究所 Shared memory based real-time monitoring and control method and system for software running process
CN107038108A (en) * 2015-08-20 2017-08-11 腾讯科技(深圳)有限公司 The method of testing and device of software
CN106547694A (en) * 2016-10-25 2017-03-29 浙江大学 A kind of on-line debugging system based on ARM CortexM4 core processors

Also Published As

Publication number Publication date
CN111324527A (en) 2020-06-23

Similar Documents

Publication Publication Date Title
US4845615A (en) Software performance analyzer
US5103394A (en) Software performance analyzer
US4937740A (en) Real time software analyzing system for storing selective m-bit addresses based upon correspondingly generated n-bit tags
CN111459700B (en) Equipment fault diagnosis method, diagnosis device, diagnosis equipment and storage medium
CN104050075B (en) The method of testing and device of Andriod application programs
US5937366A (en) Smart B-I-T (Built-In-Test)
JP6460623B2 (en) Test measurement device, trigger setting method thereof, and program for test measurement device
CN201780505U (en) Electrical performance testing device of digital control system in nuclear power plant
US7053392B2 (en) Optical measuring apparatus for measuring objects on machines
CN111273176B (en) Fault diagnosis optimization method, device, system and storage medium
CN110083081B (en) Automatic single-particle irradiation test control system and method
WO2000075746B1 (en) System and method for measuring temporal coverage detection
US7490269B2 (en) Noise accommodation in hardware and software testing
CN111324527B (en) Device and method for testing interrupt program in data acquisition mode
CN106201802A (en) The CPU internal interrupt response time of logic-based analyser and the measuring method of recovery time
CN104063326A (en) Software testing data analysis oscilloscope and method
CN110878709B (en) Method for establishing jam recognition mechanism of steam turbine valve and jam recognition method
CN113589098B (en) Power grid fault prediction and diagnosis method based on big data driving
CN104730504A (en) Test system oriented to secondary radar inquiry system and test method of test system
Yilmaz Using hardware performance counters for fault localization
CN114037010A (en) Method and device for identifying abnormal electric quantity data
CN202267870U (en) Test analysis device of sequence of event recording system
CN109634851A (en) A kind of system-level real-time method for obtaining tested program internal operation data
CN111367788A (en) Test method for random execution program
CN107273296A (en) The method of testing and test device of a kind of software

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
TA01 Transfer of patent application right

Effective date of registration: 20230713

Address after: 430205 No. 51, Liufang Avenue, Donghu New Technology Development Zone, Wuhan, Hubei Province

Applicant after: WUHAN BINHU ELECTRONIC Co.,Ltd.

Address before: No. 103-2, Hong Kong Road, Jiang'an District, Wuhan City, Hubei Province 430000

Applicant before: Xu Huamin

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant