summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2014-09-30 16:14:02 +0000
committerrodrigc <rodrigc@FreeBSD.org>2014-09-30 16:14:02 +0000
commit10f6e5e9ccf3801cab19a16a4f97eb268b76d97f (patch)
treedb111f95f6a0e5a79d642c2ace2858412c731636
parent82aeda321d7053f80a6bc0f560d107786decf47a (diff)
downloadFreeBSD-src-10f6e5e9ccf3801cab19a16a4f97eb268b76d97f.zip
FreeBSD-src-10f6e5e9ccf3801cab19a16a4f97eb268b76d97f.tar.gz
MFC r271875, r272046, r272049, r272056
-> Reference the test case "packs" to fix warnings -> Delete mentions to removed manpages -> Minor fixes to docs Approved by: re (gjb)
-rw-r--r--contrib/atf/FREEBSD-upgrade7
-rw-r--r--contrib/atf/NEWS3
-rw-r--r--contrib/atf/atf-c++/atf-c++-api.315
-rw-r--r--contrib/atf/atf-c/atf-c-api.315
-rw-r--r--contrib/atf/atf-c/macros_h_test.c3
-rw-r--r--contrib/atf/atf-sh/atf-check.116
-rw-r--r--contrib/atf/atf-sh/atf-sh-api.315
-rw-r--r--contrib/atf/atf-sh/atf-sh.117
-rw-r--r--contrib/atf/doc/atf-test-case.414
-rw-r--r--contrib/atf/doc/atf-test-program.114
10 files changed, 56 insertions, 63 deletions
diff --git a/contrib/atf/FREEBSD-upgrade b/contrib/atf/FREEBSD-upgrade
index 1b1970f..e9d7a4c 100644
--- a/contrib/atf/FREEBSD-upgrade
+++ b/contrib/atf/FREEBSD-upgrade
@@ -7,10 +7,9 @@ branches and you are supposed to follow those:
http://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html
-The ATF source code is hosted on Google Code as a subcomponent of the
-Kyua project:
+The ATF source code is hosted on GitHub:
- http://code.google.com/p/kyua/downloads/list
+ https://github.com/jmmv/atf
and is imported into the atf vendor branch (see base/vendor/atf/).
@@ -42,7 +41,7 @@ the vendor branch as you easily risk committing build products into the
tree.
Lastly, with the list of old and new files in this import, make sure
-to udpate the reachover Makefiles accordingly.
+to update the reachover Makefiles accordingly.
Test the build (keeping in mind the WITH_TESTS/WITHOUT_TESTS knobs) and,
if all looks good, you are ready to commit all the changes in one go.
diff --git a/contrib/atf/NEWS b/contrib/atf/NEWS
index 709f594..7a7ed2f 100644
--- a/contrib/atf/NEWS
+++ b/contrib/atf/NEWS
@@ -14,6 +14,9 @@ the 'tools' directory for your own consumption.
* Removed the deprecated tools. This includes atf-config, atf-report,
atf-run and atf-version.
+* Issue #8: Fixed atf-c/macros_test:use test failures spotted by the clang
+ that ships with FreeBSD 11.0-CURRENT.
+
Changes in version 0.19
***********************
diff --git a/contrib/atf/atf-c++/atf-c++-api.3 b/contrib/atf/atf-c++/atf-c++-api.3
index c086c90..da1441e 100644
--- a/contrib/atf/atf-c++/atf-c++-api.3
+++ b/contrib/atf/atf-c++/atf-c++-api.3
@@ -26,7 +26,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd November 15, 2013
+.Dd March 2, 2014
.Dt ATF-C++-API 3
.Os
.Sh NAME
@@ -330,9 +330,8 @@ If
.Va exitcode
is not
.Sq -1 ,
-.Xr atf-run 1
-will validate that the exit code of the test case matches the one provided
-in this call.
+the runtime engine will validate that the exit code of the test case
+matches the one provided in this call.
Otherwise, the exact value will be ignored.
.It Fn expect_fail "reason"
Any failure (be it fatal or non-fatal) raised in this mode is recorded.
@@ -368,9 +367,8 @@ If
.Va signo
is not
.Sq -1 ,
-.Xr atf-run 1
-will validate that the signal that terminated the test case matches the one
-provided in this call.
+the runtime engine will validate that the signal that terminated the test
+case matches the one provided in this call.
Otherwise, the exact value will be ignored.
.It Fn expect_timeout "reason"
Expects the test case to execute for longer than its timeout.
@@ -631,5 +629,4 @@ ATF_INIT_TEST_CASES(tcs)
.Ed
.Sh SEE ALSO
.Xr atf-test-program 1 ,
-.Xr atf-test-case 4 ,
-.Xr atf 7
+.Xr atf-test-case 4
diff --git a/contrib/atf/atf-c/atf-c-api.3 b/contrib/atf/atf-c/atf-c-api.3
index 366caec..b3b3086 100644
--- a/contrib/atf/atf-c/atf-c-api.3
+++ b/contrib/atf/atf-c/atf-c-api.3
@@ -26,7 +26,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd November 15, 2013
+.Dd March 2, 2014
.Dt ATF-C-API 3
.Os
.Sh NAME
@@ -409,9 +409,8 @@ If
.Va exitcode
is not
.Sq -1 ,
-.Xr atf-run 1
-will validate that the exit code of the test case matches the one provided
-in this call.
+the runtime engine will validate that the exit code of the test case
+matches the one provided in this call.
Otherwise, the exact value will be ignored.
.It Fn atf_tc_expect_fail "reason" "..."
Any failure (be it fatal or non-fatal) raised in this mode is recorded.
@@ -443,9 +442,8 @@ If
.Va signo
is not
.Sq -1 ,
-.Xr atf-run 1
-will validate that the signal that terminated the test case matches the one
-provided in this call.
+the runtime engine will validate that the signal that terminated the test
+case matches the one provided in this call.
Otherwise, the exact value will be ignored.
.It Fn atf_tc_expect_timeout "reason" "..."
Expects the test case to execute for longer than its timeout.
@@ -771,5 +769,4 @@ ATF_TP_ADD_TCS(tp)
.Ed
.Sh SEE ALSO
.Xr atf-test-program 1 ,
-.Xr atf-test-case 4 ,
-.Xr atf 7
+.Xr atf-test-case 4
diff --git a/contrib/atf/atf-c/macros_h_test.c b/contrib/atf/atf-c/macros_h_test.c
index 3dae471..64c6786 100644
--- a/contrib/atf/atf-c/macros_h_test.c
+++ b/contrib/atf/atf-c/macros_h_test.c
@@ -87,6 +87,7 @@ ATF_TC(TEST_MACRO_1);
ATF_TC_HEAD(TEST_MACRO_1, tc) { if (tc != NULL) {} }
ATF_TC_BODY(TEST_MACRO_1, tc) { if (tc != NULL) {} }
atf_tc_t *test_name_1 = &ATF_TC_NAME(TEST_MACRO_1);
+atf_tc_pack_t *test_pack_1 = &ATF_TC_PACK_NAME(TEST_MACRO_1);
void (*head_1)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_1);
void (*body_1)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_1);
ATF_TC_WITH_CLEANUP(TEST_MACRO_2);
@@ -94,10 +95,12 @@ ATF_TC_HEAD(TEST_MACRO_2, tc) { if (tc != NULL) {} }
ATF_TC_BODY(TEST_MACRO_2, tc) { if (tc != NULL) {} }
ATF_TC_CLEANUP(TEST_MACRO_2, tc) { if (tc != NULL) {} }
atf_tc_t *test_name_2 = &ATF_TC_NAME(TEST_MACRO_2);
+atf_tc_pack_t *test_pack_2 = &ATF_TC_PACK_NAME(TEST_MACRO_2);
void (*head_2)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_2);
void (*body_2)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_2);
void (*cleanup_2)(const atf_tc_t *) = ATF_TC_CLEANUP_NAME(TEST_MACRO_2);
ATF_TC_WITHOUT_HEAD(TEST_MACRO_3);
ATF_TC_BODY(TEST_MACRO_3, tc) { if (tc != NULL) {} }
atf_tc_t *test_name_3 = &ATF_TC_NAME(TEST_MACRO_3);
+atf_tc_pack_t *test_pack_3 = &ATF_TC_PACK_NAME(TEST_MACRO_3);
void (*body_3)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_3);
diff --git a/contrib/atf/atf-sh/atf-check.1 b/contrib/atf/atf-sh/atf-check.1
index 06904bc..66f9318 100644
--- a/contrib/atf/atf-sh/atf-check.1
+++ b/contrib/atf/atf-sh/atf-check.1
@@ -26,7 +26,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd June 27, 2010
+.Dd March 2, 2014
.Dt ATF-CHECK 1
.Os
.Sh NAME
@@ -118,15 +118,20 @@ Analyzes standard error (syntax identical to above)
Executes
.Ar command
as a shell command line, executing it with the system shell defined by
-.Va ATF_SHELL
-in
-.Xr atf-config 1 .
+.Va ATF_SHELL .
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
+Path to the system shell to be used when the
+.Fl x
+is given to run commands.
+.El
.Sh EXAMPLES
.Bd -literal -offset indent
# Exit code 0, nothing on stdout/stderr
@@ -146,6 +151,3 @@ atf-check -s signal:sigsegv my_program
# Combined checks
atf-check -o match:foo -o not-match:bar echo foo baz
.Ed
-.Sh SEE ALSO
-.Xr atf-config 1 ,
-.Xr atf 7
diff --git a/contrib/atf/atf-sh/atf-sh-api.3 b/contrib/atf/atf-sh/atf-sh-api.3
index d63804c..a30aee7 100644
--- a/contrib/atf/atf-sh/atf-sh-api.3
+++ b/contrib/atf/atf-sh/atf-sh-api.3
@@ -26,7 +26,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 13, 2013
+.Dd March 2, 2014
.Dt ATF-SH-API 3
.Os
.Sh NAME
@@ -224,9 +224,8 @@ If
.Va exitcode
is not
.Sq -1 ,
-.Xr atf-run 1
-will validate that the exit code of the test case matches the one provided
-in this call.
+the runtime engine will validate that the exit code of the test case
+matches the one provided in this call.
Otherwise, the exact value will be ignored.
.It Fn atf_expect_fail "reason"
Any failure raised in this mode is recorded, but such failures do not report
@@ -258,9 +257,8 @@ If
.Va signo
is not
.Sq -1 ,
-.Xr atf-run 1
-will validate that the signal that terminated the test case matches the one
-provided in this call.
+the runtime engine will validate that the signal that terminated the test
+case matches the one provided in this call.
Otherwise, the exact value will be ignored.
.It Fn atf_expect_timeout "reason" "..."
Expects the test case to execute for longer than its timeout.
@@ -339,5 +337,4 @@ atf_check -s exit:0 -o match:"^foo$" -e empty 'ls'
.Sh SEE ALSO
.Xr atf-sh 1 ,
.Xr atf-test-program 1 ,
-.Xr atf-test-case 4 ,
-.Xr atf 7
+.Xr atf-test-case 4
diff --git a/contrib/atf/atf-sh/atf-sh.1 b/contrib/atf/atf-sh/atf-sh.1
index 7578ba0..ad77f04 100644
--- a/contrib/atf/atf-sh/atf-sh.1
+++ b/contrib/atf/atf-sh/atf-sh.1
@@ -26,7 +26,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 15, 2013
+.Dd March 2, 2014
.Dt ATF-SH 1
.Os
.Sh NAME
@@ -47,10 +47,8 @@ library.
.Pp
.Nm
is not a real interpreter though: it is just a wrapper around
-the system-wide shell defined by the
-.Sq atf_shell
-configuration value in
-.Xr atf-config 1 .
+the system-wide shell defined by
+.Va ATF_SHELL .
.Nm
executes the interpreter, loads the
.Xr atf-sh-api 3
@@ -68,7 +66,10 @@ The following options are available:
.It Fl h
Shows a short summary of all available options and their purpose.
.El
+.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-config 1 ,
-.Xr atf-sh-api 3 ,
-.Xr atf 7
+.Xr atf-sh-api 3
diff --git a/contrib/atf/doc/atf-test-case.4 b/contrib/atf/doc/atf-test-case.4
index c5e9e66..7f253ed 100644
--- a/contrib/atf/doc/atf-test-case.4
+++ b/contrib/atf/doc/atf-test-case.4
@@ -26,7 +26,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 13, 2011
+.Dd March 2, 2014
.Dt ATF-TEST-CASE 4
.Os
.Sh NAME
@@ -171,9 +171,7 @@ Type: boolean.
Optional.
.Pp
If set to true, specifies that the test case has a cleanup routine that has
-to be executed by
-.Xr atf-run 1
-during the cleanup phase of the execution.
+to be executed by the runtime engine during the cleanup phase of the execution.
This property is automatically set by the framework when defining a test case
with a cleanup routine, so it should never be set by hand.
.It ident
@@ -251,8 +249,7 @@ the test case is
.Pp
If the test case is running as root and this property is
.Sq unprivileged ,
-.Xr atf-run 1
-will automatically drop the privileges if the
+the runtime engine will automatically drop the privileges if the
.Sq unprivileged-user
configuration property is set; otherwise the test case is
.Em skipped .
@@ -314,7 +311,4 @@ Test cases are always executed with a file creation mode mask (umask) of
.Sq 0022 .
The test case's code is free to change this during execution.
.Sh SEE ALSO
-.Xr atf-run 1 ,
-.Xr atf-test-program 1 ,
-.Xr atf-formats 5 ,
-.Xr atf 7
+.Xr atf-test-program 1
diff --git a/contrib/atf/doc/atf-test-program.1 b/contrib/atf/doc/atf-test-program.1
index 49ee12d..c2f7326 100644
--- a/contrib/atf/doc/atf-test-program.1
+++ b/contrib/atf/doc/atf-test-program.1
@@ -26,7 +26,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd February 6, 2011
+.Dd March 2, 2014
.Dt ATF-TEST-PROGRAM 1
.Os
.Sh NAME
@@ -61,16 +61,17 @@ instead of the test case body; see
Note that the test case is
.Em executed without isolation ,
so it can and probably will create and modify files in the current directory.
-To execute test cases in a controller manner, refer to
-.Xr atf-run 1 ,
-which is the preferred way to run test cases.
+To execute test cases in a controller manner, you need a runtime engine
+that understands the ATF interface.
+The recommended runtime engine is
+.Xr kyua 1 .
You should only execute test cases by hand for debugging purposes.
.Pp
In the second synopsis form, the test program will list all available
test cases alongside their meta-data properties in a format that is
machine parseable.
This list is processed by
-.Xr atf-run 1
+.Xr kyua 1
to know how to execute the test cases of a given test program.
.Pp
The following options are available:
@@ -99,5 +100,4 @@ to the value
.Ar value .
.El
.Sh SEE ALSO
-.Xr atf-run 1 ,
-.Xr atf 7
+.Xr kyua 1
OpenPOWER on IntegriCloud