summaryrefslogtreecommitdiffstats
path: root/share/man
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2011-07-08 20:41:12 +0000
committermdf <mdf@FreeBSD.org>2011-07-08 20:41:12 +0000
commitd825d95c9f901b258aba68040422df5daa0aeea0 (patch)
treebd0780db425378e454850c756d18521fb1d5bc31 /share/man
parentdef1e657f334eef8f652eff49b47ec28fb937fa9 (diff)
downloadFreeBSD-src-d825d95c9f901b258aba68040422df5daa0aeea0.zip
FreeBSD-src-d825d95c9f901b258aba68040422df5daa0aeea0.tar.gz
Add an option to have a fail point term only execute when run by a
specified pid. This is helpful for automated testing involving a global knob that would otherwise be executed by many other threads. MFC after: 1 week
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/fail.97
1 files changed, 7 insertions, 0 deletions
diff --git a/share/man/man9/fail.9 b/share/man/man9/fail.9
index e367eff..0973cea 100644
--- a/share/man/man9/fail.9
+++ b/share/man/man9/fail.9
@@ -116,6 +116,7 @@ The sysctl variable may be set using the following grammar:
( (<float> "%") | (<integer> "*" ) )*
<type>
[ "(" <integer> ")" ]
+ [ "[pid " <integer> "]" ]
<float> ::
<integer> [ "." <integer> ] |
@@ -161,6 +162,10 @@ For the purpose of this operator, the return() and print() operators
are the only types that cascade.
A return() term only cascades if the code executes, and a print()
term only cascades when passed a non-zero argument.
+A pid can optionally be specified.
+The fail point term is only executed when invoked by a process with a
+matching p_pid.
+.Pp
.Sh EXAMPLES
.Bl -tag
.It Sy sysctl debug.fail_point.foobar="2.1%return(5)"
@@ -181,6 +186,8 @@ After that, 1/1000th of the time, return 22.
Return 5 for 1 in 1000 executions, but only 5 times total.
.It Sy sysctl debug.fail_point.foobar="1%*sleep(50)"
1/100th of the time, sleep 50ms.
+.It Sy sysctl debug.fail_point.foobar="1*return(5)[pid 1234]"
+Return 5 once, when pid 1234 executes the fail point.
.El
.Sh AUTHORS
.An -nosplit
OpenPOWER on IntegriCloud