diff --git a/external/bsd/atf/dist/AUTHORS b/external/bsd/atf/dist/AUTHORS index 28e7b7e92396..a46576630f97 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 + + 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 40b3401a84b8..6552cc35f7d4 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 d31ba3bc29e1..a247f2de4864 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 5c8d92311d4f..ef8db66632cb 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 993a19310d5e..c0abbbc98cb9 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 8f5fbcdb60eb..b099b07a753a 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 bc0189a9ae0e..055dd4f7209f 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 d57dd290409d..dc6ff5fc6c5d 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 d9ddf9e944fb..7b7d6416c34c 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 1d25fe324984..e11b9bb21d20 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 663d1f4fadd3..a3cd2bb511d4 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 1a3ca91624c0..878b010bcde8 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 #include +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 98644211a7bf..9d1f242004a3 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 7fa1cd6ab610..2a788bfb2880 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 2d345aab6f06..5ca7f09c4f0a 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 97ce87bcc2ea..afdf69be5935 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 936785497751..a7b681d14e11 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 3bf889f8288e..79c5b489e747 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 d774c9e24e43..f655a84d8263 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 03a70db6a213..f6f9b6882ec6 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 6419f512b326..7f4071ee8472 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 55ea718f9768..222ab3a92c29 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 31ef1609679a..3517e261f939 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 8d7a7ba5f7cb..4ffb39b2a582 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 8fe3dfd8e2bf..6cf9bf6c636c 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 5435920438c5..7e7f680c573f 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 060126432dea..f1595f531f55 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 5d8901479afb..491c01457964 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 e442622e282d..deb1158bcf8d 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 ea2bc9f5e743..d13ab9453a8c 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 37ff3188ebf6..6021a6e6890c 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 8b2a73685375..f794ed485b34 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 7da2ac481fdf..5434f2cdee10 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 75e0386a7adf..b7c0ba1af827 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 ca95a6d50d95..07bde4f87dba 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 c51c839fc40a..1c81c56a963d 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 01ee83308474..e9b871bf8b99 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 77c4147315fb..ff97dfbfd5e1 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 6d8438572f22..814cc726b88c 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 40b9559bc95a..8409902c0fdb 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 02337a11f7d0..63ab2ef91a5d 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 98233c3d13ce..1858b7f8e1ed 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 5b0f5e62341b..f75e0a7a1edb 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 +#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 80e92d8148b7..548db4f9f712 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 81818100d1f7..f44d87fb09c2 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 86c00c5cd437..d7a908d3c56a 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 29f42f9cbc01..f36aa3eaef79 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 56fe68241a78..b36dd73afc09 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 f90b5ee4f123..f1047f05583e 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 25ea85158a24..a21d68fe58cc 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 bbdd4ac20cdd..e533a811ffc8 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 981cefbd1b9e..c82209a48046 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 6aa3e58fb975..1b68d38b7722 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 ac76a6ba8f0d..feb4ee53e763 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 cf8642b500c4..6ebf36c8bbef 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 03cf3f23b17d..22cbca439b36 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 #include +#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 90707e7d46b9..ec77c3bb73d4 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 cb017cab2922..043304a0c7d3 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 fa78abfd4f0e..0d005ad05181 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 c58f55c9bcb8..2c0fbcba1eda 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 64f6cd67817a..3aa576cae6b3 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 045abd329ac1..7395adfebd97 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 310a73bdedbb..a3ed7a22745e 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 31b00085a310..644ab6926c15 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 df87d0d579a2..61f1b67c980e 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 d99f96f3be31..af2bbc06f671 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 384a053b0eb7..87c335ec5383 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 c0f9b51db1cc..52d8608b701c 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 9e3a0753bd7a..d91e8d1dcf7e 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 8f67eed9c904..8f8ddf4ccbef 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 6392c2a56683..7bdf9c83129b 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 92c514bfddd9..a62ae0ad615b 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 37a7ffb1e5bb..5a89bf42b22a 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 dea7d26f3d37..d682bcfb4355 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 a60e3b79b3f2..0bf37e7e3eb7 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 b1fe23073eb5..aeb55a8ba47b 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 2d818c3c91c7..a8502801b063 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 6136d592d782..2c2a30789b2c 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 +#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 f54541464490..b6daf6708742 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 #include #include #include @@ -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 cd2f40137197..3dae471e4dd7 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 b11b207da8b9..f7f9f0e9df7a 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 95d8ea7d5cb9..8770808cad8f 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 99f60a0b9086..4aaf9a54c242 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 @@ -39,6 +39,10 @@ * --------------------------------------------------------------------- */ ATF_TC_HEAD(empty, tc) +{ + if (tc != NULL) {} +} +ATF_TC_BODY(empty, tc) { } @@ -47,10 +51,6 @@ ATF_TC_HEAD(test_var, tc) atf_tc_set_md_var(tc, "test-var", "Test text"); } -ATF_TC_BODY(empty, tc) -{ -} - /* --------------------------------------------------------------------- * Test cases for the "atf_tc_t" type. * --------------------------------------------------------------------- */ diff --git a/external/bsd/atf/dist/atf-c/tp.c b/external/bsd/atf/dist/atf-c/tp.c index 6c5a9ec7fef7..7833498ac15e 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 f832b9003f2f..e4f9ba46e936 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 54d9e3568c21..5da18b20bdac 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 abdbe68d846f..deae6f6406cb 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 2064bc8518ff..e5fdca1950e4 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 #include +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 410f98d9bd01..df03af0e072e 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 a73fbfe54ba8..1009f0e47961 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 3768da47abd1..b19346a86c3f 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 <expout <expout <>'; 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 \`<>'; expected \`:' EOF # NO_CHECK_STYLE_END - atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o csv:- expout <>'; 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:- expout < + @@ -332,32 +343,33 @@ output_xml_body() - - +#.# +#.# This always fails - - +#.# +#.# - - +#.# +#.# This always fails - - +#.# +#.# Invalid format for test case list: 1: Unexpected token \`<<NEWLINE>>'; expected \`:' - +#.# Another value EOF # NO_CHECK_STYLE_END - atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o xml:- [0-9]+.[0-9]{6}#.#expout < + @@ -400,15 +412,25 @@ EOF EOF - - +#.# +#.# Another value EOF # NO_CHECK_STYLE_END run_helpers - atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o xml:- [0-9]+.[0-9]{6}#.#experr < +} + #include #include #include +#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 fc6ce4735021..2ef038a0de4f 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 +} + #include #include @@ -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 482f8acf5151..59e4059efccc 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 `<>'; expected `:'", - "6: Unexpected token `<>'; expected test program name", - "7: Unexpected token `<>'; expected `,'", - "8: Unexpected token `<>'; expected number of test programs", - "10: Unexpected token `bar'; expected end of test program", - "12: Unexpected token `<>'; expected `:'", - "14: Unexpected token `<>'; 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 `<>'; expected timestamp", + "7: Malformed timestamp value 123", + "8: Malformed timestamp value 123.", + "9: Unexpected token `<>'; expected `,'", + "10: Unexpected token `<>'; expected test program name", + "11: Unexpected token `<>'; expected `,'", + "12: Unexpected token `<>'; expected number of test programs", + "14: Unexpected token `bar'; expected end of test program", + "16: Unexpected token `<>'; expected `:'", + "18: Unexpected token `<>'; expected timestamp", + "20: Malformed timestamp value 777", + "22: Malformed timestamp value 777.", + "24: Unexpected token `<>'; expected `,'", + + "26: Unexpected token `<>'; 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 `<>'; expected `:'", - "7: Unexpected token `<>'; expected test case name", - "9: Unexpected token `bar'; expected end of test case or test case's stdout/stderr line", - "11: Unexpected token `<>'; expected `:'", - "13: Unexpected token `<>'; expected test case name", - "15: Test case name used in terminator does not match opening", - "17: Unexpected token `<>'; expected `,'", - "19: Unexpected token `<>'; expected expected_{death,exit,failure,signal,timeout}, failed, passed or skipped", - "20: Unexpected token `tp-end'; expected start of test case", + "7: Unexpected token `<>'; expected timestamp", + "8: Malformed timestamp value 111", + "9: Malformed timestamp value 111.", + "10: Unexpected token `<>'; expected `,'", + "11: Unexpected token `<>'; expected test case name", + "13: Unexpected token `bar'; expected end of test case or test case's stdout/stderr line", + "15: Unexpected token `<>'; expected `:'", + "17: Unexpected token `<>'; expected timestamp", + "19: Malformed timestamp value 111", + "21: Malformed timestamp value 111.", + "23: Unexpected token `<>'; expected `,'", + "25: Unexpected token `<>'; expected test case name", + "27: Test case name used in terminator does not match opening", + "29: Unexpected token `<>'; expected `,'", + "31: Unexpected token `<>'; 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 `<>'; expected `:'", + "5: Unexpected token `<>'; 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 99c4ec579d36..c16f7edfb53f 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 @@