Re: [PATCH] net: add support for netdev notifier error injection

From
David Miller <davem@davemloft.net>
Date
2015-12-01 20:32:47
Also in
lkml
Reply to
Nikolay Aleksandrov, 2015-11-28
From: Nikolay Aleksandrov <razor@blackwall.org>
Date: Sat, 28 Nov 2015 13:45:28 +0100
From: Nikolay Aleksandrov <redacted>

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 <redacted>
Signed-off-by: Nikolay Aleksandrov <redacted>
This looks fine, applied to net-next, thanks!
Thread (4 messages) 4 messages, 4 authors, last reply 2015-12-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help