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:

    We will not be imposed upon by this vast application of forces. We believe that most things will have to be accomplished still by the application called Industry. We are rather pleased, after all, to consider the small private, but both constant and accumulated, force which stands behind every spade in the field. This it is that makes the valleys shine, and the deserts really bloom.
    Henry David Thoreau (1817–1862)

    The main object of a revolution is the liberation of man ... not the interpretation and application of some transcendental ideology.
    Jean Genet (1910–1986)

    Dug from the tomb of taste-refining time,
    Each form is exquisite, each block sublime.
    Or good, or bad,—disfigur’d, or deprav’d,—
    All art, is at its resurrection sav’d;
    All crown’d with glory in the critic’s heav’n,
    Each merit magnified, each fault forgiven.
    Martin Archer, Sir Shee (1769–1850)