Date: Mon, 13 Mar 2017 01:17:57 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r315183 - in stable/10/contrib/atf: atf-c atf-c++ atf-sh doc Message-ID: <201703130117.v2D1Hv1n060885@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon Mar 13 01:17:57 2017 New Revision: 315183 URL: https://svnweb.freebsd.org/changeset/base/315183 Log: MFC r314793,r314796,r314797,r314798,r314799,r314800,r314801,r314802,r314803,r314804,r314805: r314793: Fix ATF_TP_ADD_TCS example in atf-c-api(3) ATF_TP_ADD_TC should use `tp` as the second argument, not `tcs`, as ATF_TP_ADD_TCS uses `tp` as its first argument. Bump .Dd for the change. r314796: Fix atf-sh(3) manpage issues - Fix spelling errors (specifiying -> specifying) [1] - Escape '.' at start of lines using & to tell the roff processor that the line isn't meant to be treated as a command [2]. Bump .Dd for the change r314797: Fix grammar warning noted by igor Remove surrounding ellipses in e.g. section and add a comma before and after the e.g. reference. r314798: Fix out-of-order sections in atf-sh(1) - `.Op` must be used in the SYNOPSIS section, not the NAME section. - Move ATF_SHELL environment variable description up to first ENVIRONMENT section. Garbage collect the duplicate ENVIRONMENT section. Bump .Dd for the change r314799: Fix manlint issues with atf-check(1) - Use `.Bf Em`/`.Ef` instead of prefixing lines with `.Em`. The forms are equivalent with traditional roff, but unnecessarily verbose. The former form applies the .Em macro to the enclosed block. - Move EXIT_STATUS section down so the section complies with section ordering specified by mdoc(7) and enforced by manlint(1). Bump .Dd for the change r314800: Fix issues with atf-check(1) found by igor and refer to atf-check(1) - Fix typo (specifiying -> specifying) - Add atf-check(1) to SEE ALSO section for completeness. It's mentioned above, but by convention the SEE ALSO section should list all relevant references to other tools and APIs. Bump .Dd for the change r314801: Fix igor/manlint issues with atf-c(3) - Remove surrounding ellipses in i.e. section and add a comma before and after the i.e. reference [1]. - Fix typo (specifiying -> specifying) [1]. - Escape '.' at start of lines using & to tell the roff processor that the line isn't meant to be treated as a command [2]. Bump .Dd for the change r314802: Fix atf-c-api(3) manpage issues - Fix typo (specifiying -> specifying). - Remove surrounding ellipses in i.e. section and add a comma before and after the i.e. reference. Bump .Dd for the change r314803: Fix typos - specifiying -> specifying - manged -> managed Bump .Dd for the change r314804: Fix issues noted by igor/manlint - Fix typos [1]: -- manged -> managed -- specifiying -> specifying - Escape '.' at start of lines using & to tell the roff processor that the line isn't meant to be treated as a command [2]. Bump .Dd for the change r314805: Remove *-api(3) manpages removed in ATF 0.21 I overlooked the fact that these manpages had been removed upstream and replaced with their non *-api(3) equivalents. Follow upstream's lead and remove the unused manpages. Deleted: stable/10/contrib/atf/atf-c++/atf-c++-api.3 stable/10/contrib/atf/atf-c/atf-c-api.3 stable/10/contrib/atf/atf-sh/atf-sh-api.3 Modified: stable/10/contrib/atf/atf-c++/atf-c++.3 stable/10/contrib/atf/atf-c/atf-c.3 stable/10/contrib/atf/atf-sh/atf-check.1 stable/10/contrib/atf/atf-sh/atf-sh.1 stable/10/contrib/atf/atf-sh/atf-sh.3 stable/10/contrib/atf/doc/atf-test-case.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/atf/atf-c++/atf-c++.3 ============================================================================== --- stable/10/contrib/atf/atf-c++/atf-c++.3 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-c++/atf-c++.3 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd October 13, 2014 +.Dd March 6, 2017 .Dt ATF-C++ 3 .Os .Sh NAME @@ -145,10 +145,10 @@ ATF provides a C++ programming interface C++-based test programs follow this template: .Bd -literal -offset indent extern "C" { -.Ns ... C-specific includes go here ... +\&... C-specific includes go here ... } -.Ns ... C++-specific includes go here ... +\&... C++-specific includes go here ... #include <atf-c++.hpp> @@ -182,7 +182,7 @@ ATF_TEST_CASE_BODY(tc3) ... third test case's body ... } -.Ns ... additional test cases ... +\&... additional test cases ... ATF_INIT_TEST_CASES(tcs) { @@ -202,7 +202,7 @@ To define test cases, one can use the .Fn ATF_TEST_CASE_WITH_CLEANUP or the .Fn ATF_TEST_CASE_WITHOUT_HEAD -macros, which take a single parameter specifiying the test case's +macros, which take a single parameter specifying the test case's name. .Fn ATF_TEST_CASE , requires to define a head and a body for the test case, @@ -232,7 +232,7 @@ opening and closing brackets. Additionally, the .Fn ATF_TEST_CASE_NAME macro can be used to obtain the name of the class corresponding to a -particular test case, as the name is internally manged by the library to +particular test case, as the name is internally managed by the library to prevent clashes with other user identifiers. Similarly, the .Fn ATF_TEST_CASE_USE Modified: stable/10/contrib/atf/atf-c/atf-c.3 ============================================================================== --- stable/10/contrib/atf/atf-c/atf-c.3 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-c/atf-c.3 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd October 13, 2014 +.Dd March 6, 2017 .Dt ATF-C 3 .Os .Sh NAME @@ -203,7 +203,7 @@ ATF provides a C programming interface to implement test programs. C-based test programs follow this template: .Bd -literal -offset indent -.Ns ... C-specific includes go here ... +\&... C-specific includes go here ... #include <atf-c.h> @@ -237,7 +237,7 @@ ATF_TC_BODY(tc3, tc) ... third test case's body ... } -.Ns ... additional test cases ... +\&... additional test cases ... ATF_TP_ADD_TCS(tp) { @@ -259,7 +259,7 @@ To define test cases, one can use the .Fn ATF_TC_WITH_CLEANUP or the .Fn ATF_TC_WITHOUT_HEAD -macros, which take a single parameter specifiying the test case's name. +macros, which take a single parameter specifying the test case's name. .Fn ATF_TC , requires to define a head and a body for the test case, .Fn ATF_TC_WITH_CLEANUP @@ -299,7 +299,7 @@ library to do it for you. This is done by using the .Fn ATF_TP_ADD_TCS macro, which is passed the name of the object that will hold the test -cases; i.e. the test program instance. +cases, i.e., the test program instance. This name can be whatever you want as long as it is a valid variable identifier. .Pp Modified: stable/10/contrib/atf/atf-sh/atf-check.1 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-check.1 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-sh/atf-check.1 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd October 5, 2014 +.Dd March 6, 2017 .Dt ATF-CHECK 1 .Os .Sh NAME @@ -40,10 +40,12 @@ executes a given command and analyzes its results, including exit code, stdout and stderr. .Pp -.Em Test cases must use -.Em Xr atf-sh 3 Ns ' Ns s -.Em Nm atf_check -.Em builtin function instead of calling this utility directly. +.Bf Em +Test cases must use +.Xr atf-sh 3 Ns ' Ns s +.Nm atf_check +builtin function instead of calling this utility directly. +.Ef .Pp In the first synopsis form, .Nm @@ -119,9 +121,6 @@ as a shell command line, executing it wi You should avoid using this flag if at all possible to prevent shell quoting issues. .El -.Sh EXIT STATUS -.Nm -exits 0 on success, and other (unspecified) value on failure. .Sh ENVIRONMENT .Bl -tag -width ATFXSHELLXX -compact .It Va ATF_SHELL @@ -129,6 +128,9 @@ Path to the system shell to be used when .Fl x is given to run commands. .El +.Sh EXIT STATUS +.Nm +exits 0 on success, and other (unspecified) value on failure. .Sh EXAMPLES The following are sample invocations from within a test case. Note that we use the Modified: stable/10/contrib/atf/atf-sh/atf-sh.1 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-sh.1 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-sh/atf-sh.1 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,15 +22,15 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd September 27, 2014 +.Dd March 6, 2017 .Dt ATF-SH 1 .Os .Sh NAME .Nm atf-sh -.Op Fl s Ar shell .Nd interpreter for shell-based test programs .Sh SYNOPSIS .Nm +.Op Fl s Ar shell .Ar script .Sh DESCRIPTION .Nm @@ -75,6 +75,8 @@ Should not be overridden other than for Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a specific interpreter. +.It Va ATF_SHELL +Path to the system shell to be used in the generated scripts. .El .Sh EXAMPLES Scripts using @@ -98,10 +100,5 @@ option afterwards as a .Bd -literal -offset indent #! /path/to/bin/atf-sh -s/bin/bash .Ed -.Sh ENVIRONMENT -.Bl -tag -width ATFXSHELLXX -compact -.It Va ATF_SHELL -Path to the system shell to be used in the generated scripts. -.El .Sh SEE ALSO .Xr atf-sh 3 Modified: stable/10/contrib/atf/atf-sh/atf-sh.3 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-sh.3 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/atf-sh/atf-sh.3 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd October 13, 2014 +.Dd March 6, 2017 .Dt ATF-SH 3 .Os .Sh NAME @@ -129,7 +129,7 @@ tc2_cleanup() { ... second test case's cleanup ... } -.Ns ... additional test cases ... +\&... additional test cases ... atf_init_test_cases() { atf_add_test_case tc1 @@ -144,7 +144,7 @@ described in .Xr atf-test-case 4 . To define test cases, one can use the .Nm atf_test_case -function, which takes a first parameter specifiying the test case's +function, which takes a first parameter specifying the test case's name and instructs the library to set things up to accept it as a valid test case. The second parameter is optional and, if provided, must be @@ -334,7 +334,7 @@ atf_init_test_cases() { This other example shows how to include a file with extra helper functions in the test program: .Bd -literal -offset indent -.Ns ... definition of test cases ... +\&... definition of test cases ... atf_init_test_cases() { . $(atf_get_srcdir)/helper_functions.sh Modified: stable/10/contrib/atf/doc/atf-test-case.4 ============================================================================== --- stable/10/contrib/atf/doc/atf-test-case.4 Mon Mar 13 01:17:33 2017 (r315182) +++ stable/10/contrib/atf/doc/atf-test-case.4 Mon Mar 13 01:17:57 2017 (r315183) @@ -22,7 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd October 5, 2014 +.Dd March 6, 2017 .Dt ATF-TEST-CASE 4 .Os .Sh NAME @@ -79,8 +79,8 @@ Upon termination, a test case reports a reason describing why the test reported such status. The caller must ensure that the test case really performed the task that its status describes, as the test program may be bogus and therefore providing a -misleading result (e.g. providing a result that indicates success but the -error code of the program says otherwise). +misleading result, e.g., providing a result that indicates success but the +error code of the program says otherwise. .Pp The possible exit status of a test case are one of the following: .Bl -tag -width expectedXfailureXX
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703130117.v2D1Hv1n060885>