Application of Fault Injection
Fault injection can take many forms. In the testing of operating systems for example, fault injection is often performed by a driver (kernel-mode software) that intercepts system calls (calls into the kernel) and randomly returning a failure for some of the calls. This type of fault injection is useful for testing low level user mode software. For higher level software, various methods inject faults. In managed code, it is common to use instrumentation. Although fault injection can be undertaken by hand a number of fault injection tools exist to automate the process of fault injection.
Depending on the complexity of the API for the level where faults are injected, fault injection tests often must be carefully designed to minimise the number of false positives. Even a well designed fault injection test can sometimes produce situations that are impossible in the normal operation of the software. For example, imagine there are two API functions, Commit
and PrepareForCommit
, such that alone, each of these functions can possibly fail, but if PrepareForCommit
is called and succeeds, a subsequent call to Commit
is guaranteed to succeed. Now consider the following code:
error = PrepareForCommit; if (error == SUCCESS) { error = Commit; assert(error == SUCCESS); }
Often, it will be infeasible for the fault injection implementation to keep track of enough state to make the guarantee that the API functions make. In this example, a fault injection test of the above code might hit the assert, whereas this would never happen in normal operation.
Read more about this topic: Fault Injection
Famous quotes containing the words application of, application and/or fault:
“The human mind is capable of excitement without the application of gross and violent stimulants; and he must have a very faint perception of its beauty and dignity who does not know this.”
—William Wordsworth (17701850)
“If you would be a favourite of your king, address yourself to his weaknesses. An application to his reason will seldom prove very successful.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)
“How utterly futile debauchery seems once it has been accomplished, and what ashes of disgust it leaves in the soul! The pity of it is that the soul outlives the body, or in other words that impression judges sensation and that one thinks about and finds fault with the pleasure one has taken.”
—Edmond De Goncourt (18221896)