From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Subject: [PATCH v3 0/6] notifier error injection
Date: Sat, 23 Jul 2011 17:50:54 +0900 [thread overview]
Message-ID: <1311411060-30124-1-git-send-email-akinobu.mita@gmail.com> (raw)
This provides kernel modules that can be used to test the error handling
of notifier call chain failures by injecting artifical errors to the
following notifier chain callbacks.
* CPU notifier
* PM notifier
* memory hotplug notifier
* powerpc pSeries reconfig notifier
These modules create their own directory on debugfs and each of the files
in the directory represents an event which can be failed and contains the
error code. If the notifier call chain should be failed with some events
notified, write the error code to the files.
Example: Inject CPU offline error (-1 == -EPERM)
# cd /sys/kernel/debug/cpu-notifier-error-inject
# echo -1 > CPU_UP_PREPARE
# echo 0 > /sys/devices/system/cpu/cpu1/online
bash: echo: write error: Operation not permitted
Changelog:
* v3
- rewrite to be kernel modules instead of initializing at late_initcall()s
(it makes the diffstat look different but most code remains unchanged)
- export err_inject_notifier_block_{init,cleanup} for modules
- export pSeries_reconfig_notifier_{,un}register symbols for a module
- notifier priority can be specified as a module parameter
- add testing scripts in tools/testing/fault-injection
* v2
- "PM: Improve error code of pm_notifier_call_chain()" is now in -next
- "debugfs: add debugfs_create_int" is dropped
- put a comment in err_inject_notifier_block_init()
- only allow valid errno to be injected (-MAX_ERRNO <= errno <= 0)
- improve Kconfig help text
- make CONFIG_PM_NOTIFIER_ERROR_INJECTION visible even if PM_DEBUG is disabled
- make CONFIG_PM_NOTIFIER_ERROR_INJECTION default if PM_DEBUG is enabled
Akinobu Mita (6):
fault-injection: notifier error injection
cpu: rewrite cpu-notifier-error-inject module
PM: PM notifier error injection module
memory: memory notifier error injection module
powerpc: pSeries reconfig notifier error injection module
fault-injection: add notifier error injection testing scripts
arch/powerpc/platforms/pseries/reconfig.c | 2 +
include/linux/notifier.h | 25 ++++
kernel/notifier.c | 83 +++++++++++
lib/Kconfig.debug | 84 +++++++++++-
lib/Makefile | 4 +
lib/cpu-notifier-error-inject.c | 56 +++-----
lib/memory-notifier-error-inject.c | 45 ++++++
lib/pSeries-reconfig-notifier-error-inject.c | 48 +++++++
lib/pm-notifier-error-inject.c | 46 ++++++
tools/testing/fault-injection/cpu-notifier.sh | 162 +++++++++++++++++++++
tools/testing/fault-injection/memory-notifier.sh | 163 ++++++++++++++++++++++
11 files changed, 680 insertions(+), 38 deletions(-)
create mode 100644 lib/memory-notifier-error-inject.c
create mode 100644 lib/pSeries-reconfig-notifier-error-inject.c
create mode 100644 lib/pm-notifier-error-inject.c
create mode 100755 tools/testing/fault-injection/cpu-notifier.sh
create mode 100755 tools/testing/fault-injection/memory-notifier.sh
--
1.7.4.4
next reply other threads:[~2011-07-23 8:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-23 8:50 Akinobu Mita [this message]
2011-07-23 8:50 ` [PATCH v3 1/6] fault-injection: " Akinobu Mita
2011-07-23 8:50 ` [PATCH v3 2/6] cpu: rewrite cpu-notifier-error-inject module Akinobu Mita
2011-07-23 8:50 ` [PATCH v3 3/6] PM: PM notifier error injection module Akinobu Mita
2011-07-23 8:50 ` [PATCH v3 4/6] memory: memory " Akinobu Mita
2011-07-23 8:50 ` [PATCH v3 5/6] powerpc: pSeries reconfig " Akinobu Mita
2011-07-23 8:51 ` [PATCH v3 6/6] fault-injection: add notifier error injection testing scripts Akinobu Mita
2011-07-31 17:39 ` [PATCH v3 0/6] notifier error injection Pavel Machek
2011-08-02 7:35 ` Akinobu Mita
2011-08-02 9:23 ` Akinobu Mita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311411060-30124-1-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®