On Tue, Dec 27, 2016 at 12:14:36PM +0100, Seraphime Kirkovski wrote:
> This adds :signal to strace.1
> 
> Signed-off-by: Seraphime Kirkovski <kirkser...@gmail.com>
> ---
>  strace.1 | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/strace.1 b/strace.1
> index 24dd7d3..2be7d83 100644
> --- a/strace.1
> +++ b/strace.1
> @@ -472,7 +472,7 @@ Note that this is independent from the normal tracing of 
> the
>  system call which is controlled by the option
>  .BR -e "\ " trace = write .
>  .TP
> -\fB\-e\ 
> fault\fR=\,\fIset\/\fR[:\fBerror\fR=\,\fIerrno\/\fR][:\fBwhen\fR=\,\fIexpr\/\fR]
> +\fB\-e\ 
> fault\fR=\,\fIset\/\fR[:\fBerror\fR=\,\fIerrno\/\fR][:\fBsignal\fR=\,\fIsig\/\fR][:\fBwhen\fR=\,\fIexpr\/\fR]
>  Perform a syscall fault injection for the specified set of syscalls.
>  When a fault is injected into a syscall invocation, the syscall number
>  is replaced by -1 which corresponds to an invalid syscall.
> @@ -486,6 +486,17 @@ the default error code returned by the kernel, which is 
> traditionally
>  .B ENOSYS
>  for invalid syscall numbers on most architectures.
>  
> +If a signal is specified using either a symbolic value like

If a signal
.I sig
is specified using either a symbolic value like

> +.B SIGSEGV
> +or a numeric value within 1..\fBSIGRTMAX\fR,

or a numeric value within 1..\fBSIGRTMAX\fR range,

> +that signal is sent upon entry of any of the syscalls in \,\fIset\fR.

that signal is delivered on entering every syscall specified by the
.IR set .

> +
> +If \,\fIsig\fR is specified without \,\fIerrno\fR, no error injection is 
> made.

If :\fBsignal\fR=\,\fIsig\/\fR option is specified without
:\fBerror\fR=\,\fIerrno\/\fR option, then only a signal
.I sig
is delivered without a syscall fault injection.

> +Conversely, \,\fIerrno\fR without \,\fIsig\fR faults the syscall without 
> sending a signal.

Conversely, :\fBerror\fR=\,\fIerrno\/\fR option without
:\fBsignal\fR=\,\fIsig\/\fR option injects a fault without delivering a signal.

> +
> +If both \,\fIsig\fR and \,\fIerrno\fR are specified, the signal \,\fIsig\fR 
> is sent
> +and the error code \,\fIerrno\fR is injected.

If both :\fBerror\fR=\,\fIerrno\/\fR and :\fBsignal\fR=\,\fIsig\/\fR
options are specified, then both a fault is injected with the specified
error code
.I errno
and a signal
.I sig
is delivered.

> +
>  Unless a :\fBwhen\fR=\,\fIexpr\fR subexpression is specified,
>  a fault is injected into every invocation of each syscall from the

-a fault is injected into every invocation of each syscall from the
+an injection is being made into every invocation of each syscall from the

>  .IR set .

BTW, the whole thing is a user visible feature worth mentioning in the
NEWS file.


-- 
ldv

Attachment: pgpjQckaRhdpr.pgp
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to