From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: LTP Mailing List <ltp-list@lists.sourceforge.net>
Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>,
Mike Frysinger <vapier@gentoo.org>,
Michael Reed <mreed10@us.ibm.com>, Nate Straz <nate@refried.org>,
Paul Larson <paul.larson@ubuntu.com>,
Manoj Iyer <manoj.iyer@ubuntu.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: [LTP] [PATCH 02/05] Add Script which would actually do the job of injecting faults
Date: Tue, 11 Aug 2009 23:00:21 +0530 [thread overview]
Message-ID: <20090811173021.7074.87879.sendpatchset@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <20090811172957.7074.62874.sendpatchset@subratamodak.linux.ibm.com>
Script which would actually do the job of injecting faults by changing various
parametrs available under /debug/fail*. This would be done dynamically during
LTP run, and, is capable of taking parameters from 0 to 100 to vary the
probability of Fault the user wants to inject in the running kernel.
Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
---
diff -uprN ltp-full-20090731.orig/tools/insert_kernel_faults.sh ltp-full-20090731/tools/insert_kernel_faults.sh
--- ltp-full-20090731.orig/tools/insert_kernel_faults.sh 1970-01-01 05:30:00.000000000 +0530
+++ ltp-full-20090731/tools/insert_kernel_faults.sh 2009-08-11 18:44:45.000000000 +0530
@@ -0,0 +1,52 @@
+#!/bin/sh
+################################################################################
+## ##
+## Copyright (c) International Business Machines Corp., 2009 ##
+## ##
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## This program is distributed in the hope that it will be useful, but ##
+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
+## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
+## for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+## ##
+################################################################################
+# ##
+# File : insert_kernel_faults.sh ##
+# ##
+# Usage: insert_kernel_faults.sh <fault_percentage> ##
+# ##
+# Description: This is a simple script that inserts faults at various ##
+# subsystems of the kernel. Please refer to the ltp/README ##
+# for the various kernel CONFIG options needed to exploit ##
+# all those features ##
+# ##
+# Author: Subrata Modak <subrata@linux.vnet.ibm.com> ##
+# ##
+# History: Aug 11 2009 - Created - Subrata Modak. ##
+################################################################################
+
+if [ -z $1 ]
+ then
+ #Check if Useage has been proper
+ echo "Usage: $0 <fault_percentage>"
+ exit 1
+fi
+
+#These are the types of Subsystems where fault will be injected
+#Make sure debugfs has been mounted
+for FAILTYPE in `echo fail_io_timeout fail_make_request fail_page_alloc failslab`
+do
+ echo $1 > /debug/$FAILTYPE/probability
+ echo 100 > /debug/$FAILTYPE/interval
+ echo -1 > /debug/$FAILTYPE/times
+ echo 0 > /debug/$FAILTYPE/space
+done
+
---
Regards--
Subrata
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-08-11 17:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 17:29 [LTP] [PATCH 00/05] Integration of "Fault Injection Framework" into LTP Subrata Modak
2009-08-11 17:30 ` [LTP] [PATCH 01/05] Provide all necessary information through ltp/README Subrata Modak
2009-08-11 17:30 ` Subrata Modak [this message]
2009-08-12 8:45 ` [LTP] [PATCH 02/05] Add Script which would actually do the job of injecting faults Garrett Cooper
2009-08-12 11:20 ` Subrata Modak
2009-08-11 17:30 ` [LTP] [PATCH 03/05] Add Script so the kernel is restored back to its original pristine form Subrata Modak
2009-08-11 17:30 ` [LTP] [PATCH 04/05] Add Script which will be at the heart of this infrastructure Subrata Modak
2009-08-12 8:42 ` Garrett Cooper
2009-08-12 11:21 ` Subrata Modak
2009-08-13 7:11 ` Mike Frysinger
2009-08-11 17:31 ` [LTP] [PATCH 05/05] Add the necessary Interface and Option through "runltp" Subrata Modak
2009-08-11 18:02 ` Paul Larson
[not found] ` <4A81B1A0.5050708@ubuntu.com>
2009-08-12 11:21 ` Subrata Modak
2009-08-13 7:13 ` Mike Frysinger
2009-08-11 17:31 ` [LTP] [RESULTS] Results of test run for "Fault Injection Framework" Subrata Modak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090811173021.7074.87879.sendpatchset@subratamodak.linux.ibm.com \
--to=subrata@linux.vnet.ibm.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=manoj.iyer@ubuntu.com \
--cc=mreed10@us.ibm.com \
--cc=nate@refried.org \
--cc=paul.larson@ubuntu.com \
--cc=sachinp@linux.vnet.ibm.com \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox