From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755729Ab2F0Lmz (ORCPT ); Wed, 27 Jun 2012 07:42:55 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:35044 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753514Ab2F0Lmx convert rfc822-to-8bit (ORCPT ); Wed, 27 Jun 2012 07:42:53 -0400 MIME-Version: 1.0 In-Reply-To: <20120626163147.93181e21.akpm@linux-foundation.org> References: <1340463502-15341-1-git-send-email-akinobu.mita@gmail.com> <1340463502-15341-7-git-send-email-akinobu.mita@gmail.com> <20120626163147.93181e21.akpm@linux-foundation.org> Date: Wed, 27 Jun 2012 20:42:51 +0900 Message-ID: Subject: Re: [PATCH -v4 6/6] fault-injection: add notifier error injection testing scripts From: Akinobu Mita To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Pavel Machek , "Rafael J. Wysocki" , linux-pm@lists.linux-foundation.org, Greg KH , linux-mm@kvack.org, Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, =?ISO-8859-1?Q?Am=E9rico_Wang?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2012/6/27 Andrew Morton : > On Sat, 23 Jun 2012 23:58:22 +0900 > Akinobu Mita wrote: > >> This adds two testing scripts with notifier error injection > > Can we move these into tools/testing/selftests/, so that a "make > run_tests" runs these tests? > > Also, I don't think it's appropriate that "fault-injection" be in the > path - that's an implementation detail.  What we're testing here is > memory hotplug, pm, cpu hotplug, etc.  So each test would go into, say, > tools/testing/selftests/cpu-hotplug. > > Now, your cpu-hotplug test only tests a tiny part of the cpu-hotplug > code.  But it is a start, and creates the place where additional tests > will be placed in the future. > > > If the kernel configuration means that the tests cannot be run, the > attempt should succeed so that other tests are not disrupted.  I guess > that printing a warning in this case is useful. > > Probably the selftests will require root permissions - we haven't > really thought about that much.  If these tests require root (I assume > they do?) then a sensible approach would be to check for that and to > emit a warning and return "success". Thanks for your advice. I'm going to make the following changes on these scripts 1. Change these paths to: tools/testing/selftests/{cpu,memory}-hotplug/on-off-test.sh 2. Skip tests and exit(0) with a warning if no root or no sysfs so that a "make run_tests" doesn't stop. 3. Add tests that simply online and offline cpus (or memory blocks) and then tests with this notifier error injection features if the kernel supports. > My overall take on the fault-injection code is that there has been a > disappointing amount of uptake: I don't see many developers using them > for whitebox testing their stuff.  I guess this patchset addresses > that, in a way. I hope so. the impact of notifier error injection is restricted to the particular kernel functionarity and these scripts are easy to run. On the other hand, fault injection like failslab has a huge impact on any kernel components and it often results catastrophe to userspace even if no kernel bug. I am confident that I can find a certain amount of kernel bugs with failslab but it requires enough spare time. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akinobu Mita Subject: Re: [PATCH -v4 6/6] fault-injection: add notifier error injection testing scripts Date: Wed, 27 Jun 2012 20:42:51 +0900 Message-ID: References: <1340463502-15341-1-git-send-email-akinobu.mita@gmail.com> <1340463502-15341-7-git-send-email-akinobu.mita@gmail.com> <20120626163147.93181e21.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20120626163147.93181e21.akpm@linux-foundation.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Andrew Morton Cc: Greg KH , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Mackerras , =?ISO-8859-1?Q?Am=E9rico_Wang?= , linux-pm@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org List-Id: linux-pm@vger.kernel.org 2012/6/27 Andrew Morton : > On Sat, 23 Jun 2012 23:58:22 +0900 > Akinobu Mita wrote: > >> This adds two testing scripts with notifier error injection > > Can we move these into tools/testing/selftests/, so that a "make > run_tests" runs these tests? > > Also, I don't think it's appropriate that "fault-injection" be in the > path - that's an implementation detail. =A0What we're testing here is > memory hotplug, pm, cpu hotplug, etc. =A0So each test would go into, say, > tools/testing/selftests/cpu-hotplug. > > Now, your cpu-hotplug test only tests a tiny part of the cpu-hotplug > code. =A0But it is a start, and creates the place where additional tests > will be placed in the future. > > > If the kernel configuration means that the tests cannot be run, the > attempt should succeed so that other tests are not disrupted. =A0I guess > that printing a warning in this case is useful. > > Probably the selftests will require root permissions - we haven't > really thought about that much. =A0If these tests require root (I assume > they do?) then a sensible approach would be to check for that and to > emit a warning and return "success". Thanks for your advice. I'm going to make the following changes on these scripts 1. Change these paths to: tools/testing/selftests/{cpu,memory}-hotplug/on-off-test.sh 2. Skip tests and exit(0) with a warning if no root or no sysfs so that a "make run_tests" doesn't stop. 3. Add tests that simply online and offline cpus (or memory blocks) and then tests with this notifier error injection features if the kernel supports. > My overall take on the fault-injection code is that there has been a > disappointing amount of uptake: I don't see many developers using them > for whitebox testing their stuff. =A0I guess this patchset addresses > that, in a way. I hope so. the impact of notifier error injection is restricted to the particular kernel functionarity and these scripts are easy to run. On the other hand, fault injection like failslab has a huge impact on any kernel components and it often results catastrophe to userspace even if no kernel bug. I am confident that I can find a certain amount of kernel bugs with failslab but it requires enough spare time. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx160.postini.com [74.125.245.160]) by kanga.kvack.org (Postfix) with SMTP id 090BD6B005A for ; Wed, 27 Jun 2012 07:42:52 -0400 (EDT) Received: by ggm4 with SMTP id 4so959186ggm.14 for ; Wed, 27 Jun 2012 04:42:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20120626163147.93181e21.akpm@linux-foundation.org> References: <1340463502-15341-1-git-send-email-akinobu.mita@gmail.com> <1340463502-15341-7-git-send-email-akinobu.mita@gmail.com> <20120626163147.93181e21.akpm@linux-foundation.org> Date: Wed, 27 Jun 2012 20:42:51 +0900 Message-ID: Subject: Re: [PATCH -v4 6/6] fault-injection: add notifier error injection testing scripts From: Akinobu Mita Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Pavel Machek , "Rafael J. Wysocki" , linux-pm@lists.linux-foundation.org, Greg KH , linux-mm@kvack.org, Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, =?ISO-8859-1?Q?Am=E9rico_Wang?= 2012/6/27 Andrew Morton : > On Sat, 23 Jun 2012 23:58:22 +0900 > Akinobu Mita wrote: > >> This adds two testing scripts with notifier error injection > > Can we move these into tools/testing/selftests/, so that a "make > run_tests" runs these tests? > > Also, I don't think it's appropriate that "fault-injection" be in the > path - that's an implementation detail. =A0What we're testing here is > memory hotplug, pm, cpu hotplug, etc. =A0So each test would go into, say, > tools/testing/selftests/cpu-hotplug. > > Now, your cpu-hotplug test only tests a tiny part of the cpu-hotplug > code. =A0But it is a start, and creates the place where additional tests > will be placed in the future. > > > If the kernel configuration means that the tests cannot be run, the > attempt should succeed so that other tests are not disrupted. =A0I guess > that printing a warning in this case is useful. > > Probably the selftests will require root permissions - we haven't > really thought about that much. =A0If these tests require root (I assume > they do?) then a sensible approach would be to check for that and to > emit a warning and return "success". Thanks for your advice. I'm going to make the following changes on these scripts 1. Change these paths to: tools/testing/selftests/{cpu,memory}-hotplug/on-off-test.sh 2. Skip tests and exit(0) with a warning if no root or no sysfs so that a "make run_tests" doesn't stop. 3. Add tests that simply online and offline cpus (or memory blocks) and then tests with this notifier error injection features if the kernel supports. > My overall take on the fault-injection code is that there has been a > disappointing amount of uptake: I don't see many developers using them > for whitebox testing their stuff. =A0I guess this patchset addresses > that, in a way. I hope so. the impact of notifier error injection is restricted to the particular kernel functionarity and these scripts are easy to run. On the other hand, fault injection like failslab has a huge impact on any kernel components and it often results catastrophe to userspace even if no kernel bug. I am confident that I can find a certain amount of kernel bugs with failslab but it requires enough spare time. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yx0-f179.google.com (mail-yx0-f179.google.com [209.85.213.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 38CB41007E1 for ; Wed, 27 Jun 2012 21:42:54 +1000 (EST) Received: by yenr13 with SMTP id r13so751327yen.38 for ; Wed, 27 Jun 2012 04:42:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20120626163147.93181e21.akpm@linux-foundation.org> References: <1340463502-15341-1-git-send-email-akinobu.mita@gmail.com> <1340463502-15341-7-git-send-email-akinobu.mita@gmail.com> <20120626163147.93181e21.akpm@linux-foundation.org> Date: Wed, 27 Jun 2012 20:42:51 +0900 Message-ID: Subject: Re: [PATCH -v4 6/6] fault-injection: add notifier error injection testing scripts From: Akinobu Mita To: Andrew Morton Content-Type: text/plain; charset=ISO-8859-1 Cc: Greg KH , linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , linux-mm@kvack.org, Paul Mackerras , Pavel Machek , =?ISO-8859-1?Q?Am=E9rico_Wang?= , linux-pm@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 2012/6/27 Andrew Morton : > On Sat, 23 Jun 2012 23:58:22 +0900 > Akinobu Mita wrote: > >> This adds two testing scripts with notifier error injection > > Can we move these into tools/testing/selftests/, so that a "make > run_tests" runs these tests? > > Also, I don't think it's appropriate that "fault-injection" be in the > path - that's an implementation detail. =A0What we're testing here is > memory hotplug, pm, cpu hotplug, etc. =A0So each test would go into, say, > tools/testing/selftests/cpu-hotplug. > > Now, your cpu-hotplug test only tests a tiny part of the cpu-hotplug > code. =A0But it is a start, and creates the place where additional tests > will be placed in the future. > > > If the kernel configuration means that the tests cannot be run, the > attempt should succeed so that other tests are not disrupted. =A0I guess > that printing a warning in this case is useful. > > Probably the selftests will require root permissions - we haven't > really thought about that much. =A0If these tests require root (I assume > they do?) then a sensible approach would be to check for that and to > emit a warning and return "success". Thanks for your advice. I'm going to make the following changes on these scripts 1. Change these paths to: tools/testing/selftests/{cpu,memory}-hotplug/on-off-test.sh 2. Skip tests and exit(0) with a warning if no root or no sysfs so that a "make run_tests" doesn't stop. 3. Add tests that simply online and offline cpus (or memory blocks) and then tests with this notifier error injection features if the kernel supports. > My overall take on the fault-injection code is that there has been a > disappointing amount of uptake: I don't see many developers using them > for whitebox testing their stuff. =A0I guess this patchset addresses > that, in a way. I hope so. the impact of notifier error injection is restricted to the particular kernel functionarity and these scripts are easy to run. On the other hand, fault injection like failslab has a huge impact on any kernel components and it often results catastrophe to userspace even if no kernel bug. I am confident that I can find a certain amount of kernel bugs with failslab but it requires enough spare time.