Fault Injection - Application of Fault Injection

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:

    “I think that a young state, like a young virgin, should modestly stay at home, and wait the application of suitors for an alliance with her; and not run about offering her amity to all the world; and hazarding their refusal.... Our virgin is a jolly one; and tho at present not very rich, will in time be a great fortune, and where she has a favorable predisposition, it seems to me well worth cultivating.”
    —Benjamin Franklin (1706–1790)

    “May my application so close
    To so endless a repetition
    Not make me tired and morose
    And resentful of man’s condition.”
    —Robert Frost (1874–1963)

    “This is a fault common to all singers, that among their friends they will never sing when they are asked; unasked, they will never desist.”
    —Horace [Quintus Horatius Flaccus] (65–8 B.C.)