Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755414AbbK3XuA (ORCPT ); Mon, 30 Nov 2015 18:50:00 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:33040 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbbK3Xt6 (ORCPT ); Mon, 30 Nov 2015 18:49:58 -0500 Subject: Re: [PATCH] net: add support for netdev notifier error injection To: Akinobu Mita , Nikolay Aleksandrov References: <1448714728-12729-1-git-send-email-razor@blackwall.org> Cc: LKML , shm@cumulusnetworks.com, gospo@cumulusnetworks.com, roopa@cumulusnetworks.com, dsa@cumulusnetworks.com, "David S. Miller" , netdev From: Nikolay Aleksandrov Message-ID: <565CE0A3.2010403@cumulusnetworks.com> Date: Tue, 1 Dec 2015 00:49:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1349 Lines: 32 On 12/01/2015 12:48 AM, Akinobu Mita wrote: > 2015-11-28 21:45 GMT+09:00 Nikolay Aleksandrov : >> From: Nikolay Aleksandrov >> >> 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. > Thanks for reviewing and noted. I'll take a look and make some tests. Do you mind if I post it as a follow-up ? Cheers, Nik -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/