File: remote_control.rst

package info (click to toggle)
libfiu 1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 748 kB
  • sloc: ansic: 2,633; python: 973; makefile: 598; sh: 309
file content (43 lines) | stat: -rw-r--r-- 1,600 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

Remote control
==============

The library has remote controlling capabilities, so external, unrelated
processes can enable and disable failure points.

It has a very simple request/reply protocol that can be performed over
different transports. At the moment, the only transport available is named
pipes.

Remote control must be enabled by the controlled process using *fiu_rc_fifo()*
(for named pipes). A set of utilities are provided to enable remote control
without having to alter the application's source code, which can be useful for
performing fault injection in libraries, see *fiu-run* and *fiu-ctrl* for more
information.


Remote control protocol
-----------------------

It is a line based request/reply protocol. Lines end with a newline character
(no carriage return). A request is composed of a command and 0 or more
parameters, separated with a single space. The following commands are
supported at the moment:

 - ``enable <name> <failnum> <failinfo> [flags]``
 - ``enable_random <name> <failnum> <failinfo> <probability> [flags]``
 - ``disable <name>``

Where:

 - *name* is the name of the point of failure (which, at the moment, cannot
   have spaces inside).
 - *failnum* the same as the *failnum* parameter of *fiu_enable()* (see the
   manpage for more details).
 - failinfo the same as the *failinfo* parameter of *fiu_enable()* (see the
   manpage for more details).
 - *flags* can be either absent or ``one``, which has the same meaning as
   passing ``FIU_ONETIME`` in the *flags* parameter to *fiu_enable()*.

The reply is always a number: 0 on success, < 0 on errors.