diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2018-01-13 02:56:03 +0900 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-01-12 17:33:38 -0800 |
commit | 4b1a29a7f5425d32640b34b8a755f34e02f64d0f (patch) | |
tree | 1925d4ef5c272c7aedea297359a35eeed505362b /kernel/Makefile | |
parent | 663faf9f7beeaca4ad0176bb96c776eed9dad0c5 (diff) | |
download | linux-stable-4b1a29a7f5425d32640b34b8a755f34e02f64d0f.tar.gz linux-stable-4b1a29a7f5425d32640b34b8a755f34e02f64d0f.tar.bz2 linux-stable-4b1a29a7f5425d32640b34b8a755f34e02f64d0f.zip |
error-injection: Support fault injection framework
Support in-kernel fault-injection framework via debugfs.
This allows you to inject a conditional error to specified
function using debugfs interfaces.
Here is the result of test script described in
Documentation/fault-injection/fault-injection.txt
===========
# ./test_fail_function.sh
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0227404 s, 46.1 MB/s
btrfs-progs v4.4
See http://btrfs.wiki.kernel.org for more information.
Label: (null)
UUID: bfa96010-12e9-4360-aed0-42eec7af5798
Node size: 16384
Sector size: 4096
Filesystem size: 1001.00MiB
Block group profiles:
Data: single 8.00MiB
Metadata: DUP 58.00MiB
System: DUP 12.00MiB
SSD detected: no
Incompat features: extref, skinny-metadata
Number of devices: 1
Devices:
ID SIZE PATH
1 1001.00MiB /dev/loop2
mount: mount /dev/loop2 on /opt/tmpmnt failed: Cannot allocate memory
SUCCESS!
===========
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/Makefile')
-rw-r--r-- | kernel/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 172d151d429c..f85ae5dfa474 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -81,6 +81,7 @@ obj-$(CONFIG_AUDIT_TREE) += audit_tree.o obj-$(CONFIG_GCOV_KERNEL) += gcov/ obj-$(CONFIG_KCOV) += kcov.o obj-$(CONFIG_KPROBES) += kprobes.o +obj-$(CONFIG_FAIL_FUNCTION) += fail_function.o obj-$(CONFIG_KGDB) += debug/ obj-$(CONFIG_DETECT_HUNG_TASK) += hung_task.o obj-$(CONFIG_LOCKUP_DETECTOR) += watchdog.o |