From owner-svn-src-all@FreeBSD.ORG Fri Sep 18 14:05:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1014510656B7; Fri, 18 Sep 2009 14:05:57 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECCA48FC18; Fri, 18 Sep 2009 14:05:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8IE5uuf092834; Fri, 18 Sep 2009 14:05:56 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8IE5u7t092832; Fri, 18 Sep 2009 14:05:56 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200909181405.n8IE5u7t092832@svn.freebsd.org> From: Christian Brueffer Date: Fri, 18 Sep 2009 14:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197310 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2009 14:05:57 -0000 Author: brueffer Date: Fri Sep 18 14:05:56 2009 New Revision: 197310 URL: http://svn.freebsd.org/changeset/base/197310 Log: Fix mdoc, typos, contractions. This includes: PR: 135520 Submitted by: Nobuyuki Koganemaru Patch by: gavin MFC after: 3 days Modified: head/share/man/man9/fail.9 Modified: head/share/man/man9/fail.9 ============================================================================== --- head/share/man/man9/fail.9 Fri Sep 18 13:48:38 2009 (r197309) +++ head/share/man/man9/fail.9 Fri Sep 18 14:05:56 2009 (r197310) @@ -37,7 +37,6 @@ .Nm KFAIL_POINT_GOTO , .Nm fail_point , .Nm DEBUG_FP -. .Nd fail points .Sh SYNOPSIS .In sys/fail.h @@ -79,7 +78,7 @@ is derived from the .Fn return value set in the sysctl MIB. See -.Sx SYSCTL SETTINGS +.Sx SYSCTL VARIABLES below. .Pp The remaining @@ -100,7 +99,6 @@ is the equivalent of .Sy KFAIL_POINT_CODE(..., { error_var = RETURN_VALUE; goto label;}) .El -.Pp .Sh SYSCTL VARIABLES The .Fn KFAIL_POINT_* @@ -108,28 +106,28 @@ macros add sysctl MIBs where specified. Many base kernel MIBs can be found in the .Sy debug.fail_point tree (referenced in code by -.Sy DEBUG_FP -). +.Sy DEBUG_FP ) . .Pp The sysctl variable may be set using the following grammar: .Pp +.Bd -literal :: ( "->" )* -.Pp + :: ( ( "%") | ( "*" ) )* [ "(" ")" ] -.Pp + :: [ "." ] | "." -.Pp + :: "off" | "return" | "sleep" | "panic" | "break" | "print" +.Ed .Pp -The -argument specifies which action to take: +The argument specifies which action to take: .Bl -tag -width ".Dv return" .It Sy off Take no action (does not trigger fail point code) @@ -158,13 +156,13 @@ is evaluated before the count, i.e. "2%5 but only 5 times total". .Pp The operator -> can be used to express cascading terms. -If you specify ->, it means that if doesn't -'execute', is evaluated. +If you specify ->, it means that if does not +.Ql execute , + is evaluated. 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. -.Pp .Sh EXAMPLES .Bl -tag .It Sy sysctl debug.fail_point.foobar="2.1%return(5)" @@ -175,7 +173,7 @@ with RETURN_VALUE set to 5. 2/100ths of the time, execute .Fa code with RETURN_VALUE set to 5. -If that doesn't happen, 5% of the time execute +If that does not happen, 5% of the time execute .Fa code with RETURN_VALUE set to 22. .It Sy sysctl debug.fail_point.foobar="5*return(5)->0.1%return(22)" @@ -186,9 +184,8 @@ Return 5 for 1 in 1000 executions, but o .It Sy sysctl debug.fail_point.foobar="1%*sleep(50)" 1/100th of the time, sleep 50ms. .El -.Pp .Sh CAVEATS -It's easy to shoot yourself in the foot by setting fail points too +It is easy to shoot yourself in the foot by setting fail points too aggressively or setting too many in combination. For example, forcing .Fn malloc @@ -201,7 +198,6 @@ Currently, .Fn fail_point_eval does not verify whether the context is appropriate for calling .Fn msleep . -.Pp .Sh AUTHORS .An -nosplit This manual page was written by