aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 20341480bb54..c2024d86fb12 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1119,6 +1119,30 @@ config CPU_NOTIFIER_ERROR_INJECT
1119 1119
1120 If unsure, say N. 1120 If unsure, say N.
1121 1121
1122config PM_NOTIFIER_ERROR_INJECT
1123 tristate "PM notifier error injection module"
1124 depends on PM && NOTIFIER_ERROR_INJECTION
1125 default m if PM_DEBUG
1126 help
1127 This option provides the ability to inject artifical errors to
1128 PM notifier chain callbacks. It is controlled through debugfs
1129 interface /sys/kernel/debug/notifier-error-inject/pm
1130
1131 If the notifier call chain should be failed with some events
1132 notified, write the error code to "actions/<notifier event>/error".
1133
1134 Example: Inject PM suspend error (-12 = -ENOMEM)
1135
1136 # cd /sys/kernel/debug/notifier-error-inject/pm/
1137 # echo -12 > actions/PM_SUSPEND_PREPARE/error
1138 # echo mem > /sys/power/state
1139 bash: echo: write error: Cannot allocate memory
1140
1141 To compile this code as a module, choose M here: the module will
1142 be called pm-notifier-error-inject.
1143
1144 If unsure, say N.
1145
1122config FAULT_INJECTION 1146config FAULT_INJECTION
1123 bool "Fault-injection framework" 1147 bool "Fault-injection framework"
1124 depends on DEBUG_KERNEL 1148 depends on DEBUG_KERNEL