[Fault-injection-developer] FITH utility usage model draft
Status: Alpha
Brought to you by:
rustyl
|
From: Gao, K. <kev...@in...> - 2003-01-15 02:14:05
|
FITH Utility Usage Model draft:
1. I think useing old fsml (xml file format) file for user to build a
trigger (IRQ trigger used
different model, ".xml", it is xml file format yet.) is still a =
good
choise. User only needs one=20
template (using our test cases), and then changing some parameters =
is
enough.
=20
The draft fsml:
<?xml encoding=3D"UTF-8" ?>
<fsml:fsml xmlns:fsml=3D"http://fault-injection.sourceforge.net/FSML">
<fsml:trigger
id=3D"string" <!-- Required, but
not used in current release -->
name=3D"string" <!-- trigger name,
it should be exclusive -->
interceptor=3D"string" <!-- Required,
intercptor name, e.g. pf, dbp... -->
type=3D"[m|seq_io|pci_config]|{r|w}" <!-- Required, 'm'
means capture MMIO while=20
=09
default is IO. 'seq_io' means capture specific =20
IO sequence.
'pci_config' means capture PCI =20
configuration
access. You could select one or =20
none from the
previous three types. 'r' and=20
'w' stand for
capturing read or write access.=20
=09
You must select at least one of them. -->
len=3D"1|2|4" <!-- Required,
corrupted address length -->
addr=3D"0xXXXXXXXX"
<!-- The following two attributes are only used for type
=A1=B0seq_io=A1=B1-->
index_addr=3D"0xXXXXXXXX"
data_addr=3D"0xXXXXXXXX"
<!-- The following four attributes are only used for
type =A1=B0pci_config=A1=B1-->
bus=3D"unsigned integer"
slot=3D"unsigned integer"
func=3D"unsigned integer"
reg_no=3D"unsigned integer"
<!-- NOTICE! YOU SHOULDMUST NOT SET THESE ATTRIBUTES AS
NEGATIVE!!!
bitmask/min/max are optional. bitmask/min/max allow you
to specify a condition logic. The trigger starts to
work only=20
if it meets "min <=3D captured data & ~bitmask < max"
condition.=20
By default, the condition is always met.
--> =09
bitmask=3D"0xXXXXXXXX"
min=3D"unsigned integer"
max=3D"unsigned integer"
<!-- Optional. Default to 0. trigger starts to work after
the=20
specified access type happens 'skip' times. -->
skip=3D"unsigned integer"
<!-- Optional. Default to 0, never stops. Trigger will
stop=20
to work after the specified access type happens 'stop'
times -->
stop=3D"unsigned integer"
<!-- Optional. Default to 0, no protection! bit set to
1 in=20
this mask will never be corrupted or modified. This
only=20
applies to write fault injectionFI. -->
protection_mask=3D"0xXXXXXXXX"
<!-- Optional. Default to be 1 and not allow being
negative.=20
Trigger is activated once every 'hz' times with
considerations=20
of 'skip' and 'stop'. -->
HZ=3D"unsigned integer"
>
<fsml:action codesegment=3D"string" /> <!-- Execute
the specified Code-Segment=A1=AFs=20
=09
name. You must NOT use Code-Segment and
the
other actions simultaneously. --> =20
<fsml:set val=3D"0xXXXXXXXX" /> <!--
Captured data is replaced with this 'val' -->
<fsml:and val=3D"0xXXXXXXXX" /> <!--
Captured data & 'val' -->
<fsml:or val=3D"0xXXXXXXXX" /> <!--
Captured data | val' -->
<fsml:not /> <!--
!Captured data -->
<fsml:xor val=3D"0xXXXXXXXX" /> <!--
Captured data ^ 'val' -->
<fsml:nand val=3D"0xXXXXXXXX" /> <!--
!(Captured data & 'val') -->
<fsml:nor val=3D"0xXXXXXXXX" /> <!--
!(Captured data | 'val') -->
<fsml:add val=3D"0xXXXXXXXXX" /> <!--
Captured data + 'val' -->
<fsml:sub val=3D"0xXXXXXXXX" /> <!--
Captured data - 'val' -->
</fsml:trigger>
</fsml:fsml>
IRQ trigger will not be changed:
<?xml version=3D"1.0" encoding=3D"UTF-8" ?>
<fake_irq=20
<!-- NOTICE! YOU SHOULDMUST NOT SET THESE ATTRIBUTES AS
NEGATIVE!!! =A8=A4
<!-- the intercepted IRQ number. -->
irq=3D"unsigned integer"
=20
<!-- The IRQ device name. You can get it by =A1=AEcat
/proc/interrupt=A1=AF. FITH use the
name to distinguish IRQ handlers in the same IRQ name. -->
devname=3D"dummy"
<!-- Optional. The IRQ will isbe spurious every X timer =
ticker. X
is the value of the=20
attribute. Vaild range [0, 0x7FFFFFFF] -->
spurious_hertz=3D"unsigned integer"
<!-- Optional. The IRQ will isbe delayed every Y times. Y is =
the
value of the
attribute. Vaild range [0, 0x7FFFFFFF] -->
delay_hertz=3D"unsigned integer"
<!-- Optional. The default value =A1=AE0=A1=AF means =
=A1=AEdelay unlimited
time=A1=AF. FITH will
delays the delayed IRQ Z timer ticker. Z is the value of the
attribute.
Vaild range [0, 0x7FFFFFFF] -->
delay_time=3D"unsigned integer"
/>
2. The execution file of FITH utility is still "ficl", and most of the
functionality will be not changed.
So old user will change little about their test cases.=20
=20
The usage model of "ficl" command:
--insert, -i <file.fsml>
insert a faultset written in file.fsml into FITH, enable the
faultset and return the SN of the faultset.
--remove, -r <SN>|all
remove the faultset specified by SN. Also you can use '-r all' to
remove all faultset.=20
--disable, -d <SN>|all
--enable, -e <SN>|all
disable/enable the faultset specified by SN. Also you can use '-d
all'/'-e all' to disable/enable all faultset.=20
--setirq, -s <file.xml>
--clrirq, -c=20
set/clear irq IRQ faultset. Notice, irq IRQ faultset is different
and does not use fsml format. Please also read examples in
fith/test/src/fault_set/fun_test/irq*.xml.=20
--verbose, -v
verbose mode=20
--version, -V
print version information=20
--help, -h
print help information
There is a still issue, do we need to use ficl command to insert and
register the codesegment instead of user register it.
If so we will add new command parameter to do that thing.
Any comment/idea?
=20
-Kevin
|