CN103514094B - CPU on-line testing method based on grey box - Google Patents
CPU on-line testing method based on grey box Download PDFInfo
- Publication number
- CN103514094B CN103514094B CN201310473086.5A CN201310473086A CN103514094B CN 103514094 B CN103514094 B CN 103514094B CN 201310473086 A CN201310473086 A CN 201310473086A CN 103514094 B CN103514094 B CN 103514094B
- Authority
- CN
- China
- Prior art keywords
- cpu
- function
- test
- line testing
- grey box
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The invention discloses a kind of CPU on-line testing method based on grey box; Comprise the following steps: set fail-safe computer language codes rule; Extract the minimum language subset that cpu function is relevant; Produce cpu function test case; Generate object code; On tested CPU, move, produce test result; Comparative result on another CPU; On another CPU, store desired result; Judge that whether test result is consistent with desired result; As unanimously judged, cpu function is normal, continues operation; As the troubleshooting of inconsistent decision-making system. The present invention uses high-level [computer to realize the On line inspection to cpu function, improves the portability of test code with readable; Take into account cpu function layer, and comprehensive covering of the instruction truly using and register; Do not need to close interruption, need to, at Save and restore CPU internal state before and after self-inspection, can not damage CPU current state.
Description
Technical field
The invention belongs to software algorithm field, carry out the correctness of function for the online CPU of detection.
Background technology
(be applied to the row such as aviation electronics, railway signal, nuclear power at industrial control system and safety signal systemIndustry) in, central processor CPU has been established core the driver's seat, for ensureing that the safe and reliable of system hasExtremely important effect. Can correctly carry out functional task in order to ensure CPU, must carry out periodicity to CPUMonitoring. In the time having anomaly, start fault management mechanism, take safety measures in time to avoid moreSerious accident occurs. It is the difficult point of industry that security fields are detected for CPU always, and common way is as Fig. 1Shown in.
Existing method is that the internal resource of CPU is detected, such as register group, ALU etc.But this method shortcoming is as follows:
1. because the integrated level of current CPU is more and more higher, internal structure is complicated all the more, is done exercises in CPU insideWork may bring uncertain risk.
2. in system running, test and usually need to close interruption for CPU, just affecting security systemNormal work and real-time response ability.
3.CPU oneself is insincere to the testing result of itself, if CPU itself breaks down, test result needsWant oneself judgement, this has unpredictability.
4.CPU test case can realize with bottom assembly code conventionally, because needs are considered the CPU of different frameworks,Portable poor, on different CPU, need to write different test programs.
Summary of the invention
Technical problem to be solved by this invention is to provide a kind of CPU on-line testing method based on grey box, itCan use high-level [computer to realize the On line inspection to cpu function, improve the portable of test codeProperty with readable.
In order to solve above technical problem, the invention provides a kind of CPU on-line testing method based on grey box;Comprise the following steps: set fail-safe computer language codes rule; Extract the minimum language that cpu function is relevantSubset; Produce cpu function test case; Generate object code; On tested CPU, move, produceTest result; Comparative result on another CPU; On another CPU, store desired result; SentenceWhether disconnected test result is consistent with desired result; As unanimously judged, cpu function is normal, continues operation;As the troubleshooting of inconsistent decision-making system.
Beneficial effect of the present invention is: use high-level [computer to realize the On line inspection to cpu function,Improve the portability of test code with readable; Take into account cpu function layer, and truly useComprehensive covering of instruction and register; Do not need to close interruption, need to be at Save and restore CPU before and after self-inspectionInternal state, can not damage CPU current state.
Preferably, first classify for cpu function mistake, choose corresponding on-line testing set.
Preferably, can between two CPU, mutually carry out on-line testing.
Brief description of the drawings
Below in conjunction with the drawings and specific embodiments, the present invention is described in further detail.
Fig. 1 is the schematic diagram that existing detection CPU carries out function;
Fig. 2 is the schematic diagram of the method for the invention;
Fig. 3 is the schematic diagram to cpu function on-line testing process and result monitoring of the present invention.
Fig. 4 is that the method for the invention is applied schematic diagram two typical cases that get in two voting model fail-safe computers.
Detailed description of the invention
The invention provides a kind of CPU on-line testing method based on grey box test, this algorithm can be applied to bagDraw together but be not limited to the fields such as safety signal system, industrial control system. The present invention has done above-mentioned algorithmHigher level algorithm improves, overcome the shortcoming of prior art, can reach again and cover cpu function faultObject.
Ash box (GrayBox) is that the course of work in a kind of program or system is by local cognitive device. Ash boxTest, also referred to as grey box analysis, is the software debugging method based on in the limited cognition of program interior details.Tester may know between system component it how is synergisticly, but lacks inner program function and fortuneThe detailed understanding of doing. For internal procedure, grey box test is regarded one as program and must be analyzed from the outsideBlack box.
Ash box is tested owing to not needing tester to contact source code, and therefore grey box test does not exist aggressiveness and inclined to one sideSee. Between developer and tester, have obvious difference, it is minimum that the risk of occurrences in human life conflict is reduced to. But, grey boxTest relative white-box testing and be more difficult to find and solve potential problems, especially in a single application,The interior details of white-box testing can be grasped completely. The test of ash box combines wanting of white-box testing box Black-box TestingElement. It has considered user side, specific systematic knowledge and operating environment. It is at the concertedness ring of system componentIn border, evaluate the design of application software. The test of ash box is made up of Method and kit for, and these Method and kit fors are drawn materialsIn the external knowledge box of application program mutual environment with it, can be used in Black-box Testing with strengthen testing efficiency,The efficiency of error detection and error analysis. The test of ash box relates to input and output, but uses about code and journeyConventionally the test of the information design outside the tester visual field such as order operation.
The whole algorithm of the present invention is illustrated in fig. 2 shown below.
Specific algorithm can divide three phases:
First stage is to classify for cpu function mistake, chooses in corresponding high-level [computerOn-line testing set; Second stage is the method to cpu function on-line testing process and result monitoring. The 3rdStage is determining and supplementing cpu function on-line testing use-case coverage rate.
Stage one:
CPU general utility functions mistake is as follows:
Table 1
For CPU general utility functions mistake, adopt following high-level [computer (c/c++, Ada etc.) meritCan subset test:
Table 2
Stage two as shown in Figure 3.
This algorithm is got two voting model 2oo2(2outof2voting two) typical case's application in fail-safe computerAs shown in Figure 4.
Stage three:
The object code of realizing is changed into assembler code, comparison On-line self-diagnosis cpu instruction used and register,Determine coverage rate. If any the unlapped instruction of minute quantity or register, can increase pointedly in addition correspondingTest case, ensures that it all covers.
Advantage of the present invention is:
1. use high-level [computer to realize the On line inspection to cpu function, improve moving of test codePlanting property is with readable.
2. taken into account cpu function layer, and comprehensive covering of the instruction truly using and register.
3. do not need to close interruption, need to be before and after the self-inspection Save and restore CPU internal state, can be not rightCPU current state damages.
Monitor mutually by two CPU, energy effective monitoring is to the inefficacy of single cpu function.
The present invention is not limited to embodiment discussed above. Above the description of detailed description of the invention is intended toIn order to describe and illustrate the technical scheme the present invention relates to. Apparent conversion based on the present invention enlightenment orSubstitute and also should be considered to fall into protection scope of the present invention. Above detailed description of the invention is used for disclosing thisBright best implementation method, to make those of ordinary skill in the art can apply multiple enforcement of the present inventionMode and multiple alternative reach object of the present invention.
Claims (3)
1. the CPU on-line testing method based on grey box, is characterized in that, comprises the following steps:
Set the high-level [computer code regulation of security fields;
Extract the minimum high-level language function subset that cpu function is relevant;
Produce the cpu function test case for CPU is carried out to grey box test according to described minimum high-level language function subset;
Generate object code corresponding to CPU of testing according to described cpu function test case;
On tested CPU, move described object code and realize the grey box test to this CPU, produce test result;
On another CPU, store desired result;
Comparative result on another CPU, judges that whether test result is consistent with desired result;
As unanimously judged, cpu function is normal, continues operation;
As the troubleshooting of inconsistent decision-making system.
2. the CPU on-line testing method based on grey box as claimed in claim 1, is characterized in that, first classifies for cpu function mistake, chooses corresponding on-line testing set.
3. the CPU on-line testing method based on grey box as claimed in claim 1, is characterized in that, mutually carries out on-line testing between two CPU.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310473086.5A CN103514094B (en) | 2013-10-11 | 2013-10-11 | CPU on-line testing method based on grey box |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310473086.5A CN103514094B (en) | 2013-10-11 | 2013-10-11 | CPU on-line testing method based on grey box |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103514094A CN103514094A (en) | 2014-01-15 |
CN103514094B true CN103514094B (en) | 2016-05-04 |
Family
ID=49896852
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310473086.5A Active CN103514094B (en) | 2013-10-11 | 2013-10-11 | CPU on-line testing method based on grey box |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103514094B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105045696B (en) * | 2015-09-02 | 2018-08-07 | 中国航空工业集团公司航空动力控制系统研究所 | A kind of CPU detection methods |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6505342B1 (en) * | 2000-05-31 | 2003-01-07 | Siemens Corporate Research, Inc. | System and method for functional testing of distributed, component-based software |
CN101620566A (en) * | 2009-07-23 | 2010-01-06 | 北京航空航天大学 | Dynamic random testing method |
-
2013
- 2013-10-11 CN CN201310473086.5A patent/CN103514094B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6505342B1 (en) * | 2000-05-31 | 2003-01-07 | Siemens Corporate Research, Inc. | System and method for functional testing of distributed, component-based software |
CN101620566A (en) * | 2009-07-23 | 2010-01-06 | 北京航空航天大学 | Dynamic random testing method |
Non-Patent Citations (1)
Title |
---|
嵌入式计算机的BIT设计与实现;刘少雄;《计算机工程》;20080930;第34卷;第115-116,119页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103514094A (en) | 2014-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Lutz | Software engineering for safety: a roadmap | |
CN103383722B (en) | The software security of a kind of combination product and process puts to the proof development approach | |
Rushby | Runtime certification | |
Zhou et al. | An in-depth study of the potentially confounding effect of class size in fault prediction | |
CN103853871B (en) | Safety requirement modeling method applicable for avionics system | |
CN103676896B (en) | Nuclear power plant digital control room man-machine interface improvement method | |
Pilch et al. | Ideas underlying the quantification of margins and uncertainties | |
CN109918049A (en) | The verification method of software development model based on Formal Verification | |
CN103294596A (en) | Early warning method for contract-type software fault based on program invariants | |
San Kim et al. | Development and evaluation of a computer-aided system for analyzing human error in railway operations | |
Huang | Human error analysis in software engineering | |
CN103514094B (en) | CPU on-line testing method based on grey box | |
CN106339553A (en) | Method and system for reconstructing flight control of spacecraft | |
Ben-Yair et al. | AI & eBPF based performance anomaly detection system | |
Zalewski et al. | Safety of computer control systems: challenges and results in software development | |
Woods | On taking human performance seriously in risk analysis: Comments on dougherty | |
Gleirscher | Hazard analysis for technical systems | |
Li et al. | An automatic generation tool for unit test case based on dynamic symbolic execution | |
Björkman et al. | Verification of safety logic designs by model checking | |
Li et al. | Model-based generation of safety test-cases for Onboard systems | |
Levchenkov | Increasing the reliability of information management systems for complex objects | |
Goodloe et al. | High-Integrity Runtime Verification | |
Xie et al. | Study on the application of health management techniques in aerospace testing software | |
Eastwood et al. | Towards a safety case for runtime risk and uncertainty management in safety-critical systems | |
Wood | Diversity strategies to mitigate postulated common cause failure vulnerabilities |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |