]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
fault-injection: add tool to run command with failslab or fail_page_alloc
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 21 Jul 2012 00:55:19 +0000 (10:55 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:53:32 +0000 (13:53 +1000)
commit7d088deeecb41c82b9cea2788764765b48217233
tree29ce6b6bc7224f0a27b84bb256b53f1b0f1451fc
parent4ed5fe85fe4937d8292c04df992618ae4188f420
fault-injection: add tool to run command with failslab or fail_page_alloc

This adds tools/testing/fault-injection/failcmd.sh to run a command while
injecting slab/page allocation failures via fault injection.

Example:

Run a command "make -C tools/testing/selftests/ run_tests" with
injecting slab allocation failure.

# ./tools/testing/fault-injection/failcmd.sh \
-- make -C tools/testing/selftests/ run_tests

Same as above except to specify 100 times failures at most instead of
one time at most by default.

# ./tools/testing/fault-injection/failcmd.sh --times=100 \
-- make -C tools/testing/selftests/ run_tests

Same as above except to inject page allocation failure instead of slab
allocation failure.

# env FAILCMD_TYPE=fail_page_alloc \
./tools/testing/fault-injection/failcmd.sh --times=100 \
-- make -C tools/testing/selftests/ run_tests

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/fault-injection/failcmd.sh [new file with mode: 0644]