summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmmv <jmmv@NetBSD.org>2012-01-16 22:36:30 +0000
committerjmmv <jmmv@NetBSD.org>2012-01-16 22:36:30 +0000
commit6debfaafa2dbabeb04d4a3e84c8f0e07d75c370c (patch)
treedf13176c9eca66457893af02921fb5f8431c710e
parente25086c8c4713331c9dc8d5b7f1aefe24e6c2d06 (diff)
Import atf 0.15: the major goal of this import is to reconcile any local
changes to the atf codebase with upstream code. All local changes should have been backported, with appropriate portability workarounds where necessary. This new release also includes other changes though, such as performance improvements and bug fixes, and also a major new feature partially implemented by pgoyette@: the time to execute each test cases and test program is now recorded and included in the output reports. The import into NetBSD has been tested natively on amd64 and macppc, and the full test suite has also been run through anita on amd64 and i386. No regressions observed... but you never know. From the NEWS file, the changes in this version are as follows: Experimental version released on January 16th, 2012. * Respect stdin in atf-check. The previous release silenced stdin for any processes spawned by atf, not only test programs, which caused breakage in tests that pipe data through atf-check. * Performance improvements to atf-sh. * Enabled detection of unused parameters and variables in the code and fixed all warnings. * Changed the behavior of "developer mode". Compiler warnings are now enabled unconditionally regardless of whether we are in developer mode or not; developer mode is now only used to perform strict warning checks and to enable assertions. Additionally, developer mode is now only automatically enabled when building from the repository, not for formal releases. * Added new Autoconf M4 macros (ATF_ARG_WITH, ATF_CHECK_C and ATF_CHECK_CXX) to provide a consistent way of defining a --with-arg flag in configure scripts and detecting the presence of any of the ATF bindings. Note that ATF_CHECK_SH was already introduced in 0.14, but it has now been modified to also honor --with-atf if instantiated. * Added timing support to atf-run / atf-report. * Added support for a 'require.memory' property, to specify the minimum amount of physical memory needed by the test case to yield valid results. * PR bin/45690: Force an ISO-8859-1 encoding in the XML files generated by atf-report so that invalid data in the output of test cases does not mangle our report.
-rw-r--r--external/bsd/atf/dist/AUTHORS5
-rw-r--r--external/bsd/atf/dist/COPYING32
-rw-r--r--external/bsd/atf/dist/NEWS37
-rw-r--r--external/bsd/atf/dist/atf-c++.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/atf-c++-api.32
-rw-r--r--external/bsd/atf/dist/atf-c++/check.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/check.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/check_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/config.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/config.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/config_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/application.cpp9
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/application.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/application_test.cpp1
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/env.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/env.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/env_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/exceptions.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/exceptions.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/expand.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/expand.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/expand_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/fs.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/fs.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/fs_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/parser.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/parser.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/parser_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/process.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/process_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/sanity.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/test_helpers.cpp4
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/test_helpers.hpp6
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/text_test.cpp27
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/ui.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/detail/ui.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/macros.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/macros_hpp_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/macros_test.cpp52
-rw-r--r--external/bsd/atf/dist/atf-c++/pkg_config_test.sh2
-rw-r--r--external/bsd/atf/dist/atf-c++/tests_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/utils.hpp2
-rw-r--r--external/bsd/atf/dist/atf-c++/utils_test.cpp8
-rw-r--r--external/bsd/atf/dist/atf-c/atf-c-api.32
-rw-r--r--external/bsd/atf/dist/atf-c/atf_c_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/check.c5
-rw-r--r--external/bsd/atf/dist/atf-c/check.h2
-rw-r--r--external/bsd/atf/dist/atf-c/check_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/config.c2
-rw-r--r--external/bsd/atf/dist/atf-c/config_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/dynstr.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/dynstr.h2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/dynstr_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/env.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/env_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/fs.c5
-rw-r--r--external/bsd/atf/dist/atf-c/detail/fs.h2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/fs_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/list.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/list.h2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/list_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/map.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/map.h2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/map_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/process_helpers.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/sanity_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/test_helpers.h6
-rw-r--r--external/bsd/atf/dist/atf-c/detail/test_helpers_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/text.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/text.h2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/text_test.c6
-rw-r--r--external/bsd/atf/dist/atf-c/detail/tp_main.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/user.c2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/user.h2
-rw-r--r--external/bsd/atf/dist/atf-c/detail/user_test.c2
-rw-r--r--external/bsd/atf/dist/atf-c/error.c2
-rw-r--r--external/bsd/atf/dist/atf-c/error.h2
-rw-r--r--external/bsd/atf/dist/atf-c/error_test.c6
-rw-r--r--external/bsd/atf/dist/atf-c/macros.h7
-rw-r--r--external/bsd/atf/dist/atf-c/macros_h_test.c14
-rw-r--r--external/bsd/atf/dist/atf-c/macros_test.c12
-rw-r--r--external/bsd/atf/dist/atf-c/pkg_config_test.sh2
-rw-r--r--external/bsd/atf/dist/atf-c/tc_test.c10
-rw-r--r--external/bsd/atf/dist/atf-c/tp.c2
-rw-r--r--external/bsd/atf/dist/atf-c/tp.h2
-rw-r--r--external/bsd/atf/dist/atf-c/tp_test.c1
-rw-r--r--external/bsd/atf/dist/atf-config/atf-config.12
-rw-r--r--external/bsd/atf/dist/atf-config/atf-config.cpp8
-rw-r--r--external/bsd/atf/dist/atf-report/atf-report.112
-rw-r--r--external/bsd/atf/dist/atf-report/fail_helper.cpp2
-rw-r--r--external/bsd/atf/dist/atf-report/integration_test.sh159
-rw-r--r--external/bsd/atf/dist/atf-report/misc_helpers.cpp2
-rw-r--r--external/bsd/atf/dist/atf-report/pass_helper.cpp2
-rw-r--r--external/bsd/atf/dist/atf-report/reader.cpp99
-rw-r--r--external/bsd/atf/dist/atf-report/reader.hpp11
-rw-r--r--external/bsd/atf/dist/atf-report/reader_test.cpp330
-rw-r--r--external/bsd/atf/dist/atf-report/tests-results.dtd2
-rw-r--r--external/bsd/atf/dist/atf-run/atf-run.12
-rw-r--r--external/bsd/atf/dist/atf-run/atffile.cpp18
-rw-r--r--external/bsd/atf/dist/atf-run/atffile.hpp2
-rw-r--r--external/bsd/atf/dist/atf-run/atffile_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-run/config.cpp9
-rw-r--r--external/bsd/atf/dist/atf-run/fs.hpp2
-rw-r--r--external/bsd/atf/dist/atf-run/fs_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-run/io.cpp2
-rw-r--r--external/bsd/atf/dist/atf-run/io.hpp2
-rw-r--r--external/bsd/atf/dist/atf-run/misc_helpers.cpp2
-rw-r--r--external/bsd/atf/dist/atf-run/pass_helper.cpp2
-rw-r--r--external/bsd/atf/dist/atf-run/requirements_test.cpp41
-rw-r--r--external/bsd/atf/dist/atf-run/several_tcs_helper.c5
-rw-r--r--external/bsd/atf/dist/atf-run/share/atf-run.hooks2
-rw-r--r--external/bsd/atf/dist/atf-run/signals.cpp2
-rw-r--r--external/bsd/atf/dist/atf-run/signals.hpp2
-rw-r--r--external/bsd/atf/dist/atf-run/signals_test.cpp10
-rw-r--r--external/bsd/atf/dist/atf-run/user.cpp2
-rw-r--r--external/bsd/atf/dist/atf-run/user.hpp2
-rw-r--r--external/bsd/atf/dist/atf-run/user_test.cpp2
-rw-r--r--external/bsd/atf/dist/atf-run/zero_tcs_helper.c1
-rw-r--r--external/bsd/atf/dist/atf-sh/atf-check.12
-rw-r--r--external/bsd/atf/dist/atf-sh/atf-sh-api.32
-rw-r--r--external/bsd/atf/dist/atf-sh/atf_check_test.sh2
-rw-r--r--external/bsd/atf/dist/atf-sh/config_test.sh2
-rw-r--r--external/bsd/atf/dist/atf-sh/libatf-sh.subr278
-rw-r--r--external/bsd/atf/dist/atf-sh/misc_helpers.sh2
-rw-r--r--external/bsd/atf/dist/atf-sh/normalize_test.sh2
-rw-r--r--external/bsd/atf/dist/atf-sh/tc_test.sh2
-rw-r--r--external/bsd/atf/dist/atf-sh/tp_test.sh2
-rw-r--r--external/bsd/atf/dist/atf-version/atf-version.12
-rwxr-xr-xexternal/bsd/atf/dist/atf-version/generate-revision.sh2
-rw-r--r--external/bsd/atf/dist/doc/atf-formats.536
-rw-r--r--external/bsd/atf/dist/doc/atf-test-program.12
-rw-r--r--external/bsd/atf/dist/doc/atf.7.in2
-rw-r--r--external/bsd/atf/dist/test-programs/c_helpers.c16
-rw-r--r--external/bsd/atf/dist/test-programs/config_test.sh2
-rw-r--r--external/bsd/atf/dist/test-programs/cpp_helpers.cpp2
-rw-r--r--external/bsd/atf/dist/test-programs/expect_test.sh2
-rw-r--r--external/bsd/atf/dist/test-programs/fork_test.sh2
-rw-r--r--external/bsd/atf/dist/test-programs/meta_data_test.sh2
-rw-r--r--external/bsd/atf/dist/test-programs/result_test.sh2
-rw-r--r--external/bsd/atf/dist/test-programs/sh_helpers.sh2
-rw-r--r--external/bsd/atf/dist/test-programs/srcdir_test.sh2
141 files changed, 807 insertions, 691 deletions
diff --git a/external/bsd/atf/dist/AUTHORS b/external/bsd/atf/dist/AUTHORS
index 28e7b7e9239..a46576630f9 100644
--- a/external/bsd/atf/dist/AUTHORS
+++ b/external/bsd/atf/dist/AUTHORS
@@ -20,6 +20,11 @@ Authors and contributors Automated Testing Framework
initial version of the atf-check utility and started the addition of the
ATF_REQUIRE family of macros in the C interface.
+* Paul Goyette <pgoyette@NetBSD.org>
+
+ Implemented timestamping of test programs and test cases so that
+ atf-report can provide timings for their execution.
+
===========================================================================
vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2
diff --git a/external/bsd/atf/dist/COPYING b/external/bsd/atf/dist/COPYING
index 40b3401a84b..6552cc35f7d 100644
--- a/external/bsd/atf/dist/COPYING
+++ b/external/bsd/atf/dist/COPYING
@@ -5,7 +5,7 @@ Redistribution terms Automated Testing Framework
License
*******
-Copyright (c) 2007, 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc.
+Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 The NetBSD Foundation, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,36 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
+Copyright 2011, 2012 Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+* Neither the name of Google Inc. nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 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.
+
+
Relicensed code
***************
diff --git a/external/bsd/atf/dist/NEWS b/external/bsd/atf/dist/NEWS
index d31ba3bc29e..a247f2de486 100644
--- a/external/bsd/atf/dist/NEWS
+++ b/external/bsd/atf/dist/NEWS
@@ -2,6 +2,43 @@ Major changes between releases Automated Testing Framework
===========================================================================
+Changes in version 0.15
+***********************
+
+Experimental version released on January 16th, 2012.
+
+* Respect stdin in atf-check. The previous release silenced stdin for any
+ processes spawned by atf, not only test programs, which caused breakage
+ in tests that pipe data through atf-check.
+
+* Performance improvements to atf-sh.
+
+* Enabled detection of unused parameters and variables in the code and
+ fixed all warnings.
+
+* Changed the behavior of "developer mode". Compiler warnings are now
+ enabled unconditionally regardless of whether we are in developer mode or
+ not; developer mode is now only used to perform strict warning checks and
+ to enable assertions. Additionally, developer mode is now only
+ automatically enabled when building from the repository, not for formal
+ releases.
+
+* Added new Autoconf M4 macros (ATF_ARG_WITH, ATF_CHECK_C and
+ ATF_CHECK_CXX) to provide a consistent way of defining a --with-arg flag
+ in configure scripts and detecting the presence of any of the ATF
+ bindings. Note that ATF_CHECK_SH was already introduced in 0.14, but it
+ has now been modified to also honor --with-atf if instantiated.
+
+* Added timing support to atf-run / atf-report.
+
+* Added support for a 'require.memory' property, to specify the minimum
+ amount of physical memory needed by the test case to yield valid results.
+
+* PR bin/45690: Force an ISO-8859-1 encoding in the XML files generated by
+ atf-report so that invalid data in the output of test cases does not
+ mangle our report.
+
+
Changes in version 0.14
***********************
diff --git a/external/bsd/atf/dist/atf-c++.hpp b/external/bsd/atf/dist/atf-c++.hpp
index 5c8d92311d4..ef8db66632c 100644
--- a/external/bsd/atf/dist/atf-c++.hpp
+++ b/external/bsd/atf/dist/atf-c++.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/atf-c++-api.3 b/external/bsd/atf/dist/atf-c++/atf-c++-api.3
index 993a19310d5..c0abbbc98cb 100644
--- a/external/bsd/atf/dist/atf-c++/atf-c++-api.3
+++ b/external/bsd/atf/dist/atf-c++/atf-c++-api.3
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/check.cpp b/external/bsd/atf/dist/atf-c++/check.cpp
index 8f5fbcdb60e..b099b07a753 100644
--- a/external/bsd/atf/dist/atf-c++/check.cpp
+++ b/external/bsd/atf/dist/atf-c++/check.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/check.hpp b/external/bsd/atf/dist/atf-c++/check.hpp
index bc0189a9ae0..055dd4f7209 100644
--- a/external/bsd/atf/dist/atf-c++/check.hpp
+++ b/external/bsd/atf/dist/atf-c++/check.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/check_test.cpp b/external/bsd/atf/dist/atf-c++/check_test.cpp
index d57dd290409..dc6ff5fc6c5 100644
--- a/external/bsd/atf/dist/atf-c++/check_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/check_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/config.cpp b/external/bsd/atf/dist/atf-c++/config.cpp
index d9ddf9e944f..7b7d6416c34 100644
--- a/external/bsd/atf/dist/atf-c++/config.cpp
+++ b/external/bsd/atf/dist/atf-c++/config.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/config.hpp b/external/bsd/atf/dist/atf-c++/config.hpp
index 1d25fe32498..e11b9bb21d2 100644
--- a/external/bsd/atf/dist/atf-c++/config.hpp
+++ b/external/bsd/atf/dist/atf-c++/config.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/config_test.cpp b/external/bsd/atf/dist/atf-c++/config_test.cpp
index 663d1f4fadd..a3cd2bb511d 100644
--- a/external/bsd/atf/dist/atf-c++/config_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/config_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/application.cpp b/external/bsd/atf/dist/atf-c++/detail/application.cpp
index 1a3ca91624c..878b010bcde 100644
--- a/external/bsd/atf/dist/atf-c++/detail/application.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/application.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010, 2011 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -41,6 +41,10 @@ extern "C" {
#include <cstring>
#include <iostream>
+extern "C" {
+#include "atf-c/defs.h"
+}
+
#include "application.hpp"
#include "sanity.hpp"
#include "ui.hpp"
@@ -151,7 +155,8 @@ impl::app::specific_options(void)
}
void
-impl::app::process_option(int ch, const char* arg)
+impl::app::process_option(int ch ATF_DEFS_ATTRIBUTE_UNUSED,
+ const char* arg ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
diff --git a/external/bsd/atf/dist/atf-c++/detail/application.hpp b/external/bsd/atf/dist/atf-c++/detail/application.hpp
index 98644211a7b..9d1f242004a 100644
--- a/external/bsd/atf/dist/atf-c++/detail/application.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/application.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/application_test.cpp b/external/bsd/atf/dist/atf-c++/detail/application_test.cpp
index 7fa1cd6ab61..2a788bfb288 100644
--- a/external/bsd/atf/dist/atf-c++/detail/application_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/application_test.cpp
@@ -71,6 +71,7 @@ public:
}
}
+ ATF_REQUIRE(zflag);
ATF_REQUIRE_EQ(1, argc - optind);
ATF_REQUIRE_EQ(std::string("foo"), argv[optind]);
diff --git a/external/bsd/atf/dist/atf-c++/detail/env.cpp b/external/bsd/atf/dist/atf-c++/detail/env.cpp
index 2d345aab6f0..5ca7f09c4f0 100644
--- a/external/bsd/atf/dist/atf-c++/detail/env.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/env.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/env.hpp b/external/bsd/atf/dist/atf-c++/detail/env.hpp
index 97ce87bcc2e..afdf69be593 100644
--- a/external/bsd/atf/dist/atf-c++/detail/env.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/env.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/env_test.cpp b/external/bsd/atf/dist/atf-c++/detail/env_test.cpp
index 93678549775..a7b681d14e1 100644
--- a/external/bsd/atf/dist/atf-c++/detail/env_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/env_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/exceptions.cpp b/external/bsd/atf/dist/atf-c++/detail/exceptions.cpp
index 3bf889f8288..79c5b489e74 100644
--- a/external/bsd/atf/dist/atf-c++/detail/exceptions.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/exceptions.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/exceptions.hpp b/external/bsd/atf/dist/atf-c++/detail/exceptions.hpp
index d774c9e24e4..f655a84d826 100644
--- a/external/bsd/atf/dist/atf-c++/detail/exceptions.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/exceptions.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/expand.cpp b/external/bsd/atf/dist/atf-c++/detail/expand.cpp
index 03a70db6a21..f6f9b6882ec 100644
--- a/external/bsd/atf/dist/atf-c++/detail/expand.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/expand.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/expand.hpp b/external/bsd/atf/dist/atf-c++/detail/expand.hpp
index 6419f512b32..7f4071ee847 100644
--- a/external/bsd/atf/dist/atf-c++/detail/expand.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/expand.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/expand_test.cpp b/external/bsd/atf/dist/atf-c++/detail/expand_test.cpp
index 55ea718f976..222ab3a92c2 100644
--- a/external/bsd/atf/dist/atf-c++/detail/expand_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/expand_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/fs.cpp b/external/bsd/atf/dist/atf-c++/detail/fs.cpp
index 31ef1609679..3517e261f93 100644
--- a/external/bsd/atf/dist/atf-c++/detail/fs.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/fs.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/fs.hpp b/external/bsd/atf/dist/atf-c++/detail/fs.hpp
index 8d7a7ba5f7c..4ffb39b2a58 100644
--- a/external/bsd/atf/dist/atf-c++/detail/fs.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/fs.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/fs_test.cpp b/external/bsd/atf/dist/atf-c++/detail/fs_test.cpp
index 8fe3dfd8e2b..6cf9bf6c636 100644
--- a/external/bsd/atf/dist/atf-c++/detail/fs_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/fs_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/parser.cpp b/external/bsd/atf/dist/atf-c++/detail/parser.cpp
index 5435920438c..7e7f680c573 100644
--- a/external/bsd/atf/dist/atf-c++/detail/parser.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/parser.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/parser.hpp b/external/bsd/atf/dist/atf-c++/detail/parser.hpp
index 060126432de..f1595f531f5 100644
--- a/external/bsd/atf/dist/atf-c++/detail/parser.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/parser.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/parser_test.cpp b/external/bsd/atf/dist/atf-c++/detail/parser_test.cpp
index 5d8901479af..491c0145796 100644
--- a/external/bsd/atf/dist/atf-c++/detail/parser_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/parser_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/process.cpp b/external/bsd/atf/dist/atf-c++/detail/process.cpp
index e442622e282..deb1158bcf8 100644
--- a/external/bsd/atf/dist/atf-c++/detail/process.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/process.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/process_test.cpp b/external/bsd/atf/dist/atf-c++/detail/process_test.cpp
index ea2bc9f5e74..d13ab9453a8 100644
--- a/external/bsd/atf/dist/atf-c++/detail/process_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/process_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/sanity.hpp b/external/bsd/atf/dist/atf-c++/detail/sanity.hpp
index 37ff3188ebf..6021a6e6890 100644
--- a/external/bsd/atf/dist/atf-c++/detail/sanity.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/sanity.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/test_helpers.cpp b/external/bsd/atf/dist/atf-c++/detail/test_helpers.cpp
index 8b2a7368537..f794ed485b3 100644
--- a/external/bsd/atf/dist/atf-c++/detail/test_helpers.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/test_helpers.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2009 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -65,7 +65,7 @@ build_check_cxx_o(const atf::tests::tc& tc, const char* sfile,
}
void
-header_check(const atf::tests::tc& tc, const char *hdrname)
+header_check(const char *hdrname)
{
std::ofstream srcfile("test.c");
ATF_REQUIRE(srcfile);
diff --git a/external/bsd/atf/dist/atf-c++/detail/test_helpers.hpp b/external/bsd/atf/dist/atf-c++/detail/test_helpers.hpp
index 7da2ac481fd..5434f2cdee1 100644
--- a/external/bsd/atf/dist/atf-c++/detail/test_helpers.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/test_helpers.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2009 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,7 @@
} \
ATF_TEST_CASE_BODY(name) \
{ \
- header_check(*this, hdrname); \
+ header_check(hdrname); \
}
#define BUILD_TC(name, sfile, descr, failmsg) \
@@ -73,7 +73,7 @@ class tc;
}
}
-void header_check(const atf::tests::tc&, const char*);
+void header_check(const char*);
void build_check_cxx_o(const atf::tests::tc&, const char*, const char*);
atf::fs::path get_process_helpers_path(const atf::tests::tc&);
bool grep_file(const char*, const char*);
diff --git a/external/bsd/atf/dist/atf-c++/detail/text_test.cpp b/external/bsd/atf/dist/atf-c++/detail/text_test.cpp
index 75e0386a7ad..b7c0ba1af82 100644
--- a/external/bsd/atf/dist/atf-c++/detail/text_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/text_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -310,6 +310,29 @@ ATF_TEST_CASE_BODY(to_bool)
ATF_REQUIRE_THROW(std::runtime_error, to_bool("false2"));
}
+ATF_TEST_CASE(to_bytes);
+ATF_TEST_CASE_HEAD(to_bytes)
+{
+ set_md_var("descr", "Tests the to_bytes function");
+}
+ATF_TEST_CASE_BODY(to_bytes)
+{
+ using atf::text::to_bytes;
+
+ ATF_REQUIRE_EQ(0, to_bytes("0"));
+ ATF_REQUIRE_EQ(12345, to_bytes("12345"));
+ ATF_REQUIRE_EQ(2 * 1024, to_bytes("2k"));
+ ATF_REQUIRE_EQ(4 * 1024 * 1024, to_bytes("4m"));
+ ATF_REQUIRE_EQ(int64_t(8) * 1024 * 1024 * 1024, to_bytes("8g"));
+ ATF_REQUIRE_EQ(int64_t(16) * 1024 * 1024 * 1024 * 1024, to_bytes("16t"));
+
+ ATF_REQUIRE_THROW_RE(std::runtime_error, "Empty", to_bytes(""));
+ ATF_REQUIRE_THROW_RE(std::runtime_error, "Unknown size unit 'd'",
+ to_bytes("12d"));
+ ATF_REQUIRE_THROW(std::runtime_error, to_bytes(" "));
+ ATF_REQUIRE_THROW(std::runtime_error, to_bytes(" k"));
+}
+
ATF_TEST_CASE(to_string);
ATF_TEST_CASE_HEAD(to_string)
{
@@ -335,6 +358,7 @@ ATF_TEST_CASE_BODY(to_type)
ATF_REQUIRE_EQ(to_type< int >("0"), 0);
ATF_REQUIRE_EQ(to_type< int >("1234"), 1234);
+ ATF_REQUIRE_THROW(std::runtime_error, to_type< int >(" "));
ATF_REQUIRE_THROW(std::runtime_error, to_type< int >("0 a"));
ATF_REQUIRE_THROW(std::runtime_error, to_type< int >("a"));
@@ -360,6 +384,7 @@ ATF_INIT_TEST_CASES(tcs)
ATF_ADD_TEST_CASE(tcs, split_delims);
ATF_ADD_TEST_CASE(tcs, trim);
ATF_ADD_TEST_CASE(tcs, to_bool);
+ ATF_ADD_TEST_CASE(tcs, to_bytes);
ATF_ADD_TEST_CASE(tcs, to_string);
ATF_ADD_TEST_CASE(tcs, to_type);
}
diff --git a/external/bsd/atf/dist/atf-c++/detail/ui.cpp b/external/bsd/atf/dist/atf-c++/detail/ui.cpp
index ca95a6d50d9..07bde4f87db 100644
--- a/external/bsd/atf/dist/atf-c++/detail/ui.cpp
+++ b/external/bsd/atf/dist/atf-c++/detail/ui.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/detail/ui.hpp b/external/bsd/atf/dist/atf-c++/detail/ui.hpp
index c51c839fc40..1c81c56a963 100644
--- a/external/bsd/atf/dist/atf-c++/detail/ui.hpp
+++ b/external/bsd/atf/dist/atf-c++/detail/ui.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/macros.hpp b/external/bsd/atf/dist/atf-c++/macros.hpp
index 01ee8330847..e9b871bf8b9 100644
--- a/external/bsd/atf/dist/atf-c++/macros.hpp
+++ b/external/bsd/atf/dist/atf-c++/macros.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/macros_hpp_test.cpp b/external/bsd/atf/dist/atf-c++/macros_hpp_test.cpp
index 77c4147315f..ff97dfbfd5e 100644
--- a/external/bsd/atf/dist/atf-c++/macros_hpp_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/macros_hpp_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/macros_test.cpp b/external/bsd/atf/dist/atf-c++/macros_test.cpp
index 6d8438572f2..814cc726b88 100644
--- a/external/bsd/atf/dist/atf-c++/macros_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/macros_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@ extern "C" {
static
void
-create_ctl_file(const atf::tests::tc& tc, const char *name)
+create_ctl_file(const char *name)
{
ATF_REQUIRE(open(name, O_CREAT | O_WRONLY | O_TRUNC, 0644) != -1);
}
@@ -67,9 +67,9 @@ ATF_TEST_CASE_HEAD(h_pass)
}
ATF_TEST_CASE_BODY(h_pass)
{
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
ATF_PASS();
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_fail);
@@ -79,9 +79,9 @@ ATF_TEST_CASE_HEAD(h_fail)
}
ATF_TEST_CASE_BODY(h_fail)
{
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
ATF_FAIL("Failed on purpose");
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_skip);
@@ -91,9 +91,9 @@ ATF_TEST_CASE_HEAD(h_skip)
}
ATF_TEST_CASE_BODY(h_skip)
{
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
ATF_SKIP("Skipped on purpose");
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_require);
@@ -105,9 +105,9 @@ ATF_TEST_CASE_BODY(h_require)
{
bool condition = atf::text::to_bool(get_config_var("condition"));
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
ATF_REQUIRE(condition);
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_require_eq);
@@ -120,9 +120,9 @@ ATF_TEST_CASE_BODY(h_require_eq)
long v1 = atf::text::to_type< long >(get_config_var("v1"));
long v2 = atf::text::to_type< long >(get_config_var("v2"));
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
ATF_REQUIRE_EQ(v1, v2);
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_require_in);
@@ -139,9 +139,9 @@ ATF_TEST_CASE_BODY(h_require_in)
collection.insert("bar");
collection.insert("baz");
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
ATF_REQUIRE_IN(element, collection);
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_require_match);
@@ -154,9 +154,9 @@ ATF_TEST_CASE_BODY(h_require_match)
const std::string regexp = get_config_var("regexp");
const std::string string = get_config_var("string");
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
ATF_REQUIRE_MATCH(regexp, string);
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_require_not_in);
@@ -173,9 +173,9 @@ ATF_TEST_CASE_BODY(h_require_not_in)
collection.insert("bar");
collection.insert("baz");
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
ATF_REQUIRE_NOT_IN(element, collection);
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_require_throw);
@@ -185,7 +185,7 @@ ATF_TEST_CASE_HEAD(h_require_throw)
}
ATF_TEST_CASE_BODY(h_require_throw)
{
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
if (get_config_var("what") == "throw_int")
ATF_REQUIRE_THROW(std::runtime_error, if (1) throw int(5));
@@ -196,7 +196,7 @@ ATF_TEST_CASE_BODY(h_require_throw)
ATF_REQUIRE_THROW(std::runtime_error,
if (0) throw std::runtime_error("e"));
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_require_throw_re);
@@ -206,7 +206,7 @@ ATF_TEST_CASE_HEAD(h_require_throw_re)
}
ATF_TEST_CASE_BODY(h_require_throw_re)
{
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
if (get_config_var("what") == "throw_int")
ATF_REQUIRE_THROW_RE(std::runtime_error, "5", if (1) throw int(5));
@@ -220,7 +220,7 @@ ATF_TEST_CASE_BODY(h_require_throw_re)
ATF_REQUIRE_THROW_RE(std::runtime_error, "e",
if (0) throw std::runtime_error("e"));
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
static int
@@ -243,7 +243,7 @@ ATF_TEST_CASE_HEAD(h_check_errno)
}
ATF_TEST_CASE_BODY(h_check_errno)
{
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
if (get_config_var("what") == "no_error")
ATF_CHECK_ERRNO(-1, errno_ok_stub() == -1);
@@ -254,7 +254,7 @@ ATF_TEST_CASE_BODY(h_check_errno)
else
UNREACHABLE;
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
ATF_TEST_CASE(h_require_errno);
@@ -264,7 +264,7 @@ ATF_TEST_CASE_HEAD(h_require_errno)
}
ATF_TEST_CASE_BODY(h_require_errno)
{
- create_ctl_file(*this, "before");
+ create_ctl_file("before");
if (get_config_var("what") == "no_error")
ATF_REQUIRE_ERRNO(-1, errno_ok_stub() == -1);
@@ -275,7 +275,7 @@ ATF_TEST_CASE_BODY(h_require_errno)
else
UNREACHABLE;
- create_ctl_file(*this, "after");
+ create_ctl_file("after");
}
// ------------------------------------------------------------------------
diff --git a/external/bsd/atf/dist/atf-c++/pkg_config_test.sh b/external/bsd/atf/dist/atf-c++/pkg_config_test.sh
index 40b9559bc95..8409902c0fd 100644
--- a/external/bsd/atf/dist/atf-c++/pkg_config_test.sh
+++ b/external/bsd/atf/dist/atf-c++/pkg_config_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2008 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/tests_test.cpp b/external/bsd/atf/dist/atf-c++/tests_test.cpp
index 02337a11f7d..63ab2ef91a5 100644
--- a/external/bsd/atf/dist/atf-c++/tests_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/tests_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/utils.hpp b/external/bsd/atf/dist/atf-c++/utils.hpp
index 98233c3d13c..1858b7f8e1e 100644
--- a/external/bsd/atf/dist/atf-c++/utils.hpp
+++ b/external/bsd/atf/dist/atf-c++/utils.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c++/utils_test.cpp b/external/bsd/atf/dist/atf-c++/utils_test.cpp
index 5b0f5e62341..f75e0a7a1ed 100644
--- a/external/bsd/atf/dist/atf-c++/utils_test.cpp
+++ b/external/bsd/atf/dist/atf-c++/utils_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,8 @@
#include <iostream>
+#include "atf-c/defs.h"
+
#include "macros.hpp"
#include "utils.hpp"
@@ -51,7 +53,7 @@ public:
return atf::utils::auto_array< test_array >(ta);
}
- void* operator new(size_t size)
+ void* operator new(size_t size ATF_DEFS_ATTRIBUTE_UNUSED)
{
ATF_FAIL("New called but should have been new[]");
return new int(5);
@@ -65,7 +67,7 @@ public:
return mem;
}
- void operator delete(void* mem)
+ void operator delete(void* mem ATF_DEFS_ATTRIBUTE_UNUSED)
{
ATF_FAIL("Delete called but should have been delete[]");
}
diff --git a/external/bsd/atf/dist/atf-c/atf-c-api.3 b/external/bsd/atf/dist/atf-c/atf-c-api.3
index 80e92d8148b..548db4f9f71 100644
--- a/external/bsd/atf/dist/atf-c/atf-c-api.3
+++ b/external/bsd/atf/dist/atf-c/atf-c-api.3
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/atf_c_test.c b/external/bsd/atf/dist/atf-c/atf_c_test.c
index 81818100d1f..f44d87fb09c 100644
--- a/external/bsd/atf/dist/atf-c/atf_c_test.c
+++ b/external/bsd/atf/dist/atf-c/atf_c_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/check.c b/external/bsd/atf/dist/atf-c/check.c
index 86c00c5cd43..d7a908d3c56 100644
--- a/external/bsd/atf/dist/atf-c/check.c
+++ b/external/bsd/atf/dist/atf-c/check.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -301,14 +301,11 @@ atf_check_result_init(atf_check_result_t *r, const char *const *argv,
const atf_fs_path_t *dir)
{
atf_error_t err;
- const char *workdir;
r->pimpl = malloc(sizeof(struct atf_check_result_impl));
if (r->pimpl == NULL)
return atf_no_memory_error();
- workdir = atf_config_get("atf_workdir");
-
err = array_to_list(argv, &r->pimpl->m_argv);
if (atf_is_error(err))
goto out;
diff --git a/external/bsd/atf/dist/atf-c/check.h b/external/bsd/atf/dist/atf-c/check.h
index 29f42f9cbc0..f36aa3eaef7 100644
--- a/external/bsd/atf/dist/atf-c/check.h
+++ b/external/bsd/atf/dist/atf-c/check.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/check_test.c b/external/bsd/atf/dist/atf-c/check_test.c
index 56fe68241a7..b36dd73afc0 100644
--- a/external/bsd/atf/dist/atf-c/check_test.c
+++ b/external/bsd/atf/dist/atf-c/check_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/config.c b/external/bsd/atf/dist/atf-c/config.c
index f90b5ee4f12..f1047f05583 100644
--- a/external/bsd/atf/dist/atf-c/config.c
+++ b/external/bsd/atf/dist/atf-c/config.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/config_test.c b/external/bsd/atf/dist/atf-c/config_test.c
index 25ea85158a2..a21d68fe58c 100644
--- a/external/bsd/atf/dist/atf-c/config_test.c
+++ b/external/bsd/atf/dist/atf-c/config_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/dynstr.c b/external/bsd/atf/dist/atf-c/detail/dynstr.c
index bbdd4ac20cd..e533a811ffc 100644
--- a/external/bsd/atf/dist/atf-c/detail/dynstr.c
+++ b/external/bsd/atf/dist/atf-c/detail/dynstr.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/dynstr.h b/external/bsd/atf/dist/atf-c/detail/dynstr.h
index 981cefbd1b9..c82209a4804 100644
--- a/external/bsd/atf/dist/atf-c/detail/dynstr.h
+++ b/external/bsd/atf/dist/atf-c/detail/dynstr.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/dynstr_test.c b/external/bsd/atf/dist/atf-c/detail/dynstr_test.c
index 6aa3e58fb97..1b68d38b772 100644
--- a/external/bsd/atf/dist/atf-c/detail/dynstr_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/dynstr_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/env.c b/external/bsd/atf/dist/atf-c/detail/env.c
index ac76a6ba8f0..feb4ee53e76 100644
--- a/external/bsd/atf/dist/atf-c/detail/env.c
+++ b/external/bsd/atf/dist/atf-c/detail/env.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/env_test.c b/external/bsd/atf/dist/atf-c/detail/env_test.c
index cf8642b500c..6ebf36c8bbe 100644
--- a/external/bsd/atf/dist/atf-c/detail/env_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/env_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/fs.c b/external/bsd/atf/dist/atf-c/detail/fs.c
index 03cf3f23b17..22cbca439b3 100644
--- a/external/bsd/atf/dist/atf-c/detail/fs.c
+++ b/external/bsd/atf/dist/atf-c/detail/fs.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -46,6 +46,7 @@
#include <string.h>
#include <unistd.h>
+#include "atf-c/defs.h"
#include "atf-c/error.h"
#include "fs.h"
@@ -584,7 +585,7 @@ atf_fs_stat_copy(atf_fs_stat_t *dest, const atf_fs_stat_t *src)
}
void
-atf_fs_stat_fini(atf_fs_stat_t *st)
+atf_fs_stat_fini(atf_fs_stat_t *st ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
diff --git a/external/bsd/atf/dist/atf-c/detail/fs.h b/external/bsd/atf/dist/atf-c/detail/fs.h
index 90707e7d46b..ec77c3bb73d 100644
--- a/external/bsd/atf/dist/atf-c/detail/fs.h
+++ b/external/bsd/atf/dist/atf-c/detail/fs.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/fs_test.c b/external/bsd/atf/dist/atf-c/detail/fs_test.c
index cb017cab292..043304a0c7d 100644
--- a/external/bsd/atf/dist/atf-c/detail/fs_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/fs_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/list.c b/external/bsd/atf/dist/atf-c/detail/list.c
index fa78abfd4f0..0d005ad0518 100644
--- a/external/bsd/atf/dist/atf-c/detail/list.c
+++ b/external/bsd/atf/dist/atf-c/detail/list.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/list.h b/external/bsd/atf/dist/atf-c/detail/list.h
index c58f55c9bcb..2c0fbcba1ed 100644
--- a/external/bsd/atf/dist/atf-c/detail/list.h
+++ b/external/bsd/atf/dist/atf-c/detail/list.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/list_test.c b/external/bsd/atf/dist/atf-c/detail/list_test.c
index 64f6cd67817..3aa576cae6b 100644
--- a/external/bsd/atf/dist/atf-c/detail/list_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/list_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/map.c b/external/bsd/atf/dist/atf-c/detail/map.c
index 045abd329ac..7395adfebd9 100644
--- a/external/bsd/atf/dist/atf-c/detail/map.c
+++ b/external/bsd/atf/dist/atf-c/detail/map.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/map.h b/external/bsd/atf/dist/atf-c/detail/map.h
index 310a73bdedb..a3ed7a22745 100644
--- a/external/bsd/atf/dist/atf-c/detail/map.h
+++ b/external/bsd/atf/dist/atf-c/detail/map.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/map_test.c b/external/bsd/atf/dist/atf-c/detail/map_test.c
index 31b00085a31..644ab6926c1 100644
--- a/external/bsd/atf/dist/atf-c/detail/map_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/map_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/process_helpers.c b/external/bsd/atf/dist/atf-c/detail/process_helpers.c
index df87d0d579a..61f1b67c980 100644
--- a/external/bsd/atf/dist/atf-c/detail/process_helpers.c
+++ b/external/bsd/atf/dist/atf-c/detail/process_helpers.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/sanity_test.c b/external/bsd/atf/dist/atf-c/detail/sanity_test.c
index d99f96f3be3..af2bbc06f67 100644
--- a/external/bsd/atf/dist/atf-c/detail/sanity_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/sanity_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/test_helpers.h b/external/bsd/atf/dist/atf-c/detail/test_helpers.h
index 384a053b0eb..87c335ec538 100644
--- a/external/bsd/atf/dist/atf-c/detail/test_helpers.h
+++ b/external/bsd/atf/dist/atf-c/detail/test_helpers.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@ struct atf_fs_path;
} \
ATF_TC_BODY(name, tc) \
{ \
- header_check(tc, hdrname); \
+ header_check(hdrname); \
}
#define BUILD_TC(name, sfile, descr, failmsg) \
@@ -67,7 +67,7 @@ struct atf_fs_path;
}
void build_check_c_o(const atf_tc_t *, const char *, const char *);
-void header_check(const atf_tc_t *, const char *);
+void header_check(const char *);
void get_process_helpers_path(const atf_tc_t *, const bool,
struct atf_fs_path *);
bool grep_string(const struct atf_dynstr *, const char *);
diff --git a/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c b/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c
index c0f9b51db1c..52d8608b701 100644
--- a/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/text.c b/external/bsd/atf/dist/atf-c/detail/text.c
index 9e3a0753bd7..d91e8d1dcf7 100644
--- a/external/bsd/atf/dist/atf-c/detail/text.c
+++ b/external/bsd/atf/dist/atf-c/detail/text.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/text.h b/external/bsd/atf/dist/atf-c/detail/text.h
index 8f67eed9c90..8f8ddf4ccbe 100644
--- a/external/bsd/atf/dist/atf-c/detail/text.h
+++ b/external/bsd/atf/dist/atf-c/detail/text.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/text_test.c b/external/bsd/atf/dist/atf-c/detail/text_test.c
index 6392c2a5668..7bdf9c83129 100644
--- a/external/bsd/atf/dist/atf-c/detail/text_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/text_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -97,7 +97,7 @@ word_acum(const char *word, void *data)
static
atf_error_t
-word_count(const char *word, void *data)
+word_count(const char *word ATF_DEFS_ATTRIBUTE_UNUSED, void *data)
{
size_t *counter = data;
@@ -113,7 +113,7 @@ struct fail_at {
static
atf_error_t
-word_fail_at(const char *word, void *data)
+word_fail_at(const char *word ATF_DEFS_ATTRIBUTE_UNUSED, void *data)
{
struct fail_at *fa = data;
atf_error_t err;
diff --git a/external/bsd/atf/dist/atf-c/detail/tp_main.c b/external/bsd/atf/dist/atf-c/detail/tp_main.c
index 92c514bfddd..a62ae0ad615 100644
--- a/external/bsd/atf/dist/atf-c/detail/tp_main.c
+++ b/external/bsd/atf/dist/atf-c/detail/tp_main.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/user.c b/external/bsd/atf/dist/atf-c/detail/user.c
index 37a7ffb1e5b..5a89bf42b22 100644
--- a/external/bsd/atf/dist/atf-c/detail/user.c
+++ b/external/bsd/atf/dist/atf-c/detail/user.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/user.h b/external/bsd/atf/dist/atf-c/detail/user.h
index dea7d26f3d3..d682bcfb435 100644
--- a/external/bsd/atf/dist/atf-c/detail/user.h
+++ b/external/bsd/atf/dist/atf-c/detail/user.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/detail/user_test.c b/external/bsd/atf/dist/atf-c/detail/user_test.c
index a60e3b79b3f..0bf37e7e3eb 100644
--- a/external/bsd/atf/dist/atf-c/detail/user_test.c
+++ b/external/bsd/atf/dist/atf-c/detail/user_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/error.c b/external/bsd/atf/dist/atf-c/error.c
index b1fe23073eb..aeb55a8ba47 100644
--- a/external/bsd/atf/dist/atf-c/error.c
+++ b/external/bsd/atf/dist/atf-c/error.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/error.h b/external/bsd/atf/dist/atf-c/error.h
index 2d818c3c91c..a8502801b06 100644
--- a/external/bsd/atf/dist/atf-c/error.h
+++ b/external/bsd/atf/dist/atf-c/error.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/error_test.c b/external/bsd/atf/dist/atf-c/error_test.c
index 6136d592d78..2c2a30789b2 100644
--- a/external/bsd/atf/dist/atf-c/error_test.c
+++ b/external/bsd/atf/dist/atf-c/error_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,7 @@
#include <atf-c.h>
+#include "atf-c/defs.h"
#include "atf-c/error.h"
#include "detail/test_helpers.h"
@@ -44,7 +45,8 @@
static
void
-test_format(const atf_error_t err, char *buf, size_t buflen)
+test_format(const atf_error_t err ATF_DEFS_ATTRIBUTE_UNUSED,
+ char *buf, size_t buflen)
{
snprintf(buf, buflen, "Test formatting function");
}
diff --git a/external/bsd/atf/dist/atf-c/macros.h b/external/bsd/atf/dist/atf-c/macros.h
index f5454146449..b6daf670874 100644
--- a/external/bsd/atf/dist/atf-c/macros.h
+++ b/external/bsd/atf/dist/atf-c/macros.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,6 +30,7 @@
#if !defined(ATF_C_MACROS_H)
#define ATF_C_MACROS_H
+#include <atf-c/defs.h>
#include <atf-c/tc.h>
#include <atf-c/tp.h>
#include <atf-c/utils.h>
@@ -84,7 +85,7 @@
#define ATF_TC_BODY(tc, tcptr) \
static \
void \
- atfu_ ## tc ## _body(const atf_tc_t *tcptr)
+ atfu_ ## tc ## _body(const atf_tc_t *tcptr ATF_DEFS_ATTRIBUTE_UNUSED)
#define ATF_TC_BODY_NAME(tc) \
(atfu_ ## tc ## _body)
@@ -92,7 +93,7 @@
#define ATF_TC_CLEANUP(tc, tcptr) \
static \
void \
- atfu_ ## tc ## _cleanup(const atf_tc_t *tcptr)
+ atfu_ ## tc ## _cleanup(const atf_tc_t *tcptr ATF_DEFS_ATTRIBUTE_UNUSED)
#define ATF_TC_CLEANUP_NAME(tc) \
(atfu_ ## tc ## _cleanup)
diff --git a/external/bsd/atf/dist/atf-c/macros_h_test.c b/external/bsd/atf/dist/atf-c/macros_h_test.c
index cd2f4013719..3dae471e4dd 100644
--- a/external/bsd/atf/dist/atf-c/macros_h_test.c
+++ b/external/bsd/atf/dist/atf-c/macros_h_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -84,20 +84,20 @@ atf_require_errno_semicolons(void)
#define TEST_MACRO_2 invalid + name
#define TEST_MACRO_3 invalid + name
ATF_TC(TEST_MACRO_1);
-ATF_TC_HEAD(TEST_MACRO_1, tc) { }
-ATF_TC_BODY(TEST_MACRO_1, tc) { }
+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);
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);
-ATF_TC_HEAD(TEST_MACRO_2, tc) { }
-ATF_TC_BODY(TEST_MACRO_2, tc) { }
-ATF_TC_CLEANUP(TEST_MACRO_2, tc) { }
+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);
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) { }
+ATF_TC_BODY(TEST_MACRO_3, tc) { if (tc != NULL) {} }
atf_tc_t *test_name_3 = &ATF_TC_NAME(TEST_MACRO_3);
void (*body_3)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_3);
diff --git a/external/bsd/atf/dist/atf-c/macros_test.c b/external/bsd/atf/dist/atf-c/macros_test.c
index b11b207da8b..f7f9f0e9df7 100644
--- a/external/bsd/atf/dist/atf-c/macros_test.c
+++ b/external/bsd/atf/dist/atf-c/macros_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@
static
void
-create_ctl_file(const atf_tc_t *tc, const char *name)
+create_ctl_file(const char *name)
{
atf_fs_path_t p;
@@ -100,9 +100,9 @@ init_and_run_h_tc(const char *name, void (*head)(atf_tc_t *),
} \
ATF_TC_BODY(h_ ## id, tc) \
{ \
- create_ctl_file(tc, "before"); \
+ create_ctl_file("before"); \
macro; \
- create_ctl_file(tc, "after"); \
+ create_ctl_file("after"); \
}
#define H_CHECK_HEAD_NAME(id) ATF_TC_HEAD_NAME(h_check_ ## id)
@@ -678,14 +678,14 @@ ATF_TC_BODY(require_streq, tc)
static
bool
-aux_bool(const char *fmt)
+aux_bool(const char *fmt ATF_DEFS_ATTRIBUTE_UNUSED)
{
return false;
}
static
const char *
-aux_str(const char *fmt)
+aux_str(const char *fmt ATF_DEFS_ATTRIBUTE_UNUSED)
{
return "foo";
}
diff --git a/external/bsd/atf/dist/atf-c/pkg_config_test.sh b/external/bsd/atf/dist/atf-c/pkg_config_test.sh
index 95d8ea7d5cb..8770808cad8 100644
--- a/external/bsd/atf/dist/atf-c/pkg_config_test.sh
+++ b/external/bsd/atf/dist/atf-c/pkg_config_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2008 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/tc_test.c b/external/bsd/atf/dist/atf-c/tc_test.c
index 99f60a0b908..4aaf9a54c24 100644
--- a/external/bsd/atf/dist/atf-c/tc_test.c
+++ b/external/bsd/atf/dist/atf-c/tc_test.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -40,15 +40,15 @@
ATF_TC_HEAD(empty, tc)
{
+ if (tc != NULL) {}
}
-
-ATF_TC_HEAD(test_var, tc)
+ATF_TC_BODY(empty, tc)
{
- atf_tc_set_md_var(tc, "test-var", "Test text");
}
-ATF_TC_BODY(empty, tc)
+ATF_TC_HEAD(test_var, tc)
{
+ atf_tc_set_md_var(tc, "test-var", "Test text");
}
/* ---------------------------------------------------------------------
diff --git a/external/bsd/atf/dist/atf-c/tp.c b/external/bsd/atf/dist/atf-c/tp.c
index 6c5a9ec7fef..7833498ac15 100644
--- a/external/bsd/atf/dist/atf-c/tp.c
+++ b/external/bsd/atf/dist/atf-c/tp.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/tp.h b/external/bsd/atf/dist/atf-c/tp.h
index f832b9003f2..e4f9ba46e93 100644
--- a/external/bsd/atf/dist/atf-c/tp.h
+++ b/external/bsd/atf/dist/atf-c/tp.h
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-c/tp_test.c b/external/bsd/atf/dist/atf-c/tp_test.c
index 54d9e3568c2..5da18b20bda 100644
--- a/external/bsd/atf/dist/atf-c/tp_test.c
+++ b/external/bsd/atf/dist/atf-c/tp_test.c
@@ -73,6 +73,7 @@ ATF_TC_BODY(getopt, tc)
}
}
+ ATF_REQUIRE(zflag);
ATF_REQUIRE_EQ_MSG(1, argc - optind, "Invalid number of arguments left "
"after the call to getopt(3)");
ATF_CHECK_STREQ_MSG("foo", argv[optind], "The non-option argument is "
diff --git a/external/bsd/atf/dist/atf-config/atf-config.1 b/external/bsd/atf/dist/atf-config/atf-config.1
index abdbe68d846..deae6f6406c 100644
--- a/external/bsd/atf/dist/atf-config/atf-config.1
+++ b/external/bsd/atf/dist/atf-config/atf-config.1
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-config/atf-config.cpp b/external/bsd/atf/dist/atf-config/atf-config.cpp
index 2064bc8518f..e5fdca1950e 100644
--- a/external/bsd/atf/dist/atf-config/atf-config.cpp
+++ b/external/bsd/atf/dist/atf-config/atf-config.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -32,6 +32,10 @@
#include <map>
#include <string>
+extern "C" {
+#include "atf-c/defs.h"
+}
+
#include "atf-c++/config.hpp"
#include "atf-c++/detail/application.hpp"
@@ -67,7 +71,7 @@ atf_config::atf_config(void) :
}
void
-atf_config::process_option(int ch, const char* arg)
+atf_config::process_option(int ch, const char* arg ATF_DEFS_ATTRIBUTE_UNUSED)
{
switch (ch) {
case 't':
diff --git a/external/bsd/atf/dist/atf-report/atf-report.1 b/external/bsd/atf/dist/atf-report/atf-report.1
index 410f98d9bd0..df03af0e072 100644
--- a/external/bsd/atf/dist/atf-report/atf-report.1
+++ b/external/bsd/atf/dist/atf-report/atf-report.1
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -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 29, 2007
+.Dd December 16, 2011
.Dt ATF-REPORT 1
.Os
.Sh NAME
@@ -98,7 +98,7 @@ A machine-parseable Comma-Separated Values (CSV) file.
This file contains the results for all test cases and test programs.
Test cases are logged using the following syntax:
.Bd -literal -offset indent
-tc, test-program, test-case, result[, reason]
+tc, duration, test-program, test-case, result[, reason]
.Ed
.Pp
The
@@ -112,7 +112,7 @@ The last two are always followed by a reason.
.Pp
Test programs are logged with the following syntax:
.Bd -literal -offset indent
-tp, test-program, result[, reason]
+tp, duration, test-program, result[, reason]
.Ed
.Pp
In this case, the
@@ -125,8 +125,10 @@ which refers to test programs in which one or more test cases failed;
or
.Sq bogus ,
which mentions those test programs that failed to execute by some reason.
-The reason file is only available in the last case.
+The reason field is only available in the last case.
.Pp
+The time required to execute each test case and test program is
+also provided.
You should not rely on the order of the entries in the resulting output.
.It ticker
A user-friendly report that shows the progress of the test suite's
diff --git a/external/bsd/atf/dist/atf-report/fail_helper.cpp b/external/bsd/atf/dist/atf-report/fail_helper.cpp
index a73fbfe54ba..1009f0e4796 100644
--- a/external/bsd/atf/dist/atf-report/fail_helper.cpp
+++ b/external/bsd/atf/dist/atf-report/fail_helper.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-report/integration_test.sh b/external/bsd/atf/dist/atf-report/integration_test.sh
index 3768da47abd..b19346a86c3 100644
--- a/external/bsd/atf/dist/atf-report/integration_test.sh
+++ b/external/bsd/atf/dist/atf-report/integration_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -117,48 +117,51 @@ EOF
# NO_CHECK_STYLE_BEGIN
cat >expout <<EOF
-tc, expect_helpers, death_and_exit, expected_death, Exit case
-tc, expect_helpers, death_and_signal, expected_death, Signal case
-tc, expect_helpers, death_but_pass, failed, Test case was expected to terminate abruptly but it continued execution
-tc, expect_helpers, exit_any_and_exit, expected_exit, Call will exit
-tc, expect_helpers, exit_but_pass, failed, Test case was expected to exit cleanly but it continued execution
-tc, expect_helpers, exit_code_and_exit, expected_exit, Call will exit
-tc, expect_helpers, fail_and_fail_check, expected_failure, And fail again: 2 checks failed as expected; see output for more details
-tc, expect_helpers, fail_and_fail_requirement, expected_failure, Fail reason: The failure
-tc, expect_helpers, fail_but_pass, failed, Test case was expecting a failure but none were raised
-tc, expect_helpers, pass_and_pass, passed
-tc, expect_helpers, pass_but_fail_check, failed, 1 checks failed; see output for more details
-tc, expect_helpers, pass_but_fail_requirement, failed, Some reason
-tc, expect_helpers, signal_any_and_signal, expected_signal, Call will signal
-tc, expect_helpers, signal_but_pass, failed, Test case was expected to receive a termination signal but it continued execution
-tc, expect_helpers, signal_no_and_signal, expected_signal, Call will signal
-tc, expect_helpers, timeout_and_hang, expected_timeout, Will overrun
-tc, expect_helpers, timeout_but_pass, failed, Test case was expected to hang but it continued execution
-tp, expect_helpers, failed
+tc, #.#, expect_helpers, death_and_exit, expected_death, Exit case
+tc, #.#, expect_helpers, death_and_signal, expected_death, Signal case
+tc, #.#, expect_helpers, death_but_pass, failed, Test case was expected to terminate abruptly but it continued execution
+tc, #.#, expect_helpers, exit_any_and_exit, expected_exit, Call will exit
+tc, #.#, expect_helpers, exit_but_pass, failed, Test case was expected to exit cleanly but it continued execution
+tc, #.#, expect_helpers, exit_code_and_exit, expected_exit, Call will exit
+tc, #.#, expect_helpers, fail_and_fail_check, expected_failure, And fail again: 2 checks failed as expected; see output for more details
+tc, #.#, expect_helpers, fail_and_fail_requirement, expected_failure, Fail reason: The failure
+tc, #.#, expect_helpers, fail_but_pass, failed, Test case was expecting a failure but none were raised
+tc, #.#, expect_helpers, pass_and_pass, passed
+tc, #.#, expect_helpers, pass_but_fail_check, failed, 1 checks failed; see output for more details
+tc, #.#, expect_helpers, pass_but_fail_requirement, failed, Some reason
+tc, #.#, expect_helpers, signal_any_and_signal, expected_signal, Call will signal
+tc, #.#, expect_helpers, signal_but_pass, failed, Test case was expected to receive a termination signal but it continued execution
+tc, #.#, expect_helpers, signal_no_and_signal, expected_signal, Call will signal
+tc, #.#, expect_helpers, timeout_and_hang, expected_timeout, Will overrun
+tc, #.#, expect_helpers, timeout_but_pass, failed, Test case was expected to hang but it continued execution
+tp, #.#, expect_helpers, failed
EOF
# NO_CHECK_STYLE_END
- atf_check -s eq:0 -o file:expout -e empty -x "atf-report -o csv:- <tps.out"
+ atf_check -s eq:0 -o file:expout -e empty -x \
+ "atf-report -o csv:- <tps.out | " \
+ "sed -E -e 's/[0-9]+.[0-9]{6}, /#.#, /'"
# NO_CHECK_STYLE_BEGIN
cat >expout <<EOF
expect_helpers (1/1): 17 test cases
- death_and_exit: Expected failure: Exit case
- death_and_signal: Expected failure: Signal case
- death_but_pass: Failed: Test case was expected to terminate abruptly but it continued execution
- exit_any_and_exit: Expected failure: Call will exit
- exit_but_pass: Failed: Test case was expected to exit cleanly but it continued execution
- exit_code_and_exit: Expected failure: Call will exit
- fail_and_fail_check: Expected failure: And fail again: 2 checks failed as expected; see output for more details
- fail_and_fail_requirement: Expected failure: Fail reason: The failure
- fail_but_pass: Failed: Test case was expecting a failure but none were raised
- pass_and_pass: Passed.
- pass_but_fail_check: Failed: 1 checks failed; see output for more details
- pass_but_fail_requirement: Failed: Some reason
- signal_any_and_signal: Expected failure: Call will signal
- signal_but_pass: Failed: Test case was expected to receive a termination signal but it continued execution
- signal_no_and_signal: Expected failure: Call will signal
- timeout_and_hang: Expected failure: Will overrun
- timeout_but_pass: Failed: Test case was expected to hang but it continued execution
+ death_and_exit: [#.#s] Expected failure: Exit case
+ death_and_signal: [#.#s] Expected failure: Signal case
+ death_but_pass: [#.#s] Failed: Test case was expected to terminate abruptly but it continued execution
+ exit_any_and_exit: [#.#s] Expected failure: Call will exit
+ exit_but_pass: [#.#s] Failed: Test case was expected to exit cleanly but it continued execution
+ exit_code_and_exit: [#.#s] Expected failure: Call will exit
+ fail_and_fail_check: [#.#s] Expected failure: And fail again: 2 checks failed as expected; see output for more details
+ fail_and_fail_requirement: [#.#s] Expected failure: Fail reason: The failure
+ fail_but_pass: [#.#s] Failed: Test case was expecting a failure but none were raised
+ pass_and_pass: [#.#s] Passed.
+ pass_but_fail_check: [#.#s] Failed: 1 checks failed; see output for more details
+ pass_but_fail_requirement: [#.#s] Failed: Some reason
+ signal_any_and_signal: [#.#s] Expected failure: Call will signal
+ signal_but_pass: [#.#s] Failed: Test case was expected to receive a termination signal but it continued execution
+ signal_no_and_signal: [#.#s] Expected failure: Call will signal
+ timeout_and_hang: [#.#s] Expected failure: Will overrun
+ timeout_but_pass: [#.#s] Failed: Test case was expected to hang but it continued execution
+[#.#s]
Test cases for known bugs:
expect_helpers:death_and_exit: Exit case
@@ -182,7 +185,8 @@ Summary for 1 test programs:
EOF
# NO_CHECK_STYLE_END
atf_check -s eq:0 -o file:expout -e empty -x \
- "atf-report -o ticker:- <tps.out"
+ "atf-report -o ticker:- <tps.out | " \
+ "sed -E -e 's/[0-9]+.[0-9]{6}/#.#/'"
# Just ensure that this does not crash for now...
atf_check -s eq:0 -o ignore -e empty -x "atf-report -o xml:- <tps.out"
@@ -253,19 +257,20 @@ output_csv_body()
# NO_CHECK_STYLE_BEGIN
cat >expout <<EOF
-tc, dir1/tp1, main, passed
-tp, dir1/tp1, passed
-tc, dir1/tp2, main, failed, This always fails
-tp, dir1/tp2, failed
-tc, tp3, main, passed
-tp, tp3, passed
-tc, tp4, main, failed, This always fails
-tp, tp4, failed
-tp, tp5, bogus, Invalid format for test case list: 1: Unexpected token \`<<NEWLINE>>'; expected \`:'
+tc, #.#, dir1/tp1, main, passed
+tp, #.#, dir1/tp1, passed
+tc, #.#, dir1/tp2, main, failed, This always fails
+tp, #.#, dir1/tp2, failed
+tc, #.#, tp3, main, passed
+tp, #.#, tp3, passed
+tc, #.#, tp4, main, failed, This always fails
+tp, #.#, tp4, failed
+tp, #.#, tp5, bogus, Invalid format for test case list: 1: Unexpected token \`<<NEWLINE>>'; expected \`:'
EOF
# NO_CHECK_STYLE_END
- atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o csv:- <tps.out'
+ atf_check -s eq:0 -o file:expout -e empty -x \
+ "atf-report -o csv:- <tps.out | sed -E -e 's/[0-9]+.[0-9]{6}, /#.#, /'"
}
atf_test_case output_ticker
@@ -281,19 +286,24 @@ output_ticker_body()
# NO_CHECK_STYLE_BEGIN
cat >expout <<EOF
dir1/tp1 (1/5): 1 test cases
- main: Passed.
+ main: [#.#s] Passed.
+[#.#s]
dir1/tp2 (2/5): 1 test cases
- main: Failed: This always fails
+ main: [#.#s] Failed: This always fails
+[#.#s]
tp3 (3/5): 1 test cases
- main: Passed.
+ main: [#.#s] Passed.
+[#.#s]
tp4 (4/5): 1 test cases
- main: Failed: This always fails
+ main: [#.#s] Failed: This always fails
+[#.#s]
tp5 (5/5): 0 test cases
tp5: BOGUS TEST PROGRAM: Cannot trust its results because of \`Invalid format for test case list: 1: Unexpected token \`<<NEWLINE>>'; expected \`:''
+[#.#s]
Failed (bogus) test programs:
tp5
@@ -308,7 +318,8 @@ Summary for 5 test programs:
0 skipped test cases.
EOF
- atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o ticker:- <tps.out'
+ atf_check -s eq:0 -o file:expout -e empty -x \
+ "atf-report -o ticker:- <tps.out | sed -E -e 's/[0-9]+.[0-9]{6}/#.#/'"
}
# NO_CHECK_STYLE_END
@@ -324,7 +335,7 @@ output_xml_body()
# NO_CHECK_STYLE_BEGIN
cat >expout <<EOF
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tests-results PUBLIC "-//NetBSD//DTD ATF Tests Results 0.1//EN" "http://www.NetBSD.org/XML/atf/tests-results.dtd">
<tests-results>
@@ -332,32 +343,33 @@ output_xml_body()
<tp id="dir1/tp1">
<tc id="main">
<passed />
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
<tp id="dir1/tp2">
<tc id="main">
<failed>This always fails</failed>
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
<tp id="tp3">
<tc id="main">
<passed />
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
<tp id="tp4">
<tc id="main">
<failed>This always fails</failed>
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
<tp id="tp5">
<failed>Invalid format for test case list: 1: Unexpected token \`&lt;&lt;NEWLINE&gt;&gt;'; expected \`:'</failed>
-</tp>
+<tp-time>#.#</tp-time></tp>
<info class="endinfo">Another value</info>
</tests-results>
EOF
# NO_CHECK_STYLE_END
- atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o xml:- <tps.out'
+ atf_check -s eq:0 -o file:expout -e empty -x \
+ "atf-report -o xml:- < tps.out | sed -E -e 's/>[0-9]+.[0-9]{6}</>#.#</'"
}
atf_test_case output_xml_space
@@ -380,7 +392,7 @@ EOF
# NO_CHECK_STYLE_BEGIN
cat >expout <<EOF
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tests-results PUBLIC "-//NetBSD//DTD ATF Tests Results 0.1//EN" "http://www.NetBSD.org/XML/atf/tests-results.dtd">
<tests-results>
@@ -400,15 +412,25 @@ EOF
<so> </so>
<so> EOF</so>
<passed />
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
<info class="endinfo">Another value</info>
</tests-results>
EOF
# NO_CHECK_STYLE_END
run_helpers
- atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o xml:- <tps.out'
+ atf_check -s eq:0 -o file:expout -e empty -x \
+ "atf-report -o xml:- <tps.out | sed -E -e 's/>[0-9]+.[0-9]{6}</>#.#</'"
+}
+
+atf_test_case too_many_args
+too_many_args_body()
+{
+ cat >experr <<EOF
+atf-report: ERROR: No arguments allowed
+EOF
+ atf_check -s eq:1 -o empty -e file:experr atf-report foo
}
atf_init_test_cases()
@@ -420,6 +442,7 @@ atf_init_test_cases()
atf_add_test_case output_ticker
atf_add_test_case output_xml
atf_add_test_case output_xml_space
+ atf_add_test_case too_many_args
}
# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
diff --git a/external/bsd/atf/dist/atf-report/misc_helpers.cpp b/external/bsd/atf/dist/atf-report/misc_helpers.cpp
index e13303f74fc..6f14ce4cf1c 100644
--- a/external/bsd/atf/dist/atf-report/misc_helpers.cpp
+++ b/external/bsd/atf/dist/atf-report/misc_helpers.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-report/pass_helper.cpp b/external/bsd/atf/dist/atf-report/pass_helper.cpp
index 49f1e3217ac..b752b131b38 100644
--- a/external/bsd/atf/dist/atf-report/pass_helper.cpp
+++ b/external/bsd/atf/dist/atf-report/pass_helper.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-report/reader.cpp b/external/bsd/atf/dist/atf-report/reader.cpp
index 583f927f7d1..8f5fde791c8 100644
--- a/external/bsd/atf/dist/atf-report/reader.cpp
+++ b/external/bsd/atf/dist/atf-report/reader.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -27,10 +27,16 @@
// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
+extern "C" {
+#include <sys/time.h>
+}
+
#include <map>
#include <sstream>
#include <utility>
+#include "atf-c/defs.h"
+
#include "atf-c++/detail/parser.hpp"
#include "atf-c++/detail/sanity.hpp"
#include "atf-c++/detail/text.hpp"
@@ -44,12 +50,12 @@ namespace impl = atf::atf_report;
// Auxiliary functions.
// ------------------------------------------------------------------------
-static
-size_t
-string_to_size_t(const std::string& str)
+template< typename Type >
+Type
+string_to_int(const std::string& str)
{
std::istringstream ss(str);
- size_t s;
+ Type s;
ss >> s;
return s;
@@ -112,6 +118,24 @@ public:
} // namespace atf_tps
+struct timeval
+read_timeval(atf::parser::parser< atf_tps::tokenizer >& parser)
+{
+ using namespace atf_tps;
+
+ atf::parser::token t = parser.expect(text_type, "timestamp");
+ const std::string::size_type divider = t.text().find('.');
+ if (divider == std::string::npos || divider == 0 ||
+ divider == t.text().length() - 1)
+ throw atf::parser::parse_error(t.lineno(),
+ "Malformed timestamp value " + t.text());
+
+ struct timeval tv;
+ tv.tv_sec = string_to_int< long >(t.text().substr(0, divider));
+ tv.tv_usec = string_to_int< long >(t.text().substr(divider + 1));
+ return tv;
+}
+
// ------------------------------------------------------------------------
// The "atf_tps_reader" class.
// ------------------------------------------------------------------------
@@ -126,44 +150,54 @@ impl::atf_tps_reader::~atf_tps_reader(void)
}
void
-impl::atf_tps_reader::got_info(const std::string& what,
- const std::string& val)
+impl::atf_tps_reader::got_info(
+ const std::string& what ATF_DEFS_ATTRIBUTE_UNUSED,
+ const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-impl::atf_tps_reader::got_ntps(size_t ntps)
+impl::atf_tps_reader::got_ntps(size_t ntps ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-impl::atf_tps_reader::got_tp_start(const std::string& tp, size_t ntcs)
+impl::atf_tps_reader::got_tp_start(
+ const std::string& tp ATF_DEFS_ATTRIBUTE_UNUSED,
+ size_t ntcs ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-impl::atf_tps_reader::got_tp_end(const std::string& reason)
+impl::atf_tps_reader::got_tp_end(
+ struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+ const std::string& reason ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-impl::atf_tps_reader::got_tc_start(const std::string& tcname)
+impl::atf_tps_reader::got_tc_start(
+ const std::string& tcname ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-impl::atf_tps_reader::got_tc_stdout_line(const std::string& line)
+impl::atf_tps_reader::got_tc_stdout_line(
+ const std::string& line ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-impl::atf_tps_reader::got_tc_stderr_line(const std::string& line)
+impl::atf_tps_reader::got_tc_stderr_line(
+ const std::string& line ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-impl::atf_tps_reader::got_tc_end(const std::string& state,
- const std::string& reason)
+impl::atf_tps_reader::got_tc_end(
+ const std::string& state ATF_DEFS_ATTRIBUTE_UNUSED,
+ struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+ const std::string& reason ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
@@ -206,13 +240,17 @@ impl::atf_tps_reader::read_tp(void* pptr)
t = p.expect(colon_type, "`:'");
+ struct timeval s1 = read_timeval(p);
+
+ t = p.expect(comma_type, "`,'");
+
t = p.expect(text_type, "test program name");
std::string tpname = t.text();
t = p.expect(comma_type, "`,'");
t = p.expect(text_type, "number of test programs");
- size_t ntcs = string_to_size_t(t.text());
+ size_t ntcs = string_to_int< std::size_t >(t.text());
t = p.expect(nl_type, "new line");
@@ -232,6 +270,13 @@ impl::atf_tps_reader::read_tp(void* pptr)
t = p.expect(colon_type, "`:'");
+ struct timeval s2 = read_timeval(p);
+
+ struct timeval s3;
+ timersub(&s2, &s1, &s3);
+
+ t = p.expect(comma_type, "`,'");
+
t = p.expect(text_type, "test program name");
if (t.text() != tpname)
throw parse_error(t.lineno(), "Test program name used in "
@@ -249,7 +294,7 @@ impl::atf_tps_reader::read_tp(void* pptr)
t = p.next();
}
- ATF_PARSER_CALLBACK(p, got_tp_end(reason));
+ ATF_PARSER_CALLBACK(p, got_tp_end(&s3, reason));
}
void
@@ -266,8 +311,13 @@ impl::atf_tps_reader::read_tc(void* pptr)
t = p.expect(colon_type, "`:'");
+ struct timeval s1 = read_timeval(p);
+
+ t = p.expect(comma_type, "`,'");
+
t = p.expect(text_type, "test case name");
std::string tcname = t.text();
+
ATF_PARSER_CALLBACK(p, got_tc_start(tcname));
t = p.expect(nl_type, "new line");
@@ -297,6 +347,13 @@ impl::atf_tps_reader::read_tc(void* pptr)
t = p.expect(colon_type, "`:'");
+ struct timeval s2 = read_timeval(p);
+
+ struct timeval s3;
+ timersub(&s2, &s1, &s3);
+
+ t = p.expect(comma_type, "`,'");
+
t = p.expect(text_type, "test case name");
if (t.text() != tcname)
throw parse_error(t.lineno(),
@@ -310,7 +367,7 @@ impl::atf_tps_reader::read_tc(void* pptr)
skipped_type, "expected_{death,exit,failure,signal,timeout}, failed, "
"passed or skipped");
if (t.type() == passed_type) {
- ATF_PARSER_CALLBACK(p, got_tc_end("passed", ""));
+ ATF_PARSER_CALLBACK(p, got_tc_end("passed", &s3, ""));
} else {
std::string state;
if (t.type() == expected_death_type) state = "expected_death";
@@ -327,7 +384,7 @@ impl::atf_tps_reader::read_tc(void* pptr)
if (reason.empty())
throw parse_error(t.lineno(), "Empty reason for " + state +
" test case result");
- ATF_PARSER_CALLBACK(p, got_tc_end(state, reason));
+ ATF_PARSER_CALLBACK(p, got_tc_end(state, &s3, reason));
}
t = p.expect(nl_type, "new line");
@@ -341,7 +398,7 @@ impl::atf_tps_reader::read(void)
std::pair< size_t, atf::parser::headers_map > hml =
atf::parser::read_headers(m_is, 1);
- atf::parser::validate_content_type(hml.second, "application/X-atf-tps", 2);
+ atf::parser::validate_content_type(hml.second, "application/X-atf-tps", 3);
tokenizer tkz(m_is, hml.first);
atf::parser::parser< tokenizer > p(tkz);
@@ -356,7 +413,7 @@ impl::atf_tps_reader::read(void)
t = p.expect(colon_type, "`:'");
t = p.expect(text_type, "number of test programs");
- size_t ntps = string_to_size_t(t.text());
+ size_t ntps = string_to_int< std::size_t >(t.text());
ATF_PARSER_CALLBACK(p, got_ntps(ntps));
t = p.expect(nl_type, "new line");
diff --git a/external/bsd/atf/dist/atf-report/reader.hpp b/external/bsd/atf/dist/atf-report/reader.hpp
index fc6ce473502..2ef038a0de4 100644
--- a/external/bsd/atf/dist/atf-report/reader.hpp
+++ b/external/bsd/atf/dist/atf-report/reader.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -30,6 +30,10 @@
#if !defined(_ATF_REPORT_FORMATS_HPP_)
#define _ATF_REPORT_FORMATS_HPP_
+extern "C" {
+#include <sys/time.h>
+}
+
#include <istream>
#include <string>
@@ -65,12 +69,13 @@ protected:
virtual void got_info(const std::string&, const std::string&);
virtual void got_ntps(size_t);
virtual void got_tp_start(const std::string&, size_t);
- virtual void got_tp_end(const std::string&);
+ virtual void got_tp_end(struct timeval*, const std::string&);
virtual void got_tc_start(const std::string&);
virtual void got_tc_stdout_line(const std::string&);
virtual void got_tc_stderr_line(const std::string&);
- virtual void got_tc_end(const std::string&, const std::string&);
+ virtual void got_tc_end(const std::string&, struct timeval*,
+ const std::string&);
virtual void got_eof(void);
public:
diff --git a/external/bsd/atf/dist/atf-report/reader_test.cpp b/external/bsd/atf/dist/atf-report/reader_test.cpp
index 482f8acf515..59e4059efcc 100644
--- a/external/bsd/atf/dist/atf-report/reader_test.cpp
+++ b/external/bsd/atf/dist/atf-report/reader_test.cpp
@@ -65,7 +65,8 @@ class tps_reader : protected impl::atf_tps_reader {
}
void
- got_tp_end(const std::string& reason)
+ got_tp_end(struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+ const std::string& reason)
{
m_calls.push_back("got_tp_end(" + reason + ")");
}
@@ -77,7 +78,9 @@ class tps_reader : protected impl::atf_tps_reader {
}
void
- got_tc_end(const std::string& state, const std::string& reason)
+ got_tc_end(const std::string& state,
+ struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+ const std::string& reason)
{
const std::string r = state + (reason.empty() ? "" : ", " + reason);
m_calls.push_back("got_tc_end(" + r + ")");
@@ -120,7 +123,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_1);
ATF_TEST_CASE_BODY(tps_1)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 0\n"
;
@@ -142,13 +145,13 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_2);
ATF_TEST_CASE_BODY(tps_2)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 2\n"
- "tp-start: first-prog, 0\n"
- "tp-end: first-prog\n"
- "tp-start: second-prog, 0\n"
- "tp-end: second-prog, This program failed\n"
+ "tp-start: 123.456, first-prog, 0\n"
+ "tp-end: 123.567, first-prog\n"
+ "tp-start: 123.678, second-prog, 0\n"
+ "tp-end: 123.789, second-prog, This program failed\n"
;
const char* exp_calls[] = {
@@ -172,37 +175,37 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_3);
ATF_TEST_CASE_BODY(tps_3)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 2\n"
- "tp-start: first-prog, 3\n"
- "tc-start: first-test\n"
- "tc-end: first-test, passed\n"
- "tc-start: second-test\n"
- "tc-end: second-test, skipped, Testing skipped reason\n"
- "tc-start: third-test\n"
- "tc-end: third-test, failed, Testing failed reason\n"
- "tp-end: first-prog\n"
- "tp-start: second-prog, 3\n"
- "tc-start: first-test\n"
+ "tp-start: 123.123, first-prog, 3\n"
+ "tc-start: 123.234, first-test\n"
+ "tc-end: 123.345, first-test, passed\n"
+ "tc-start: 123.456, second-test\n"
+ "tc-end: 123.567, second-test, skipped, Testing skipped reason\n"
+ "tc-start: 123.678, third.test\n"
+ "tc-end: 123.789, third.test, failed, Testing failed reason\n"
+ "tp-end: 123.890, first-prog\n"
+ "tp-start: 124.901, second-prog, 3\n"
+ "tc-start: 124.1012, first-test\n"
"tc-so:first stdout line for 1st test\n"
"tc-se:first stderr line for 1st test\n"
"tc-so:second stdout line for 1st test\n"
"tc-se:second stderr line for 1st test\n"
- "tc-end: first-test, passed\n"
- "tc-start: second-test\n"
+ "tc-end: 124.1123, first-test, passed\n"
+ "tc-start: 124.1234, second-test\n"
"tc-so:first stdout line for 2nd test\n"
"tc-se:first stderr line for 2nd test\n"
"tc-so:second stdout line for 2nd test\n"
"tc-se:second stderr line for 2nd test\n"
- "tc-end: second-test, skipped, Testing skipped reason\n"
- "tc-start: third-test\n"
+ "tc-end: 124.1345, second-test, skipped, Testing skipped reason\n"
+ "tc-start: 124.1456, third.test\n"
"tc-so:first stdout line for 3rd test\n"
"tc-se:first stderr line for 3rd test\n"
"tc-so:second stdout line for 3rd test\n"
"tc-se:second stderr line for 3rd test\n"
- "tc-end: third-test, failed, Testing failed reason\n"
- "tp-end: second-prog, This program failed\n"
+ "tc-end: 124.1567, third.test, failed, Testing failed reason\n"
+ "tp-end: 124.1678, second-prog, This program failed\n"
;
const char* exp_calls[] = {
@@ -212,7 +215,7 @@ ATF_TEST_CASE_BODY(tps_3)
"got_tc_end(passed)",
"got_tc_start(second-test)",
"got_tc_end(skipped, Testing skipped reason)",
- "got_tc_start(third-test)",
+ "got_tc_start(third.test)",
"got_tc_end(failed, Testing failed reason)",
"got_tp_end()",
"got_tp_start(second-prog, 3)",
@@ -228,7 +231,7 @@ ATF_TEST_CASE_BODY(tps_3)
"got_tc_stdout_line(second stdout line for 2nd test)",
"got_tc_stderr_line(second stderr line for 2nd test)",
"got_tc_end(skipped, Testing skipped reason)",
- "got_tc_start(third-test)",
+ "got_tc_start(third.test)",
"got_tc_stdout_line(first stdout line for 3rd test)",
"got_tc_stderr_line(first stderr line for 3rd test)",
"got_tc_stdout_line(second stdout line for 3rd test)",
@@ -250,40 +253,40 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_4);
ATF_TEST_CASE_BODY(tps_4)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info: a, foo\n"
"info: b, bar\n"
"info: c, baz\n"
"tps-count: 2\n"
- "tp-start: first-prog, 3\n"
- "tc-start: first-test\n"
- "tc-end: first-test, passed\n"
- "tc-start: second-test\n"
- "tc-end: second-test, skipped, Testing skipped reason\n"
- "tc-start: third-test\n"
- "tc-end: third-test, failed, Testing failed reason\n"
- "tp-end: first-prog\n"
- "tp-start: second-prog, 3\n"
- "tc-start: first-test\n"
+ "tp-start: 234.1, first-prog, 3\n"
+ "tc-start: 234.12, first-test\n"
+ "tc-end: 234.23, first-test, passed\n"
+ "tc-start: 234.34, second-test\n"
+ "tc-end: 234.45, second-test, skipped, Testing skipped reason\n"
+ "tc-start: 234.56, third-test\n"
+ "tc-end: 234.67, third-test, failed, Testing failed reason\n"
+ "tp-end: 234.78, first-prog\n"
+ "tp-start: 234.89, second-prog, 3\n"
+ "tc-start: 234.90, first-test\n"
"tc-so:first stdout line for 1st test\n"
"tc-se:first stderr line for 1st test\n"
"tc-so:second stdout line for 1st test\n"
"tc-se:second stderr line for 1st test\n"
- "tc-end: first-test, passed\n"
- "tc-start: second-test\n"
+ "tc-end: 234.101, first-test, passed\n"
+ "tc-start: 234.112, second-test\n"
"tc-so:first stdout line for 2nd test\n"
"tc-se:first stderr line for 2nd test\n"
"tc-so:second stdout line for 2nd test\n"
"tc-se:second stderr line for 2nd test\n"
- "tc-end: second-test, skipped, Testing skipped reason\n"
- "tc-start: third-test\n"
+ "tc-end: 234.123, second-test, skipped, Testing skipped reason\n"
+ "tc-start: 234.134, third-test\n"
"tc-so:first stdout line for 3rd test\n"
"tc-se:first stderr line for 3rd test\n"
"tc-so:second stdout line for 3rd test\n"
"tc-se:second stderr line for 3rd test\n"
- "tc-end: third-test, failed, Testing failed reason\n"
- "tp-end: second-prog, This program failed\n"
+ "tc-end: 234.145, third-test, failed, Testing failed reason\n"
+ "tp-end: 234.156, second-prog, This program failed\n"
"info: d, foo\n"
"info: e, bar\n"
"info: f, baz\n"
@@ -340,11 +343,11 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_5);
ATF_TEST_CASE_BODY(tps_5)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 1\n"
- "tp-start: the-prog, 1\n"
- "tc-start: the-test\n"
+ "tp-start: 345.123, the-prog, 1\n"
+ "tc-start: 345.134, the-test\n"
"tc-so:--- a 2007-11-04 14:00:41.000000000 +0100\n"
"tc-so:+++ b 2007-11-04 14:00:48.000000000 +0100\n"
"tc-so:@@ -1,7 +1,7 @@\n"
@@ -357,8 +360,8 @@ ATF_TEST_CASE_BODY(tps_5)
"tc-so:+Second modified line.\n"
"tc-so: \n"
"tc-so: EOF\n"
- "tc-end: the-test, passed\n"
- "tp-end: the-prog\n"
+ "tc-end: 345.145, the-test, passed\n"
+ "tp-end: 345.156, the-prog\n"
;
// NO_CHECK_STYLE_BEGIN
@@ -396,27 +399,27 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_6);
ATF_TEST_CASE_BODY(tps_6)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 1\n"
- "tp-start: the-prog, 8\n"
- "tc-start: one\n"
- "tc-end: one, expected_death, The reason\n"
- "tc-start: two\n"
- "tc-end: two, expected_exit, This would be an exit\n"
- "tc-start: three\n"
- "tc-end: three, expected_failure, And this a failure\n"
- "tc-start: four\n"
- "tc-end: four, expected_signal, And this a signal\n"
- "tc-start: five\n"
- "tc-end: five, failed, Another reason\n"
- "tc-start: six\n"
- "tc-end: six, passed\n"
- "tc-start: seven\n"
- "tc-end: seven, skipped, Skipping it\n"
- "tc-start: eight\n"
- "tc-end: eight, expected_timeout, Some hang reason\n"
- "tp-end: the-prog\n"
+ "tp-start: 321.1, the-prog, 8\n"
+ "tc-start: 321.12, one\n"
+ "tc-end: 321.23, one, expected_death, The reason\n"
+ "tc-start: 321.34, two\n"
+ "tc-end: 321.45, two, expected_exit, This would be an exit\n"
+ "tc-start: 321.56, three\n"
+ "tc-end: 321.67, three, expected_failure, And this a failure\n"
+ "tc-start: 321.78, four\n"
+ "tc-end: 321.89, four, expected_signal, And this a signal\n"
+ "tc-start: 321.90, five\n"
+ "tc-end: 321.101, five, failed, Another reason\n"
+ "tc-start: 321.112, six\n"
+ "tc-end: 321.123, six, passed\n"
+ "tc-start: 321.134, seven\n"
+ "tc-end: 321.145, seven, skipped, Skipping it\n"
+ "tc-start: 321.156, eight\n"
+ "tc-end: 321.167, eight, expected_timeout, Some hang reason\n"
+ "tp-end: 321.178, the-prog\n"
;
// NO_CHECK_STYLE_BEGIN
@@ -457,7 +460,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_50);
ATF_TEST_CASE_BODY(tps_50)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"foo\n"
;
@@ -478,7 +481,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_51);
ATF_TEST_CASE_BODY(tps_51)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count\n"
;
@@ -499,7 +502,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_52);
ATF_TEST_CASE_BODY(tps_52)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count:\n"
;
@@ -520,7 +523,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_53);
ATF_TEST_CASE_BODY(tps_53)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 1\n"
"foo\n"
@@ -543,24 +546,36 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_54);
ATF_TEST_CASE_BODY(tps_54)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 1\n"
"foo\n"
"tp-start\n"
"tp-start:\n"
- "tp-start: foo\n"
- "tp-start: foo,\n"
- "tp-start: foo, 0\n"
+ "tp-start: 123\n"
+ "tp-start: 123.\n"
+ "tp-start: 123.456\n"
+ "tp-start: 123.456,\n"
+ "tp-start: 123.456, foo\n"
+ "tp-start: 123.456, foo,\n"
+ "tp-start: 123.456, foo, 0\n"
"bar\n"
- "tp-start: foo, 0\n"
+ "tp-start: 456.789, foo, 0\n"
"tp-end\n"
- "tp-start: foo, 0\n"
+ "tp-start: 777.777, foo, 0\n"
"tp-end:\n"
- "tp-start: foo, 0\n"
- "tp-end: bar\n"
- "tp-start: foo, 0\n"
- "tp-end: foo,\n"
+ "tp-start: 777.777, foo, 0\n"
+ "tp-end: 777\n"
+ "tp-start: 777.777, foo, 0\n"
+ "tp-end: 777.\n"
+ "tp-start: 777.777, foo, 0\n"
+ "tp-end: 777.888\n"
+ "tp-start: 777.777, foo, 0\n"
+ "tp-end: 777.888, \n"
+ "tp-start: 777.777, foo, 0\n"
+ "tp-end: 777.888, bar\n"
+ "tp-start: 777.777, foo, 0\n"
+ "tp-end: 777.888, foo,\n"
;
const char* exp_calls[] = {
@@ -571,14 +586,23 @@ ATF_TEST_CASE_BODY(tps_54)
const char* exp_errors[] = {
"4: Unexpected token `foo'; expected start of test program",
"5: Unexpected token `<<NEWLINE>>'; expected `:'",
- "6: Unexpected token `<<NEWLINE>>'; expected test program name",
- "7: Unexpected token `<<NEWLINE>>'; expected `,'",
- "8: Unexpected token `<<NEWLINE>>'; expected number of test programs",
- "10: Unexpected token `bar'; expected end of test program",
- "12: Unexpected token `<<NEWLINE>>'; expected `:'",
- "14: Unexpected token `<<NEWLINE>>'; expected test program name",
- "16: Test program name used in terminator does not match opening",
- "18: Empty reason for failed test program",
+ "6: Unexpected token `<<NEWLINE>>'; expected timestamp",
+ "7: Malformed timestamp value 123",
+ "8: Malformed timestamp value 123.",
+ "9: Unexpected token `<<NEWLINE>>'; expected `,'",
+ "10: Unexpected token `<<NEWLINE>>'; expected test program name",
+ "11: Unexpected token `<<NEWLINE>>'; expected `,'",
+ "12: Unexpected token `<<NEWLINE>>'; expected number of test programs",
+ "14: Unexpected token `bar'; expected end of test program",
+ "16: Unexpected token `<<NEWLINE>>'; expected `:'",
+ "18: Unexpected token `<<NEWLINE>>'; expected timestamp",
+ "20: Malformed timestamp value 777",
+ "22: Malformed timestamp value 777.",
+ "24: Unexpected token `<<NEWLINE>>'; expected `,'",
+
+ "26: Unexpected token `<<NEWLINE>>'; expected test program name",
+ "28: Test program name used in terminator does not match opening",
+ "30: Empty reason for failed test program",
NULL
};
@@ -589,26 +613,38 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_55);
ATF_TEST_CASE_BODY(tps_55)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 1\n"
- "tp-start: foo, 1\n"
+ "tp-start: 100.200, foo, 1\n"
"foo\n"
"tc-start\n"
"tc-start:\n"
- "tc-start: foo\n"
+ "tc-start: 111\n"
+ "tc-start: 111.\n"
+ "tc-start: 111.222\n"
+ "tc-start: 111.222,\n"
+ "tc-start: 111.222, foo\n"
"bar\n"
- "tc-start: foo\n"
+ "tc-start: 111.333, foo\n"
"tc-end\n"
- "tc-start: foo\n"
+ "tc-start: 111.444, foo\n"
"tc-end:\n"
- "tc-start: foo\n"
- "tc-end: bar\n"
- "tc-start: foo\n"
- "tc-end: foo\n"
- "tc-start: foo\n"
- "tc-end: foo,\n"
- "tp-end: foo\n"
+ "tc-start: 111.444, foo\n"
+ "tc-end: 111\n"
+ "tc-start: 111.444, foo\n"
+ "tc-end: 111.\n"
+ "tc-start: 111.444, foo\n"
+ "tc-end: 111.555\n"
+ "tc-start: 111.444, foo\n"
+ "tc-end: 111.555, \n"
+ "tc-start: 111.444, foo\n"
+ "tc-end: 111.555, bar\n"
+ "tc-start: 111.444, foo\n"
+ "tc-end: 111.555, foo\n"
+ "tc-start: 111.444, foo\n"
+ "tc-end: 111.555, foo,\n"
+ "tp-end: 111.666, foo\n"
;
const char* exp_calls[] = {
@@ -621,14 +657,22 @@ ATF_TEST_CASE_BODY(tps_55)
const char* exp_errors[] = {
"5: Unexpected token `foo'; expected start of test case",
"6: Unexpected token `<<NEWLINE>>'; expected `:'",
- "7: Unexpected token `<<NEWLINE>>'; expected test case name",
- "9: Unexpected token `bar'; expected end of test case or test case's stdout/stderr line",
- "11: Unexpected token `<<NEWLINE>>'; expected `:'",
- "13: Unexpected token `<<NEWLINE>>'; expected test case name",
- "15: Test case name used in terminator does not match opening",
- "17: Unexpected token `<<NEWLINE>>'; expected `,'",
- "19: Unexpected token `<<NEWLINE>>'; expected expected_{death,exit,failure,signal,timeout}, failed, passed or skipped",
- "20: Unexpected token `tp-end'; expected start of test case",
+ "7: Unexpected token `<<NEWLINE>>'; expected timestamp",
+ "8: Malformed timestamp value 111",
+ "9: Malformed timestamp value 111.",
+ "10: Unexpected token `<<NEWLINE>>'; expected `,'",
+ "11: Unexpected token `<<NEWLINE>>'; expected test case name",
+ "13: Unexpected token `bar'; expected end of test case or test case's stdout/stderr line",
+ "15: Unexpected token `<<NEWLINE>>'; expected `:'",
+ "17: Unexpected token `<<NEWLINE>>'; expected timestamp",
+ "19: Malformed timestamp value 111",
+ "21: Malformed timestamp value 111.",
+ "23: Unexpected token `<<NEWLINE>>'; expected `,'",
+ "25: Unexpected token `<<NEWLINE>>'; expected test case name",
+ "27: Test case name used in terminator does not match opening",
+ "29: Unexpected token `<<NEWLINE>>'; expected `,'",
+ "31: Unexpected token `<<NEWLINE>>'; expected expected_{death,exit,failure,signal,timeout}, failed, passed or skipped",
+ "32: Unexpected token `tp-end'; expected start of test case",
NULL
};
// NO_CHECK_STYLE_END
@@ -640,23 +684,23 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_56);
ATF_TEST_CASE_BODY(tps_56)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 1\n"
- "tp-start: foo, 1\n"
- "tc-start: foo\n"
- "tc-end: foo, passe\n"
- "tc-start: foo\n"
- "tc-end: foo, passed,\n"
- "tc-start: bar\n"
- "tc-end: bar, failed\n"
- "tc-start: bar\n"
- "tc-end: bar, failed,\n"
- "tc-start: baz\n"
- "tc-end: baz, skipped\n"
- "tc-start: baz\n"
- "tc-end: baz, skipped,\n"
- "tp-end: foo\n"
+ "tp-start: 111.222, foo, 1\n"
+ "tc-start: 111.333, foo\n"
+ "tc-end: 111.444, foo, passe\n"
+ "tc-start: 111.333, foo\n"
+ "tc-end: 111.444, foo, passed,\n"
+ "tc-start: 111.555, bar\n"
+ "tc-end: 111.666, bar, failed\n"
+ "tc-start: 111.555, bar\n"
+ "tc-end: 111.666, bar, failed,\n"
+ "tc-start: 111.555, baz\n"
+ "tc-end: 111.666, baz, skipped\n"
+ "tc-start: 111.555, baz\n"
+ "tc-end: 111.666, baz, skipped,\n"
+ "tp-end: 111.777, foo\n"
;
const char* exp_calls[] = {
@@ -686,11 +730,11 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_57);
ATF_TEST_CASE_BODY(tps_57)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 2\n"
- "tp-start: foo, 0\n"
- "tp-end: foo\n"
+ "tp-start: 111.222, foo, 0\n"
+ "tp-end: 111.333, foo\n"
;
const char* exp_calls[] = {
@@ -712,13 +756,13 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_58);
ATF_TEST_CASE_BODY(tps_58)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"tps-count: 1\n"
- "tp-start: foo, 0\n"
- "tp-end: foo\n"
- "tp-start: bar, 0\n"
- "tp-end: bar\n"
+ "tp-start: 111.222, foo, 0\n"
+ "tp-end: 111.333, foo\n"
+ "tp-start: 111.444, bar, 0\n"
+ "tp-end: 111.555, bar\n"
;
const char* exp_calls[] = {
@@ -740,7 +784,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_59);
ATF_TEST_CASE_BODY(tps_59)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info\n"
;
@@ -761,7 +805,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_60);
ATF_TEST_CASE_BODY(tps_60)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info:\n"
;
@@ -782,7 +826,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_61);
ATF_TEST_CASE_BODY(tps_61)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info: a\n"
;
@@ -803,7 +847,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_62);
ATF_TEST_CASE_BODY(tps_62)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info: a,\n"
;
@@ -825,7 +869,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_63);
ATF_TEST_CASE_BODY(tps_63)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info: a, b\n"
;
@@ -847,19 +891,21 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_64);
ATF_TEST_CASE_BODY(tps_64)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info: a, b\n"
+ "info: a.b.c.def, g\n"
"tps-count\n"
;
const char* exp_calls[] = {
"got_info(a, b)",
+ "got_info(a.b.c.def, g)",
NULL
};
const char* exp_errors[] = {
- "4: Unexpected token `<<NEWLINE>>'; expected `:'",
+ "5: Unexpected token `<<NEWLINE>>'; expected `:'",
NULL
};
@@ -870,7 +916,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_65);
ATF_TEST_CASE_BODY(tps_65)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info: a, b\n"
"tps-count:\n"
@@ -893,7 +939,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_66);
ATF_TEST_CASE_BODY(tps_66)
{
const char* input =
- "Content-Type: application/X-atf-tps; version=\"2\"\n"
+ "Content-Type: application/X-atf-tps; version=\"3\"\n"
"\n"
"info: a, b\n"
"tps-count: 0\n"
diff --git a/external/bsd/atf/dist/atf-report/tests-results.dtd b/external/bsd/atf/dist/atf-report/tests-results.dtd
index 99c4ec579d3..c16f7edfb53 100644
--- a/external/bsd/atf/dist/atf-report/tests-results.dtd
+++ b/external/bsd/atf/dist/atf-report/tests-results.dtd
@@ -1,7 +1,7 @@
<!--
++ Automated Testing Framework (atf)
++
- ++ Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+ ++ Copyright (c) 2007 The NetBSD Foundation, Inc.
++ All rights reserved.
++
++ Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/atf-run.1 b/external/bsd/atf/dist/atf-run/atf-run.1
index e737a5d0a1d..d593f479445 100644
--- a/external/bsd/atf/dist/atf-run/atf-run.1
+++ b/external/bsd/atf/dist/atf-run/atf-run.1
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/atffile.cpp b/external/bsd/atf/dist/atf-run/atffile.cpp
index 983241b43e7..22ece645d5f 100644
--- a/external/bsd/atf/dist/atf-run/atffile.cpp
+++ b/external/bsd/atf/dist/atf-run/atffile.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,8 @@
#include <fstream>
+#include "atf-c/defs.h"
+
#include "atf-c++/detail/exceptions.hpp"
#include "atf-c++/detail/expand.hpp"
#include "atf-c++/detail/parser.hpp"
@@ -90,19 +92,23 @@ detail::atf_atffile_reader::~atf_atffile_reader(void)
}
void
-detail::atf_atffile_reader::got_conf(const std::string& name,
- const std::string& val)
+detail::atf_atffile_reader::got_conf(
+ const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
+ const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-detail::atf_atffile_reader::got_prop(const std::string& name,
- const std::string& val)
+detail::atf_atffile_reader::got_prop(
+ const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
+ const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
void
-detail::atf_atffile_reader::got_tp(const std::string& name, bool isglob)
+detail::atf_atffile_reader::got_tp(
+ const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
+ bool isglob ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
diff --git a/external/bsd/atf/dist/atf-run/atffile.hpp b/external/bsd/atf/dist/atf-run/atffile.hpp
index fbf933ab709..8c915c24cf4 100644
--- a/external/bsd/atf/dist/atf-run/atffile.hpp
+++ b/external/bsd/atf/dist/atf-run/atffile.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/atffile_test.cpp b/external/bsd/atf/dist/atf-run/atffile_test.cpp
index 1a46d444055..e5781a3370b 100644
--- a/external/bsd/atf/dist/atf-run/atffile_test.cpp
+++ b/external/bsd/atf/dist/atf-run/atffile_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2009 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/config.cpp b/external/bsd/atf/dist/atf-run/config.cpp
index f820e4da714..0ea240fe20c 100644
--- a/external/bsd/atf/dist/atf-run/config.cpp
+++ b/external/bsd/atf/dist/atf-run/config.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -30,6 +30,8 @@
#include <fstream>
#include <vector>
+#include "atf-c/defs.h"
+
#include "atf-c++/config.hpp"
#include "atf-c++/detail/env.hpp"
@@ -136,8 +138,9 @@ detail::atf_config_reader::~atf_config_reader(void)
}
void
-detail::atf_config_reader::got_var(const std::string& var,
- const std::string& val)
+detail::atf_config_reader::got_var(
+ const std::string& var ATF_DEFS_ATTRIBUTE_UNUSED,
+ const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
{
}
diff --git a/external/bsd/atf/dist/atf-run/fs.hpp b/external/bsd/atf/dist/atf-run/fs.hpp
index 0a889879405..37382684b57 100644
--- a/external/bsd/atf/dist/atf-run/fs.hpp
+++ b/external/bsd/atf/dist/atf-run/fs.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/fs_test.cpp b/external/bsd/atf/dist/atf-run/fs_test.cpp
index f07b25dc59c..f03045eb613 100644
--- a/external/bsd/atf/dist/atf-run/fs_test.cpp
+++ b/external/bsd/atf/dist/atf-run/fs_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/io.cpp b/external/bsd/atf/dist/atf-run/io.cpp
index b51bd436a64..9be78d01261 100644
--- a/external/bsd/atf/dist/atf-run/io.cpp
+++ b/external/bsd/atf/dist/atf-run/io.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/io.hpp b/external/bsd/atf/dist/atf-run/io.hpp
index 4d9c548c5cb..e021cf30965 100644
--- a/external/bsd/atf/dist/atf-run/io.hpp
+++ b/external/bsd/atf/dist/atf-run/io.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/misc_helpers.cpp b/external/bsd/atf/dist/atf-run/misc_helpers.cpp
index 62382ee8754..abc9a4a945f 100644
--- a/external/bsd/atf/dist/atf-run/misc_helpers.cpp
+++ b/external/bsd/atf/dist/atf-run/misc_helpers.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010, 2011 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/pass_helper.cpp b/external/bsd/atf/dist/atf-run/pass_helper.cpp
index 49f1e3217ac..b752b131b38 100644
--- a/external/bsd/atf/dist/atf-run/pass_helper.cpp
+++ b/external/bsd/atf/dist/atf-run/pass_helper.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/requirements_test.cpp b/external/bsd/atf/dist/atf-run/requirements_test.cpp
index 5f5478ecc89..ef72b411d90 100644
--- a/external/bsd/atf/dist/atf-run/requirements_test.cpp
+++ b/external/bsd/atf/dist/atf-run/requirements_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
+// Copyright (c) 2010 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -28,6 +28,7 @@
//
#include "atf-c++/config.hpp"
+#include "atf-c++/detail/text.hpp"
#include "atf-c++/macros.hpp"
#include "requirements.hpp"
@@ -48,7 +49,7 @@ do_check(const std::string& expected, const atf::tests::vars_map& metadata,
const atf::tests::vars_map& config = no_config)
{
const std::string actual = impl::check_requirements(metadata, config);
- if (actual != expected)
+ if (!atf::text::match(actual, expected))
ATF_FAIL("Requirements failure reason \"" + actual + "\" does not "
"match \"" + expected + "\"");
}
@@ -224,6 +225,37 @@ ATF_TEST_CASE_BODY(require_machine_many_fail) {
}
// -------------------------------------------------------------------------
+// Tests for the require.memory metadata property.
+// -------------------------------------------------------------------------
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_memory_ok);
+ATF_TEST_CASE_BODY(require_memory_ok) {
+ atf::tests::vars_map metadata;
+ metadata["require.memory"] = "1m";
+ do_check("", metadata);
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_memory_not_enough);
+ATF_TEST_CASE_BODY(require_memory_not_enough) {
+ atf::tests::vars_map metadata;
+ metadata["require.memory"] = "128t";
+#if defined(__APPLE__) || defined(__NetBSD__)
+ do_check("Not enough memory; needed 140737488355328, available [0-9]*",
+ metadata);
+#else
+ skip("Don't know how to check for the amount of physical memory");
+#endif
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_memory_fail);
+ATF_TEST_CASE_BODY(require_memory_fail) {
+ atf::tests::vars_map metadata;
+ metadata["require.memory"] = "foo";
+ ATF_REQUIRE_THROW(std::runtime_error,
+ impl::check_requirements(metadata, no_config));
+}
+
+// -------------------------------------------------------------------------
// Tests for the require.progs metadata property.
// -------------------------------------------------------------------------
@@ -346,6 +378,11 @@ ATF_INIT_TEST_CASES(tcs)
ATF_ADD_TEST_CASE(tcs, require_machine_many_ok);
ATF_ADD_TEST_CASE(tcs, require_machine_many_fail);
+ // Add test cases for require.memory.
+ ATF_ADD_TEST_CASE(tcs, require_memory_ok);
+ ATF_ADD_TEST_CASE(tcs, require_memory_not_enough);
+ ATF_ADD_TEST_CASE(tcs, require_memory_fail);
+
// Add test cases for require.progs.
ATF_ADD_TEST_CASE(tcs, require_progs_one_ok);
ATF_ADD_TEST_CASE(tcs, require_progs_one_missing);
diff --git a/external/bsd/atf/dist/atf-run/several_tcs_helper.c b/external/bsd/atf/dist/atf-run/several_tcs_helper.c
index 0ea001b935c..d287c8193a6 100644
--- a/external/bsd/atf/dist/atf-run/several_tcs_helper.c
+++ b/external/bsd/atf/dist/atf-run/several_tcs_helper.c
@@ -52,10 +52,7 @@ ATF_TC_CLEANUP(second, tc)
{
}
-ATF_TC(third);
-ATF_TC_HEAD(third, tc)
-{
-}
+ATF_TC_WITHOUT_HEAD(third);
ATF_TC_BODY(third, tc)
{
}
diff --git a/external/bsd/atf/dist/atf-run/share/atf-run.hooks b/external/bsd/atf/dist/atf-run/share/atf-run.hooks
index fffd1226808..c94f3bcfc9e 100644
--- a/external/bsd/atf/dist/atf-run/share/atf-run.hooks
+++ b/external/bsd/atf/dist/atf-run/share/atf-run.hooks
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2011 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/signals.cpp b/external/bsd/atf/dist/atf-run/signals.cpp
index 9b1a37b9fd2..851c8f02c2c 100644
--- a/external/bsd/atf/dist/atf-run/signals.cpp
+++ b/external/bsd/atf/dist/atf-run/signals.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/signals.hpp b/external/bsd/atf/dist/atf-run/signals.hpp
index 2e6f3c71554..8765ac9ec56 100644
--- a/external/bsd/atf/dist/atf-run/signals.hpp
+++ b/external/bsd/atf/dist/atf-run/signals.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/signals_test.cpp b/external/bsd/atf/dist/atf-run/signals_test.cpp
index 466b0ccee32..358c8a8ab59 100644
--- a/external/bsd/atf/dist/atf-run/signals_test.cpp
+++ b/external/bsd/atf/dist/atf-run/signals_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,8 @@ extern "C" {
#include <cstdlib>
#include <iostream>
+#include "atf-c/defs.h"
+
#include "atf-c++/macros.hpp"
#include "atf-c++/detail/exceptions.hpp"
@@ -53,7 +55,7 @@ namespace sigusr1 {
static
void
- handler(int signo)
+ handler(int signo ATF_DEFS_ATTRIBUTE_UNUSED)
{
happened = true;
}
@@ -77,7 +79,7 @@ namespace sigusr1_2 {
static
void
- handler(int signo)
+ handler(int signo ATF_DEFS_ATTRIBUTE_UNUSED)
{
happened = true;
}
@@ -223,7 +225,7 @@ ATF_TEST_CASE_BODY(signal_programmer_preserve)
static
void
-reset_child(void *v)
+reset_child(void *v ATF_DEFS_ATTRIBUTE_UNUSED)
{
sigusr1::program();
diff --git a/external/bsd/atf/dist/atf-run/user.cpp b/external/bsd/atf/dist/atf-run/user.cpp
index 126254ccf16..37329f16667 100644
--- a/external/bsd/atf/dist/atf-run/user.cpp
+++ b/external/bsd/atf/dist/atf-run/user.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/user.hpp b/external/bsd/atf/dist/atf-run/user.hpp
index fe3f4801afe..11b3e5546d3 100644
--- a/external/bsd/atf/dist/atf-run/user.hpp
+++ b/external/bsd/atf/dist/atf-run/user.hpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/user_test.cpp b/external/bsd/atf/dist/atf-run/user_test.cpp
index 770876b11d6..7218ba6553b 100644
--- a/external/bsd/atf/dist/atf-run/user_test.cpp
+++ b/external/bsd/atf/dist/atf-run/user_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-run/zero_tcs_helper.c b/external/bsd/atf/dist/atf-run/zero_tcs_helper.c
index 1533e317bc7..d4068b17a83 100644
--- a/external/bsd/atf/dist/atf-run/zero_tcs_helper.c
+++ b/external/bsd/atf/dist/atf-run/zero_tcs_helper.c
@@ -31,5 +31,6 @@
ATF_TP_ADD_TCS(tp)
{
+ if (tp != NULL) {} /* Use tp. */
return atf_no_error();
}
diff --git a/external/bsd/atf/dist/atf-sh/atf-check.1 b/external/bsd/atf/dist/atf-sh/atf-check.1
index 93f5348cfa5..06904bc3ffd 100644
--- a/external/bsd/atf/dist/atf-sh/atf-check.1
+++ b/external/bsd/atf/dist/atf-sh/atf-check.1
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-sh/atf-sh-api.3 b/external/bsd/atf/dist/atf-sh/atf-sh-api.3
index 2450d2df994..247b52c8387 100644
--- a/external/bsd/atf/dist/atf-sh/atf-sh-api.3
+++ b/external/bsd/atf/dist/atf-sh/atf-sh-api.3
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-sh/atf_check_test.sh b/external/bsd/atf/dist/atf-sh/atf_check_test.sh
index ef16516dd82..398e517c106 100644
--- a/external/bsd/atf/dist/atf-sh/atf_check_test.sh
+++ b/external/bsd/atf/dist/atf-sh/atf_check_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-sh/config_test.sh b/external/bsd/atf/dist/atf-sh/config_test.sh
index 287a08f66e9..f7f57f0199f 100644
--- a/external/bsd/atf/dist/atf-sh/config_test.sh
+++ b/external/bsd/atf/dist/atf-sh/config_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010, 2011 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-sh/libatf-sh.subr b/external/bsd/atf/dist/atf-sh/libatf-sh.subr
index 5dd36f59316..8525b220c7c 100644
--- a/external/bsd/atf/dist/atf-sh/libatf-sh.subr
+++ b/external/bsd/atf/dist/atf-sh/libatf-sh.subr
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -33,9 +33,6 @@ set -e
# GLOBAL VARIABLES
# ------------------------------------------------------------------------
-# The list of all test cases defined by the test program.
-Defined_Test_Cases=
-
# Values for the expect property.
Expect=pass
Expect_Reason=
@@ -61,9 +58,7 @@ Test_Case=
Test_Case_Vars=
# The list of all test cases provided by the test program.
-# Subset of ${Defined_Test_Cases}.
Test_Cases=
-Test_Cases_With_Cleanup=
# ------------------------------------------------------------------------
# PUBLIC INTERFACE
@@ -79,9 +74,6 @@ Test_Cases_With_Cleanup=
#
atf_add_test_case()
{
- _atf_is_tc_defined "${1}" || \
- _atf_error 128 "Test case ${1} was not correctly defined by" \
- "this test program"
Test_Cases="${Test_Cases} ${1}"
}
@@ -157,7 +149,7 @@ atf_expect_death()
_atf_validate_expect
Expect=death
- _atf_create_resfile expected_death -1 "${@}"
+ _atf_create_resfile "expected_death: ${*}"
}
#
@@ -170,7 +162,7 @@ atf_expect_timeout()
_atf_validate_expect
Expect=timeout
- _atf_create_resfile expected_timeout -1 "${@}"
+ _atf_create_resfile "expected_timeout: ${*}"
}
#
@@ -185,7 +177,11 @@ atf_expect_exit()
_atf_validate_expect
Expect=exit
- _atf_create_resfile expected_exit "${_exitcode}" "${@}"
+ if [ "${_exitcode}" = "-1" ]; then
+ _atf_create_resfile "expected_exit: ${*}"
+ else
+ _atf_create_resfile "expected_exit(${_exitcode}): ${*}"
+ fi
}
#
@@ -226,7 +222,11 @@ atf_expect_signal()
_atf_validate_expect
Expect=signal
- _atf_create_resfile expected_signal "${_signo}" "${@}"
+ if [ "${_signo}" = "-1" ]; then
+ _atf_create_resfile "expected_signal: ${*}"
+ else
+ _atf_create_resfile "expected_signal(${_signo}): ${*}"
+ fi
}
#
@@ -238,7 +238,7 @@ atf_expect_signal()
#
atf_expected_failure()
{
- _atf_create_resfile expected_failure -1 "${Expect_Reason}:" "${@}"
+ _atf_create_resfile "expected_failure: ${Expect_Reason}: ${*}"
exit 0
}
@@ -256,7 +256,7 @@ atf_fail()
atf_expected_failure "${@}"
;;
pass)
- _atf_create_resfile failed -1 "${@}"
+ _atf_create_resfile "failed: ${*}"
exit 1
;;
*)
@@ -284,18 +284,7 @@ atf_get()
#
atf_get_srcdir()
{
- _atf_internal_get srcdir
-}
-
-#
-# atf_init_test_cases
-#
-# The function in charge of registering the test cases that have to
-# be made available to the user. Must be redefined.
-#
-atf_init_test_cases()
-{
- _atf_error 128 "No test cases defined"
+ echo ${Source_Dir}
}
#
@@ -312,7 +301,7 @@ atf_pass()
atf_fail "Test case was expecting a failure but got a pass instead"
;;
pass)
- _atf_create_resfile passed -1
+ _atf_create_resfile passed
exit 0
;;
*)
@@ -377,7 +366,7 @@ atf_set()
#
atf_skip()
{
- _atf_create_resfile skipped -1 "${@}"
+ _atf_create_resfile "skipped: ${*}"
exit 0
}
@@ -391,12 +380,10 @@ atf_skip()
#
atf_test_case()
{
- Defined_Test_Cases="${Defined_Test_Cases} ${1}"
-
eval "${1}_head() { :; }"
eval "${1}_body() { atf_fail 'Test case not implemented'; }"
if [ "${2}" = cleanup ]; then
- Test_Cases_With_Cleanup="${Test_Cases_With_Cleanup} ${1}"
+ eval __has_cleanup_${1}=true
eval "${1}_cleanup() { :; }"
else
eval "${1}_cleanup() {
@@ -440,70 +427,21 @@ _atf_config_set_from_str()
}
#
-# _atf_create_resfile result arg [reason ...]
+# _atf_create_resfile contents
#
# Creates the results file.
#
_atf_create_resfile()
{
- _result="${1}"; shift
- if [ "${1}" -eq -1 ]; then
- _arg=""
- shift
- else
- _arg="(${1})"
- shift
- fi
- if [ ${#} -gt 0 ]; then
- _reason=": ${*}"
- else
- _reason=""
- fi
-
if [ -n "${Results_File}" ]; then
- echo "${_result}${_arg}${_reason}" >"${Results_File}" || \
+ echo "${*}" >"${Results_File}" || \
_atf_error 128 "Cannot create results file '${Results_File}'"
else
- echo "${_result}${_arg}${_reason}"
+ echo "${*}"
fi
}
#
-# _atf_ensure_boolean var
-#
-# Ensures that the test case defined the variable 'var' to a boolean
-# value.
-#
-_atf_ensure_boolean()
-{
- _atf_ensure_not_empty ${1}
-
- case $(atf_get ${1}) in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee])
- atf_set ${1} true
- ;;
- [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee])
- atf_set ${1} false
- ;;
- *)
- _atf_error 128 "Invalid value for boolean variable \`${1}'"
- ;;
- esac
-}
-
-#
-# _atf_ensure_not_empty var
-#
-# Ensures that the test case defined the variable 'var' to a non-empty
-# value.
-#
-_atf_ensure_not_empty()
-{
- [ -n "$(atf_get ${1})" ] || \
- _atf_error 128 "Undefined or empty variable \`${1}'"
-}
-
-#
# _atf_error error_code [msg1 [.. msgN]]
#
# Prints the given error message (which can be composed of multiple
@@ -567,49 +505,12 @@ _atf_find_in_path()
_atf_has_tc()
{
for _tc in ${Test_Cases}; do
- if [ ${_tc} = ${1} ]; then
- return 0
- fi
+ [ "${_tc}" != "${1}" ] || return 0
done
return 1
}
#
-# _atf_get_bool varname
-#
-# Evaluates a test case-specific variable as a boolean and returns its
-# value.
-#
-_atf_get_bool()
-{
- eval $(atf_get ${1})
-}
-
-#
-# _atf_internal_get varname
-#
-# Prints the value of a test case-specific internal variable. Given
-# that one should not get the value of non-existent variables, it is
-# fine to always use this function as 'val=$(_atf_internal_get var)'.
-#
-_atf_internal_get()
-{
- eval echo \${__tc_internal_var_${Test_Case}_${1}}
-}
-
-#
-# _atf_internal_set varname val1 [.. valN]
-#
-# Sets the test case's private variable 'varname' to the specified
-# values which are concatenated using a single blank space.
-#
-_atf_internal_set()
-{
- _var=${1}; shift
- eval __tc_internal_var_${Test_Case}_${_var}=\"\${*}\"
-}
-
-#
# _atf_list_tcs
#
# Describes all test cases and prints the list to the standard output.
@@ -651,7 +552,6 @@ _atf_normalize()
#
_atf_parse_head()
{
- ${Parsing_Head} && _atf_error 128 "_atf_parse_head called recursively"
Parsing_Head=true
Test_Case="${1}"
@@ -661,11 +561,8 @@ _atf_parse_head()
atf_set has.cleanup "true"
fi
- atf_set ident "${1}"
${1}_head
- _atf_ensure_not_empty ident
- test $(atf_get ident) = "${1}" || \
- _atf_error 128 "Test case redefined ident"
+ atf_set ident "${1}"
Parsing_Head=false
}
@@ -695,78 +592,37 @@ _atf_run_tc()
;;
esac
- if _atf_has_tc ${_tcname}; then
- if [ "${__RUNNING_INSIDE_ATF_RUN}" != "internal-yes-value" ]; then
- _atf_warning "Running test cases without atf-run(1) is unsupported"
- _atf_warning "No isolation nor timeout control is being applied;" \
- "you may get unexpected failures; see atf-test-case(4)"
- fi
-
- _atf_parse_head ${_tcname}
-
- _atf_internal_set srcdir "${Source_Dir}"
+ _atf_has_tc "${_tcname}" || _atf_syntax_error "Unknown test case \`${1}'"
- case ${_tcpart} in
- body)
- if ${_tcname}_body; then
- _atf_validate_expect
- _atf_create_resfile passed -1
- else
- Expect=pass
- atf_fail "Test case body returned a non-ok exit code, but" \
- "this is not allowed"
- fi
- ;;
- cleanup)
- if _atf_has_cleanup "${_tcname}"; then
- if ${_tcname}_cleanup; then
- :
- else
- _atf_error 128 "The test case cleanup returned a non-ok" \
- "exit code, but this is not allowed"
- fi
- fi
- ;;
- *)
- _atf_error 128 "Unknown test case part"
- ;;
- esac
- else
- _atf_syntax_error "Unknown test case \`${1}'"
+ if [ "${__RUNNING_INSIDE_ATF_RUN}" != "internal-yes-value" ]; then
+ _atf_warning "Running test cases without atf-run(1) is unsupported"
+ _atf_warning "No isolation nor timeout control is being applied;" \
+ "you may get unexpected failures; see atf-test-case(4)"
fi
-}
-#
-# _atf_sighup_handler
-#
-# Handler for the SIGHUP signal that registers its occurrence so that
-# it can be processed at a later stage.
-#
-_atf_sighup_handler()
-{
- Held_Signals="${Held_Signals} SIGHUP"
-}
+ _atf_parse_head ${_tcname}
-#
-# _atf_sigint_handler
-#
-# Handler for the SIGINT signal that registers its occurrence so that
-# it can be processed at a later stage.
-#
-_atf_sigint_handler()
-{
- Held_Signals="${Held_Signals} SIGINT"
-}
-
-#
-# _atf_sigterm_handler
-#
-# Handler for the SIGTERM signal that registers its occurrence so that
-# it can be processed at a later stage.
-#
-_atf_sigterm_handler()
-{
- Held_Signals="${Held_Signals} SIGTERM"
+ case ${_tcpart} in
+ body)
+ if ${_tcname}_body; then
+ _atf_validate_expect
+ _atf_create_resfile passed
+ else
+ Expect=pass
+ atf_fail "Test case body returned a non-ok exit code, but" \
+ "this is not allowed"
+ fi
+ ;;
+ cleanup)
+ if _atf_has_cleanup "${_tcname}"; then
+ ${_tcname}_cleanup || _atf_error 128 "The test case cleanup" \
+ "returned a non-ok exit code, but this is not allowed"
+ fi
+ ;;
+ *)
+ _atf_error 128 "Unknown test case part"
+ ;;
+ esac
}
#
@@ -783,20 +639,6 @@ _atf_syntax_error()
}
#
-# _atf_is_tc_defined tc-name
-#
-# Returns a boolean indicating if the given test case was defined by the
-# test program or not.
-#
-_atf_is_tc_defined()
-{
- for _tc in ${Defined_Test_Cases}; do
- [ ${_tc} = ${1} ] && return 0
- done
- return 1
-}
-
-#
# _atf_has_cleanup tc-name
#
# Returns a boolean indicating if the given test case has a cleanup
@@ -804,10 +646,9 @@ _atf_is_tc_defined()
#
_atf_has_cleanup()
{
- for _tc in ${Test_Cases_With_Cleanup}; do
- [ ${_tc} = ${1} ] && return 0
- done
- return 1
+ _found=true
+ eval "[ x\"\${__has_cleanup_${1}}\" = xtrue ] || _found=false"
+ [ "${_found}" = true ]
}
#
@@ -915,17 +756,6 @@ main()
_atf_error 1 "Cannot find the test program in the source" \
"directory \`${Source_Dir}'"
- # Set some global variables useful to the user. Not specific to the
- # test case because they may be needed during initialization too.
- # XXX I'm not too fond on this though. Sure, it is very useful in some
- # situations -- such as in NetBSD's fs/tmpfs/* tests where each test
- # program includes a helper subroutines file -- but there are also
- # other, maybe better ways to achieve the same. Because, for example,
- # at the moment it is not possible to detect failures in the inclusion
- # and report them nicely. Plus this change is difficult to implement
- # in the current C++ API.
- _atf_internal_set srcdir "${Source_Dir}"
-
# Call the test program's hook to register all available test cases.
atf_init_test_cases
diff --git a/external/bsd/atf/dist/atf-sh/misc_helpers.sh b/external/bsd/atf/dist/atf-sh/misc_helpers.sh
index 63364d0c671..8b72f0ae2b7 100644
--- a/external/bsd/atf/dist/atf-sh/misc_helpers.sh
+++ b/external/bsd/atf/dist/atf-sh/misc_helpers.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2011 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-sh/normalize_test.sh b/external/bsd/atf/dist/atf-sh/normalize_test.sh
index b87141cd71f..0f59da03bd6 100644
--- a/external/bsd/atf/dist/atf-sh/normalize_test.sh
+++ b/external/bsd/atf/dist/atf-sh/normalize_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-sh/tc_test.sh b/external/bsd/atf/dist/atf-sh/tc_test.sh
index 6154e37c4b1..5bece420007 100644
--- a/external/bsd/atf/dist/atf-sh/tc_test.sh
+++ b/external/bsd/atf/dist/atf-sh/tc_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010, 2011 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-sh/tp_test.sh b/external/bsd/atf/dist/atf-sh/tp_test.sh
index f2d6ee1b5cf..c159813d51b 100644
--- a/external/bsd/atf/dist/atf-sh/tp_test.sh
+++ b/external/bsd/atf/dist/atf-sh/tp_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010, 2011 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-version/atf-version.1 b/external/bsd/atf/dist/atf-version/atf-version.1
index 751df08ec4d..136f13cd463 100644
--- a/external/bsd/atf/dist/atf-version/atf-version.1
+++ b/external/bsd/atf/dist/atf-version/atf-version.1
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/atf-version/generate-revision.sh b/external/bsd/atf/dist/atf-version/generate-revision.sh
index e7d4d3dab99..4ae6c3bc20a 100755
--- a/external/bsd/atf/dist/atf-version/generate-revision.sh
+++ b/external/bsd/atf/dist/atf-version/generate-revision.sh
@@ -2,7 +2,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/doc/atf-formats.5 b/external/bsd/atf/dist/doc/atf-formats.5
index 1d5edd5b352..bb919f483a9 100644
--- a/external/bsd/atf/dist/doc/atf-formats.5
+++ b/external/bsd/atf/dist/doc/atf-formats.5
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -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 7, 2010
+.Dd December 20, 2011
.Dt ATF-FORMATS 5
.Os
.Sh NAME
@@ -149,7 +149,7 @@ An example:
var1 = this is a variable value
var2 = this is another one # Optional comment at the end.
.Ed
-.Ss Format: application/X-atf-tps, version: 2
+.Ss Format: application/X-atf-tps, version: 3
The
.Sq application/X-atf-tps
format multiplexes the standard output, standard error and results output
@@ -165,14 +165,16 @@ DATA ::= INFO* TPS-COUNT TP-STANZA* INFO* EOF
INFO ::= 'info' COLON STRING COMMA STRING NEWLINE
TPS-COUNT ::= 'tps-count' COLON POSITIVE-NUMBER NEWLINE
TP-STANZA ::= TP-START TC-STANZA* TC-END
-TP-START ::= 'tp-start' COLON STRING COMMA POSITIVE-NUMBER NEWLINE
-TP-END ::= 'tc-end' COLON STRING (COMMA STRING)?
+TP-START ::= 'tp-start' COLON TIMESTAMP COMMA STRING COMMA
+ POSITIVE-NUMBER NEWLINE
+TP-END ::= 'tc-end' COLON TIMESTAMP COMMA STRING (COMMA STRING)?
TC-STANZA ::= TC-START (TC-SO | TC-SE)* TC-END
-TC-START ::= 'tc-start' COLON STRING NEWLINE
+TC-START ::= 'tc-start' COLON TIMESTAMP COMMA STRING NEWLINE
TC-SO ::= 'tc-so' COLON STRING NEWLINE
TC-SE ::= 'tc-se' COLON STRING NEWLINE
-TC-END ::= 'tc-end' COLON STRING COMMA TCR NEWLINE
+TC-END ::= 'tc-end' COLON TIMESTAMP COMMA STRING COMMA TCR NEWLINE
TCR ::= 'passed' | ('failed' | 'skipped') COMMA STRING
+TIMESTAMP ::= [0-9]+.[0-9]+
.Ed
.Pp
The meaning of the constructions above is:
@@ -212,18 +214,18 @@ associated with this result (if applicable).
An example:
.Bd -literal -offset indent
tps-count: 2
-tp-start: calculator, 2
-tc-start: add
-tc-end: add, passed
-tc-start: subtract
+tp-start: calculator, 1324318951.838923, 2
+tc-start: add, 1324318951.839101
+tc-end: add, 1324318951.839500, passed
+tc-start: subtract, 1324318951.840001
tc-so: 3-2 expected to return 1 but got 0
-tc-end: subtract, failed, Calculated an unexpected value
-tp-end: calculator
-tp-start: files, 1
-tc-start: copy
+tc-end: subtract, 1324318952.000123, failed, Calculated an unexpected value
+tp-end: calculator, 1324318952.002301
+tp-start: files, 1, 1324318952.502348
+tc-start: copy, 1324318952.508291
tc-se: could not find the cp(1) utility
-tc-end: copy, skipped
-tp-end: files
+tc-end: copy, 1324318953.203145, skipped
+tp-end: files, 1324318953.203800
.Ed
.Sh SEE ALSO
.Xr atf 7
diff --git a/external/bsd/atf/dist/doc/atf-test-program.1 b/external/bsd/atf/dist/doc/atf-test-program.1
index 39470d13c31..49ee12ddff2 100644
--- a/external/bsd/atf/dist/doc/atf-test-program.1
+++ b/external/bsd/atf/dist/doc/atf-test-program.1
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2007, 2008, 2010, 2011 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/doc/atf.7.in b/external/bsd/atf/dist/doc/atf.7.in
index bf86b9a8557..5fcca44df16 100644
--- a/external/bsd/atf/dist/doc/atf.7.in
+++ b/external/bsd/atf/dist/doc/atf.7.in
@@ -1,7 +1,7 @@
.\"
.\" Automated Testing Framework (atf)
.\"
-.\" Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/test-programs/c_helpers.c b/external/bsd/atf/dist/test-programs/c_helpers.c
index b6fb9182544..95cde6f717a 100644
--- a/external/bsd/atf/dist/test-programs/c_helpers.c
+++ b/external/bsd/atf/dist/test-programs/c_helpers.c
@@ -1,7 +1,7 @@
/*
* Automated Testing Framework (atf)
*
- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -420,10 +420,7 @@ ATF_TC_BODY(fork_stop, tc)
* Helper tests for "t_meta_data".
* --------------------------------------------------------------------- */
-ATF_TC(metadata_no_descr);
-ATF_TC_HEAD(metadata_no_descr, tc)
-{
-}
+ATF_TC_WITHOUT_HEAD(metadata_no_descr);
ATF_TC_BODY(metadata_no_descr, tc)
{
}
@@ -460,23 +457,20 @@ ATF_TC_BODY(srcdir_exists, tc)
* Helper tests for "t_result".
* --------------------------------------------------------------------- */
-ATF_TC(result_pass);
-ATF_TC_HEAD(result_pass, tc) { }
+ATF_TC_WITHOUT_HEAD(result_pass);
ATF_TC_BODY(result_pass, tc)
{
printf("msg\n");
}
-ATF_TC(result_fail);
-ATF_TC_HEAD(result_fail, tc) { }
+ATF_TC_WITHOUT_HEAD(result_fail);
ATF_TC_BODY(result_fail, tc)
{
printf("msg\n");
atf_tc_fail("Failure reason");
}
-ATF_TC(result_skip);
-ATF_TC_HEAD(result_skip, tc) { }
+ATF_TC_WITHOUT_HEAD(result_skip);
ATF_TC_BODY(result_skip, tc)
{
printf("msg\n");
diff --git a/external/bsd/atf/dist/test-programs/config_test.sh b/external/bsd/atf/dist/test-programs/config_test.sh
index 5927c394860..a697bee2b6c 100644
--- a/external/bsd/atf/dist/test-programs/config_test.sh
+++ b/external/bsd/atf/dist/test-programs/config_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/test-programs/cpp_helpers.cpp b/external/bsd/atf/dist/test-programs/cpp_helpers.cpp
index 075ed96064a..4487aefb664 100644
--- a/external/bsd/atf/dist/test-programs/cpp_helpers.cpp
+++ b/external/bsd/atf/dist/test-programs/cpp_helpers.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/test-programs/expect_test.sh b/external/bsd/atf/dist/test-programs/expect_test.sh
index 668f9447e06..46293507db7 100644
--- a/external/bsd/atf/dist/test-programs/expect_test.sh
+++ b/external/bsd/atf/dist/test-programs/expect_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/test-programs/fork_test.sh b/external/bsd/atf/dist/test-programs/fork_test.sh
index 6f66cf0ce02..70f611874e7 100644
--- a/external/bsd/atf/dist/test-programs/fork_test.sh
+++ b/external/bsd/atf/dist/test-programs/fork_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/test-programs/meta_data_test.sh b/external/bsd/atf/dist/test-programs/meta_data_test.sh
index fc6b91279b6..35b00864739 100644
--- a/external/bsd/atf/dist/test-programs/meta_data_test.sh
+++ b/external/bsd/atf/dist/test-programs/meta_data_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
+# Copyright (c) 2010 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/test-programs/result_test.sh b/external/bsd/atf/dist/test-programs/result_test.sh
index 08d1701db60..b2b325c4dae 100644
--- a/external/bsd/atf/dist/test-programs/result_test.sh
+++ b/external/bsd/atf/dist/test-programs/result_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010, 2011 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/test-programs/sh_helpers.sh b/external/bsd/atf/dist/test-programs/sh_helpers.sh
index 31f0d2f470c..de95882f647 100644
--- a/external/bsd/atf/dist/test-programs/sh_helpers.sh
+++ b/external/bsd/atf/dist/test-programs/sh_helpers.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/external/bsd/atf/dist/test-programs/srcdir_test.sh b/external/bsd/atf/dist/test-programs/srcdir_test.sh
index edb45245600..11d6831f886 100644
--- a/external/bsd/atf/dist/test-programs/srcdir_test.sh
+++ b/external/bsd/atf/dist/test-programs/srcdir_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without