CN106294036A - A kind of hardware fault verification method, device and client - Google Patents
A kind of hardware fault verification method, device and client Download PDFInfo
- Publication number
- CN106294036A CN106294036A CN201510262737.5A CN201510262737A CN106294036A CN 106294036 A CN106294036 A CN 106294036A CN 201510262737 A CN201510262737 A CN 201510262737A CN 106294036 A CN106294036 A CN 106294036A
- Authority
- CN
- China
- Prior art keywords
- code
- hardware fault
- hardware
- checking
- origin authentication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The application provides a kind of hardware fault verification method, device and client.Described method may include that the origin authentication code obtaining identifying object;The hardware fault Validation Code preset is injected in the position of specifying of described origin authentication code;When triggering the checking execution event arranged in described origin authentication code, perform described hardware fault Validation Code;After described hardware fault Validation Code has performed, recover the origin authentication code of described identifying object.Utilize each embodiment in the application, when can verify generation hardware fault by the way of software analog hardware fault, whether operation system can be it is anticipated that takes counter-measure, the resources such as the checking equipment of hardware fault, manpower, time can be saved, improve the verification efficiency of hardware fault.
Description
Technology neighborhood
The application belongs to computer information processing field, particularly relates to a kind of hardware fault verification method, device and client.
Background technology
Along with gradually stepping up of people's safety consciousness, safety work, production are increasingly taken seriously.Described safety work,
Generation can include hardware, the safe operation of software system and when described hardware or software break down correctly, timely
Counter-measure.
In the terminal traffic system of some software+combination of hardware, some hardware events can be set in advance in described operation system
The behavior of corresponding counter-measure when barrier occurs.Such as interrupt power supply, termination device runs, jump to appointment application etc., these
The counter-measure behavior of hardware fault can be set in advance in operation system.But at actual equipment or operation system line
During upper operation, usually can send many faults, be much due to hardware failure and corresponding operation system in these faults
Not when there is described hardware fault it is anticipated that perform corresponding counter-measure, or the unreachable position of counter-measure is even held
Row mistake.That causes above-mentioned phenomenon main reason is that a lot of terminal unit hardware fault especially complicated, main equipment is various,
Exist and be difficult to the hardware fault predicted, and gather when operation system design it may happen that the fault message of hardware is comprehensive not,
Hardware fault information is difficult to the problems such as simulation.
In prior art, in order to when ensureing generation hardware fault, corresponding operation system can take intended counter-measure, operation people
Member generally uses the method for on-the-spot hardware fault test to verify operation system.In described on-the-spot hardware fault test permissible
Use actual physical device is operated, such as pull out network interface card, power outage, container capacity overflow, be heated to specified
Temperature etc..But existing take the test of on-the-spot hardware fault to verify whether corresponding service system performs the side of intended counter-measure
In method, every time rehearsal test process all can consume substantial amounts of equipment, manpower and time resource, and the checking of described operation system
Needing a large amount of validation test often, this makes on-the-spot hardware fault test verify that operation system performs testing of the method for behavior undoubtedly
Card efficiency is substantially reduced.
Summary of the invention
The application purpose is to provide a kind of hardware fault verification method, device and client, can be with analog hardware fault, it is achieved
When there is hardware fault in checking operation system whether can it is anticipated that counter-measure perform corresponding behavior, checking can be saved
The resources such as the equipment of hardware fault, manpower, time, improve the checking execution efficiency of hardware fault.
A kind of hardware fault verification method, device and client that the application provides are achieved in that
A kind of hardware fault verification method, described method includes:
Obtain the origin authentication code of identifying object;
The hardware fault Validation Code preset is injected in the position of specifying of described origin authentication code;
When triggering the checking execution event arranged in described origin authentication code, perform described hardware fault Validation Code;
After described hardware fault Validation Code has performed, recover the origin authentication code of described identifying object.
A kind of hardware fault checking device, described device includes:
Checking configuration module, includes, for storage, the hardware verification failure code arranged and injects described hardware verification failure code position
The configuration information put;
Checking interface module, for the calling interface providing hardware fault to verify, described interface is for sending to the called side of interface
Described configuration information;
Code recovers module, for when judging that described called side has performed described hardware fault Validation Code, calls described in recovery
The source code of side.
A kind of hardware fault checking device, it is characterised in that described device includes:
Checking configuration module, includes, for storage, the hardware verification failure code arranged and injects described hardware verification failure code position
The configuration information put;
Failure code performs module, for performing described hardware fault Validation Code according to described configuration information;
Code recovers module, for when judging that described called side has performed described hardware fault Validation Code, calls described in recovery
The source code of side.
A kind of faulted-phase judgment client, described client is configured to, including:
Call failure proof interface, obtain the processing unit of checking configuration information;Fault according to arranging in described configuration information is tested
The positional information of card code and the described failure proof code of injection injects described failure proof code process unit;Perform described fault
Validation Code, and after having performed described failure proof code, eliminate the processing unit of the failure proof code of described injection.
The application provide a kind of hardware fault verification method, device and client, can by the way of locally or remotely to
Operation system injects the hardware fault Validation Code pre-set.Described checking execution event is triggered, such as in described operation system
When going to failure proof code, by the implementation status of described failure proof code and the result characteristic of output are helped
Whether the ruuning situation of operating personnel's observed traffic system meets expection.So, hardware fault authentication described herein is used
Method replaces the hardware fault test at scene, can be substantially reduced checking cost, improve verification efficiency.Hardware described herein
Failure proof method, device and client can need not change the source code of the operation system being currently running in proof procedure
Information, can automatically remove after injecting hardware fault Validation Code, source code not had invasive.Using JAVA
Implementation in do not interfere with other validation tests simultaneously carried out, can effectively improve holding of operation system validation test
Line efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present application or technical scheme of the prior art, below will be to embodiment or prior art
In description, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only to remember in the application
Some embodiments carried, from the point of view of this neighborhood those of ordinary skill, on the premise of not paying creative work, it is also possible to
Other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of herein described a kind of a kind of embodiment of hardware fault verification method;
Fig. 2 is the method flow diagram of herein described a kind of hardware fault verification method another kind embodiment;
Fig. 3 is the method flow diagram of herein described a kind of hardware fault verification method another kind embodiment;
Fig. 4 is the method flow diagram of herein described a kind of hardware fault verification method another kind embodiment;
Fig. 5 is the modular structure schematic diagram of a kind of embodiment of herein described hardware fault checking device;
Fig. 6 is the modular structure schematic diagram of a kind of embodiment that code recovers module in herein described hardware fault checking device;
Fig. 7 is the modular structure signal of the another kind of embodiment that code recovers module in herein described hardware fault checking device
Figure;
Fig. 8 is the modular structure schematic diagram of herein described a kind of hardware fault checking device another kind embodiment.
Detailed description of the invention
For the technical scheme making the personnel of this technology neighborhood be more fully understood that in the application, below in conjunction with in the embodiment of the present application
Accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only
It is some embodiments of the present application rather than whole embodiments.Based on the embodiment in the application, this neighborhood ordinary skill people
The every other embodiment that member is obtained under not making creative work premise, all should belong to the scope of the application protection.
Below in conjunction with the accompanying drawings figure main body recognition methods described herein is described in detail.Fig. 1 is herein described one
The method flow diagram of a kind of embodiment of hardware fault verification method.Although this application provides as described in following embodiment or flow chart
Method operating procedure, but based on conventional or can include more or less in the process without performing creative labour
Operating procedure.Not existing in necessary causal step in logicality, it is real that the execution sequence of these steps is not limited to the application
The execution sequence provided in example is provided.When the device in practice of described method or end product perform, can be according to embodiment
Or method shown in the drawings order performs or executed in parallel (environment of such as parallel processor or multiple threads).
A kind of hardware fault verification method one embodiment that concrete the application provides is as it is shown in figure 1, described method may include that
S1: obtain the origin authentication code of identifying object.
Identifying object described herein can include needing carrying out the class of hardware fault functional verification, assembly, unit, module,
Device, client, server, operation system etc..Described origin authentication code can include the shape of various Programming Design language
The code information of the identifying object become.The application is not limited to the Programming Design language of concrete a certain described identifying object, as
JAVA, C# etc..Due to extensively application and the good platform-neutral of JAVA, former described in the application preferred embodiment
Beginning Validation Code can be JAVA bytecode.General, described JAVA bytecode (Byte-code) can be a kind of bag
Containing execution program, by the sequence OP code/data binary file to forming
Obtain and need the origin authentication code carrying out the identifying object of hardware fault checking.
S2: inject the hardware fault Validation Code preset in the position of specifying of described origin authentication code.
Concrete can the passing through of the implementation of input hardware failure proof code in described origin authentication code in the application
The instrument function that JVM provides realizes.Described JVM is the contracting of JAVA Virtual Machine (JAVA virtual machine)
Write.JVM is a kind of specification for calculating equipment, is to be come by the various computer function of analogue simulation on actual computer
Realize.Described JVM is core and the basis of JAVA Programming Design language, between JAV compiler and OS platform
Virtual processor.It is a kind of operating system based on lower floor and hardware platform the abstract calculating utilizing software approach to realize
Machine, can perform the bytecode program of JAVA above.
General, it is achieved described herein in origin authentication code, inject Validation Code can include various ways.This Shen
In a kind of embodiment that please provide, the profile information pre-set can be read, can be pre-in described profile information
First store the hardware fault Validation Code of setting and need to inject the positional information of failure code.Therefore, the described one of the application
In the another kind of embodiment of hardware fault verification method, inject, in the position of specifying of described origin authentication code, the hardware fault preset
Validation Code may include that
S201: read the configuration file preset, according to the hardware fault code arranged in described configuration file and code injection position
Information is at hardware fault Validation Code described in described origin authentication code injection.
Realize the injection of failure code by loading the configuration file described in the present embodiment, can complete fast and accurately described firmly
Part failure proof code injection, improves hardware fault verification efficiency.
S3: when triggering the checking execution event arranged in described origin authentication code, perform described hardware fault Validation Code.
Described checking execution event can be the event triggering execution hardware fault checking pre-set.Concrete, such as may be used
To be arranged to carry out triggering checking event when certain row of described origin authentication code instructs, or monitor described origin authentication generation
In Ma, certain parameter value triggers, when meeting trigger condition, the event that checking performs.General described checking execution event can include not
Need to add the monitoring event of new code in origin authentication code, or need to add new code realization checking execution event
Setting.In the present embodiment, checking execution event, concrete example can be inserted in the appointment position of described origin authentication code
Can utilize the dynamic byte code amendment technology during running software that the instrument mechanism of JVM provides realize as described in original
Burying a little of Validation Code checking execution event.Certainly, the particular location of described checking execution time can be verified according to hardware fault
Design requirement needs to arrange in described origin authentication code.
When described origin authentication code runs to specify position or monitor the appointment parameter value of described origin authentication code reach
The value of described checking execution event, or when other behaviors meeting setting trigger described checking execution event, can test described
The hardware fault Validation Code pre-set is injected in the position of specifying of card code.
After injecting described hardware fault Validation Code and triggering checking execution event, described hardware fault Validation Code can be performed,
Implementation status according to described hardware fault Validation Code judges whether the operation of operation system meets expection.Concrete, performing
During described hardware fault Validation Code, if there is performing exception, can interrupt proof procedure, that recovers before checking is former
Beginning Validation Code, can export simultaneously and perform abnormal relevant information.
S4: after described hardware fault Validation Code has performed, recovers the origin authentication code of described identifying object.
After above-mentioned injection hardware fault Validation Code, the origin authentication code of described identifying object has been modified.Described hardware
After failure proof code has performed, the origin authentication code information that described identifying object is original can be recovered.Described in described recovery
What the origin authentication code of identifying object was concrete can include multiple implementation.Fig. 2 is that herein described a kind of hardware fault is tested
The method flow diagram of card method another kind embodiment.As in figure 2 it is shown, in a kind of embodiment of the application offer, described recovery
The origin authentication code of described identifying object may include that
S401: eliminate described execution complete after specify position hardware fault Validation Code.
The failure proof code that the mode of the origin authentication code recovering identifying object described in the present embodiment is inserted by elimination is real
Existing.Origin authentication code is not made an amendment by this kind of common being applicable to of embodiment, is only specifying position to add failure proof
The application scenarios of code.Certainly, if with the addition of the code of checking execution event in described appointment position, recovering described original
Described checking execution event can be deleted in the lump during Validation Code.
And in application scenes, described identifying object may be at the state being currently running.The described hardware event of the application
In the another kind of embodiment of barrier verification mode, before carrying out hardware fault checking, preserve the origin authentication code of described identifying object,
At the origin authentication code needing the described identifying object of described recovery, the origin authentication code of preservation replaced the described hardware of execution
The origin authentication code of failure proof.Therefore, a kind of hardware fault verification method described herein is obtaining described identifying object
Origin authentication code after, it is also possible to including:
S402: store described origin authentication code;
Accordingly, the origin authentication code of described recovery identifying object can include replacing institute with the origin authentication code of described storage
State the origin authentication code after identifying object injects described hardware fault code.
Fig. 3 is the method flow diagram of herein described a kind of hardware fault verification method another kind embodiment.As it is shown on figure 3,
In the present embodiment, the original code of identifying object can be kept before hardware fault is verified.Hardware fault Validation Code has performed
Finish, need to recover can be replaced by the code of the identifying object being previously stored during the code of original identifying object current perform hard
The amended code information of part fault.In actual job is implemented, can be realized by the instrument that design programming language provides.
General, storage and the replacement, such as .class of the whole code of identifying object is taked when storing, replace the code of described identifying object
The replacement of file.
In hardware fault verification method described herein, execution institute can be exported after having performed described hardware fault Validation Code
State the result characteristic of hardware fault code.Described operating personnel can observe according to described result characteristic, judge business
Whether system correctly performs corresponding behavior measure when there is the hardware fault arranged, and can provide number to the checking of operation system
According to support.Fig. 4 is the method flow diagram of herein described a kind of hardware fault verification method another kind embodiment.As shown in Figure 4,
A kind of hardware fault verification method described herein can also include:
S5: output performs the result characteristic of described hardware fault Validation Code.
In concrete implementation mode, instant during the execution performing described hardware fault Validation Code can export result spy
Levy data, it is also possible to after having performed, export described result characteristic for described hardware fault Validation Code.Certainly, the application is not
Get rid of and use above two to realize the mode of described result characteristic output simultaneously.
Checking to hardware fault described in the present embodiment, can be during performing described hardware fault Validation Code, or institute
Stating after hardware fault Validation Code is finished, output performs the result characteristic of described hardware fault Validation Code.Described
What result characteristic was general can be included in performs described hardware fault Validation Code in described origin authentication code and exports
The result related data, it is common that in order to get the information of the behavior produced when program performs.Common described result feature
Data can include hardware fault whether identified, perform during the parameter value that produces and the described hardware fault of execution of setting
Other related datas etc. that Validation Code produces.
The concrete application scenarios of hardware fault verification method described herein is carried out by the application with JAVA Programming Design language below
Further illustrate.In described application scenarios, the described origin authentication code needing to carry out hardware fault checking can be JAVA
Syllabified code.
Described JAVA bytecode (Byte-code) be one comprise execution program, by a sequence OP code/data to forming
Binary file.The application can use dynamic byte code amendment technology, and the instrument mechanism of JVM, it is provided that one
Plant during running software, revise bytecode dynamically, inject intended fault, check that whether software is it is anticipated that run.Specifically
, the Instrumentation of described JVM can be used to realization allows target vm dynamic load agentlib.Described
Instrumentation realizes in the dynamic lib storehouse (being libinstrument.so under linux) of an entitled libinstrument.dylib
Realize based on jvmti interface, therefore can create an agent example it is loaded when, and toward jvmti environment
Registering some callback methods, such as monitor the event that class file loads, vm has initialized event etc..May then pass through and hold
Row Agent_OnAttach, creates an Instrumentation example, and increases transform.Further can perform
The loadClassAndCallAgentmain method of Instrumentation example, the method mainly performs in the MF file of agent
The agentmain method of the Agent-Class class of definition.After vm initialization is complete, can call
LoadClassAndCallPremain method, the Agent-Class class that the method mainly performs to define in the MF file of agent
Pre main method.The transform method of Instrumentation can be called class loads when, thus can be real
Now arrive and replace original bytecode with amended bytecode, it is achieved inject without invasive hardware fault Validation Code.
Accordingly, the mode of the instrument amended bytecode replacement raw bytes code being referred to above-mentioned JVM realizes
The recovery of described origin authentication code, such as .class file replacement etc..
The application, by the implementation of JAVA language, can add oneself by the Instrumentation in parameter fixed
The ClassFileTransformer of justice, changes class file.The most self-defining Transformer can achieve Transform
Method, it is provided that the amendment to the bytecode of the class being actually subjected to execution.
Each embodiment of a kind of hardware fault verification method provided herein, can by dynamic byte code amending method and
The instrument mechanism that the virtual machine of JAVA provides realizes, and injection and described checking including described hardware fault Validation Code are right
The recovery etc. of the origin authentication code of elephant.
Based on hardware fault verification method described herein, the application provides a kind of hardware fault checking device.Fig. 5 is this Shen
Please the modular structure schematic diagram of a kind of embodiment of described hardware fault checking device.As it is shown in figure 5, described device may include that
Verify configuration module 101, may be used for storing the hardware verification failure code including arranging and injecting the event of described hardware verification
The configuration information of barrier code position;
Checking interface module 102, is provided for the calling interface of hardware fault checking, and described interface is for the tune of interface
Send described checking configuration information with side, receive the result characteristic that described called side sends;
Code recovers module 103, may be used for when judging that described called side has performed described hardware fault Validation Code, recovers
The source code of described called side.
In the described hardware fault checking device that the application provides, operating personnel can be with the checking of hardware fault, testing requirement etc.
In described checking configuration module 101, configuration specifically needs the class of hardware fault Validation Code, the hardware fault checking injected in advance
The detailed configurations such as the execution behavior of code, monitoring information, fault type, the position being inserted described hardware fault Validation Code
Information.Certainly, in described configuration information, it is also possible to configure other information according to demand, such as, set described called side and start
Injecting described hardware fault Validation Code trigger message, concrete such as could be arranged in JVM realizes the application device:
" JAVA_OPTS="-Javaagent=/path/to/faultinject.jar $ JAVA_OPTS " "
Extroversion can be needed the called side carrying out hardware fault checking to provide access interface, example by described checking interface module 102
Such as the interface function provided by certain Programming Design language.General, described checking interface module 102 is by the interface provided
Described configuration information can be sent to described called side.
In the another kind of embodiment of the application, described checking interface module 102 may be provided for receiving the interface of data message,
May be used for receiving described called side and perform the result characteristic of described hardware fault Validation Code.
Described called side can get configuration file by the interface that described checking interface module 102 provides, and automatically reads described
Configuration file, obtains the information such as the description about described hardware fault Validation Code, configuration, injection phase.Described about hardware
The described checking interface module 102 of failure proof code can also be described called side according to design requirement or other third parties carry
For corresponding access interface, monitor interface etc..
Described code recovers module 103, when monitoring, called side has run described hardware fault Validation Code, and can be automatic
Recover described called side and insert source code before described hardware fault Validation Code, it is achieved the hardware fault Validation Code of described insertion
Automatically eliminate, reach the validation test without invasive to the checking of described called side hardware fault.
After hardware fault described herein checking device injects hardware fault code, the described original generation recovering described called side
What code was concrete can include numerous embodiments.In a kind of embodiment of a kind of hardware fault described herein checking device,
Described code recovers module 103 and may include that
Code cancellation module 1031, may be used for eliminating the hardware fault Validation Code injected in described called side.
Fig. 6 is the modular structure schematic diagram of a kind of embodiment that code recovers module in herein described hardware fault checking device.
As shown in Figure 6, the present embodiment can be provided for eliminating the code cancellation module 1031 of the hardware fault code injected, it is achieved
Recover the source code of described called side, in order to operating personnel can be normally carried out other follow-up tests.
In the another embodiment of the application, described tune can also be prestored in the source code recovering described called side
With the source code of side, then replace the amended called side code injecting hardware fault code with the source code of storage.Figure
7 is the modular structure schematic diagram of the another kind of embodiment that code recovers module in herein described hardware fault checking device.Such as figure
Shown in 7, concrete described code recovers module 103 and may include that
Code storage block 1032, may be used for obtaining and storing the source code of described called side;
Code replacement module 1033, after may be used for the source code of described storage is replaced described injection hardware fault Validation Code
The source code of called side.
Code described above recovers the elimination hardware fault code described in module and the replacement etc. of called side code, concrete
The instrumention mechanism that such as JAVA can be used in implementation process to provide realizes the amendment of dynamic byte code.Concrete is permissible
JAVA Programming Design language is used to realize retouching of the concrete application scenarios of hardware fault verification method described herein with reference to the application
State, do not repeat at this.
In the application, the hardware fault checking device described in each embodiment can be stored by CPU load and execution
Realize with the mode of the executable program in tangible storage media.Described executable program can be JAVA Programming Design language,
It can also be other the Programming Design language such as such as C#.In preferably a kind of embodiment of the application, described hardware fault
Checking device can use JAVA Programming Design language to realize, and the concrete example of described device can be the code bag of Jar form.
Certainly, concrete in the actual product of described device example can also be the merit of assembly, functional module, processing unit, client
Can apply, or the operation system etc. on server.Device described in the application preferred embodiment can be that JAVA builds Jar
Tool kit, can run in the virtual machine that JAVA provides, including described hardware fault code injection, perform, elimination etc.,
Realize needing the identifying object the carrying out hardware fault checking validation test without invasive, ensure safety the most simultaneously, permissible
Improve the efficiency of hardware fault test, save the cost such as manpower, time.
When above-mentioned employing JAVA Programming Design language realizes herein described device, described device can provide at JAVA
Virtual machine completes hardware fault checking.Fig. 8 is the module of herein described a kind of hardware fault checking device another kind embodiment
Structural representation.As shown in Figure 8, described device may include that
Verify configuration module 201, may be used for storing the hardware verification failure code including arranging and injecting the event of described hardware verification
The configuration information of barrier code position;
Failure code performs module 202, may be used for performing described hardware fault Validation Code according to described configuration information;
Code recovers module 203, may be used for when judging that described called side has performed described hardware fault Validation Code, recovers
The source code of described called side.
Failure code described in the present embodiment performs module 202 and may be used for performing described hardware fault according to described configuration information
Validation Code.Can also perform during described hardware fault code, and/or after having performed described hardware fault code, defeated
Go out the result characteristic performing described hardware fault code.
Certainly, described failure code performs module 202 can perform described hardware fault generation in the virtual machine that JAVA provides
Code.In the hardware fault checking device that herein described employing JAVA realizes, can complete to adjust in the virtual machine of JAVA
Operate with the replacement etc. of side's amendment of bytecode, called side .class file.The application device can be by the instrument of JAVA
Mechanism realizes the automatic test of hardware fault, and can checking operation system perform intended reply and arrange when there is hardware fault
Execute, improve the reliability of operation system.
Hardware fault processing means described above can be arranged in the operation system of server, it is also possible to as special terminal
Device (such as Jar bag) provides the service for checking credentials for needing the operation system carrying out hardware fault checking.Concrete herein described dress
The entity put can use different implementations according to checking demand.
Hardware fault described herein checking device goes in the operation system of multiple client, it is achieved to described client
The checking of behavior is processed during end operation system generation hardware fault.Therefore, the application can provide one to use/call the application institute
State the faulted-phase judgment client of hardware fault checking device, it is achieved checking operation system processes whether the behavior of hardware fault accords with
Close expection.Concrete, a kind of faulted-phase judgment client of the application offer, can be configured to, including:
Failure proof interface can be called, obtain the processing unit of checking configuration information;Can arrange according in described configuration information
Failure proof code and inject described failure proof code positional information inject described failure proof code processing unit;Can
To perform described failure proof code, it is possible to eliminate the failure proof generation of described injection after having performed described failure proof code
The processing unit of code.
Although it should be noted that the application including employing JAVA Programming Design language realize hardware described herein
The embodiment of failure proof method, device and client, but use other Programming Design language or other processor to perform
Program can also realize the application.During realizing, different Programming Design language can provide different function call, number
According to processing, information is mutual, realize class etc., but the application is not limited to certain concrete implementation language, based on the application thought without
Other embodiments needing creative work all should belong to the application category.
Although teachings herein being mentioned JAVA Programming Design language, calling interface, loading and read fileinfo or the like
The description that data process, information is mutual, but, the application is not limited to must be at complete standard or mentioned data
Reason or the situation of information interaction approach.In the application, the foregoing description involved by each embodiment is only that some in the application are implemented
Application in example, on the basis of some standard, method, language, agreement, the most amended processing mode can also be carried out
State the scheme of each embodiment of the application.Certainly, its of the process method step described in the application the various embodiments described above is being met
He, without creative deformation, still can realize identical application, not repeat them here.
Although this application provides the method operating procedure as described in embodiment or flow chart, but based on routine or without creativeness
Means can include more or less operating procedure.The sequence of steps enumerated in embodiment is only numerous step execution sequences
In a kind of mode, do not represent unique execution sequence.When device in practice or client production perform, can be according to reality
Execute example or method shown in the drawings order performs or executed in parallel (environment of such as parallel processor or multiple threads).
Unit that above-described embodiment illustrates or module, specifically can be realized by computer chip or entity, or by having certain merit
The product of energy realizes.For convenience of description, it is divided into various module to be respectively described with function when describing apparatus above.Certainly,
The function of each module can be realized in same or multiple softwares and/or hardware when implementing the application, it is also possible to will realize same
The module of one function is realized by the combination of multiple submodules or subelement, or by other one or more modules or the merit of unit
Realization can be integrated in a module.
This neighborhood technique personnel are also, it is understood that in addition to realizing controller in pure computer readable program code mode, the most permissible
Make controller with gate, switch, special IC, FPGA control by method step carries out programming in logic
The form of device processed and embedding microcontroller etc. realizes identical function.The most this controller is considered a kind of Hardware Subdivision
Part, and its inside is included can also be considered as the structure in hardware component for the device realizing various function.Or even,
In can being considered as the device being used for realizing various function not only can being the software module of implementation method but also can being hardware component
Structure.
The application can be described in the general context of computer executable instructions, such as program module.
Usually, program module include perform particular task or realize the routine of particular abstract data type, program, object, assembly,
Data structure, class etc..The application can also be put into practice in a distributed computing environment, in these distributed computing environment, by
The remote processing devices connected by communication network performs task.In a distributed computing environment, program module can position
In the local and remote computer-readable storage medium including storage device.
As seen through the above description of the embodiments, this neighborhood technical staff it can be understood that to the application can be by soft
Part adds the mode of required general hardware platform and realizes.Based on such understanding, the technical scheme of the application is the most in other words
The part contributing prior art can embody with the form of software product, and this computer software product can be stored in
In storage medium, such as ROM/RAM, magnetic disc, CD etc., use so that a computer equipment is (permissible including some instructions
Be personal computer, mobile terminal, server, or the network equipment etc.) perform each embodiment of the application or embodiment
Method described in some part.
Each embodiment in this specification uses the mode gone forward one by one to describe, and between each embodiment, same or analogous part is mutual
Seeing, what each embodiment stressed is the difference with other embodiments.The application can be used for numerous general or
In special computing system environments or configuration.Such as: personal computer, server computer, handheld device or portable set
Standby, laptop device, multicomputer system, system based on microprocessor, programmable electronic equipment, network PC, small-sized
Computer, mainframe computer, the distributed computing environment including any of the above system or equipment etc..
Although depicting the application by embodiment, this neighborhood those of ordinary skill is known, the application have many deformation and a change and
Without departing from spirit herein, it is desirable to appended claim includes that these deformation and change are without deviating from spirit herein.
Claims (12)
1. a hardware fault verification method, it is characterised in that described method includes:
Obtain the origin authentication code of identifying object;
The hardware fault Validation Code preset is injected in the position of specifying of described origin authentication code;
When triggering the checking execution event arranged in described origin authentication code, perform described hardware fault Validation Code;
After described hardware fault Validation Code has performed, recover the origin authentication code of described identifying object.
2. hardware fault verification method as claimed in claim 1 a kind of, it is characterised in that described at origin authentication code
Specify position to inject the hardware fault Validation Code preset to include:
Reading the configuration file preset, hardware fault code and code injection positional information according to arranging in described configuration file exist
Hardware fault Validation Code described in described origin authentication code injection.
3. a kind of hardware fault verification method as claimed in claim 1, it is characterised in that the described identifying object of described recovery
Origin authentication code include:
Eliminate described execution complete after specify position hardware fault Validation Code.
4. a kind of hardware fault verification method as claimed in claim 1, it is characterised in that obtain the former of described identifying object
After beginning Validation Code, described method also includes:
Store described origin authentication code;
Accordingly, the origin authentication code of described recovery identifying object includes testing described in the origin authentication code replacement of described storage
Card object injects the origin authentication code after described hardware fault code.
5. a kind of hardware fault verification method as claimed in claim 1, it is characterised in that described method also includes:
Output performs the result characteristic of described hardware fault Validation Code.
6. a kind of hardware fault verification method as described in any one in claim 1-5, it is characterised in that described original test
Card code is JAVA bytecode.
7. a hardware fault checking device, it is characterised in that described device includes:
Checking configuration module, includes, for storage, the hardware verification failure code arranged and injects described hardware verification failure code position
The configuration information put;
Checking interface module, for the calling interface providing hardware fault to verify, described interface is for sending to the called side of interface
Described configuration information;
Code recovers module, for when judging that described called side has performed described hardware fault Validation Code, calls described in recovery
The source code of side.
8. a kind of hardware fault checking device as claimed in claim 7, it is characterised in that described code recovers module and includes:
Code cancellation module, for eliminating the hardware fault Validation Code injected in described called side.
9. a kind of hardware fault checking device as claimed in claim 7, it is characterised in that described code recovers module and includes:
Code storage block, for obtaining and store the source code of described called side;
Code replacement module, the called side after the source code of described storage is replaced described injection hardware fault Validation Code
Source code.
10. a kind of hardware fault checking device as claimed in claim 7, it is characterised in that described checking interface module is also
The result characteristic of described hardware fault Validation Code is performed for receiving described called side.
11. 1 kinds of hardware fault checking devices, it is characterised in that described device includes:
Checking configuration module, includes, for storage, the hardware verification failure code arranged and injects described hardware verification failure code position
The configuration information put;
Failure code performs module, for performing described hardware fault Validation Code according to described configuration information;
Code recovers module, for when judging that described called side has performed described hardware fault Validation Code, calls described in recovery
The source code of side.
12. 1 kinds of faulted-phase judgment clients, it is characterised in that described client is configured to, including:
Call failure proof interface, obtain the processing unit of checking configuration information;Fault according to arranging in described configuration information is tested
The positional information of card code and the described failure proof code of injection injects described failure proof code process unit;Perform described fault
Validation Code, and after having performed described failure proof code, eliminate the processing unit of the failure proof code of described injection.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510262737.5A CN106294036A (en) | 2015-05-21 | 2015-05-21 | A kind of hardware fault verification method, device and client |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510262737.5A CN106294036A (en) | 2015-05-21 | 2015-05-21 | A kind of hardware fault verification method, device and client |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106294036A true CN106294036A (en) | 2017-01-04 |
Family
ID=57634001
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510262737.5A Pending CN106294036A (en) | 2015-05-21 | 2015-05-21 | A kind of hardware fault verification method, device and client |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106294036A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446196A (en) * | 2018-02-28 | 2018-08-24 | 郑州云海信息技术有限公司 | The method and device of authentication server system RAS performance |
CN109710539A (en) * | 2019-01-17 | 2019-05-03 | 南京大学 | A kind of Android software enhancing test method based on bytecode operation |
CN110362434A (en) * | 2019-03-22 | 2019-10-22 | 斑马网络技术有限公司 | Object test method and equipment |
CN110728802A (en) * | 2019-10-23 | 2020-01-24 | 深圳市丰巢科技有限公司 | Intelligent cabinet inspection method and device, intelligent cabinet and storage medium |
CN111896865A (en) * | 2020-07-30 | 2020-11-06 | 电子科技大学 | Fault position detection method for signal acquisition system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1094391A1 (en) * | 1999-10-21 | 2001-04-25 | Sun Microsystems, Inc. | Method and apparatus for testing a computer system through software fault injection |
CN101334754A (en) * | 2008-08-05 | 2008-12-31 | 浙江大学 | Fault infusion based embedded system evaluation method |
US7757215B1 (en) * | 2006-04-11 | 2010-07-13 | Oracle America, Inc. | Dynamic fault injection during code-testing using a dynamic tracing framework |
CN103529820A (en) * | 2013-09-26 | 2014-01-22 | 北京航天自动控制研究所 | Fault injection testing system and testing method applied to embedded equipment |
CN104331324A (en) * | 2014-11-04 | 2015-02-04 | 哈尔滨工业大学 | MapReduce fault injection external member |
CN104391784A (en) * | 2014-08-27 | 2015-03-04 | 北京中电华大电子设计有限责任公司 | Method and device for fault injection attack based on simulation |
-
2015
- 2015-05-21 CN CN201510262737.5A patent/CN106294036A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1094391A1 (en) * | 1999-10-21 | 2001-04-25 | Sun Microsystems, Inc. | Method and apparatus for testing a computer system through software fault injection |
US7757215B1 (en) * | 2006-04-11 | 2010-07-13 | Oracle America, Inc. | Dynamic fault injection during code-testing using a dynamic tracing framework |
CN101334754A (en) * | 2008-08-05 | 2008-12-31 | 浙江大学 | Fault infusion based embedded system evaluation method |
CN103529820A (en) * | 2013-09-26 | 2014-01-22 | 北京航天自动控制研究所 | Fault injection testing system and testing method applied to embedded equipment |
CN104391784A (en) * | 2014-08-27 | 2015-03-04 | 北京中电华大电子设计有限责任公司 | Method and device for fault injection attack based on simulation |
CN104331324A (en) * | 2014-11-04 | 2015-02-04 | 哈尔滨工业大学 | MapReduce fault injection external member |
Non-Patent Citations (1)
Title |
---|
刘佳翔 等: "Java程序的静态故障注入工具", 《内蒙古大学学报(自然科学版)》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446196A (en) * | 2018-02-28 | 2018-08-24 | 郑州云海信息技术有限公司 | The method and device of authentication server system RAS performance |
CN109710539A (en) * | 2019-01-17 | 2019-05-03 | 南京大学 | A kind of Android software enhancing test method based on bytecode operation |
CN110362434A (en) * | 2019-03-22 | 2019-10-22 | 斑马网络技术有限公司 | Object test method and equipment |
CN110728802A (en) * | 2019-10-23 | 2020-01-24 | 深圳市丰巢科技有限公司 | Intelligent cabinet inspection method and device, intelligent cabinet and storage medium |
CN111896865A (en) * | 2020-07-30 | 2020-11-06 | 电子科技大学 | Fault position detection method for signal acquisition system |
CN111896865B (en) * | 2020-07-30 | 2021-06-25 | 电子科技大学 | Fault position detection method for signal acquisition system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108600029B (en) | Configuration file updating method and device, terminal equipment and storage medium | |
CN106156186B (en) | Data model management device, server and data processing method | |
CN109634728B (en) | Job scheduling method and device, terminal equipment and readable storage medium | |
US10248541B2 (en) | Extraction of problem diagnostic knowledge from test cases | |
JP7110415B2 (en) | Fault injection method, device, electronic equipment, storage medium, and program | |
CN106294036A (en) | A kind of hardware fault verification method, device and client | |
CN107506663A (en) | Server security based on credible BMC starts method | |
US8627146B2 (en) | Model-based testing of an application program under test | |
CN105793860A (en) | Method for anti-debugging | |
CN110062926B (en) | Device driver telemetry | |
CN111327490A (en) | Byzantine fault-tolerant detection method of block chain and related device | |
CN112527252A (en) | Applet management method and device, applet platform, electronic device and medium | |
CN110543420A (en) | Software testing method, system, terminal and storage medium | |
CN105512562B (en) | Vulnerability mining method and device and electronic equipment | |
CN110673993A (en) | Fault injection method, platform and system | |
CN105701009B (en) | Security application test method in mobile terminal | |
CN106909382B (en) | Method and device for outputting different types of system starting information | |
CN112256532A (en) | Test interface generation method and device, computer equipment and readable storage medium | |
CN110990289B (en) | Method and device for automatically submitting bug, electronic equipment and storage medium | |
CN114579473B (en) | Application testing method, device, equipment and storage medium | |
CN111597093A (en) | Exception handling method, device and equipment | |
CN115757099A (en) | Automatic test method and device for platform firmware protection recovery function | |
CN115934559A (en) | Testing method of intelligent form testing system | |
CN107870777A (en) | A kind of hot patch implementation method and device, terminal | |
CN112003727A (en) | Multi-node server power supply testing method, system, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170104 |