Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755359AbbK3Xsx (ORCPT ); Mon, 30 Nov 2015 18:48:53 -0500 Received: from mail-vk0-f52.google.com ([209.85.213.52]:33620 "EHLO mail-vk0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755299AbbK3Xsb (ORCPT ); Mon, 30 Nov 2015 18:48:31 -0500 MIME-Version: 1.0 In-Reply-To: <1448714728-12729-1-git-send-email-razor@blackwall.org> References: <1448714728-12729-1-git-send-email-razor@blackwall.org> Date: Tue, 1 Dec 2015 08:48:30 +0900 Message-ID: Subject: Re: [PATCH] net: add support for netdev notifier error injection From: Akinobu Mita To: Nikolay Aleksandrov Cc: LKML , shm@cumulusnetworks.com, gospo@cumulusnetworks.com, roopa@cumulusnetworks.com, dsa@cumulusnetworks.com, Nikolay Aleksandrov , "David S. Miller" , netdev Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1152 Lines: 23 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. -- 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/