This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 7/11/08, Anup C Shan <anupcshan@gmail.com> wrote:
> Hi.
>
> We have designed a tapset for fault injection. It is meant to ease the
> process of injecting faults into the kernel. As use cases, we have
> ported in-kernel fault injection for slab and page_alloc using this
> framework. Refer Documentation/fault-injection/
>
> We have also modified the existing SCSI fault-injection systemtap script
> (http://sourceforge.net/projects/scsifaultinjtst/) to use this framework.
>
> Please find the tapset file and readme attached. The usecase scripts
> are in the follow-up mails.
>
> Comments and suggestions are welcome.
>
> Please suggest a right location to place these tapset scripts in
> SystemTap source tree.
>
> Thanks,
> Kushal & Anup
>
Attached is the patch for SCSI Fault Injection SystemTap scripts found at
http://sourceforge.net/projects/scsifaultinjtst/
A few changes have been made like
1. A new tapset called faultinject.stp have been developed for
generic fault injection
framework which can be used to inject fault in a
simplified manner. It enables the user
to inject faults by choosing number of times to inject,
probability of failure,
which process to fail etc.
2. A tapset for SCSI called scsi_tapset.stp have been developed over the above
mentioned tapset. It makes giving the command line arguments
easier in any order
of the form 'parameter=value'.
3. There is a set of default parameters in faultinject.stp which are
fij_failtimes,
fij_totaltime, fij_space, fij_probability, fij_pids to fail,
fij_verbosity, fij_taskfilter, fij_interval,
fij_debug. All these parameters are optional. They will be loaded
with their default
values if not specified. But the parameters for the scsi fault
injection are mandatory.
They are dev_major, dev_minor_min, dev_minor_max, inode_lba_flag,
inode_lba_val.
The function fij_scsi_add_option() adds all these mandatory
parameters to the
parameters' list by calling the function
fij_add_necessary_option(option_name,
help_string) defined in faultinject.stp. They have to be provided
in the form as
mentioned in the above point. Not specifying any of these will
result in an error.
4. fij_scsi_assign_params() in scsi_tapset.stp assigns all the scsi
command line
arguments' values to the global variables dev_major, dev_minor_min,
dev_minor_max, inode_lba_flag, inode_lba_val.
5. So in all the 8 scsi scripts the assignments statements have been
replaced with
fij_scsi_add_option() and fij_scsi_assign_params(), giving the
user the flexibility of
providing the command line arguments in any order.
6. The field request_bufflen in struct scsi_cmnd is not found in the
current kernel versions
so all references to it have been deleted.
7. A global variable fij_flag has been introduced in
scsi_timeout_injection.stp in all the 4
tapsets to control the execution of the probe handlers depending on
when the fault
injection took place.
8. The typecasting of THIS->__retvalue has been changed from unsigned
int to long in
functions save_start_site() and save_entry_next() to avoid
dependencies on architecture
in scsi_timeout_injection.stp
9. There is a shell script scsi_exe which is completely interactive
and asks the user script
name and taspset for execution along with scsi command
line arguments and gives a menu for optional parameters.
10. However scripts can be executed without this also like
#stap -v -g disk_rerr.stp -I fault_injection_common_scsi -I
tapset dev_major=8 dev_minor_min=0 dev_minor_max=49 inode_lba_flag=1
inode_lba_val=0 failtimes=10 probability=100 verbosity=2
11. A documentation README.new has been given.
Thanks,
Kushal & Anup
Attachment:
scsi_fault_injection_test_tool-1.0.1-using-faultinject-framework.patch
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |