Browse Prior Art Database

A mechanism to simulate O/S and middle-ware errors for shell-script test on Unix(AIX/Linux) environment. Disclosure Number: IPCOM000200526D
Publication Date: 2010-Oct-18
Document File: 6 page(s) / 78K

Publishing Venue

The Prior Art Database


This article describes the mechanism of the error simulation to test error handling logic in shell scripts, especially for IT operation shell scripts. By using the mechanism, it is easy to simulate an error of Middle-wear products or Operation System(AIX/LINUX), and the quality of shell scripts can be improved.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 37% of the total text.

Page 01 of 6

A mechanism to simulate O/S and middle-ware errors for shell-script test on Unix(AIX/Linux) environment.

Background and the current test method (before this invention)

Usually, the operations of IT system on AIX/LINUX operating system (O/S) are performed using the shell scripts program. (e.g. shell script for node power on, or off )

However, it is difficult to test the error handling logic in the shell scripts, and that causes the system trouble. The reasons are as follows;

1. It is difficult to test with the real error of middle-wear product or operation system. Especially, the verification of retry logic (e.g. the test case of the 1st time is error and the 2nd time is successful) is also very difficult to test because it is not able to control the situation. And some the other errors are never happen in usually for test.

2. In general, the shell scripts used for IT operation are influences the system and the entire node, therefore the test period and the environment are limited.

The test case for error handling can not performed several times, because it influences the other nodes,

for example,

- A middle-wear products and O/S can not stop because of application development in process. - There is no test environment in the test machine nodes because of no installation for middle-wear products to redact its cost.

So, it is necessary to be able to simulate an error at the commands for middle-wear and O/S easily, and that mechanism is required to improve the shell scripts quality.

Current solution (before this invention)

Generally, the following methods has been used for the error handling test in a shell script.

1. Some special routines are added into the shell script temporary.
2. If a O/S or the command is very difficult to execute in real environment, some dummy commands are prepared to simulate an error,
3. Only the part that is easy to generate an error is verified, and other difficult parts are not test.

This invention is to propose of a mechanism to verify and test the error handling parts in the shell scripts, especially for IT system operations, by the error simulations.

The key points of this mechanism is as follows;


Page 02 of 6

1. The mechanism to hook a call of the O/S and middle-wear commands using symbolic link.
2. The mechanism to control a execution command by the stub selection module (SSM) with the file( CNT file) to recode the number of calling times and the definition file (RCD file) to specify return codes and stub commands by conditions.
3. The mechanism to simulate an error using SSM with a stub command execution.

The abstract of mechanism

1. At the first, setup the PATH environment value to one directory path to control all O/S and middle-wear commands.
2. Make symbolic link files for all of O/S and middle-wear commands.

The command which do not need to control the return code and output messages are linked directory, and the others are link to the special module (stub selection module : SSM)
3.SSM can can...