# US 2014/0195857 A1 · Framework for a software error inject tool

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0195857 A1
- Document ID: US20140195857A1
- Status: Published application
- Kind: A1
- Application number: 14/142,188
- Filed: 2013-12-27
- Published: 2014-07-10
- Earliest claimed: 2010-05-18
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Cheng-Chung Song
- Web page: https://patentgrep.com/patent/US20140195857A1

## CPC

- G06F 11/3668: Testing of software
- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F 11/3644: {by instrumenting at runtime}
- G06F 11/3696: {Methods or tools to render software testable}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F 8/41: Compilation
- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 11/3636: {by tracing the execution of the program}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided are techniques for receiving an error inject script that describes one or more error inject scenarios that define under which conditions at least one error inject is to be executed and compiling the error inject script to output an error inject data structure. While executing code that includes the error inject, an indication that an event has been triggered is received, conditions defined in the one or more error inject scenarios are evaluated using the error inject data structure, and, for each of the conditions that evaluates to true, one or more actions defined in the error inject script for the condition are performed.

## Claims

### Claim 1

A system, comprising:
a processor; and
storage coupled to the processor, wherein the storage stores a computer program, and wherein the processor is configured to execute the computer program to perform operations, wherein the operations comprise:
receiving an error inject script that includes a declaration that describes one or more events and an error inject scenario that describes conditions and associated one or more error inject actions;
compiling the error inject script to output an error inject data structure; and
using the error inject data structure and the one or more events to determine when to execute at least one error inject by, while executing code that includes the error inject,
receiving an indication that an event from the one or more events has been triggered;
in response to the event from the one or more events being triggered, evaluating the conditions using the error inject data structure; and
for a condition from the conditions that evaluates to true, performing the associated one or more error inject actions defined in the error inject script for the condition.

### Claim 2 (depends on 1)

The system of claim 1, wherein the event comprises a code path event and wherein the operations further comprise:
reaching an event macro while executing code, wherein the event macro is a statement in the code that generates the code path event.

### Claim 3 (depends on 1)

The system of claim 1, wherein the event comprises a time event.

### Claim 4 (depends on 1)

The system of claim 1, wherein the declaration defines programming elements that include the one or more events, a counter, a state, a constant, and a timer.

### Claim 5 (depends on 1)

The system of claim 1, wherein the at least one error inject comprises at least one common error inject and at least one non-common error inject.

### Claim 6 (depends on 1)

The system of claim 1, wherein, when the error inject data structure is loaded into a storage controller, the storage controller activates the one or more events.

### Claim 7

A computer program product comprising a computer readable storage medium including a computer readable program, wherein the computer readable program when executed by a processor on a computer causes the computer to:
receive an error inject script that includes a declaration that describes one or more events and an error inject scenario that describes conditions and associated one or more error inject actions;
compile the error inject script to output an error inject data structure; and
using the error inject data structure and the one or more events to determine when to execute at least one error inject by, while executing code that includes the error inject,
receive an indication that an event from the one or more events has been triggered;
in response to the event from the one or more events being triggered, evaluate the conditions using the error inject data structure; and
for a condition from the conditions that evaluates to true, perform the associated one or more error inject actions defined in the error inject script for the condition.

### Claim 8 (depends on 7)

The computer program product of claim 7, wherein the event comprises a code path event and wherein the computer readable program when executed by the processor on the computer causes the computer to:
reach an event macro while executing code, wherein the event macro is a statement in the code that generates the code path event.

### Claim 9 (depends on 7)

The computer program product of claim 7, wherein the event comprises a time event.

### Claim 10 (depends on 7)

The computer program product of claim 7, wherein the declaration defines programming elements that include the one or more events, a counter, a state, a constant, and a timer.

### Claim 11 (depends on 7)

The computer program product of claim 7, wherein the at least one error inject comprises at least one common error inject and at least one non-common error inject.

### Claim 12 (depends on 7)

The computer program product of claim 7, wherein, when the error inject data structure is loaded into a storage controller, the storage controller activates the one or more events.
