diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2010-05-26 17:43:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:48 -0400 |
commit | c9d221f86e43d9fb16260fe18a8cd6767f36c8a5 (patch) | |
tree | 87e56764a538eb0fa94bd05e211e1ad89cf5f043 /lib/Kconfig.debug | |
parent | 55af6bb509d3ef2696faddd4a734bf024794b337 (diff) |
fault-injection: add CPU notifier error injection module
I used this module to test the series of modification to the cpu notifiers
code.
Example1: inject CPU offline error (-1 == -EPERM)
# modprobe cpu-notifier-error-inject cpu_down_prepare_error=-1
# echo 0 > /sys/devices/system/cpu/cpu1/online
bash: echo: write error: Operation not permitted
Example2: inject CPU online error (-2 == -ENOENT)
# modprobe cpu-notifier-error-inject cpu_up_prepare_error=-2
# echo 1 > /sys/devices/system/cpu/cpu1/online
bash: echo: write error: No such file or directory
[akpm@linux-foundation.org: fix Kconfig help text]
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r-- | lib/Kconfig.debug | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 231208948363..e722e9d62221 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -898,6 +898,18 @@ config LKDTM | |||
898 | Documentation on how to use the module can be found in | 898 | Documentation on how to use the module can be found in |
899 | Documentation/fault-injection/provoke-crashes.txt | 899 | Documentation/fault-injection/provoke-crashes.txt |
900 | 900 | ||
901 | config CPU_NOTIFIER_ERROR_INJECT | ||
902 | tristate "CPU notifier error injection module" | ||
903 | depends on HOTPLUG_CPU && DEBUG_KERNEL | ||
904 | help | ||
905 | This option provides a kernel module that can be used to test | ||
906 | the error handling of the cpu notifiers | ||
907 | |||
908 | To compile this code as a module, choose M here: the module will | ||
909 | be called cpu-notifier-error-inject. | ||
910 | |||
911 | If unsure, say N. | ||
912 | |||
901 | config FAULT_INJECTION | 913 | config FAULT_INJECTION |
902 | bool "Fault-injection framework" | 914 | bool "Fault-injection framework" |
903 | depends on DEBUG_KERNEL | 915 | depends on DEBUG_KERNEL |