lkml.org 
[lkml]   [2015]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: add support for netdev notifier error injection
From
2015-11-28 21:45 GMT+09:00 Nikolay Aleksandrov <razor@blackwall.org>:
> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
>
> 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

This patch looks good to me. It would be nice if you add tools like
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh for this feature.


\
 
 \ /
  Last update: 2015-12-01 01:01    [W:0.122 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site