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 v2 02/05] Add Script which would actually do the job of injecting faults
Date: Mon, 17 Aug 2009 17:39:22 +0530 [thread overview]
Message-ID: <20090817120920.8902.89815.sendpatchset@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <20090817120835.8902.4597.sendpatchset@subratamodak.linux.ibm.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3459 bytes --]
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.
Incorporated Mike�� & Garrets comments and concerns.
Signed-off-by: Subrata Modak<subrata@linux.vnet.ibm.com>
---
--- 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-17 12:17:31.000000000 +0530
@@ -0,0 +1,53 @@
+#!/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. ##
+# Aug 17 2009 - Changed the debugfs mount point - 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 fail_io_timeout fail_make_request fail_page_alloc failslab
+do
+ echo $1 > /sys/kernel/debug/$FAILTYPE/probability
+ echo 100 > /sys/kernel/debug/$FAILTYPE/interval
+ echo -1 > /sys/kernel/debug/$FAILTYPE/times
+ echo 0 > /sys/kernel/debug/$FAILTYPE/space
+done
+
---
Regards--
Subrata
[-- Attachment #2: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
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
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
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-17 12:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 12:08 [LTP] [PATCH v2 00/05] Integration of "Fault Injection Framework" into LTP Subrata Modak
2009-08-17 12:08 ` [LTP] [PATCH v2 01/05] Provide all necessary information through ltp/README Subrata Modak
2009-08-17 12:09 ` Subrata Modak [this message]
2009-08-17 17:11 ` [LTP] [PATCH v2 02/05] Add Script which would actually do the job of injecting faults Garrett Cooper
2009-08-17 17:44 ` Subrata Modak
2009-08-17 12:09 ` [LTP] [PATCH v2 03/05] Add Script so the kernel is restored back to its original pristine form Subrata Modak
2009-08-17 12:10 ` [LTP] [PATCH v2 04/05] Add Script which will be at the heart of this infrastructure Subrata Modak
2009-08-17 12:10 ` [LTP] [PATCH v2 05/05] Add the necessary Interface and Option through "runltp" Subrata Modak
2009-08-17 12:10 ` [LTP] [RESULTS v2] Results of test run for "Fault Injection Framework" Subrata Modak
2009-08-22 13:01 ` [LTP] [PATCH v2 00/05] Integration of "Fault Injection Framework" into LTP 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=20090817120920.8902.89815.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