summaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2015-11-28 13:45:28 +0100
committerDavid S. Miller <davem@davemloft.net>2015-12-01 15:31:57 -0500
commit02fff96a79775b7adc34eb599fc6b0476ccda520 (patch)
treeb8b5ccf5a9c21f47ef78f563ff8c6c734567be64 /lib/Makefile
parent27a70af3f4cf633a1b86c0ac7b426e2fe16ad2e5 (diff)
downloadop-kernel-dev-02fff96a79775b7adc34eb599fc6b0476ccda520.zip
op-kernel-dev-02fff96a79775b7adc34eb599fc6b0476ccda520.tar.gz
net: add support for netdev notifier error injection
This module allows to insert errors in some of netdevice's notifier events. All network drivers use these notifiers to signal various events and to check if they are allowed, e.g. PRECHANGEMTU and CHANGEMTU afterwards. Until recently I had to run failure tests by injecting a custom module, but now this infrastructure makes it trivial to test these failure paths. Some of the recent bugs I fixed were found using this module. Here's an example: $ cd /sys/kernel/debug/notifier-error-inject/netdev $ echo -22 > actions/NETDEV_CHANGEMTU/error $ ip link set eth0 mtu 1024 RTNETLINK answers: Invalid argument CC: Akinobu Mita <akinobu.mita@gmail.com> CC: "David S. Miller" <davem@davemloft.net> CC: netdev <netdev@vger.kernel.org> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 7f1de26..180dd4d 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -120,6 +120,7 @@ obj-$(CONFIG_FAULT_INJECTION) += fault-inject.o
obj-$(CONFIG_NOTIFIER_ERROR_INJECTION) += notifier-error-inject.o
obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o
obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o
+obj-$(CONFIG_NETDEV_NOTIFIER_ERROR_INJECT) += netdev-notifier-error-inject.o
obj-$(CONFIG_MEMORY_NOTIFIER_ERROR_INJECT) += memory-notifier-error-inject.o
obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \
of-reconfig-notifier-error-inject.o
OpenPOWER on IntegriCloud