CVS commit: src/external/bsd/atf/dist/tools

2021-07-08 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Jul  8 18:10:52 UTC 2021

Modified Files:
src/external/bsd/atf/dist/tools: atf-run.cpp

Log Message:
When running an individual test case under isolation, make the test
case count on the tp-start line of the output match the number of test
cases actually executed (one) so that the atf-run output is valid
input to atf-report.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/tools/atf-run.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/atf-run.cpp
diff -u src/external/bsd/atf/dist/tools/atf-run.cpp:1.6 src/external/bsd/atf/dist/tools/atf-run.cpp:1.7
--- src/external/bsd/atf/dist/tools/atf-run.cpp:1.6	Sat Apr 10 10:32:57 2021
+++ src/external/bsd/atf/dist/tools/atf-run.cpp	Thu Jul  8 18:10:52 2021
@@ -388,7 +388,22 @@ atf_run::run_test_program(const tools::f
 tools::fs::temp_dir resdir(
 tools::fs::path(tools::config::get("atf_workdir")) / "atf-run.XX");
 
-w.start_tp(tp.str(), md.test_cases.size());
+size_t nseltcs;
+if (tc.empty()) {
+nseltcs = md.test_cases.size();
+} else {
+nseltcs = 0;
+for (std::map< std::string, vars_map >::const_iterator iter
+ = md.test_cases.begin(); iter != md.test_cases.end(); iter++) {
+const std::string& tcname = (*iter).first;
+if (tcname == tc)
+nseltcs++;
+}
+if (nseltcs == 0)
+throw std::runtime_error("No such test case");
+}
+
+w.start_tp(tp.str(), nseltcs);
 if (md.test_cases.empty()) {
 w.end_tp("Bogus test program: reported 0 test cases");
 errcode = EXIT_FAILURE;



CVS commit: src/external/bsd/atf/dist/tools

2021-04-10 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Apr 10 10:32:57 UTC 2021

Modified Files:
src/external/bsd/atf/dist/tools: atf-run.1 atf-run.cpp

Log Message:
Add support for running individual test cases under isolation.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/atf-run.1
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/tools/atf-run.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/atf-run.1
diff -u src/external/bsd/atf/dist/tools/atf-run.1:1.4 src/external/bsd/atf/dist/tools/atf-run.1:1.5
--- src/external/bsd/atf/dist/tools/atf-run.1:1.4	Sat Feb  8 19:13:44 2014
+++ src/external/bsd/atf/dist/tools/atf-run.1	Sat Apr 10 10:32:57 2021
@@ -26,23 +26,22 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 1, 2010
+.Dd April 10, 2021
 .Dt ATF-RUN 1
 .Os
 .Sh NAME
 .Nm atf-run
-.Nd executes a collection of test programs
+.Nd executes a collection of tests
 .Sh SYNOPSIS
 .Nm
 .Op Fl v Ar var1=value1 Op .. Fl v Ar varN=valueN
-.Op Ar test_program1 Op Ar .. test_programN
+.Op Ar test1 Op Ar .. testN
 .Nm
 .Fl h
 .Sh DESCRIPTION
 .Nm
-executes a collection of test programs or, in other words, a complete
-test suite.
-The results of each test program are collected by the tool, and are then
+executes a collection of test cases, test programs, or a complete test suite.
+The results of each test are collected by the tool, and are then
 multiplexed into a single machine-parseable report; see
 .Xr atf-formats 5
 for more details.
@@ -70,8 +69,14 @@ In the first synopsis form,
 parses the
 .Pa Atffile
 in the current directory and runs all the test programs specified in it.
-If any test program names are given as part of the command line, those are
-the ones executed instead of the complete list.
+If any
+.Ar test
+arguments are given as part of the command line, those tests are
+executed instead of the complete list.  Each
+.Ar test
+argument can be either the name of a test program, or a string of the form
+.Ar test_program:test_case
+to execute a single test case.
 .Pp
 In the second synopsis form,
 .Nm

Index: src/external/bsd/atf/dist/tools/atf-run.cpp
diff -u src/external/bsd/atf/dist/tools/atf-run.cpp:1.5 src/external/bsd/atf/dist/tools/atf-run.cpp:1.6
--- src/external/bsd/atf/dist/tools/atf-run.cpp:1.5	Tue Feb 11 18:13:45 2014
+++ src/external/bsd/atf/dist/tools/atf-run.cpp	Sat Apr 10 10:32:57 2021
@@ -81,11 +81,13 @@ class atf_run : public tools::applicatio
 
 size_t count_tps(std::vector< std::string >) const;
 
-int run_test(const tools::fs::path&, tools::test_program::atf_tps_writer&,
+int run_test(const tools::fs::path&, const std::string &,
+ tools::test_program::atf_tps_writer&,
  const vars_map&);
 int run_test_directory(const tools::fs::path&,
tools::test_program::atf_tps_writer&);
 int run_test_program(const tools::fs::path&,
+ const std::string tc,
  tools::test_program::atf_tps_writer&,
  const vars_map&);
 
@@ -179,7 +181,7 @@ std::string
 atf_run::specific_args(void)
 const
 {
-return "[test-program1 .. test-programN]";
+return "[test1 .. testN]";
 }
 
 atf_run::options_set
@@ -214,6 +216,7 @@ atf_run::parse_vflag(const std::string& 
 
 int
 atf_run::run_test(const tools::fs::path& tp,
+  const std::string ,
   tools::test_program::atf_tps_writer& w,
   const vars_map& config)
 {
@@ -226,7 +229,7 @@ atf_run::run_test(const tools::fs::path&
 const vars_map effective_config =
 tools::config_file::merge_configs(config, m_cmdline_vars);
 
-errcode = run_test_program(tp, w, effective_config);
+errcode = run_test_program(tp, tc, w, effective_config);
 }
 return errcode;
 }
@@ -247,7 +250,7 @@ atf_run::run_test_directory(const tools:
 bool ok = true;
 for (std::vector< std::string >::const_iterator iter = af.tps().begin();
  iter != af.tps().end(); iter++) {
-const bool result = run_test(tp / *iter, w,
+const bool result = run_test(tp / *iter, "", w,
 tools::config_file::merge_configs(af.conf(), test_suite_vars));
 ok &= (result == EXIT_SUCCESS);
 }
@@ -362,6 +365,7 @@ atf_run::get_test_case_result(const std:
 
 int
 atf_run::run_test_program(const tools::fs::path& tp,
+  const std::string tc,
   tools::test_program::atf_tps_writer& w,
   const vars_map& config)
 {
@@ -394,6 +398,9 @@ atf_run::run_test_program(const tools::f
 const std::string& tcname = (*iter).first;
 const vars_map& tcmd = (*iter).second;
 
+  

CVS commit: src/external/bsd/atf/dist/tools

2021-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 28 16:35:37 UTC 2021

Modified Files:
src/external/bsd/atf/dist/tools: fs.cpp fs.hpp test-program.cpp

Log Message:
If we are running the test as an unprivileged user, hand ownership of the
test directory to that user.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/fs.cpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/tools/fs.hpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/tools/test-program.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/fs.cpp
diff -u src/external/bsd/atf/dist/tools/fs.cpp:1.4 src/external/bsd/atf/dist/tools/fs.cpp:1.5
--- src/external/bsd/atf/dist/tools/fs.cpp:1.4	Sat Nov 11 09:16:06 2017
+++ src/external/bsd/atf/dist/tools/fs.cpp	Sun Mar 28 12:35:37 2021
@@ -683,6 +683,17 @@ impl::rmdir(const path& p)
 }
 }
 
+void
+impl::change_ownership(const path& p, const std::pair < int, int >& user)
+{
+if (::chown(p.c_str(), user.first, user.second) == -1) {
+std::stringstream ss;
+ss << IMPL_NAME "::chown(" << p.str() << ", " << user.first << ", "
+   << user.second << ")";
+throw tools::system_error(ss.str(), "chown(2) failed", errno);
+}
+}
+
 impl::path
 impl::change_directory(const path& dir)
 {

Index: src/external/bsd/atf/dist/tools/fs.hpp
diff -u src/external/bsd/atf/dist/tools/fs.hpp:1.2 src/external/bsd/atf/dist/tools/fs.hpp:1.3
--- src/external/bsd/atf/dist/tools/fs.hpp:1.2	Mon Mar  9 16:34:52 2020
+++ src/external/bsd/atf/dist/tools/fs.hpp	Sun Mar 28 12:35:37 2021
@@ -368,6 +368,7 @@ void remove(const path&);
 void rmdir(const path&);
 
 tools::fs::path change_directory(const tools::fs::path&);
+void change_ownership(const tools::fs::path&, const std::pair< int, int >&);
 void cleanup(const tools::fs::path&);
 tools::fs::path get_current_dir(void);
 

Index: src/external/bsd/atf/dist/tools/test-program.cpp
diff -u src/external/bsd/atf/dist/tools/test-program.cpp:1.3 src/external/bsd/atf/dist/tools/test-program.cpp:1.4
--- src/external/bsd/atf/dist/tools/test-program.cpp:1.3	Wed Dec 30 17:23:38 2015
+++ src/external/bsd/atf/dist/tools/test-program.cpp	Sun Mar 28 12:35:37 2021
@@ -304,8 +304,10 @@ run_test_case_child(void* raw_params)
 
 const std::pair< int, int > user = tools::get_required_user(
 params->metadata, params->config);
-if (user.first != -1 && user.second != -1)
+if (user.first != -1 && user.second != -1) {
+tools::fs::change_ownership(params->workdir, user);
 tools::user::drop_privileges(user);
+}
 
 // The input 'tp' parameter may be relative and become invalid once
 // we change the current working directory.



CVS commit: src/external/bsd/atf/dist/atf-sh

2020-09-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Sep 10 22:51:11 UTC 2020

Modified Files:
src/external/bsd/atf/dist/atf-sh: libatf-sh.subr

Log Message:
Replace a pipe into tr to normalise a var name (convert '.' or '-'
into '_' to meet sh variable name rules) into a shell string processing
loop.

On my test system, this reduces the total elapsed time for the bin/sh ATF
tests from about 109 secs to about 102 (user cpu from 24.5 to 21, sys cpu
from 34 to 30) and the usr.bin/make tests elapsed time from 42.5 to 40
secs (user from a bit over 15 to a bit over 13, and sys from 16+ to 13+).
(Recorded on an AMD64 domU).

These probably exaggerate the effect, as there are a bunch of quite small
tests, which means the ATF overhead (which this change affects) is a greater
proportion of the total test time than for some other tests where most of
the time is spent actually testing.

But I am fairly confident that there will be at least some improvement.

This could be further improved by removing the cmdsub invocation method,
and instead passing the name of a variable containing the string to
normalise (with the result returned in that same var) - but that would
mean altering all the callers as well.   Some other time maybe.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/libatf-sh.subr
diff -u src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.4 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.5
--- src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.4	Wed Dec 30 22:23:02 2015
+++ src/external/bsd/atf/dist/atf-sh/libatf-sh.subr	Thu Sep 10 22:51:10 2020
@@ -544,7 +544,15 @@ _atf_list_tcs()
 #
 _atf_normalize()
 {
-echo ${1} | tr .- __
+while :
+do
+	case "${1}" in
+	(*.*)	set -- "${1%.*}_${1##*.}";;
+	(*-*)	set -- "${1%-*}_${1##*-}";;
+	(*)	break;;
+	esac
+done
+printf "%s\n" "$1"
 }
 
 #



CVS commit: src/external/bsd/atf/dist/atf-c

2020-07-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jul  3 19:22:39 UTC 2020

Modified Files:
src/external/bsd/atf/dist/atf-c: atf-c-api.3

Log Message:
Consistent use of comma in lists.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-c/atf-c-api.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/atf-c-api.3
diff -u src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.4 src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.5
--- src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.4	Sat Feb  8 19:13:43 2014
+++ src/external/bsd/atf/dist/atf-c/atf-c-api.3	Fri Jul  3 19:22:38 2020
@@ -276,15 +276,15 @@ In order to do so, a later registration 
 macro detailed in
 .Sx Program initialization .
 .Pp
-Later on, one must define the three parts of the body by means of three
+Later on, one must define the three parts of the test by means of three
 functions.
 Their headers are given by the
 .Fn ATF_TC_HEAD ,
-.Fn ATF_TC_BODY
+.Fn ATF_TC_BODY ,
 and
 .Fn ATF_TC_CLEANUP
 macros, all of which take the test case name provided to the
-.Fn ATF_TC
+.Fn ATF_TC ,
 .Fn ATF_TC_WITH_CLEANUP ,
 or
 .Fn ATF_TC_WITHOUT_HEAD



CVS commit: src/external/bsd/atf/dist/tools

2020-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 23 16:05:16 UTC 2020

Modified Files:
src/external/bsd/atf/dist/tools: env.cpp

Log Message:
Add the system binary paths too since tests use them.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/tools/env.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/env.cpp
diff -u src/external/bsd/atf/dist/tools/env.cpp:1.3 src/external/bsd/atf/dist/tools/env.cpp:1.4
--- src/external/bsd/atf/dist/tools/env.cpp:1.3	Mon Mar 30 21:02:18 2020
+++ src/external/bsd/atf/dist/tools/env.cpp	Thu Apr 23 12:05:15 2020
@@ -53,7 +53,7 @@ impl::get(const std::string& name)
 if (val != NULL)
 	return val;
 if (strcmp(n, "PATH") == 0)
-	return "/bin:/usr/bin";
+	return "/bin:/usr/bin:/sbin:/usr/sbin";
 	
 throw tools::system_error(IMPL_NAME "::set",
 			"Cannot get environment variable '" + name +



CVS commit: src/external/bsd/atf/dist/tools

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 31 01:02:18 UTC 2020

Modified Files:
src/external/bsd/atf/dist/tools: env.cpp

Log Message:
Allow env - atf-run to work by setting a default minimal path.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/tools/env.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/env.cpp
diff -u src/external/bsd/atf/dist/tools/env.cpp:1.2 src/external/bsd/atf/dist/tools/env.cpp:1.3
--- src/external/bsd/atf/dist/tools/env.cpp:1.2	Tue Feb 11 12:28:20 2014
+++ src/external/bsd/atf/dist/tools/env.cpp	Mon Mar 30 21:02:18 2020
@@ -48,9 +48,16 @@ namespace impl = tools::env;
 std::string
 impl::get(const std::string& name)
 {
-const char* val = getenv(name.c_str());
-assert(val != NULL);
-return val;
+const char *n =name.c_str();
+const char* val = getenv(n);
+if (val != NULL)
+	return val;
+if (strcmp(n, "PATH") == 0)
+	return "/bin:/usr/bin";
+	
+throw tools::system_error(IMPL_NAME "::set",
+			"Cannot get environment variable '" + name +
+			"'", errno);
 }
 
 bool



CVS commit: src/external/bsd/atf/dist/tools

2017-11-11 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Nov 11 14:16:06 UTC 2017

Modified Files:
src/external/bsd/atf/dist/tools: fs.cpp

Log Message:
don't use auto_ptr with memory allocated by C code
silences alloc-dealloc-mismatch warnings from asan

from joerg


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/tools/fs.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/fs.cpp
diff -u src/external/bsd/atf/dist/tools/fs.cpp:1.3 src/external/bsd/atf/dist/tools/fs.cpp:1.4
--- src/external/bsd/atf/dist/tools/fs.cpp:1.3	Tue Feb 11 18:13:45 2014
+++ src/external/bsd/atf/dist/tools/fs.cpp	Sat Nov 11 14:16:06 2017
@@ -707,11 +707,17 @@ impl::cleanup(const path& p)
 impl::path
 impl::get_current_dir(void)
 {
-std::auto_ptr< char > cwd;
-cwd.reset(getcwd(NULL, 0));
-if (cwd.get() == NULL)
+char *cwd = getcwd(NULL, 0);
+if (cwd == NULL)
 throw tools::system_error(IMPL_NAME "::get_current_dir()",
 "getcwd() failed", errno);
 
-return path(cwd.get());
+try {
+impl::path p(cwd);
+free(cwd);
+return p;
+} catch(...) {
+free(cwd);
+throw;
+}
 }



CVS commit: src/external/bsd/atf/dist/atf-sh

2017-05-14 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon May 15 04:54:09 UTC 2017

Modified Files:
src/external/bsd/atf/dist/atf-sh: atf-sh-api.3

Log Message:
Add some information learned from experience with using (and abusing)
this API...

While here do some markup improvements (it is amazing what one can
learn from observing a wizard at work!) (which still probably need more work.)
In particular, sh functions are not functions in the mdoc .Fn sense!
(Many places where explicit double quotes were not doing what was intended.)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 src/external/bsd/atf/dist/atf-sh/atf-sh-api.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/atf-sh-api.3
diff -u src/external/bsd/atf/dist/atf-sh/atf-sh-api.3:1.1.1.7 src/external/bsd/atf/dist/atf-sh/atf-sh-api.3:1.2
--- src/external/bsd/atf/dist/atf-sh/atf-sh-api.3:1.1.1.7	Sat Feb  8 19:11:32 2014
+++ src/external/bsd/atf/dist/atf-sh/atf-sh-api.3	Mon May 15 04:54:09 2017
@@ -26,7 +26,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 13, 2013
+.Dd May 15, 2017
 .Dt ATF-SH-API 3
 .Os
 .Sh NAME
@@ -51,25 +51,44 @@
 .Nm atf_test_case
 .Nd POSIX shell API to write ATF-based test programs
 .Sh SYNOPSIS
-.Fn atf_add_test_case "name"
-.Fn atf_check "command"
-.Fn atf_check_equal "expr1" "expr2"
-.Fn atf_config_get "var_name"
-.Fn atf_config_has "var_name"
-.Fn atf_expect_death "reason" "..."
-.Fn atf_expect_exit "exitcode" "reason" "..."
-.Fn atf_expect_fail "reason" "..."
-.Fn atf_expect_pass
-.Fn atf_expect_signal "signo" "reason" "..."
-.Fn atf_expect_timeout "reason" "..."
-.Fn atf_fail "reason"
-.Fn atf_get "var_name"
-.Fn atf_get_srcdir
-.Fn atf_pass
-.Fn atf_require_prog "prog_name"
-.Fn atf_set "var_name" "value"
-.Fn atf_skip "reason"
-.Fn atf_test_case "name" "cleanup"
+.Ic atf_add_test_case Dq name
+.br
+.Ic atf_check Dq command
+.br
+.Ic atf_check_equal Do expr1 Dc Dq expr2
+.br
+.Ic atf_config_get Dq var_name
+.br
+.Ic atf_config_has Dq var_name
+.br
+.Ic atf_expect_death Do reason Dc Dq \&...
+.br
+.Ic atf_expect_exit Do exitcode Dc Do reason Dc Dq \&...
+.br
+.Ic atf_expect_fail Do reason Dc Dq \&...
+.br
+.Ic atf_expect_pass
+.br
+.Ic atf_expect_signal Do signo Dc Do reason Dc Dq \&...
+.br
+.Ic atf_expect_timeout Do reason Dc Dq \&...
+.br
+.Ic atf_fail Dq reason
+.br
+.Ic atf_get Dq var_name
+.br
+.Ic atf_get_srcdir
+.br
+.Ic atf_pass
+.br
+.Ic atf_require_prog Dq prog_name
+.br
+.Ic atf_set Do var_name Dc Dq value
+.br
+.Ic atf_skip Dq reason
+.br
+.Ic atf_test_case Do name Dc Dq cleanup
+.br
 .Sh DESCRIPTION
 ATF
 provides a simple but powerful interface to easily write test programs in
@@ -114,13 +133,43 @@ atf_init_test_cases() {
 ... add additional test cases ...
 }
 .Ed
+.Pp
+All of these functions are required to return with an exit-status of
+zero, or ATF will determine that the test is faulty.
+In particular, this means that none may end with a conditional like:
+.Bd -literal -offset indent
+atf_sh_function() {
+... appropriate code here ...
+condition-test && {
+	... more code here ...
+}
+}
+.Ed
+.Pp
+as if condition-test fails
+the return code from atf_sh_function will not be 0.
+This can be corrected by adding
+.Bd -literal -offset indent
+return 0
+.Ed
+.Pp
+before the end of the function, or by writing it as
+.Bd -literal -offset indent
+atf_sh_function() {
+... appropriate code here ...
+if condition-test
+then
+	... more code here ...
+fi
+}
+.Ed
 .Ss Definition of test cases
 Test cases have an identifier and are composed of three different parts:
 the header, the body and an optional cleanup routine, all of which are
 described in
 .Xr atf-test-case 4 .
 To define test cases, one can use the
-.Fn atf_test_case
+.Ic atf_test_case
 function, which takes a first parameter specifiying the test case's
 name and instructs the library to set things up to accept it as a valid
 test case.
@@ -132,33 +181,34 @@ It is important to note that this functi
 .Em does not
 set the test case up for execution when the program is run.
 In order to do so, a later registration is needed through the
-.Fn atf_add_test_case
+.Ic atf_add_test_case
 function detailed in
 .Sx Program initialization .
 .Pp
 Later on, one must define the three parts of the body by providing two
 or three functions (remember that the cleanup routine is optional).
 These functions are named after the test case's identifier, and are
-.Fn _head ,
-.Fn _body
+.Ic _head ,
+.Ic _body
 and
-.Fn _cleanup.
+.Ic _cleanup.
 None of these take parameters when executed.
 .Ss Program initialization
 The test program must define an
-.Fn atf_init_test_cases
+.Ic atf_init_test_cases
 function, which is in charge of registering the test cases that will be
 executed at run time by using 

CVS commit: src/external/bsd/atf/dist/atf-sh

2015-12-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 30 22:23:02 UTC 2015

Modified Files:
src/external/bsd/atf/dist/atf-sh: libatf-sh.subr

Log Message:
Work around ksh bug


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/libatf-sh.subr
diff -u src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.3 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.4
--- src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.3	Thu Jan  9 20:39:32 2014
+++ src/external/bsd/atf/dist/atf-sh/libatf-sh.subr	Wed Dec 30 17:23:02 2015
@@ -526,7 +526,10 @@ _atf_list_tcs()
 
 echo "ident: $(atf_get ident)"
 for _var in ${Test_Case_Vars}; do
+	# Elide ksh bug!
+	set +e
 [ "${_var}" != "ident" ] && echo "${_var}: $(atf_get ${_var})"
+	set -e
 done
 
 [ ${#} -gt 1 ] && echo



CVS commit: src/external/bsd/atf/dist/tools

2015-12-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 30 22:23:38 UTC 2015

Modified Files:
src/external/bsd/atf/dist/tools: process.cpp process.hpp
test-program.cpp

Log Message:
Print symbolically why the process exited.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/tools/process.cpp
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/tools/process.hpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/tools/test-program.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/process.cpp
diff -u src/external/bsd/atf/dist/tools/process.cpp:1.3 src/external/bsd/atf/dist/tools/process.cpp:1.4
--- src/external/bsd/atf/dist/tools/process.cpp:1.3	Tue Feb 11 13:13:45 2014
+++ src/external/bsd/atf/dist/tools/process.cpp	Wed Dec 30 17:23:38 2015
@@ -360,6 +360,25 @@ impl::status::~status(void)
 {
 }
 
+std::string
+impl::status::str(void)
+ const
+{
+int mutable_status = m_status;
+std::stringstream rv;
+if (WIFEXITED(mutable_status))
+	rv << "exit("  << WEXITSTATUS(mutable_status);
+else if (WIFSTOPPED(mutable_status))
+	rv << "stopped("  << WSTOPSIG(mutable_status);
+else if (WIFSIGNALED(mutable_status))
+	rv << "terminated("  << WTERMSIG(mutable_status);
+if (WCOREDUMP(mutable_status))
+	rv << "/core)";
+else
+	rv << ")";
+return rv.str();
+}
+
 bool
 impl::status::exited(void)
 const

Index: src/external/bsd/atf/dist/tools/process.hpp
diff -u src/external/bsd/atf/dist/tools/process.hpp:1.1.1.1 src/external/bsd/atf/dist/tools/process.hpp:1.2
--- src/external/bsd/atf/dist/tools/process.hpp:1.1.1.1	Sat Feb  8 14:11:33 2014
+++ src/external/bsd/atf/dist/tools/process.hpp	Wed Dec 30 17:23:38 2015
@@ -207,6 +207,8 @@ class status {
 public:
 ~status(void);
 
+std::string str(void) const;
+
 bool exited(void) const;
 int exitstatus(void) const;
 

Index: src/external/bsd/atf/dist/tools/test-program.cpp
diff -u src/external/bsd/atf/dist/tools/test-program.cpp:1.2 src/external/bsd/atf/dist/tools/test-program.cpp:1.3
--- src/external/bsd/atf/dist/tools/test-program.cpp:1.2	Tue Feb 11 11:31:38 2014
+++ src/external/bsd/atf/dist/tools/test-program.cpp	Wed Dec 30 17:23:38 2015
@@ -664,7 +664,7 @@ impl::get_metadata(const tools::fs::path
 const tools::process::status status = child.wait();
 if (!status.exited() || status.exitstatus() != EXIT_SUCCESS)
 throw tools::parser::format_error("Test program returned failure "
-"exit status for test case list");
+	"exit status " + status.str() + " for test case list");
 
 return metadata(parser.get_tcs());
 }



CVS commit: src/external/bsd/atf/dist/atf-sh

2015-12-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 01:43:58 UTC 2015

Modified Files:
src/external/bsd/atf/dist/atf-sh: atf-check.cpp

Log Message:
fix the open error messages to include the right file and strerror


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/dist/atf-sh/atf-check.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/atf-check.cpp
diff -u src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.9 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.10
--- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.9	Sat Feb  8 14:13:44 2014
+++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp	Thu Dec  3 20:43:58 2015
@@ -359,11 +359,20 @@ execute_with_shell(char* const* argv)
 
 static
 void
+open_error(const atf::fs::path& path)
+{
+throw std::runtime_error("Failed to open " + path.str() + " "
+	+ ::strerror(errno));
+}
+	
+
+static
+void
 cat_file(const atf::fs::path& path)
 {
 std::ifstream stream(path.c_str());
 if (!stream)
-throw std::runtime_error("Failed to open " + path.str());
+	open_error(path);
 
 stream >> std::noskipws;
 std::istream_iterator< char > begin(stream), end;
@@ -379,7 +388,7 @@ grep_file(const atf::fs::path& path, con
 {
 std::ifstream stream(path.c_str());
 if (!stream)
-throw std::runtime_error("Failed to open " + path.str());
+	open_error(path);
 
 bool found = false;
 
@@ -410,11 +419,11 @@ compare_files(const atf::fs::path& p1, c
 
 std::ifstream f1(p1.c_str());
 if (!f1)
-throw std::runtime_error("Failed to open " + p1.str());
+	open_error(p1);
 
 std::ifstream f2(p2.c_str());
 if (!f2)
-throw std::runtime_error("Failed to open " + p1.str());
+	open_error(p2);
 
 for (;;) {
 char buf1[512], buf2[512];



CVS commit: src/external/bsd/atf/dist/atf-sh

2015-02-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb 23 08:48:18 UTC 2015

Modified Files:
src/external/bsd/atf/dist/atf-sh: atf_check_test.sh

Log Message:
Wait 10 seconds instead of 1 before killing the helper - otherwise on slow
machines it might not have gotten around to execute the first command at
all (and since it next waits for 42 seconds, 10 seconds is safe).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 \
src/external/bsd/atf/dist/atf-sh/atf_check_test.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/atf_check_test.sh
diff -u src/external/bsd/atf/dist/atf-sh/atf_check_test.sh:1.1.1.5 src/external/bsd/atf/dist/atf-sh/atf_check_test.sh:1.2
--- src/external/bsd/atf/dist/atf-sh/atf_check_test.sh:1.1.1.5	Sat Feb  8 19:11:32 2014
+++ src/external/bsd/atf/dist/atf-sh/atf_check_test.sh	Mon Feb 23 08:48:18 2015
@@ -174,7 +174,7 @@ flush_stdout_on_timeout_body()
 $(atf_get_srcdir)/misc_helpers -s $(atf_get_srcdir) atf_check_timeout \
 out 2err 
 pid=${!}
-sleep 1
+sleep 10
 kill ${pid}
 
 grep 'Executing command.*true' out \



CVS commit: src/external/bsd/atf/dist

2015-01-22 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Jan 22 12:33:36 UTC 2015

Modified Files:
src/external/bsd/atf/dist/atf-c: macros_test.c
src/external/bsd/atf/dist/atf-c++: macros_test.cpp

Log Message:
Mark atf/atf-c/macros_test/detect_unused_tests and
atf/atf-c++/macros_test/detect_unused_tests as expected failures
when using versions of GCC where they are known to fail, with a
reference to PR toolchain/49187.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-c/macros_test.c
cvs rdiff -u -r1.1.1.8 -r1.2 \
src/external/bsd/atf/dist/atf-c++/macros_test.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/macros_test.c
diff -u src/external/bsd/atf/dist/atf-c/macros_test.c:1.4 src/external/bsd/atf/dist/atf-c/macros_test.c:1.5
--- src/external/bsd/atf/dist/atf-c/macros_test.c:1.4	Sat Feb  8 19:13:43 2014
+++ src/external/bsd/atf/dist/atf-c/macros_test.c	Thu Jan 22 12:33:35 2015
@@ -863,6 +863,10 @@ ATF_TC_BODY(detect_unused_tests, tc)
 atf_tc_expect_fail(Compiler does not raise a warning on an unused 
static global variable declared by a macro);
 
+#if __GNUC__  4 || (__GNUC__ == 4  __GNUC_MINOR__ = 8)
+atf_tc_expect_fail(PR 49187);
+#endif
+
 if (build_check_c_o_srcdir(tc, unused_test.c))
 atf_tc_fail(Build of unused_test.c passed; unused test cases are 
 not properly detected);

Index: src/external/bsd/atf/dist/atf-c++/macros_test.cpp
diff -u src/external/bsd/atf/dist/atf-c++/macros_test.cpp:1.1.1.8 src/external/bsd/atf/dist/atf-c++/macros_test.cpp:1.2
--- src/external/bsd/atf/dist/atf-c++/macros_test.cpp:1.1.1.8	Sat Feb  8 19:11:31 2014
+++ src/external/bsd/atf/dist/atf-c++/macros_test.cpp	Thu Jan 22 12:33:36 2015
@@ -783,6 +783,10 @@ ATF_TEST_CASE_BODY(detect_unused_tests)
 expect_fail(Compiler does not raise a warning on an unused 
 static global variable declared by a macro);
 
+#if __GNUC__  4 || (__GNUC__ == 4  __GNUC_MINOR__ = 8)
+expect_fail(PR 49187);
+#endif
+
 if (build_check_cxx_o_srcdir(*this, unused_test.cpp))
 ATF_FAIL(Build of unused_test.cpp passed; unused test cases are 
  not properly detected);



CVS commit: src/external/bsd/atf/dist

2014-02-11 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Feb 11 16:10:41 UTC 2014

Removed Files:
src/external/bsd/atf/dist: Atffile
src/external/bsd/atf/dist/atf-c: Atffile
src/external/bsd/atf/dist/atf-c++: Atffile
src/external/bsd/atf/dist/atf-c++/detail: Atffile
src/external/bsd/atf/dist/atf-c/detail: Atffile
src/external/bsd/atf/dist/atf-sh: Atffile
src/external/bsd/atf/dist/test-programs: Atffile
src/external/bsd/atf/dist/tools: Atffile

Log Message:
Merge atf-0.20.

The upstream Atffiles are gone so we will just rely on our automatic
generation of such files from bsd.test.mk.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/atf/dist/Atffile
cvs rdiff -u -r1.2 -r0 src/external/bsd/atf/dist/atf-c/Atffile
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/atf-c++/Atffile
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/atf/dist/atf-c++/detail/Atffile
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/atf-c/detail/Atffile
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/atf-sh/Atffile
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/test-programs/Atffile
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/tools/Atffile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/atf/dist/tools

2014-02-11 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Feb 11 18:13:45 UTC 2014

Modified Files:
src/external/bsd/atf/dist/tools: atf-run.cpp fs.cpp process.cpp
requirements.cpp requirements_test.cpp

Log Message:
Remove portability-related guards from the atf tools.

Just assume we are building for NetBSD given that the tools code is now
owned by the NetBSD tree.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/atf-run.cpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/tools/fs.cpp \
src/external/bsd/atf/dist/tools/process.cpp \
src/external/bsd/atf/dist/tools/requirements.cpp
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/atf/dist/tools/requirements_test.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/atf-run.cpp
diff -u src/external/bsd/atf/dist/tools/atf-run.cpp:1.4 src/external/bsd/atf/dist/tools/atf-run.cpp:1.5
--- src/external/bsd/atf/dist/tools/atf-run.cpp:1.4	Tue Feb 11 17:28:20 2014
+++ src/external/bsd/atf/dist/tools/atf-run.cpp	Tue Feb 11 18:13:45 2014
@@ -64,12 +64,6 @@ typedef std::map std::string, std::stri
 
 } // anonymous namespace
 
-#if defined(MAXCOMLEN)
-static const std::string::size_type max_core_name_length = MAXCOMLEN;
-#else
-static const std::string::size_type max_core_name_length = std::string::npos;
-#endif
-
 class atf_run : public tools::application::app {
 static const char* m_description;
 
@@ -127,7 +121,7 @@ dump_stacktrace(const tools::fs::path t
 w.stderr_tc(Test program crashed; attempting to get stack trace);
 
 const tools::fs::path corename = workdir /
-(tp.leaf_name().substr(0, max_core_name_length) + .core);
+(tp.leaf_name().substr(0, MAXCOMLEN) + .core);
 if (!tools::fs::exists(corename)) {
 w.stderr_tc(Expected file  + corename.str() +  not found);
 return;

Index: src/external/bsd/atf/dist/tools/fs.cpp
diff -u src/external/bsd/atf/dist/tools/fs.cpp:1.2 src/external/bsd/atf/dist/tools/fs.cpp:1.3
--- src/external/bsd/atf/dist/tools/fs.cpp:1.2	Tue Feb 11 17:28:20 2014
+++ src/external/bsd/atf/dist/tools/fs.cpp	Tue Feb 11 18:13:45 2014
@@ -434,9 +434,7 @@ impl::file_info::file_info(const path p
 case S_IFLNK:  m_type = lnk_type;  break;
 case S_IFREG:  m_type = reg_type;  break;
 case S_IFSOCK: m_type = sock_type; break;
-#if defined(S_IFWHT)
 case S_IFWHT:  m_type = wht_type;  break;
-#endif
 default:
 throw system_error(IMPL_NAME ::file_info, Unknown file type 
error, EINVAL);
Index: src/external/bsd/atf/dist/tools/process.cpp
diff -u src/external/bsd/atf/dist/tools/process.cpp:1.2 src/external/bsd/atf/dist/tools/process.cpp:1.3
--- src/external/bsd/atf/dist/tools/process.cpp:1.2	Tue Feb 11 16:31:38 2014
+++ src/external/bsd/atf/dist/tools/process.cpp	Tue Feb 11 18:13:45 2014
@@ -399,12 +399,8 @@ impl::status::coredump(void)
 const
 {
 assert(signaled());
-#if defined(WCOREDUMP)
 int mutable_status = m_status;
 return WCOREDUMP(mutable_status);
-#else
-return false;
-#endif
 }
 
 // 
Index: src/external/bsd/atf/dist/tools/requirements.cpp
diff -u src/external/bsd/atf/dist/tools/requirements.cpp:1.2 src/external/bsd/atf/dist/tools/requirements.cpp:1.3
--- src/external/bsd/atf/dist/tools/requirements.cpp:1.2	Tue Feb 11 16:31:38 2014
+++ src/external/bsd/atf/dist/tools/requirements.cpp	Tue Feb 11 18:13:45 2014
@@ -145,14 +145,15 @@ check_machine(const std::string machine
 return Requires one of the ' + machines + ' machine types;
 }
 
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
 static
 std::string
-check_memory_sysctl(const int64_t needed, const char* sysctl_variable)
+check_memory(const std::string raw_memory)
 {
+const int64_t needed = tools::text::to_bytes(raw_memory);
+
 int64_t available;
 std::size_t available_length = sizeof(available);
-if (::sysctlbyname(sysctl_variable, available, available_length,
+if (::sysctlbyname(hw.usermem64, available, available_length,
NULL, 0) == -1) {
 const char* e = std::strerror(errno);
 return Failed to get sysctl(hw.usermem64) value:  + std::string(e);
@@ -164,55 +165,6 @@ check_memory_sysctl(const int64_t needed
 } else
 return ;
 }
-#   if defined(__APPLE__)
-static
-std::string
-check_memory_darwin(const int64_t needed)
-{
-return check_memory_sysctl(needed, hw.usermem);
-}
-#   elif defined(__FreeBSD__)
-static
-std::string
-check_memory_freebsd(const int64_t needed)
-{
-return check_memory_sysctl(needed, hw.usermem);
-}
-#   elif defined(__NetBSD__)
-static
-std::string
-check_memory_netbsd(const int64_t needed)
-{
-return check_memory_sysctl(needed, hw.usermem64);
-}
-#   else
-#  error 

CVS commit: src/external/bsd/atf/dist/atf-sh

2014-01-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 10 01:16:07 UTC 2014

Modified Files:
src/external/bsd/atf/dist/atf-sh: libatf-sh.subr

Log Message:
Make cleanup work as documented; note there are no tests testing that cleanup
works.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/libatf-sh.subr
diff -u src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.1.1.5 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.2
--- src/external/bsd/atf/dist/atf-sh/libatf-sh.subr:1.1.1.5	Mon Jan 16 17:36:53 2012
+++ src/external/bsd/atf/dist/atf-sh/libatf-sh.subr	Thu Jan  9 20:16:07 2014
@@ -772,6 +772,7 @@ main()
 _atf_syntax_error Cannot provide more than one test case name
 else
 _atf_run_tc ${1}
+_atf_run_tc ${1}:cleanup
 fi
 fi
 }



CVS commit: src/external/bsd/atf/dist

2014-01-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jan  7 02:06:42 UTC 2014

Modified Files:
src/external/bsd/atf/dist/atf-c: error.h tc.c tc.h
src/external/bsd/atf/dist/atf-c++: tests.cpp
src/external/bsd/atf/dist/atf-c/detail: dynstr.c dynstr.h fs.c fs.h
sanity.c test_helpers.c text.h tp_main.c

Log Message:
Format string annotations and fixes for resulting fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/atf/dist/atf-c/error.h
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/atf/dist/atf-c/tc.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-c/tc.h
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/dist/atf-c++/tests.cpp
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-c/detail/dynstr.c \
src/external/bsd/atf/dist/atf-c/detail/dynstr.h \
src/external/bsd/atf/dist/atf-c/detail/fs.c \
src/external/bsd/atf/dist/atf-c/detail/fs.h \
src/external/bsd/atf/dist/atf-c/detail/text.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/atf-c/detail/sanity.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/atf/dist/atf-c/detail/tp_main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/error.h
diff -u src/external/bsd/atf/dist/atf-c/error.h:1.1.1.4 src/external/bsd/atf/dist/atf-c/error.h:1.2
--- src/external/bsd/atf/dist/atf-c/error.h:1.1.1.4	Mon Jan 16 22:36:30 2012
+++ src/external/bsd/atf/dist/atf-c/error.h	Tue Jan  7 02:06:42 2014
@@ -33,6 +33,7 @@
 #include stdbool.h
 #include stddef.h
 
+#include atf-c/defs.h
 #include atf-c/error_fwd.h
 
 /* -
@@ -62,7 +63,8 @@ void atf_error_format(const atf_error_t,
  * Common error types.
  * - */
 
-atf_error_t atf_libc_error(int, const char *, ...);
+atf_error_t atf_libc_error(int, const char *, ...)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3);
 int atf_libc_error_code(const atf_error_t);
 const char *atf_libc_error_msg(const atf_error_t);
 

Index: src/external/bsd/atf/dist/atf-c/tc.c
diff -u src/external/bsd/atf/dist/atf-c/tc.c:1.12 src/external/bsd/atf/dist/atf-c/tc.c:1.13
--- src/external/bsd/atf/dist/atf-c/tc.c:1.12	Mon Jan 16 22:41:30 2012
+++ src/external/bsd/atf/dist/atf-c/tc.c	Tue Jan  7 02:06:42 2014
@@ -79,12 +79,14 @@ struct context {
 static void context_init(struct context *, const atf_tc_t *, const char *);
 static void check_fatal_error(atf_error_t);
 static void report_fatal_error(const char *, ...)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2)
 ATF_DEFS_ATTRIBUTE_NORETURN;
 static atf_error_t write_resfile(const int, const char *, const int,
  const atf_dynstr_t *);
 static void create_resfile(const char *, const char *, const int,
atf_dynstr_t *);
 static void error_in_expect(struct context *, const char *, ...)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3)
 ATF_DEFS_ATTRIBUTE_NORETURN;
 static void validate_expect(struct context *);
 static void expected_failure(struct context *, atf_dynstr_t *)
@@ -97,9 +99,11 @@ static void pass(struct context *)
 static void skip(struct context *, atf_dynstr_t *)
 ATF_DEFS_ATTRIBUTE_NORETURN;
 static void format_reason_ap(atf_dynstr_t *, const char *, const size_t,
- const char *, va_list);
+ const char *, va_list)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(4, 0);
 static void format_reason_fmt(atf_dynstr_t *, const char *, const size_t,
-  const char *, ...);
+  const char *, ...)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(4, 5);
 static void errno_test(struct context *, const char *, const size_t,
const int, const char *, const bool,
void (*)(struct context *, atf_dynstr_t *));
@@ -571,7 +575,7 @@ atf_tc_init(atf_tc_t *tc, const char *id
 if (atf_is_error(err))
 goto err_vars;
 
-err = atf_tc_set_md_var(tc, ident, ident);
+err = atf_tc_set_md_var(tc, ident, %s, ident);
 if (atf_is_error(err))
 goto err_map;
 
@@ -787,28 +791,35 @@ atf_tc_set_md_var(atf_tc_t *tc, const ch
  * - */
 
 static void _atf_tc_fail(struct context *, const char *, va_list)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 0)
 ATF_DEFS_ATTRIBUTE_NORETURN;
-static void _atf_tc_fail_nonfatal(struct context *, const char *, va_list);
+static void _atf_tc_fail_nonfatal(struct context *, const char *, va_list)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 0);
 static void _atf_tc_fail_check(struct context *, const char *, const size_t,
-const char *, va_list);
+const char *, va_list)
+   

CVS commit: src/external/bsd/atf/dist/atf-c++/detail

2013-04-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Apr 30 00:31:56 UTC 2013

Modified Files:
src/external/bsd/atf/dist/atf-c++/detail: parser.hpp

Log Message:
It is unclear whether cin is guaranteed to buffer the last input
character of a get() for ungetch() to work. Prefer putback() to make it
work with current implementations of cin in libc++. Tracked as
http://llvm.org/bugs/show_bug.cgi?id=15867 with test case.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/atf/dist/atf-c++/detail/parser.hpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c++/detail/parser.hpp
diff -u src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.1.1.2 src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.2
--- src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.1.1.2	Mon Jan 16 22:36:46 2012
+++ src/external/bsd/atf/dist/atf-c++/detail/parser.hpp	Tue Apr 30 00:31:56 2013
@@ -259,7 +259,7 @@ tokenizer IS ::next(void)
 t = token(m_lineno, m_text_type, text);
 quoted = true;
 } else {
-m_is.unget();
+m_is.putback(ch);
 done = true;
 }
 } else {
@@ -271,13 +271,13 @@ tokenizer IS ::next(void)
 t = token(m_lineno, (*idelim).second,
std::string() + ch);
 else
-m_is.unget();
+m_is.putback(ch);
 } else if (ch == '\n') {
 done = true;
 if (text.empty())
 t = token(m_lineno, m_nl_type, NEWLINE);
 else
-m_is.unget();
+m_is.putback(ch);
 } else if (m_skipws  (ch == ' ' || ch == '\t')) {
 if (!text.empty())
 done = true;



CVS commit: src/external/bsd/atf/dist

2013-03-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sat Mar 16 04:21:19 UTC 2013

Modified Files:
src/external/bsd/atf/dist/atf-c: pkg_config_test.sh
src/external/bsd/atf/dist/atf-c++: pkg_config_test.sh

Log Message:
Mark the atf/atf-{c,c++}/pkg_config_test:version tests as needing atf-version.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/atf/dist/atf-c++/pkg_config_test.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
diff -u src/external/bsd/atf/dist/atf-c/pkg_config_test.sh:1.1.1.3 src/external/bsd/atf/dist/atf-c/pkg_config_test.sh:1.2
--- src/external/bsd/atf/dist/atf-c/pkg_config_test.sh:1.1.1.3	Mon Jan 16 22:36:32 2012
+++ src/external/bsd/atf/dist/atf-c/pkg_config_test.sh	Sat Mar 16 04:21:19 2013
@@ -59,7 +59,7 @@ atf_test_case version
 version_head()
 {
 atf_set descr Checks that the version in atf-c is correct
-atf_set require.progs pkg-config
+atf_set require.progs atf-version pkg-config
 }
 version_body()
 {

Index: src/external/bsd/atf/dist/atf-c++/pkg_config_test.sh
diff -u src/external/bsd/atf/dist/atf-c++/pkg_config_test.sh:1.1.1.4 src/external/bsd/atf/dist/atf-c++/pkg_config_test.sh:1.2
--- src/external/bsd/atf/dist/atf-c++/pkg_config_test.sh:1.1.1.4	Mon Jan 16 22:36:45 2012
+++ src/external/bsd/atf/dist/atf-c++/pkg_config_test.sh	Sat Mar 16 04:21:19 2013
@@ -59,7 +59,7 @@ atf_test_case version
 version_head()
 {
 atf_set descr Checks that the version in atf-c++ is correct
-atf_set require.progs pkg-config
+atf_set require.progs atf-version pkg-config
 }
 version_body()
 {



CVS commit: src/external/bsd/atf/dist

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 17:04:22 UTC 2013

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv9795

Log Message:
Import atf 0.17:

Experimental version released on February 14th, 2013.

* Added the atf_utils_cat_file, atf_utils_compare_file,
  atf_utils_copy_file, atf_utils_create_file, atf_utils_file_exists,
  atf_utils_fork, atf_utils_grep_file, atf_utils_grep_string,
  atf_utils_readline, atf_utils_redirect and atf_utils_wait utility
  functions to atf-c-api.  Documented the already-public
  atf_utils_free_charpp function.

* Added the cat_file, compare_file, copy_file, create_file, file_exists,
  fork, grep_collection, grep_file, grep_string, redirect and wait
  functions to the atf::utils namespace of atf-c++-api.  These are
  wrappers around the same functions added to the atf-c-api library.

* Added the ATF_CHECK_MATCH, ATF_CHECK_MATCH_MSG, ATF_REQUIRE_MATCH and
  ATF_REQUIRE_MATCH_MSG macros to atf-c to simplify the validation of a
  string against a regular expression.

* Miscellaneous fixes for manpage typos and compilation problems with
  clang.

* Added caching of the results of those configure tests that rely on
  executing a test program.  This should help crossbuild systems by
  providing a mechanism to pre-specify what the results should be.

* PR bin/45690: Make atf-report convert any non-printable characters to
  a plain-text representation (matching their corresponding hexadecimal
  entities) in XML output files.  This is to prevent the output of test
  cases from breaking xsltproc later.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-17

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
C src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
U src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
U src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
C src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
U src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c/Atffile
U src/external/bsd/atf/dist/atf-c/Kyuafile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
U src/external/bsd/atf/dist/atf-c/unused_test.c
U src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
C src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr.c
U src/external/bsd/atf/dist/atf-c/detail/dynstr.h
U src/external/bsd/atf/dist/atf-c/detail/env.c
U src/external/bsd/atf/dist/atf-c/detail/env.h
U src/external/bsd/atf/dist/atf-c/detail/fs.c
U src/external/bsd/atf/dist/atf-c/detail/fs.h
U src/external/bsd/atf/dist/atf-c/detail/list.c
U src/external/bsd/atf/dist/atf-c/detail/list.h
U src/external/bsd/atf/dist/atf-c/detail/map.c
U src/external/bsd/atf/dist/atf-c/detail/map.h
U src/external/bsd/atf/dist/atf-c/detail/process.c
U src/external/bsd/atf/dist/atf-c/detail/process.h
U src/external/bsd/atf/dist/atf-c/detail/sanity.c
U src/external/bsd/atf/dist/atf-c/detail/sanity.h
U src/external/bsd/atf/dist/atf-c/detail/text.c
U src/external/bsd/atf/dist/atf-c/detail/text.h
U src/external/bsd/atf/dist/atf-c/detail/tp_main.c
U src/external/bsd/atf/dist/atf-c/detail/user.c
U src/external/bsd/atf/dist/atf-c/detail/user.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr_test.c
U src/external/bsd/atf/dist/atf-c/detail/env_test.c
U src/external/bsd/atf/dist/atf-c/detail/fs_test.c
U src/external/bsd/atf/dist/atf-c/detail/list_test.c
U src/external/bsd/atf/dist/atf-c/detail/map_test.c
C src/external/bsd/atf/dist/atf-c/detail/process_test.c
U src/external/bsd/atf/dist/atf-c/detail/sanity_test.c
U src/external/bsd/atf/dist/atf-c/detail/text_test.c

CVS commit: src/external/bsd/atf/dist

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 17:08:01 UTC 2013

Modified Files:
src/external/bsd/atf/dist/atf-c: atf-c-api.3 macros_test.c
src/external/bsd/atf/dist/atf-c++: tests.cpp tests.hpp
src/external/bsd/atf/dist/atf-c++/detail: process.hpp
src/external/bsd/atf/dist/atf-c/detail: process_test.c test_helpers.c
src/external/bsd/atf/dist/atf-report: atf-report.cpp
src/external/bsd/atf/dist/atf-run: fs.cpp timer.hpp
src/external/bsd/atf/dist/atf-sh: atf-check.cpp atf-check_test.sh
src/external/bsd/atf/dist/doc: atf-test-case.4
Removed Files:
src/external/bsd/atf/dist/atf-c/detail: test_helpers_test.c
src/external/bsd/atf/dist/test-programs: fork_test.sh

Log Message:
Fix merge conflicts after import of atf 0.17.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-c/atf-c-api.3 \
src/external/bsd/atf/dist/atf-c/macros_test.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/atf/dist/atf-c++/tests.cpp
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-c++/tests.hpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c++/detail/process.hpp
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/atf/dist/atf-c/detail/process_test.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-report/atf-report.cpp
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-run/fs.cpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/timer.hpp
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-sh/atf-check.cpp
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/doc/atf-test-case.4
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/bsd/atf/dist/test-programs/fork_test.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/atf-c-api.3
diff -u src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.2 src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.3
--- src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.2	Wed Sep 26 23:27:34 2012
+++ src/external/bsd/atf/dist/atf-c/atf-c-api.3	Fri Feb 15 17:07:59 2013
@@ -26,14 +26,17 @@
 .\ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd December 26, 2010
+.Dd November 30, 2012
 .Dt ATF-C-API 3
 .Os
 .Sh NAME
+.Nm atf-c-api ,
 .Nm ATF_CHECK ,
 .Nm ATF_CHECK_MSG ,
 .Nm ATF_CHECK_EQ ,
 .Nm ATF_CHECK_EQ_MSG ,
+.Nm ATF_CHECK_MATCH ,
+.Nm ATF_CHECK_MATCH_MSG ,
 .Nm ATF_CHECK_STREQ ,
 .Nm ATF_CHECK_STREQ_MSG ,
 .Nm ATF_CHECK_ERRNO ,
@@ -41,6 +44,8 @@
 .Nm ATF_REQUIRE_MSG ,
 .Nm ATF_REQUIRE_EQ ,
 .Nm ATF_REQUIRE_EQ_MSG ,
+.Nm ATF_REQUIRE_MATCH ,
+.Nm ATF_REQUIRE_MATCH_MSG ,
 .Nm ATF_REQUIRE_STREQ ,
 .Nm ATF_REQUIRE_STREQ_MSG ,
 .Nm ATF_REQUIRE_ERRNO ,
@@ -72,7 +77,19 @@
 .Nm atf_tc_fail ,
 .Nm atf_tc_fail_nonfatal ,
 .Nm atf_tc_pass ,
-.Nm atf_tc_skip
+.Nm atf_tc_skip ,
+.Nm atf_utils_cat_file ,
+.Nm atf_utils_compare_file ,
+.Nm atf_utils_copy_file ,
+.Nm atf_utils_create_file ,
+.Nm atf_utils_file_exists ,
+.Nm atf_utils_fork ,
+.Nm atf_utils_free_charpp ,
+.Nm atf_utils_grep_file ,
+.Nm atf_utils_grep_string ,
+.Nm atf_utils_readline ,
+.Nm atf_utils_redirect ,
+.Nm atf_utils_wait
 .Nd C API to write ATF-based test programs
 .Sh SYNOPSIS
 .In atf-c.h
@@ -80,6 +97,8 @@
 .Fn ATF_CHECK_MSG expression fail_msg_fmt ...
 .Fn ATF_CHECK_EQ expression_1 expression_2
 .Fn ATF_CHECK_EQ_MSG expression_1 expression_2 fail_msg_fmt ...
+.Fn ATF_CHECK_MATCH regexp string
+.Fn ATF_CHECK_MATCH_MSG regexp string fail_msg_fmt ...
 .Fn ATF_CHECK_STREQ string_1 string_2
 .Fn ATF_CHECK_STREQ_MSG string_1 string_2 fail_msg_fmt ...
 .Fn ATF_CHECK_ERRNO exp_errno bool_expression
@@ -87,6 +106,8 @@
 .Fn ATF_REQUIRE_MSG expression fail_msg_fmt ...
 .Fn ATF_REQUIRE_EQ expression_1 expression_2
 .Fn ATF_REQUIRE_EQ_MSG expression_1 expression_2 fail_msg_fmt ...
+.Fn ATF_REQUIRE_MATCH regexp string
+.Fn ATF_REQUIRE_MATCH_MSG regexp string fail_msg_fmt ...
 .Fn ATF_REQUIRE_STREQ string_1 string_2
 .Fn ATF_REQUIRE_STREQ_MSG string_1 string_2 fail_msg_fmt ...
 .Fn ATF_REQUIRE_ERRNO exp_errno bool_expression
@@ -119,6 +140,67 @@
 .Fn atf_tc_fail_nonfatal reason
 .Fn atf_tc_pass
 .Fn atf_tc_skip reason
+.Ft void
+.Fo atf_utils_cat_file
+.Fa const char *file
+.Fa const char *prefix
+.Fc
+.Ft bool
+.Fo atf_utils_compare_file
+.Fa const char *file
+.Fa const char *contents
+.Fc
+.Ft void
+.Fo atf_utils_copy_file
+.Fa const char *source
+.Fa const char *destination
+.Fc
+.Ft void
+.Fo atf_utils_create_file
+.Fa const char *file
+.Fa const char *contents
+.Fa ...
+.Fc
+.Ft void
+.Fo atf_utils_file_exists
+.Fa const char *file
+.Fc
+.Ft pid_t
+.Fo atf_utils_fork
+.Fa 

CVS commit: src/external/bsd/atf/dist/atf-c

2012-09-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Sep 26 23:27:34 UTC 2012

Modified Files:
src/external/bsd/atf/dist/atf-c: atf-c-api.3

Log Message:
now sense - no sense


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 src/external/bsd/atf/dist/atf-c/atf-c-api.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/atf-c-api.3
diff -u src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.1.1.7 src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.2
--- src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.1.1.7	Mon Jan 16 22:36:31 2012
+++ src/external/bsd/atf/dist/atf-c/atf-c-api.3	Wed Sep 26 23:27:34 2012
@@ -382,7 +382,7 @@ variant of the macros immediately abort 
 condition is detected by calling the
 .Fn atf_tc_fail
 function.
-Use this variant whenever it makes now sense to continue the execution of a
+Use this variant whenever it makes no sense to continue the execution of a
 test case when the checked condition is not met.
 The
 .Sq CHECK



CVS commit: src/external/bsd/atf/dist

2012-07-11 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Jul 11 22:37:16 UTC 2012

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv29292

Log Message:
Import atf 0.16:

Experimental version released on July 10th, 2012.

* Added a --enable-tools flag to configure to request the build of the
  deprecated ATF tools, whose build is now disabled by default.  In order
  to continue running tests, you should migrate to Kyua instead of enabling
  the build of the deprecated tools.  The kyua-atf-compat package provides
  transitional compatibility versions of atf-run and atf-report built on
  top of Kyua.

* Tweaked the ATF_TEST_CASE macro of atf-c++ so that the compiler can
  detect defined but unused test cases.

* PR bin/45859: Fixed some XSLT bugs that resulted in the tc-time and
  tp-time XML tags leaking into the generated HTML file.  Also improved
  the CSS file slightly to correct alignment and color issues with the
  timestamps column.

* Optimized atf-c++/macros.hpp so that GNU G++ consumes less memory during
  compilation with GNU G++.

* Flipped the default to building shared libraries for atf-c and atf-c++,
  and started versioning them.  As a side-effect, this removes the
  --enable-unstable-shared flag from configure that appears to not work any
  more (under NetBSD).  Additionally, some distributions require the use of
  shared libraries for proper dependency tracking (e.g. Fedora), so it is
  better if we do the right versioning upstream.

* Project hosting moved from an adhoc solution (custom web site and
  Monotone repository) to Google Code (standard wiki and Git).  ATF now
  lives in a subcomponent of the Kyua project.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-16

U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/test-programs/meta_data_test.sh
U src/external/bsd/atf/dist/test-programs/Atffile
U src/external/bsd/atf/dist/test-programs/Kyuafile
U src/external/bsd/atf/dist/test-programs/c_helpers.c
U src/external/bsd/atf/dist/test-programs/srcdir_test.sh
U src/external/bsd/atf/dist/test-programs/fork_test.sh
U src/external/bsd/atf/dist/test-programs/config_test.sh
U src/external/bsd/atf/dist/test-programs/common.sh
U src/external/bsd/atf/dist/test-programs/cpp_helpers.cpp
U src/external/bsd/atf/dist/test-programs/sh_helpers.sh
U src/external/bsd/atf/dist/test-programs/result_test.sh
U src/external/bsd/atf/dist/test-programs/expect_test.sh
U src/external/bsd/atf/dist/atf-version/generate-revision.sh
C src/external/bsd/atf/dist/atf-version/atf-version.cpp
U src/external/bsd/atf/dist/atf-version/atf-version.1
U src/external/bsd/atf/dist/atf-run/atf-run.1
U src/external/bsd/atf/dist/atf-run/timer.hpp
U src/external/bsd/atf/dist/atf-run/io.hpp
U src/external/bsd/atf/dist/atf-run/atffile.hpp
U src/external/bsd/atf/dist/atf-run/Atffile
U src/external/bsd/atf/dist/atf-run/config_test.cpp
U src/external/bsd/atf/dist/atf-run/Kyuafile
U src/external/bsd/atf/dist/atf-run/signals.hpp
U src/external/bsd/atf/dist/atf-run/user.hpp
U src/external/bsd/atf/dist/atf-run/requirements_test.cpp
U src/external/bsd/atf/dist/atf-run/test-program.hpp
U src/external/bsd/atf/dist/atf-run/atffile_test.cpp
U src/external/bsd/atf/dist/atf-run/config.cpp
U src/external/bsd/atf/dist/atf-run/zero_tcs_helper.c
U src/external/bsd/atf/dist/atf-run/signals_test.cpp
U src/external/bsd/atf/dist/atf-run/pass_helper.cpp
U src/external/bsd/atf/dist/atf-run/io.cpp
U src/external/bsd/atf/dist/atf-run/io_test.cpp
C src/external/bsd/atf/dist/atf-run/fs.cpp
U src/external/bsd/atf/dist/atf-run/test-program.cpp
U src/external/bsd/atf/dist/atf-run/bad_metadata_helper.c
U src/external/bsd/atf/dist/atf-run/user_test.cpp
U src/external/bsd/atf/dist/atf-run/signals.cpp
U src/external/bsd/atf/dist/atf-run/integration_test.sh
U src/external/bsd/atf/dist/atf-run/atffile.cpp
U src/external/bsd/atf/dist/atf-run/atf-run.cpp
U src/external/bsd/atf/dist/atf-run/fs.hpp
C src/external/bsd/atf/dist/atf-run/test_program_test.cpp
U src/external/bsd/atf/dist/atf-run/fs_test.cpp
U src/external/bsd/atf/dist/atf-run/expect_helpers.c
U src/external/bsd/atf/dist/atf-run/user.cpp
U src/external/bsd/atf/dist/atf-run/timer.cpp
U src/external/bsd/atf/dist/atf-run/requirements.hpp
U src/external/bsd/atf/dist/atf-run/requirements.cpp
U src/external/bsd/atf/dist/atf-run/misc_helpers.cpp
U src/external/bsd/atf/dist/atf-run/several_tcs_helper.c
U src/external/bsd/atf/dist/atf-run/config.hpp
U src/external/bsd/atf/dist/atf-run/share/atf-run.hooks
U src/external/bsd/atf/dist/atf-run/sample/atf-run.hooks
U src/external/bsd/atf/dist/atf-run/sample/common.conf
U src/external/bsd/atf/dist/atf-c++/pkg_config_test.sh
U 

CVS commit: src/external/bsd/atf/dist

2012-07-11 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Jul 11 22:38:40 UTC 2012

Modified Files:
src/external/bsd/atf/dist/atf-c/detail: test_helpers.c
src/external/bsd/atf/dist/atf-run: test_program_test.cpp
src/external/bsd/atf/dist/atf-sh: atf-check.cpp
src/external/bsd/atf/dist/atf-version: atf-version.cpp

Log Message:
Post-import merge of atf 0.16.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/atf/dist/atf-run/test_program_test.cpp
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-sh/atf-check.cpp
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/atf/dist/atf-version/atf-version.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
diff -u src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.3 src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.4
--- src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.3	Mon Jan 16 22:41:30 2012
+++ src/external/bsd/atf/dist/atf-c/detail/test_helpers.c	Wed Jul 11 22:38:40 2012
@@ -46,33 +46,37 @@
 
 static
 void
-build_check_c_o_aux(const char *path, const char *failmsg)
+build_check_c_o_aux(const char *path, const char *failmsg,
+const bool expect_pass)
 {
 bool success;
 atf_dynstr_t iflag;
-const char *optargs[2];
+const char *optargs[4];
 
 RE(atf_dynstr_init_fmt(iflag, -I%s, atf_config_get(atf_includedir)));
 
 optargs[0] = atf_dynstr_cstring(iflag);
-optargs[1] = NULL;
+optargs[1] = -Wall;
+optargs[2] = -Werror;
+optargs[3] = NULL;
 
 RE(atf_check_build_c_o(path, test.o, optargs, success));
 
 atf_dynstr_fini(iflag);
 
-if (!success)
+if ((expect_pass  !success) || (!expect_pass  success))
 atf_tc_fail(%s, failmsg);
 }
 
 void
-build_check_c_o(const atf_tc_t *tc, const char *sfile, const char *failmsg)
+build_check_c_o(const atf_tc_t *tc, const char *sfile, const char *failmsg,
+const bool expect_pass)
 {
 atf_fs_path_t path;
 
 RE(atf_fs_path_init_fmt(path, %s/%s,
 atf_tc_get_config_var(tc, srcdir), sfile));
-build_check_c_o_aux(atf_fs_path_cstring(path), failmsg);
+build_check_c_o_aux(atf_fs_path_cstring(path), failmsg, expect_pass);
 atf_fs_path_fini(path);
 }
 
@@ -90,7 +94,7 @@ header_check(const char *hdrname)
 snprintf(failmsg, sizeof(failmsg),
  Header check failed; %s is not self-contained, hdrname);
 
-build_check_c_o_aux(test.c, failmsg);
+build_check_c_o_aux(test.c, failmsg, true);
 }
 
 void

Index: src/external/bsd/atf/dist/atf-run/test_program_test.cpp
diff -u src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.4 src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.5
--- src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.4	Mon Jan 16 22:41:30 2012
+++ src/external/bsd/atf/dist/atf-run/test_program_test.cpp	Wed Jul 11 22:38:40 2012
@@ -1008,6 +1008,8 @@ ATF_INIT_TEST_CASES(tcs)
 ATF_ADD_TEST_CASE(tcs, parse_test_case_result_skipped);
 ATF_ADD_TEST_CASE(tcs, parse_test_case_result_unknown);
 
+ATF_ADD_TEST_CASE(tcs, read_test_case_result_failed);
+ATF_ADD_TEST_CASE(tcs, read_test_case_result_skipped);
 ATF_ADD_TEST_CASE(tcs, read_test_case_result_no_file);
 ATF_ADD_TEST_CASE(tcs, read_test_case_result_empty_file);
 ATF_ADD_TEST_CASE(tcs, read_test_case_result_multiline);

Index: src/external/bsd/atf/dist/atf-sh/atf-check.cpp
diff -u src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.6 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.7
--- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.6	Mon Jan 16 22:41:31 2012
+++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp	Wed Jul 11 22:38:40 2012
@@ -271,7 +271,7 @@ parse_status_check_arg(const std::string
 else
 value = parse_signal(value_str);
 } else
-throw atf::application::usage_error(Invalid output checker);
+throw atf::application::usage_error(Invalid status checker);
 
 return status_check(type, negated, value);
 }

Index: src/external/bsd/atf/dist/atf-version/atf-version.cpp
diff -u src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.6 src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.7
--- src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.6	Mon Jan 16 22:41:31 2012
+++ src/external/bsd/atf/dist/atf-version/atf-version.cpp	Wed Jul 11 22:38:40 2012
@@ -69,7 +69,7 @@ atf_version::main(void)
 #if defined(PACKAGE_REVISION_TYPE_DIST)
 std::cout  format_text(Built from a distribution file; no revision 
 information available.)  \n;
-#elif defined(PACKAGE_REVISION_TYPE_MTN)
+#elif defined(PACKAGE_REVISION_TYPE_GIT)
 std::cout  format_text_with_tag(PACKAGE_REVISION_BRANCH, Branch: ,
   

CVS commit: src/external/bsd/atf/dist/atf-run

2012-04-04 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Thu Apr  5 01:04:18 UTC 2012

Modified Files:
src/external/bsd/atf/dist/atf-run: fs.cpp

Log Message:
Fix retry logic to avoid triggering an assertion.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/fs.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/fs.cpp
diff -u src/external/bsd/atf/dist/atf-run/fs.cpp:1.3 src/external/bsd/atf/dist/atf-run/fs.cpp:1.4
--- src/external/bsd/atf/dist/atf-run/fs.cpp:1.3	Mon Jan 16 22:41:30 2012
+++ src/external/bsd/atf/dist/atf-run/fs.cpp	Thu Apr  5 01:04:18 2012
@@ -137,9 +137,9 @@ retry_chmod:
 subdirs = d.names();
 ok = true;
 } catch (const atf::system_error e) {
+retries--;
 if (retries == 0)
 throw e;
-retries--;
 ::sleep(retry_delay_in_seconds);
 }
 }



CVS commit: src/external/bsd/atf/dist/atf-report

2012-01-23 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 23 23:03:39 UTC 2012

Modified Files:
src/external/bsd/atf/dist/atf-report: tests-results.css
tests-results.xsl

Log Message:
Pull up upstream revision db8568696ad5a100ab3f118ac1cde53ee61ccbc3:

Fix some XSLT/CSS bugs that leaked some internal tags into the HTML file.
This, together with some CSS inconsistency, supposedly prevented the
timestamp column from being right-aligned... although I have not been able
to reproduce it with neither Chrome nor Firefox.  That said, the changes
in here should fix this.

While doing this, also change the background color of the timestamp column
for test programs to improve the divider bar between test programs.

Based on patches and ideas from pgoyette@.  Should fix PR bin/45859.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/atf/dist/atf-report/tests-results.css
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/atf/dist/atf-report/tests-results.xsl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-report/tests-results.css
diff -u src/external/bsd/atf/dist/atf-report/tests-results.css:1.4 src/external/bsd/atf/dist/atf-report/tests-results.css:1.5
--- src/external/bsd/atf/dist/atf-report/tests-results.css:1.4	Mon Jan 16 22:41:30 2012
+++ src/external/bsd/atf/dist/atf-report/tests-results.css	Mon Jan 23 23:03:39 2012
@@ -148,10 +148,22 @@ table.tcs-summary th {
 }
 
 table.tcs-summary td.numeric {
+width: 1pt;
+}
+
+table.tcs-summary td.numeric p {
 text-align: right;
+}
+
+table.tcs-summary td.tp-numeric {
+background: #dd;
 width: 1pt;
 }
 
+table.tcs-summary td.tp-numeric p {
+text-align: right;
+}
+
 table.tcs-summary td.tp-id {
 background: #dd;
 font-weight: bold;

Index: src/external/bsd/atf/dist/atf-report/tests-results.xsl
diff -u src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.6 src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.7
--- src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.6	Mon Jan 16 22:41:30 2012
+++ src/external/bsd/atf/dist/atf-report/tests-results.xsl	Mon Jan 23 23:03:39 2012
@@ -382,8 +382,8 @@
 td class=tp-id colspan=3
   pxsl:value-of select=@id //p
 /td
-td class=numeric
-  xsl:apply-templates select=tp-time /s
+td class=tp-numeric
+  pxsl:value-of select=tp-time /s/p
 /td
   /tr
   xsl:if test=$which != 'bogus'
@@ -437,9 +437,9 @@
  expected_failure|expected_timeout|
  expected_signal|failed|passed|
  skipped mode=tc /
-	td class=numeric
-	  xsl:apply-templates select=tc-time /s
-	/td
+td class=numeric
+  pxsl:value-of select=tc-time /s/p
+/td
   /tr
 /xsl:if
   /xsl:template



CVS commit: src/external/bsd/atf/dist

2012-01-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 16 22:37:01 UTC 2012

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv22655

Log Message:
Import atf 0.15: the major goal of this import is to reconcile any local
changes to the atf codebase with upstream code.  All local changes should
have been backported, with appropriate portability workarounds where
necessary.

This new release also includes other changes though, such as performance
improvements and bug fixes, and also a major new feature partially
implemented by pgoyette@: the time to execute each test cases and test
program is now recorded and included in the output reports.

The import into NetBSD has been tested natively on amd64 and macppc, and
the full test suite has also been run through anita on amd64 and i386.
No regressions observed... but you never know.

From the NEWS file, the changes in this version are as follows:

Experimental version released on January 16th, 2012.

* Respect stdin in atf-check.  The previous release silenced stdin for any
  processes spawned by atf, not only test programs, which caused breakage
  in tests that pipe data through atf-check.

* Performance improvements to atf-sh.

* Enabled detection of unused parameters and variables in the code and
  fixed all warnings.

* Changed the behavior of developer mode.  Compiler warnings are now
  enabled unconditionally regardless of whether we are in developer mode or
  not; developer mode is now only used to perform strict warning checks and
  to enable assertions.  Additionally, developer mode is now only
  automatically enabled when building from the repository, not for formal
  releases.

* Added new Autoconf M4 macros (ATF_ARG_WITH, ATF_CHECK_C and
  ATF_CHECK_CXX) to provide a consistent way of defining a --with-arg flag
  in configure scripts and detecting the presence of any of the ATF
  bindings.  Note that ATF_CHECK_SH was already introduced in 0.14, but it
  has now been modified to also honor --with-atf if instantiated.

* Added timing support to atf-run / atf-report.

* Added support for a 'require.memory' property, to specify the minimum
  amount of physical memory needed by the test case to yield valid results.

* PR bin/45690: Force an ISO-8859-1 encoding in the XML files generated by
  atf-report so that invalid data in the output of test cases does not
  mangle our report.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-15

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
C src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
C src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
C src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
U src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
U src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c/Atffile
U src/external/bsd/atf/dist/atf-c/Kyuafile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
U src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
C src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr.c
U src/external/bsd/atf/dist/atf-c/detail/dynstr.h
U src/external/bsd/atf/dist/atf-c/detail/env.c
U src/external/bsd/atf/dist/atf-c/detail/env.h
U src/external/bsd/atf/dist/atf-c/detail/fs.c
U src/external/bsd/atf/dist/atf-c/detail/fs.h
U src/external/bsd/atf/dist/atf-c/detail/list.c
U src/external/bsd/atf/dist/atf-c/detail/list.h
U src/external/bsd/atf/dist/atf-c/detail/map.c
U src/external/bsd/atf/dist/atf-c/detail/map.h
C src/external/bsd/atf/dist/atf-c/detail/process.c
C src/external/bsd/atf/dist/atf-c/detail/process.h
U 

CVS commit: src/external/bsd/atf/dist/atf-run

2011-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 19 21:59:46 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-run: timer.cpp

Log Message:
Put back setitimer based code for the have-nots: (OS/X Lion)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/timer.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/timer.cpp
diff -u src/external/bsd/atf/dist/atf-run/timer.cpp:1.3 src/external/bsd/atf/dist/atf-run/timer.cpp:1.4
--- src/external/bsd/atf/dist/atf-run/timer.cpp:1.3	Sun Dec 18 22:16:05 2011
+++ src/external/bsd/atf/dist/atf-run/timer.cpp	Mon Dec 19 16:59:46 2011
@@ -44,11 +44,25 @@ namespace impl = atf::atf_run;
 // Auxiliary functions.
 // 
 
+#ifdef SIGEV_NONE
+#define HAVE_POSIX_TIMER
+#endif
+
+#ifndef HAVE_POSIX_TIMER
+static void *handle;
+#endif
+
 static
 void
 handler(int signo, siginfo_t *si, void *uc)
 {
-impl::timer *timer = static_castimpl::timer *(si-si_value.sival_ptr);
+impl::timer *timer = static_castimpl::timer *(
+#ifndef HAVE_POSIX_TIMER
+	handle
+#else
+	si-si_value.sival_ptr
+#endif
+);
 
 timer-setfired();
 timer-timeout_callback();
@@ -68,7 +82,7 @@ impl::timer::timer(const unsigned int se
 throw system_error(IMPL_NAME ::timer::timer,
Failed to set signal handler, errno);
 	
-
+#ifndef HAVE_POSIX_TIMER
 ::sigevent se;
 se.sigev_notify = SIGEV_SIGNAL;
 se.sigev_signo = SIGALRM;
@@ -92,11 +106,32 @@ impl::timer::timer(const unsigned int se
 throw system_error(IMPL_NAME ::timer::timer,
Failed to program timer, errno);
 }
+#else
+::itimerval it, oit;
+it.it_interval.tv_sec = 0;
+it.it_interval.tv_usec = 0;
+it.it_value.tv_sec = seconds;
+it.it_value.tv_usec = 0;
+if (::setitimer(ITIMER_REAL, it, oit) == -1)
+	::sigaction(SIGALRM, m_old_sa, NULL);
+throw system_error(IMPL_NAME ::timer::timer,
+   Failed to program timer, errno);
+}
+TIMEVAL_TO_TIMESPEC(m_old_it, oit);
+handle = static_castvoid *(this);
+#endif
 }
 
 impl::timer::~timer(void)
 {
-int ret = ::timer_delete(m_timer);
+int ret;
+#ifdef HAVE_POSIX_TIMER
+::itimerval oit;
+TIMESPEC_TO_TIMEVAL(oit, m_old_it);
+ret = ::setitimer(ITIMER_REAL, oit, NULL);
+#else
+ret = ::timer_delete(m_timer);
+#endif
 INV(ret != -1);
 ret = ::sigaction(SIGALRM, m_old_sa, NULL);
 INV(ret != -1);



CVS commit: src/external/bsd/atf/dist/atf-run

2011-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 19 22:25:46 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-run: timer.cpp

Log Message:
- make all the ifdefs match
- make it compile, and test


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-run/timer.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/timer.cpp
diff -u src/external/bsd/atf/dist/atf-run/timer.cpp:1.4 src/external/bsd/atf/dist/atf-run/timer.cpp:1.5
--- src/external/bsd/atf/dist/atf-run/timer.cpp:1.4	Mon Dec 19 16:59:46 2011
+++ src/external/bsd/atf/dist/atf-run/timer.cpp	Mon Dec 19 17:25:45 2011
@@ -57,10 +57,10 @@ void
 handler(int signo, siginfo_t *si, void *uc)
 {
 impl::timer *timer = static_castimpl::timer *(
-#ifndef HAVE_POSIX_TIMER
-	handle
-#else
+#ifdef HAVE_POSIX_TIMER
 	si-si_value.sival_ptr
+#else
+	handle
 #endif
 );
 
@@ -82,7 +82,7 @@ impl::timer::timer(const unsigned int se
 throw system_error(IMPL_NAME ::timer::timer,
Failed to set signal handler, errno);
 	
-#ifndef HAVE_POSIX_TIMER
+#ifdef HAVE_POSIX_TIMER
 ::sigevent se;
 se.sigev_notify = SIGEV_SIGNAL;
 se.sigev_signo = SIGALRM;
@@ -112,12 +112,13 @@ impl::timer::timer(const unsigned int se
 it.it_interval.tv_usec = 0;
 it.it_value.tv_sec = seconds;
 it.it_value.tv_usec = 0;
-if (::setitimer(ITIMER_REAL, it, oit) == -1)
+if (::setitimer(ITIMER_REAL, it, oit) == -1) {
 	::sigaction(SIGALRM, m_old_sa, NULL);
 throw system_error(IMPL_NAME ::timer::timer,
Failed to program timer, errno);
 }
-TIMEVAL_TO_TIMESPEC(m_old_it, oit);
+TIMEVAL_TO_TIMESPEC(oit.it_interval, m_old_it.it_interval);
+TIMEVAL_TO_TIMESPEC(oit.it_value, m_old_it.it_value);
 handle = static_castvoid *(this);
 #endif
 }
@@ -126,11 +127,12 @@ impl::timer::~timer(void)
 {
 int ret;
 #ifdef HAVE_POSIX_TIMER
+ret = ::timer_delete(m_timer);
+#else
 ::itimerval oit;
-TIMESPEC_TO_TIMEVAL(oit, m_old_it);
+TIMESPEC_TO_TIMEVAL(oit.it_interval, m_old_it.it_interval);
+TIMESPEC_TO_TIMEVAL(oit.it_value, m_old_it.it_value);
 ret = ::setitimer(ITIMER_REAL, oit, NULL);
-#else
-ret = ::timer_delete(m_timer);
 #endif
 INV(ret != -1);
 ret = ::sigaction(SIGALRM, m_old_sa, NULL);



CVS commit: src/external/bsd/atf/dist/atf-run

2011-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 18 22:34:06 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-run: timer.cpp timer.hpp

Log Message:
Don't use antiquated BSD API's that require global variable, use posix timers
instead.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-run/timer.cpp \
src/external/bsd/atf/dist/atf-run/timer.hpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/timer.cpp
diff -u src/external/bsd/atf/dist/atf-run/timer.cpp:1.1.1.2 src/external/bsd/atf/dist/atf-run/timer.cpp:1.2
--- src/external/bsd/atf/dist/atf-run/timer.cpp:1.1.1.2	Wed Oct 20 05:14:23 2010
+++ src/external/bsd/atf/dist/atf-run/timer.cpp	Sun Dec 18 17:34:06 2011
@@ -27,9 +27,7 @@
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
-extern C {
-#include signal.h
-}
+#include csignal
 
 #include cerrno
 
@@ -46,56 +44,69 @@ namespace impl = atf::atf_run;
 // Auxiliary functions.
 // 
 
-namespace sigalrm {
-
-bool m_fired = false;
-impl::timer* m_timer = NULL;
-
+static
 void
-handler(const int signo)
+handler(int signo, siginfo_t *si, void *uc)
 {
-PRE(signo == SIGALRM);
+impl::timer *timer = static_castimpl::timer *(si-si_value.sival_ptr);
 
-m_fired = true;
-m_timer-timeout_callback();
+timer-setfired();
+timer-timeout_callback();
 }
 
-} // anonymous namespace
-
 // 
 // The timer class.
 // 
 
-impl::timer::timer(const unsigned int seconds)
+impl::timer::timer(const unsigned int seconds) : m_fired(false)
 {
-sigalrm::m_fired = false;
-sigalrm::m_timer = this;
-m_sigalrm.reset(new signal_programmer(SIGALRM, sigalrm::handler));
-
-::itimerval timeval;
-timeval.it_interval.tv_sec = 0;
-timeval.it_interval.tv_usec = 0;
-timeval.it_value.tv_sec = seconds;
-timeval.it_value.tv_usec = 0;
+struct sigaction sa;
+::sigemptyset(sa.sa_mask);
+sa.sa_flags = SA_SIGINFO;
+sa.sa_sigaction = ::handler;
+if (::sigaction(SIGALRM, sa, m_old_sa) == -1)
+throw system_error(IMPL_NAME ::timer::timer,
+   Failed to set signal handler, errno);
+	
+
+::sigevent se;
+se.sigev_notify = SIGEV_SIGNAL;
+se.sigev_signo = SIGALRM;
+se.sigev_value.sival_ptr = static_castvoid *(this);
+se.sigev_notify_function = NULL;
+se.sigev_notify_attributes = NULL;
+if (::timer_create(CLOCK_MONOTONIC, se, m_timer) == -1) {
+	::sigaction(SIGALRM, m_old_sa, NULL);
+throw system_error(IMPL_NAME ::timer::timer,
+   Failed to create timer, errno);
+}
 
-if (::setitimer(ITIMER_REAL, timeval, m_old_timeval) == -1)
+::itimerspec it;
+it.it_interval.tv_sec = 0;
+it.it_interval.tv_nsec = 0;
+it.it_value.tv_sec = seconds;
+it.it_value.tv_nsec = 0;
+if (::timer_settime(m_timer, 0, it, m_old_it) == -1) {
+	::sigaction(SIGALRM, m_old_sa, NULL);
+	::timer_delete(m_timer);
 throw system_error(IMPL_NAME ::timer::timer,
Failed to program timer, errno);
+}
 }
 
 impl::timer::~timer(void)
 {
-const int ret = ::setitimer(ITIMER_REAL, m_old_timeval, NULL);
+int ret = ::timer_delete(m_timer);
+INV(ret != -1);
+ret = ::sigaction(SIGALRM, m_old_sa, NULL);
 INV(ret != -1);
-sigalrm::m_timer = NULL;
-sigalrm::m_fired = false;
 }
 
 bool
 impl::timer::fired(void)
 const
 {
-return sigalrm::m_fired;
+return m_fired;
 }
 
 // 
@@ -121,5 +132,5 @@ impl::child_timer::timeout_callback(void
 
 // Should use killpg(2) but, according to signal(7), using this system
 // call in a signal handler context is not safe.
-::kill(m_pid, SIGKILL);
+::killpg(-m_pid, SIGKILL);
 }
Index: src/external/bsd/atf/dist/atf-run/timer.hpp
diff -u src/external/bsd/atf/dist/atf-run/timer.hpp:1.1.1.2 src/external/bsd/atf/dist/atf-run/timer.hpp:1.2
--- src/external/bsd/atf/dist/atf-run/timer.hpp:1.1.1.2	Wed Oct 20 05:14:23 2010
+++ src/external/bsd/atf/dist/atf-run/timer.hpp	Sun Dec 18 17:34:06 2011
@@ -30,12 +30,8 @@
 #if !defined(_ATF_RUN_ALARM_HPP_)
 #define _ATF_RUN_ALARM_HPP_
 
-extern C {
-#include sys/time.h
-#include sys/types.h
-}
-
-#include memory
+#include ctime
+#include csignal
 
 #include atf-c++/utils.hpp
 
@@ -49,14 +45,17 @@ class signal_programmer;
 // 
 
 class timer : utils::noncopyable {
-::itimerval m_old_timeval;
-std::auto_ptr signal_programmer  m_sigalrm;
+::timer_t m_timer;
+::itimerspec m_old_it;
+struct sigaction 

CVS commit: src/external/bsd/atf/dist/atf-run

2011-12-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 19 03:16:06 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-run: timer.cpp

Log Message:
fix killing code I just broke, and give program a chance to cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-run/timer.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/timer.cpp
diff -u src/external/bsd/atf/dist/atf-run/timer.cpp:1.2 src/external/bsd/atf/dist/atf-run/timer.cpp:1.3
--- src/external/bsd/atf/dist/atf-run/timer.cpp:1.2	Sun Dec 18 17:34:06 2011
+++ src/external/bsd/atf/dist/atf-run/timer.cpp	Sun Dec 18 22:16:05 2011
@@ -128,9 +128,10 @@ impl::child_timer::~child_timer(void)
 void
 impl::child_timer::timeout_callback(void)
 {
+static const timespec ts = { 1, 0 };
 m_terminate = true;
-
-// Should use killpg(2) but, according to signal(7), using this system
-// call in a signal handler context is not safe.
-::killpg(-m_pid, SIGKILL);
+::kill(-m_pid, SIGTERM);
+::nanosleep(ts, NULL);
+if (::kill(-m_pid, 0) != -1)
+	::kill(-m_pid, SIGKILL);
 }



CVS commit: src/external/bsd/atf/dist

2011-11-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 16 17:46:16 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c++/detail: text.cpp text.hpp
src/external/bsd/atf/dist/atf-run: requirements.cpp test-program.cpp

Log Message:
PR/45619: jmmv: Allow atf tests to request a minimum amount of memory


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/atf/dist/atf-c++/detail/text.cpp \
src/external/bsd/atf/dist/atf-c++/detail/text.hpp
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/atf/dist/atf-run/requirements.cpp
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/atf/dist/atf-run/test-program.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c++/detail/text.cpp
diff -u src/external/bsd/atf/dist/atf-c++/detail/text.cpp:1.1.1.1 src/external/bsd/atf/dist/atf-c++/detail/text.cpp:1.2
--- src/external/bsd/atf/dist/atf-c++/detail/text.cpp:1.1.1.1	Wed Oct 20 05:14:21 2010
+++ src/external/bsd/atf/dist/atf-c++/detail/text.cpp	Wed Nov 16 12:46:16 2011
@@ -33,6 +33,7 @@ extern C {
 
 #include cctype
 #include cstring
+#include cstdlib
 
 extern C {
 #include ../../atf-c/error.h
@@ -133,3 +134,12 @@ impl::to_bool(const std::string str)
 
 return b;
 }
+
+int64_t
+impl::to_number(const std::string str)
+{
+	int64_t num;
+	::dehumanize_number(str.c_str(), num);
+	return num;
+}
+
Index: src/external/bsd/atf/dist/atf-c++/detail/text.hpp
diff -u src/external/bsd/atf/dist/atf-c++/detail/text.hpp:1.1.1.1 src/external/bsd/atf/dist/atf-c++/detail/text.hpp:1.2
--- src/external/bsd/atf/dist/atf-c++/detail/text.hpp:1.1.1.1	Wed Oct 20 05:14:21 2010
+++ src/external/bsd/atf/dist/atf-c++/detail/text.hpp	Wed Nov 16 12:46:16 2011
@@ -106,6 +106,13 @@ bool to_bool(const std::string);
 std::string to_lower(const std::string);
 
 //!
+//! \brief Converts the given string to a number
+//!
+//! The string should be of the form ^[0-9]+[KMGT]$ or ^[0-9]$
+//!
+int64_t to_number(const std::string);
+
+//!
 //! \brief Converts the given object to a string.
 //!
 //! Returns a string with the representation of the given object.  There

Index: src/external/bsd/atf/dist/atf-run/requirements.cpp
diff -u src/external/bsd/atf/dist/atf-run/requirements.cpp:1.1.1.4 src/external/bsd/atf/dist/atf-run/requirements.cpp:1.2
--- src/external/bsd/atf/dist/atf-run/requirements.cpp:1.1.1.4	Tue Jun 14 11:23:24 2011
+++ src/external/bsd/atf/dist/atf-run/requirements.cpp	Wed Nov 16 12:46:16 2011
@@ -29,6 +29,14 @@
 
 // TODO: We probably don't want to raise std::runtime_error for the errors
 // detected in this file.
+extern C {
+#include sys/param.h
+#include sys/sysctl.h
+};
+
+#include cstdlib
+#include cstring
+#include cerrno
 #include stdexcept
 
 #include atf-c++/config.hpp
@@ -185,6 +193,36 @@ check_user(const std::string user, cons
  require.user);
 }
 
+static
+std::string
+check_memory(const std::string memory)
+{
+// Make sure we have enough memory 
+int64_t memneed = atf::text::to_number(memory);
+int64_t memavail;
+size_t len = sizeof(memavail);
+
+if (::sysctlbyname(hw.usermem64, memavail, len, NULL, 0) == -1) {
+	const char *e = ::strerror(errno);
+	std::stringstream ss;
+	ss  sysctl hw.usermem64 failed (  e  );
+	return ss.str();
+}
+
+if (memavail  memneed) {
+	char avail[6], need[6];
+	::humanize_number(avail, sizeof(avail), memavail, , HN_AUTOSCALE,
+	HN_B | HN_NOSPACE);
+	::humanize_number(need, sizeof(need), memneed, , HN_AUTOSCALE,
+	HN_B | HN_NOSPACE);
+	std::stringstream ss;
+	ss  available memory (  avail 
+	) is less than required (  need  );
+	return ss.str();
+}
+return ;
+}
+
 } // anonymous namespace
 
 std::string
@@ -211,6 +249,8 @@ impl::check_requirements(const atf::test
 failure_reason = check_progs(value);
 else if (name == require.user)
 failure_reason = check_user(value, config);
+	else if (name == require.memory)
+failure_reason = check_memory(value);
 else {
 // Unknown require.* properties are forbidden by the
 // application/X-atf-tp parser.

Index: src/external/bsd/atf/dist/atf-run/test-program.cpp
diff -u src/external/bsd/atf/dist/atf-run/test-program.cpp:1.10 src/external/bsd/atf/dist/atf-run/test-program.cpp:1.11
--- src/external/bsd/atf/dist/atf-run/test-program.cpp:1.10	Wed Jun 15 04:48:36 2011
+++ src/external/bsd/atf/dist/atf-run/test-program.cpp	Wed Nov 16 12:46:16 2011
@@ -418,6 +418,7 @@ detail::atf_tp_reader::validate_and_inse
 
 const std::string ident_regex = ^[_A-Za-z0-9]+$;
 const std::string integer_regex = ^[0-9]+$;
+const std::string memory_regex = ^[0-9]+[KMGT]$;
 
 if (name == descr) {
 // Any non-empty value is valid.
@@ -438,6 +439,12 @@ detail::atf_tp_reader::validate_and_inse
 } else if (name == require.machine) {
 

CVS commit: src/external/bsd/atf/dist/atf-c

2011-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  9 14:42:43 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c: tc.c

Log Message:
need || instead of 


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/atf/dist/atf-c/tc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/tc.c
diff -u src/external/bsd/atf/dist/atf-c/tc.c:1.10 src/external/bsd/atf/dist/atf-c/tc.c:1.11
--- src/external/bsd/atf/dist/atf-c/tc.c:1.10	Tue Nov  8 15:25:14 2011
+++ src/external/bsd/atf/dist/atf-c/tc.c	Wed Nov  9 09:42:42 2011
@@ -164,7 +164,7 @@ write_resfile(const int fd, const char *
 ssize_t ret;
 int count = 0;
 
-INV(arg == -1  reason != NULL);
+INV(arg == -1 || reason != NULL);
 
 iov[count].iov_base = __UNCONST(result);
 iov[count++].iov_len = strlen(result);



CVS commit: src/external/bsd/atf/dist/atf-c

2011-11-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  8 20:25:14 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c: tc.c

Log Message:
use writev(2) instead of dprintf(3) for portability. Suggested by joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/dist/atf-c/tc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/tc.c
diff -u src/external/bsd/atf/dist/atf-c/tc.c:1.9 src/external/bsd/atf/dist/atf-c/tc.c:1.10
--- src/external/bsd/atf/dist/atf-c/tc.c:1.9	Sun Nov  6 13:18:16 2011
+++ src/external/bsd/atf/dist/atf-c/tc.c	Tue Nov  8 15:25:14 2011
@@ -29,6 +29,7 @@
 
 #include sys/types.h
 #include sys/stat.h
+#include sys/uio.h
 
 #include errno.h
 #include fcntl.h
@@ -156,24 +157,40 @@ static atf_error_t
 write_resfile(const int fd, const char *result, const int arg,
   const atf_dynstr_t *reason)
 {
-if (arg == -1  reason == NULL) {
-if (dprintf(fd, %s\n, result) = 0)
-goto err;
-} else if (arg == -1  reason != NULL) {
-if (dprintf(fd, %s: %s\n, result,
- atf_dynstr_cstring(reason))  0)
-goto err;
-} else if (arg != -1  reason != NULL) {
-if (dprintf(fd, %s(%d): %s\n, result,
- arg, atf_dynstr_cstring(reason))  0)
-goto err;
-} else {
-UNREACHABLE;
+static char NL[] = \n, CS[] = : ;
+char buf[64];
+const char *r;
+struct iovec iov[5];
+ssize_t ret;
+int count = 0;
+
+INV(arg == -1  reason != NULL);
+
+iov[count].iov_base = __UNCONST(result);
+iov[count++].iov_len = strlen(result);
+
+if (reason != NULL) {
+	if (arg != -1) {
+	iov[count].iov_base = buf;
+	iov[count++].iov_len = snprintf(buf, sizeof(buf), (%d), arg);
+	}
+
+	iov[count].iov_base = CS;
+	iov[count++].iov_len = sizeof(CS) - 1;
+
+	r = atf_dynstr_cstring(reason);
+	iov[count].iov_base = __UNCONST(r);
+	iov[count++].iov_len = strlen(r);
 }
 
-return atf_no_error();
+iov[count].iov_base = NL;
+iov[count++].iov_len = sizeof(NL) - 1;
+
+while ((ret = writev(fd, iov, count)) == -1  errno == EINTR)
+continue; /* Retry. */
+if (ret != -1)
+return atf_no_error();
 
-err:
 return atf_libc_error(
 errno, Failed to write results file; result %s, reason %s, result,
 reason == NULL ? null : atf_dynstr_cstring(reason));



CVS commit: src/external/bsd/atf/dist/atf-c

2011-11-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  6 18:18:16 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c: tc.c

Log Message:
don't truncate error messages to 1K.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/atf/dist/atf-c/tc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/tc.c
diff -u src/external/bsd/atf/dist/atf-c/tc.c:1.8 src/external/bsd/atf/dist/atf-c/tc.c:1.9
--- src/external/bsd/atf/dist/atf-c/tc.c:1.8	Sun Nov  7 12:45:21 2010
+++ src/external/bsd/atf/dist/atf-c/tc.c	Sun Nov  6 13:18:16 2011
@@ -156,28 +156,22 @@ static atf_error_t
 write_resfile(const int fd, const char *result, const int arg,
   const atf_dynstr_t *reason)
 {
-char buffer[1024];
-int ret;
-
 if (arg == -1  reason == NULL) {
-if (snprintf(buffer, sizeof(buffer), %s\n, result) = 0)
+if (dprintf(fd, %s\n, result) = 0)
 goto err;
 } else if (arg == -1  reason != NULL) {
-if (snprintf(buffer, sizeof(buffer), %s: %s\n, result,
- atf_dynstr_cstring(reason)) = 0)
+if (dprintf(fd, %s: %s\n, result,
+ atf_dynstr_cstring(reason))  0)
 goto err;
 } else if (arg != -1  reason != NULL) {
-if (snprintf(buffer, sizeof(buffer), %s(%d): %s\n, result,
- arg, atf_dynstr_cstring(reason)) = 0)
+if (dprintf(fd, %s(%d): %s\n, result,
+ arg, atf_dynstr_cstring(reason))  0)
 goto err;
 } else {
 UNREACHABLE;
 }
 
-while ((ret = write(fd, buffer, strlen(buffer))) == -1  errno == EINTR)
-; /* Retry. */
-if (ret != -1)
-return atf_no_error();
+return atf_no_error();
 
 err:
 return atf_libc_error(



CVS commit: src/external/bsd/atf/dist/atf-c/detail

2011-06-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Jun 16 14:57:22 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c/detail: test_helpers.c

Log Message:
Properly use a format string.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/atf/dist/atf-c/detail/test_helpers.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
diff -u src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.1.1.1 src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.2
--- src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.1.1.1	Wed Oct 20 09:14:19 2010
+++ src/external/bsd/atf/dist/atf-c/detail/test_helpers.c	Thu Jun 16 14:57:22 2011
@@ -62,7 +62,7 @@
 atf_dynstr_fini(iflag);
 
 if (!success)
-atf_tc_fail(failmsg);
+atf_tc_fail(%s, failmsg);
 }
 
 void



CVS commit: src/external/bsd/atf/dist

2011-06-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Jun 15 08:48:36 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c/detail: process.c
src/external/bsd/atf/dist/atf-run: test-program.cpp
src/external/bsd/atf/dist/atf-sh: atf-check_test.sh

Log Message:
Pull up part of revision f621bc0489ac3e4ef364f840a852a6a5290e8e12:

-
Only silence stdin for test programs

atf-check is expected to accept data in its stdin, and a previous change
broke this behavior.
-

This should fix a few tests that broke during the 0.14 import.  In
particularly, the tests in libc/stdlib and libc/ssp that redirect stuff
to atf_check.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c/detail/process.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/dist/atf-run/test-program.cpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/detail/process.c
diff -u src/external/bsd/atf/dist/atf-c/detail/process.c:1.3 src/external/bsd/atf/dist/atf-c/detail/process.c:1.4
--- src/external/bsd/atf/dist/atf-c/detail/process.c:1.3	Tue Jun 14 15:26:20 2011
+++ src/external/bsd/atf/dist/atf-c/detail/process.c	Wed Jun 15 08:48:35 2011
@@ -412,24 +412,6 @@
 }
 
 static
-atf_error_t
-silence_stdin(void)
-{
-atf_error_t err;
-
-close(STDIN_FILENO);
-int fd = open(/dev/zero, O_RDONLY);
-if (fd == -1)
-err = atf_libc_error(errno, Could not open /dev/zero);
-else {
-INV(fd == STDIN_FILENO);
-err = atf_no_error();
-}
-
-return err;
-}
-
-static
 void
 do_child(void (*)(void *),
  void *,
@@ -445,10 +427,6 @@
 {
 atf_error_t err;
 
-err = silence_stdin();
-if (atf_is_error(err))
-goto out;
-
 err = child_connect(outsp, STDOUT_FILENO);
 if (atf_is_error(err))
 goto out;

Index: src/external/bsd/atf/dist/atf-run/test-program.cpp
diff -u src/external/bsd/atf/dist/atf-run/test-program.cpp:1.9 src/external/bsd/atf/dist/atf-run/test-program.cpp:1.10
--- src/external/bsd/atf/dist/atf-run/test-program.cpp:1.9	Tue Jun 14 15:26:21 2011
+++ src/external/bsd/atf/dist/atf-run/test-program.cpp	Wed Jun 15 08:48:36 2011
@@ -31,6 +31,7 @@
 #include sys/types.h
 #include sys/stat.h
 
+#include fcntl.h
 #include signal.h
 #include unistd.h
 }
@@ -220,6 +221,17 @@
 
 static
 void
+silence_stdin(void)
+{
+::close(STDIN_FILENO);
+int fd = ::open(/dev/null, O_RDONLY);
+if (fd == -1)
+throw std::runtime_error(Could not open /dev/null);
+INV(fd == STDIN_FILENO);
+}
+
+static
+void
 prepare_child(const atf::fs::path workdir)
 {
 const int ret = ::setpgid(::getpid(), 0);
@@ -244,6 +256,8 @@
 atf::env::set(__RUNNING_INSIDE_ATF_RUN, internal-yes-value);
 
 impl::change_directory(workdir);
+
+silence_stdin();
 }
 
 static

Index: src/external/bsd/atf/dist/atf-sh/atf-check_test.sh
diff -u src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.3 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.4
--- src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.3	Thu Mar 31 16:44:17 2011
+++ src/external/bsd/atf/dist/atf-sh/atf-check_test.sh	Wed Jun 15 08:48:36 2011
@@ -400,6 +400,17 @@
 h_fail echo foo bar 12 -e not-match:foo
 }
 
+atf_test_case stdin
+stdin_head()
+{
+atf_set descr Tests that stdin is preserved
+}
+stdin_body()
+{
+echo hello | ${Atf_Check} -o match:hello cat || \
+atf_fail atf-check does not seem to respect stdin
+}
+
 atf_test_case invalid_umask
 invalid_umask_head()
 {
@@ -444,6 +455,8 @@
 atf_add_test_case eflag_multiple
 atf_add_test_case eflag_negated
 
+atf_add_test_case stdin
+
 atf_add_test_case invalid_umask
 }
 



CVS commit: src/external/bsd/atf/dist

2011-06-14 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Jun 14 15:23:30 UTC 2011

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv17790

Log Message:
Import atf-0.14:

Experimental version released on June 14th, 2011.

* Added a pkg-config file for atf-sh and an aclocal file to ease the
  detection of atf-sh from autoconf scripts.

* Made the default test case body defined by atf_sh fail.  This is to
  ensure that test cases are properly defined in test programs and helps
  in catching typos in the names of the body functions.

* PR bin/44882: Made atf-run connect the stdin of test cases to /dev/zero.
  This provides more consistent results with normal execution (in
  particular, when tests are executed detached from a terminal).

* Made atf-run hardcode TZ=UTC for test cases.  It used to undefine TZ, but
  that does not take into account that libc determines the current timezone
  from a configuration file.

* All test programs will now print a warning when they are not run through
  atf-run(1) stating that this is unsupported and may deliver incorrect
  results.

* Added support for the 'require.files' test-case property.  This allows
  test cases to specify installed files that must be present for the test
  case to run.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-14

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
C src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
C src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
U src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
U src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
U src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c/Atffile
U src/external/bsd/atf/dist/atf-c/Kyuafile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
U src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr.c
U src/external/bsd/atf/dist/atf-c/detail/dynstr.h
U src/external/bsd/atf/dist/atf-c/detail/env.c
U src/external/bsd/atf/dist/atf-c/detail/env.h
U src/external/bsd/atf/dist/atf-c/detail/fs.c
U src/external/bsd/atf/dist/atf-c/detail/fs.h
U src/external/bsd/atf/dist/atf-c/detail/list.c
U src/external/bsd/atf/dist/atf-c/detail/list.h
U src/external/bsd/atf/dist/atf-c/detail/map.c
U src/external/bsd/atf/dist/atf-c/detail/map.h
C src/external/bsd/atf/dist/atf-c/detail/process.c
C src/external/bsd/atf/dist/atf-c/detail/process.h
U src/external/bsd/atf/dist/atf-c/detail/sanity.c
U src/external/bsd/atf/dist/atf-c/detail/sanity.h
U src/external/bsd/atf/dist/atf-c/detail/text.c
U src/external/bsd/atf/dist/atf-c/detail/text.h
U src/external/bsd/atf/dist/atf-c/detail/tp_main.c
U src/external/bsd/atf/dist/atf-c/detail/user.c
U src/external/bsd/atf/dist/atf-c/detail/user.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr_test.c
U src/external/bsd/atf/dist/atf-c/detail/env_test.c
U src/external/bsd/atf/dist/atf-c/detail/fs_test.c
U src/external/bsd/atf/dist/atf-c/detail/list_test.c
U src/external/bsd/atf/dist/atf-c/detail/map_test.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c
C src/external/bsd/atf/dist/atf-c/detail/process_test.c
U src/external/bsd/atf/dist/atf-c/detail/sanity_test.c
U src/external/bsd/atf/dist/atf-c/detail/text_test.c
U src/external/bsd/atf/dist/atf-c/detail/user_test.c
U src/external/bsd/atf/dist/atf-c/detail/Atffile
U src/external/bsd/atf/dist/atf-c/detail/Kyuafile
U src/external/bsd/atf/dist/atf-c++/atf-c++-api.3
U src/external/bsd/atf/dist/atf-c++/build.hpp
U src/external/bsd/atf/dist/atf-c++/check.hpp
U 

CVS commit: src/external/bsd/atf/dist

2011-06-14 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Jun 14 15:26:21 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c: defs.h.in tc.h
src/external/bsd/atf/dist/atf-c++: tests.cpp
src/external/bsd/atf/dist/atf-c/detail: process.c
src/external/bsd/atf/dist/atf-run: atf-run.cpp integration_test.sh
test-program.cpp test_program_test.cpp
src/external/bsd/atf/dist/doc: atf-test-case.4

Log Message:
Post-import merge of atf-0.14.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-c/defs.h.in \
src/external/bsd/atf/dist/atf-c/tc.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-c++/tests.cpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-c/detail/process.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/dist/atf-run/atf-run.cpp
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/atf/dist/atf-run/integration_test.sh \
src/external/bsd/atf/dist/atf-run/test_program_test.cpp
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/atf/dist/atf-run/test-program.cpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/doc/atf-test-case.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/defs.h.in
diff -u src/external/bsd/atf/dist/atf-c/defs.h.in:1.2 src/external/bsd/atf/dist/atf-c/defs.h.in:1.3
--- src/external/bsd/atf/dist/atf-c/defs.h.in:1.2	Sat Jun 11 18:03:57 2011
+++ src/external/bsd/atf/dist/atf-c/defs.h.in	Tue Jun 14 15:26:20 2011
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008, 2011 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_DEFS_H)
 #define ATF_C_DEFS_H
 
+#define ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(a, b) @ATTRIBUTE_FORMAT_PRINTF@
 #define ATF_DEFS_ATTRIBUTE_NORETURN @ATTRIBUTE_NORETURN@
 #define ATF_DEFS_ATTRIBUTE_PRINTF(a,b) @ATTRIBUTE_PRINTF(a,b)@
 
Index: src/external/bsd/atf/dist/atf-c/tc.h
diff -u src/external/bsd/atf/dist/atf-c/tc.h:1.2 src/external/bsd/atf/dist/atf-c/tc.h:1.3
--- src/external/bsd/atf/dist/atf-c/tc.h:1.2	Sat Jun 11 18:03:57 2011
+++ src/external/bsd/atf/dist/atf-c/tc.h	Tue Jun 14 15:26:20 2011
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -104,33 +104,33 @@
 
 /* To be run from test case bodies only. */
 void atf_tc_fail(const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(1, 2)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2)
 ATF_DEFS_ATTRIBUTE_NORETURN;
 void atf_tc_fail_nonfatal(const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(1, 2);
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
 void atf_tc_pass(void)
 ATF_DEFS_ATTRIBUTE_NORETURN;
 void atf_tc_require_prog(const char *);
 void atf_tc_skip(const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(1, 2)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2)
 ATF_DEFS_ATTRIBUTE_NORETURN;
 void atf_tc_expect_pass(void);
 void atf_tc_expect_fail(const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(1, 2);
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
 void atf_tc_expect_exit(const int, const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(2, 3);
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3);
 void atf_tc_expect_signal(const int, const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(2, 3);
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3);
 void atf_tc_expect_death(const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(1, 2);
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
 void atf_tc_expect_timeout(const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(1, 2);
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
 
 /* To be run from test case bodies only; internal to macros.h. */
 void atf_tc_fail_check(const char *, const size_t, const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(3, 4);
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(3, 4);
 void atf_tc_fail_requirement(const char *, const size_t, const char *, ...)
-ATF_DEFS_ATTRIBUTE_PRINTF(3, 4)
+ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(3, 4)
 ATF_DEFS_ATTRIBUTE_NORETURN;
 void atf_tc_check_errno(const char *, const size_t, const int,
 const char *, const bool);

Index: src/external/bsd/atf/dist/atf-c++/tests.cpp
diff -u src/external/bsd/atf/dist/atf-c++/tests.cpp:1.6 src/external/bsd/atf/dist/atf-c++/tests.cpp:1.7
--- src/external/bsd/atf/dist/atf-c++/tests.cpp:1.6	Sun Nov  7 17:45:22 2010
+++ src/external/bsd/atf/dist/atf-c++/tests.cpp	Tue Jun 14 15:26:20 2011
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007, 2008, 2009, 2010, 2011 The 

CVS commit: src/external/bsd/atf/dist/atf-c

2011-06-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun 15 01:45:16 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c: defs.h.in

Log Message:
remove merge botch.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c/defs.h.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/defs.h.in
diff -u src/external/bsd/atf/dist/atf-c/defs.h.in:1.3 src/external/bsd/atf/dist/atf-c/defs.h.in:1.4
--- src/external/bsd/atf/dist/atf-c/defs.h.in:1.3	Tue Jun 14 11:26:20 2011
+++ src/external/bsd/atf/dist/atf-c/defs.h.in	Tue Jun 14 21:45:16 2011
@@ -32,6 +32,5 @@
 
 #define ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(a, b) @ATTRIBUTE_FORMAT_PRINTF@
 #define ATF_DEFS_ATTRIBUTE_NORETURN @ATTRIBUTE_NORETURN@
-#define ATF_DEFS_ATTRIBUTE_PRINTF(a,b) @ATTRIBUTE_PRINTF(a,b)@
 
 #endif /* !defined(ATF_C_DEFS_H) */



CVS commit: src/external/bsd/atf/dist

2011-04-05 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Apr  5 17:17:35 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c++/detail: process.hpp
src/external/bsd/atf/dist/atf-c/detail: process.c process.h
process_test.c
src/external/bsd/atf/dist/atf-run: atf-run.cpp

Log Message:
Pull up revision b94e200f2a6ce3d47103339db1f3c8936b7238d3:

Unset TERM when running GDB

GDB inserts some funny control characters in its output when TERM is set to
e.g. xterm.  Workaround this by simply unsetting TERM.

Reported by martin@ and diagnosed by pooka@/martin@.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/atf/dist/atf-c++/detail/process.hpp
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/atf-c/detail/process.c \
src/external/bsd/atf/dist/atf-c/detail/process.h
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/atf/dist/atf-c/detail/process_test.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/atf/dist/atf-run/atf-run.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c++/detail/process.hpp
diff -u src/external/bsd/atf/dist/atf-c++/detail/process.hpp:1.1.1.1 src/external/bsd/atf/dist/atf-c++/detail/process.hpp:1.2
--- src/external/bsd/atf/dist/atf-c++/detail/process.hpp:1.1.1.1	Wed Oct 20 09:14:21 2010
+++ src/external/bsd/atf/dist/atf-c++/detail/process.hpp	Tue Apr  5 17:17:35 2011
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -118,7 +118,7 @@
 child fork(void (*)(void*), const OutStream, const ErrStream, void*);
 template class OutStream, class ErrStream  friend
 status exec(const atf::fs::path, const argv_array,
-const OutStream, const ErrStream);
+const OutStream, const ErrStream, void (*)(void));
 
 public:
 stream_capture(void);
@@ -130,7 +130,7 @@
 child fork(void (*)(void*), const OutStream, const ErrStream, void*);
 template class OutStream, class ErrStream  friend
 status exec(const atf::fs::path, const argv_array,
-const OutStream, const ErrStream);
+const OutStream, const ErrStream, void (*)(void));
 
 public:
 stream_connect(const int, const int);
@@ -142,7 +142,7 @@
 child fork(void (*)(void*), const OutStream, const ErrStream, void*);
 template class OutStream, class ErrStream  friend
 status exec(const atf::fs::path, const argv_array,
-const OutStream, const ErrStream);
+const OutStream, const ErrStream, void (*)(void));
 
 public:
 stream_inherit(void);
@@ -154,7 +154,7 @@
 child fork(void (*)(void*), const OutStream, const ErrStream, void*);
 template class OutStream, class ErrStream  friend
 status exec(const atf::fs::path, const argv_array,
-const OutStream, const ErrStream);
+const OutStream, const ErrStream, void (*)(void));
 
 public:
 stream_redirect_fd(const int);
@@ -166,7 +166,7 @@
 child fork(void (*)(void*), const OutStream, const ErrStream, void*);
 template class OutStream, class ErrStream  friend
 status exec(const atf::fs::path, const argv_array,
-const OutStream, const ErrStream);
+const OutStream, const ErrStream, void (*)(void));
 
 public:
 stream_redirect_path(const fs::path);
@@ -182,7 +182,7 @@
 friend class child;
 template class OutStream, class ErrStream  friend
 status exec(const atf::fs::path, const argv_array,
-const OutStream, const ErrStream);
+const OutStream, const ErrStream, void (*)(void));
 
 status(atf_process_status_t);
 
@@ -249,7 +249,8 @@
 template class OutStream, class ErrStream 
 status
 exec(const atf::fs::path prog, const argv_array argv,
- const OutStream outsb, const ErrStream errsb)
+ const OutStream outsb, const ErrStream errsb,
+ void (*prehook)(void))
 {
 atf_process_status_t s;
 
@@ -257,13 +258,22 @@
 atf_error_t err = atf_process_exec_array(s, prog.c_path(),
  argv.exec_argv(),
  outsb.get_sb(),
- errsb.get_sb());
+ errsb.get_sb(),
+ prehook);
 if (atf_is_error(err))
 throw_atf_error(err);
 
 return status(s);
 }
 
+template class OutStream, class ErrStream 
+status
+exec(const atf::fs::path prog, const argv_array argv,
+ const OutStream outsb, const ErrStream errsb)
+{
+return exec(prog, argv, outsb, errsb, NULL);
+}
+
 } // namespace process
 

CVS commit: src/external/bsd/atf/dist

2011-03-31 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Thu Mar 31 16:41:17 UTC 2011

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv24817

Log Message:
Import atf-0.13:

Experimental version released on March 31st, 2011.

This is the first release after the creation of the Kyua project, a more
modular and reliable replacement for ATF.  From now on, ATF will change to
accomodate the transition to this new codebase, but ATF will still continue
to see development in the short/medium term.  Check out the project page at
http://code.google.com/p/kyua/ for more details.

The changes in this release are:

* Added support to run the tests with the Kyua runtime engine (kyua-cli), a
  new package that aims to replace atf-run and atf-report.  The ATF tests
  can be run with the new system by issuing a 'make installcheck-kyua' from
  the top-level directory of the project (assuming the 'kyua' binary is
  available during the configuration stage of ATF).

* atf-run and atf-report are now in maintenance mode (but *not* deprecated
  yet!).  Kyua already implements a new, much more reliable runtime engine
  that provides similar features to these tools.  That said, it is not
  complete yet so all development efforts should go towards it.

* If GDB is installed, atf-run dumps the stack trace of crashing test
  programs in an attempt to aid debugging.  Contributed by Antti Kantee.

* Reverted default timeout change in previous release and reset its value
  to 5 minutes.  This was causing several issues, specially when running
  the existing NetBSD test suite in qemu.

* Fixed the 'match' output checker in atf-check to properly validate the
  last line of a file even if it does not have a newline.

* Added the ATF_REQUIRE_IN and ATF_REQUIRE_NOT_IN macros to atf-c++ to
  check for the presence (or lack thereof) of an element in a collection.

* PR bin/44176: Fixed a race condition in atf-run that would crash atf-run
  when the cleanup of a test case triggered asynchronous modifications to
  its work directory (e.g. killing a daemon process that cleans up a pid
  file in the work directory).

* PR bin/44301: Fixed the sample XSLT file to report bogus test programs
  instead of just listing them as having 0 test cases.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-13

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
N src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
U src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
U src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
U src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
U src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
C src/external/bsd/atf/dist/atf-c/Atffile
N src/external/bsd/atf/dist/atf-c/Kyuafile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
U src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr.c
U src/external/bsd/atf/dist/atf-c/detail/dynstr.h
U src/external/bsd/atf/dist/atf-c/detail/env.c
U src/external/bsd/atf/dist/atf-c/detail/env.h
U src/external/bsd/atf/dist/atf-c/detail/fs.c
U src/external/bsd/atf/dist/atf-c/detail/fs.h
U src/external/bsd/atf/dist/atf-c/detail/list.c
U src/external/bsd/atf/dist/atf-c/detail/list.h
U src/external/bsd/atf/dist/atf-c/detail/map.c
U src/external/bsd/atf/dist/atf-c/detail/map.h
U src/external/bsd/atf/dist/atf-c/detail/process.c
U src/external/bsd/atf/dist/atf-c/detail/process.h
U src/external/bsd/atf/dist/atf-c/detail/sanity.c
U src/external/bsd/atf/dist/atf-c/detail/sanity.h
U src/external/bsd/atf/dist/atf-c/detail/text.c
U 

CVS commit: src/external/bsd/atf/dist

2011-03-31 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Thu Mar 31 16:44:18 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-run: atf-run.cpp
src/external/bsd/atf/dist/atf-sh: atf-check.cpp atf-check_test.sh
src/external/bsd/atf/dist/doc: atf-test-case.4

Log Message:
Fix import conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/dist/atf-run/atf-run.cpp
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-sh/atf-check.cpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/doc/atf-test-case.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/atf-run.cpp
diff -u src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.9 src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.10
--- src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.9	Fri Mar  4 09:04:06 2011
+++ src/external/bsd/atf/dist/atf-run/atf-run.cpp	Thu Mar 31 16:44:17 2011
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007, 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -99,6 +99,45 @@
 int main(void);
 };
 
+static void
+dump_stacktrace(const atf::fs::path tp, const atf::process::status s,
+const atf::fs::path workdir, impl::atf_tps_writer w)
+{
+PRE(s.signaled()  s.coredump());
+
+w.stderr_tc(Test program crashed; attempting to get stack trace);
+
+const atf::fs::path corename = workdir / (tp.leaf_name() + .core);
+if (!atf::fs::exists(corename)) {
+w.stderr_tc(Expected file  + corename.str() +  not found);
+return;
+}
+
+const atf::fs::path gdb(GDB);
+const atf::fs::path gdbout = workdir / gdb.out;
+const atf::process::argv_array args(gdb.leaf_name().c_str(), -batch,
+-q, -ex, bt, tp.c_str(),
+corename.c_str(), NULL);
+atf::process::status status = atf::process::exec(
+gdb, args,
+atf::process::stream_redirect_path(gdbout),
+atf::process::stream_redirect_path(atf::fs::path(/dev/null)));
+if (!status.exited() || status.exitstatus() != EXIT_SUCCESS) {
+w.stderr_tc(Execution of  GDB  failed);
+return;
+}
+
+std::ifstream input(gdbout.c_str());
+if (input) {
+std::string line;
+while (std::getline(input, line).good())
+w.stderr_tc(line);
+input.close();
+}
+
+w.stderr_tc(Stack trace complete);
+}
+
 const char* atf_run::m_description =
 atf-run is a tool that runs tests programs and collects their 
 results.;
@@ -370,8 +409,8 @@
 if (user.first != -1  user.second != -1) {
 if (::chown(workdir.get_path().c_str(), user.first,
 user.second) == -1) {
-throw atf::system_error(chmod( +
-workdir.get_path().str() + ), chmod(2) failed,
+throw atf::system_error(chown( +
+workdir.get_path().str() + ), chown(2) failed,
 errno);
 }
 resfile = workdir.get_path() / tcr;
@@ -380,45 +419,17 @@
 std::pair std::string, const atf::process::status  s =
 impl::run_test_case(tp, tcname, body, tcmd, config,
 resfile, workdir.get_path(), w);
+if (s.second.signaled()  s.second.coredump())
+dump_stacktrace(tp, s.second, workdir.get_path(), w);
+if (has_cleanup)
+(void)impl::run_test_case(tp, tcname, cleanup, tcmd,
+config, resfile, workdir.get_path(), w);
 
 // TODO: Force deletion of workdir.
 
 impl::test_case_result tcr = get_test_case_result(s.first,
 s.second, resfile);
 
-		/* if we have a core, scope out stacktrace */
-		size_t slashpos = tp.str().rfind(/);
-		std::string corename = workdir.get_path().str()
-		+ std::string(/) + tp.str().substr(slashpos+1)
-		+ std::string(.core);
-		if (s.second.signaled()  s.second.coredump() 
-		access(corename.c_str(), F_OK) == 0) {
-			std::string gdbcmd;
-			char buf[256];
-			char *p;
-
-			gdbcmd = std::string(gdb -batch -q -ex bt ) +
-			tp.str() + std::string( ) + corename +
-			std::string( 2 /dev/null | grep -v ) +
-			std::string('(no debugging symbols found)');
-			FILE *gdbstrm = popen(gdbcmd.c_str(), r);
-			if (gdbstrm) {
-w.stderr_tc(std::string(test program crashed, 
-autolisting stacktrace:));
-while 

CVS commit: src/external/bsd/atf/dist/atf-c

2011-03-24 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Thu Mar 24 19:50:30 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-c: Atffile

Log Message:
Enable the execution of pkg_config_test; it has been present for a while
and it is even being built and installed already.

Partial pull up of 0930d2c3f44a9c8fcaf0a960ab51c5e8f320684d.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-c/Atffile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/Atffile
diff -u src/external/bsd/atf/dist/atf-c/Atffile:1.1.1.2 src/external/bsd/atf/dist/atf-c/Atffile:1.2
--- src/external/bsd/atf/dist/atf-c/Atffile:1.1.1.2	Wed Oct 20 09:14:19 2010
+++ src/external/bsd/atf/dist/atf-c/Atffile	Thu Mar 24 19:50:30 2011
@@ -10,6 +10,7 @@
 tp: config_test
 tp: error_test
 tp: macros_test
+tp: pkg_config_test
 tp: tc_test
 tp: tp_test
 tp: utils_test



CVS commit: src/external/bsd/atf/dist/atf-run

2011-03-17 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Thu Mar 17 19:45:36 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-run: test-program.cpp

Log Message:
Pull up revision 3dd2481ec97b2fde76521939b6451d03ce989745 from upstream:

Really kill subprocesses of a test case before waiting for its completion

Before waiting for any leftover output of the test case after it terminates,
we must ensure that all of its subprocess are really, really dead.  Otherwise,
these subprocesses may be sharing the stdout of the test case, in which case
our wait will block (potentially indefinitely).

This finally (well, hopefully) fixes some random lockups exposed by the
NetBSD test suite.  Reported by Antti Kantee after
tests/fs/vfs/t_full:p2k_ffs_fillfs was exposing this problem in a pretty
reproducible manner.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-run/test-program.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/test-program.cpp
diff -u src/external/bsd/atf/dist/atf-run/test-program.cpp:1.7 src/external/bsd/atf/dist/atf-run/test-program.cpp:1.8
--- src/external/bsd/atf/dist/atf-run/test-program.cpp:1.7	Tue Nov 16 17:55:56 2010
+++ src/external/bsd/atf/dist/atf-run/test-program.cpp	Thu Mar 17 19:45:36 2011
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007, 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -724,10 +724,9 @@
 UNREACHABLE;
 }
 
-::killpg(child_pid, SIGTERM);
+::killpg(child_pid, SIGKILL);
 mux.flush();
 atf::process::status status = child.wait();
-::killpg(child_pid, SIGKILL);
 
 std::string reason;
 



CVS commit: src/external/bsd/atf/dist/atf-run

2011-03-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Mar  2 16:47:04 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-run: atf-run.cpp

Log Message:
In case we get a coredump from a test, autorun gdb to produce a
stacktrace (or whatever gdb can give us, which unfortunately is
usually not that much).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-run/atf-run.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/atf-run.cpp
diff -u src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.7 src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.8
--- src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.7	Sun Nov  7 17:45:22 2010
+++ src/external/bsd/atf/dist/atf-run/atf-run.cpp	Wed Mar  2 16:47:04 2011
@@ -380,15 +380,44 @@
 std::pair std::string, const atf::process::status  s =
 impl::run_test_case(tp, tcname, body, tcmd, config,
 resfile, workdir.get_path(), w);
-if (has_cleanup)
-(void)impl::run_test_case(tp, tcname, cleanup, tcmd,
-config, resfile, workdir.get_path(), w);
 
 // TODO: Force deletion of workdir.
 
 impl::test_case_result tcr = get_test_case_result(s.first,
 s.second, resfile);
 
+		/* if we have a core, scope out stacktrace */
+		size_t slashpos = tp.str().rfind(/);
+		std::string corename = workdir.get_path().str()
+		+ std::string(/) + tp.str().substr(slashpos+1)
+		+ std::string(.core);
+		if (s.second.signaled()  s.second.coredump() 
+		access(corename.c_str(), F_OK) == 0) {
+			std::string gdbcmd;
+			char buf[256];
+			char *p;
+
+			gdbcmd = std::string(gdb -batch -q -ex bt ) +
+			tp.str() + std::string( ) + corename +
+			std::string( 2 /dev/null);
+			FILE *gdbstrm = popen(gdbcmd.c_str(), r);
+			if (gdbstrm) {
+w.stderr_tc(std::string(test program crashed, 
+autolisting stacktrace:));
+while (fgets(buf, sizeof(buf), gdbstrm)) {
+	if ((p = strchr(buf, '\n')) != NULL)
+		*p = '\0';
+	w.stderr_tc(std::string(buf));
+}
+pclose(gdbstrm);
+w.stderr_tc(std::string(stacktrace complete));
+			}
+		}
+
+if (has_cleanup)
+(void)impl::run_test_case(tp, tcname, cleanup, tcmd,
+config, resfile, workdir.get_path(), w);
+
 w.end_tc(tcr.state(), tcr.reason());
 if (tcr.state() == failed)
 errcode = EXIT_FAILURE;



CVS commit: src/external/bsd/atf/dist/atf-report

2011-01-05 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Jan  5 14:03:08 UTC 2011

Modified Files:
src/external/bsd/atf/dist/atf-report: tests-results.xsl

Log Message:
Cherry-pick upstream revision f791048924a1b68da070f17dfd5e5c2d825dd018:

Report bogus test programs in the HTML output

From Paul Goyette in private mail.  Fixes PR bin/44301.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/atf/dist/atf-report/tests-results.xsl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-report/tests-results.xsl
diff -u src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.4 src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.5
--- src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.4	Wed Oct 20 09:17:23 2010
+++ src/external/bsd/atf/dist/atf-report/tests-results.xsl	Wed Jan  5 14:03:08 2011
@@ -86,6 +86,9 @@
 xsl:if test=$ntcs-skipped  0
   xsl:call-template name=skipped-tcs-summary /
 /xsl:if
+xsl:if test=$ntps-failed  0
+  xsl:call-template name=failed-tps-summary /
+/xsl:if
 xsl:call-template name=info-bottom /
 
 xsl:apply-templates select=tp mode=details /
@@ -167,14 +170,16 @@
 td class=numericpxsl:value-of select=$ntps //p/td
   /tr
   tr class=entry
-tdpBogus test programs/p/td
 xsl:choose
   xsl:when test=$ntps-failed  0
+tdpa href=#failed-tps-summaryBogus test
+programs/a/p/td
 td class=numeric-error
   pxsl:value-of select=$ntps-failed //p
 /td
   /xsl:when
   xsl:otherwise
+tdpBogus test programs/p/td
 td class=numeric
   pxsl:value-of select=$ntps-failed //p
 /td
@@ -314,6 +319,20 @@
 /table
   /xsl:template
 
+  xsl:template name=failed-tps-summary
+a name=failed-tps-summary /
+h2 id=failed-tps-summaryBogus test programs summary/h2
+
+table class=tcs-summary
+  tr
+thTest program/th
+  /tr
+  xsl:apply-templates select=tp mode=summary
+xsl:with-param name=whichbogus/xsl:with-param
+  /xsl:apply-templates
+/table
+  /xsl:template
+
   xsl:template name=skipped-tcs-summary
 a name=skipped-tcs-summary /
 h2 id=skipped-tcs-summarySkipped test cases summary/h2
@@ -335,6 +354,7 @@
 
 xsl:variable name=chosen
   xsl:choose
+xsl:when test=$which = 'bogus' and failedyes/xsl:when
 xsl:when test=$which = 'passed' and tc/passedyes/xsl:when
 xsl:when test=$which = 'failed' and tc/failedyes/xsl:when
 xsl:when test=$which = 'xfail' and
@@ -359,9 +379,11 @@
   pxsl:value-of select=@id //p
 /td
   /tr
-  xsl:apply-templates select=tc mode=summary
-xsl:with-param name=which select=$which /
-  /xsl:apply-templates
+  xsl:if test=$which != 'bogus'
+xsl:apply-templates select=tc mode=summary
+  xsl:with-param name=which select=$which /
+/xsl:apply-templates
+  /xsl:if
 /xsl:if
   /xsl:template
 



CVS commit: src/external/bsd/atf/dist/atf-sh

2010-12-27 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Dec 27 20:36:17 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-sh: atf-check.cpp

Log Message:
Pull up revision 869e092e4986eb5dce90331ca9a64e125d7796eb from mainstream:

Revision: 869e092e4986eb5dce90331ca9a64e125d7796eb
Parent:   cca40eb08e7469dfe9d6ca982613458f24c1de28
Author:   j...@netbsd.org
Date: 12/27/10 21:19:19
Branch:   org.NetBSD.atf.src

Changelog:

Recognize sigabrt in the signal checker

Problem found by Paul Goyette.

Changes against parent cca40eb08e7469dfe9d6ca982613458f24c1de28

  patched  atf-sh/atf-check.cpp


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-sh/atf-check.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/atf-check.cpp
diff -u src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.3 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.4
--- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.3	Mon Dec  6 18:04:02 2010
+++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp	Mon Dec 27 20:36:17 2010
@@ -184,6 +184,7 @@
 { int, SIGINT },
 { quit, SIGQUIT },
 { trap, SIGTRAP },
+{ abrt, SIGABRT },
 { kill, SIGKILL },
 { segv, SIGSEGV },
 { pipe, SIGPIPE },



CVS commit: src/external/bsd/atf/dist/atf-sh

2010-12-06 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Dec  6 18:04:02 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-sh: atf-check.cpp atf-check_test.sh

Log Message:
Pull up revision c917871de7dd67ba57c17496ad68fe4e4aa8b239:

Fix atf-check match checker to validate lines without newline

Problem found by po...@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-sh/atf-check.cpp
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/atf/dist/atf-sh/atf-check_test.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/atf-check.cpp
diff -u src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.2 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.3
--- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.2	Fri Nov 26 12:04:36 2010
+++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp	Mon Dec  6 18:04:02 2010
@@ -378,7 +378,7 @@
 bool found = false;
 
 std::string line;
-while (!found  std::getline(stream, line).good()) {
+while (!found  !std::getline(stream, line).fail()) {
 if (atf::text::match(line, regexp))
 found = true;
 }

Index: src/external/bsd/atf/dist/atf-sh/atf-check_test.sh
diff -u src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.1.1.2 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.2
--- src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.1.1.2	Sun Nov  7 17:43:29 2010
+++ src/external/bsd/atf/dist/atf-sh/atf-check_test.sh	Mon Dec  6 18:04:02 2010
@@ -234,6 +234,7 @@
 }
 oflag_match_body()
 {
+h_pass printf no-newline -o match:^no-newline
 h_pass echo line1; echo foo bar -o match:^foo
 h_pass echo foo bar -o match:o b
 h_fail echo foo bar -o match:baz
@@ -365,6 +366,7 @@
 }
 eflag_match_body()
 {
+h_pass printf no-newline 12 -e match:^no-newline
 h_pass echo line1 12; echo foo bar 12 -e match:^foo
 h_pass echo foo bar 12 -e match:o b
 h_fail echo foo bar 12 -e match:baz



CVS commit: src/external/bsd/atf/dist/atf-sh

2010-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Nov 26 12:04:36 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-sh: atf-check.cpp

Log Message:
Remove spammy (debug?) prints.  took ages to figure out they were
not coming from my application...

XXX: the memcmp below looks suspicious


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-sh/atf-check.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/atf-check.cpp
diff -u src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.1.1.2 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.2
--- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.1.1.2	Sun Nov  7 17:43:28 2010
+++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp	Fri Nov 26 12:04:36 2010
@@ -421,8 +421,6 @@
 if (f2.bad())
 throw std::runtime_error(Failed to read from  + p1.str());
 
-std::cout  1 read:   f1.gcount()  \n;
-std::cout  2 read:   f2.gcount()  \n;
 if ((f1.gcount() == 0)  (f2.gcount() == 0)) {
 equal = true;
 break;



CVS commit: src/external/bsd/atf/dist

2010-11-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Nov 16 17:55:56 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-run: test-program.cpp
test_program_test.cpp
src/external/bsd/atf/dist/doc: atf-test-case.4

Log Message:
Pull up 702fa99a25c1b27e4c501e4a504f36b74106ea97 from upstream

This reverts the default timeout for test cases back to 300 seconds.
The change in the release was quite blind because it did not anticipate
many existing tests to be slow enough to overflow the modified timeout
(30 seconds), specially in anita.

My plan to really fix this is to let test cases specify their sizes in
a declarative way instead of specifying timeouts in seconds (the timeout
being defined by atf-run on a size basis), so I'm not going to bother to
go over all existing tests trying to figure out which ones need a higher
timeout for now.  It is just easier to revert.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-run/test-program.cpp
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/bsd/atf/dist/atf-run/test_program_test.cpp
cvs rdiff -u -r1.1.1.6 -r1.2 src/external/bsd/atf/dist/doc/atf-test-case.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/test-program.cpp
diff -u src/external/bsd/atf/dist/atf-run/test-program.cpp:1.6 src/external/bsd/atf/dist/atf-run/test-program.cpp:1.7
--- src/external/bsd/atf/dist/atf-run/test-program.cpp:1.6	Sun Nov  7 17:45:22 2010
+++ src/external/bsd/atf/dist/atf-run/test-program.cpp	Tue Nov 16 17:55:56 2010
@@ -110,7 +110,7 @@
 m_tcs[ident].insert(std::make_pair(has.cleanup, false));
 
 if (m_tcs[ident].find(timeout) == m_tcs[ident].end())
-m_tcs[ident].insert(std::make_pair(timeout, 30));
+m_tcs[ident].insert(std::make_pair(timeout, 300));
 }
 
 public:

Index: src/external/bsd/atf/dist/atf-run/test_program_test.cpp
diff -u src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.1.1.3 src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.2
--- src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.1.1.3	Sun Nov  7 17:43:28 2010
+++ src/external/bsd/atf/dist/atf-run/test_program_test.cpp	Tue Nov 16 17:55:56 2010
@@ -190,7 +190,7 @@
 \n
 ident: test_case_1\n
 descr: This is the description\n
-timeout: 30\n
+timeout: 300\n
 \n
 ident: test_case_2\n
 \n
@@ -201,7 +201,7 @@
 
 // NO_CHECK_STYLE_BEGIN
 const char* exp_calls[] = {
-got_tc(test_case_1, {descr=This is the description, ident=test_case_1, timeout=30}),
+got_tc(test_case_1, {descr=This is the description, ident=test_case_1, timeout=300}),
 got_tc(test_case_2, {ident=test_case_2}),
 got_tc(test_case_3, {X-prop1=A custom property, descr=Third test case, ident=test_case_3}),
 got_eof(),
@@ -224,7 +224,7 @@
 \n
 ident: single_test\n
 descr: Some description\n
-timeout: 30\n
+timeout: 300\n
 require.arch: thearch\n
 require.config: foo-bar\n
 require.machine: themachine\n
@@ -234,7 +234,7 @@
 
 // NO_CHECK_STYLE_BEGIN
 const char* exp_calls[] = {
-got_tc(single_test, {descr=Some description, ident=single_test, require.arch=thearch, require.config=foo-bar, require.machine=themachine, require.progs=/bin/cp mv, require.user=root, timeout=30}),
+got_tc(single_test, {descr=Some description, ident=single_test, require.arch=thearch, require.config=foo-bar, require.machine=themachine, require.progs=/bin/cp mv, require.user=root, timeout=300}),
 got_eof(),
 NULL
 };
@@ -474,7 +474,7 @@
 \n
 \n
 ident: test\n
-timeout: 30\n
+timeout: 300\n
 ;
 
 const char* exp_calls[] = {
@@ -762,7 +762,7 @@
 check_property((*iter).second, descr, Description 1);
 check_property((*iter).second, has.cleanup, false);
 check_property((*iter).second, ident, first);
-check_property((*iter).second, timeout, 30);
+check_property((*iter).second, timeout, 300);
 }
 
 {
@@ -786,7 +786,7 @@
 ATF_REQUIRE_EQ(3, (*iter).second.size());
 check_property((*iter).second, has.cleanup, false);
 check_property((*iter).second, ident, third);
-check_property((*iter).second, timeout, 30);
+check_property((*iter).second, timeout, 300);
 }
 }
 

Index: src/external/bsd/atf/dist/doc/atf-test-case.4
diff -u src/external/bsd/atf/dist/doc/atf-test-case.4:1.1.1.6 src/external/bsd/atf/dist/doc/atf-test-case.4:1.2
--- src/external/bsd/atf/dist/doc/atf-test-case.4:1.1.1.6	Sun Nov  7 17:43:29 2010
+++ src/external/bsd/atf/dist/doc/atf-test-case.4	Tue Nov 16 17:55:56 2010
@@ -26,7 +26,7 @@
 .\ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\ IF ADVISED OF 

CVS commit: src/external/bsd/atf/dist

2010-11-07 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Nov  7 17:43:34 UTC 2010

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv15245

Log Message:
Import atf 0.12:

Experimental version released on November 7th, 2010.

* Added the ATF_REQUIRE_THROW_RE to atf-c++, which is the same as
  ATF_REQUIRE_THROW but allows checking for the validity of the exception's
  error message by means of a regular expression.

* Added the ATF_REQUIRE_MATCH to atf-c++, which allows checking for a
  regular expression match in a string.

* Changed the default timeout for test cases from 5 minutes to 30 seconds.
  30 seconds is long enough for virtually all tests to complete, and 5
  minutes is a way too long pause in a test suite where a single test case
  stalls.

* Deprecated the use.fs property.  While this seemed like a good idea in
  the first place to impose more control on what test cases can do, it
  turns out to be bad.  First, use.fs=false prevents bogus test cases
  from dumping core so after-the-fact debugging is harder.  Second,
  supporting use.fs adds a lot of unnecessary complexity.  atf-run will
  now ignore any value provided to use.fs and will allow test cases to
  freely access the file system if they wish to.

* Added the atf_tc_get_config_var_as_{bool,long}{,_wd} functions to the atf-c
  library.  The 'text' module became private in 0.11 but was being used
  externally to simplify the parsing of configuration variables.

* Made atf-run recognize the 'unprivileged-user' configuration variable
  and automatically drop root privileges when a test case sets
  require.user=unprivileged.  Note that this is, by no means, done for
  security purposes; this is just for user convenience; tests should, in
  general, not be blindly run as root in the first place.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-12

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
U src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
C src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
U src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
U src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c/Atffile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
U src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr.c
U src/external/bsd/atf/dist/atf-c/detail/dynstr.h
U src/external/bsd/atf/dist/atf-c/detail/env.c
U src/external/bsd/atf/dist/atf-c/detail/env.h
U src/external/bsd/atf/dist/atf-c/detail/fs.c
U src/external/bsd/atf/dist/atf-c/detail/fs.h
U src/external/bsd/atf/dist/atf-c/detail/list.c
U src/external/bsd/atf/dist/atf-c/detail/list.h
U src/external/bsd/atf/dist/atf-c/detail/map.c
U src/external/bsd/atf/dist/atf-c/detail/map.h
U src/external/bsd/atf/dist/atf-c/detail/process.c
U src/external/bsd/atf/dist/atf-c/detail/process.h
U src/external/bsd/atf/dist/atf-c/detail/sanity.c
U src/external/bsd/atf/dist/atf-c/detail/sanity.h
U src/external/bsd/atf/dist/atf-c/detail/text.c
U src/external/bsd/atf/dist/atf-c/detail/text.h
U src/external/bsd/atf/dist/atf-c/detail/tp_main.c
U src/external/bsd/atf/dist/atf-c/detail/user.c
U src/external/bsd/atf/dist/atf-c/detail/user.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr_test.c
U src/external/bsd/atf/dist/atf-c/detail/env_test.c
U src/external/bsd/atf/dist/atf-c/detail/fs_test.c
U src/external/bsd/atf/dist/atf-c/detail/list_test.c
U src/external/bsd/atf/dist/atf-c/detail/map_test.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c
U 

CVS commit: src/external/bsd/atf/dist

2010-11-07 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Nov  7 17:45:22 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-c: tc.c
src/external/bsd/atf/dist/atf-c++: tests.cpp tests.hpp
src/external/bsd/atf/dist/atf-run: atf-run.cpp io_test.cpp
test-program.cpp

Log Message:
Help merge of atf-0.12.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-c/tc.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/atf-c++/tests.cpp
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-c++/tests.hpp
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-run/atf-run.cpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-run/io_test.cpp
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/atf-run/test-program.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/tc.c
diff -u src/external/bsd/atf/dist/atf-c/tc.c:1.7 src/external/bsd/atf/dist/atf-c/tc.c:1.8
--- src/external/bsd/atf/dist/atf-c/tc.c:1.7	Wed Oct 20 09:17:22 2010
+++ src/external/bsd/atf/dist/atf-c/tc.c	Sun Nov  7 17:45:21 2010
@@ -642,6 +642,70 @@
 return val;
 }
 
+bool
+atf_tc_get_config_var_as_bool(const atf_tc_t *tc, const char *name)
+{
+bool val;
+const char *strval;
+atf_error_t err;
+
+strval = atf_tc_get_config_var(tc, name);
+err = atf_text_to_bool(strval, val);
+if (atf_is_error(err)) {
+atf_error_free(err);
+atf_tc_fail(Configuration variable %s does not have a valid 
+boolean value; found %s, name, strval);
+}
+
+return val;
+}
+
+bool
+atf_tc_get_config_var_as_bool_wd(const atf_tc_t *tc, const char *name,
+ const bool defval)
+{
+bool val;
+
+if (!atf_tc_has_config_var(tc, name))
+val = defval;
+else
+val = atf_tc_get_config_var_as_bool(tc, name);
+
+return val;
+}
+
+long
+atf_tc_get_config_var_as_long(const atf_tc_t *tc, const char *name)
+{
+long val;
+const char *strval;
+atf_error_t err;
+
+strval = atf_tc_get_config_var(tc, name);
+err = atf_text_to_long(strval, val);
+if (atf_is_error(err)) {
+atf_error_free(err);
+atf_tc_fail(Configuration variable %s does not have a valid 
+long value; found %s, name, strval);
+}
+
+return val;
+}
+
+long
+atf_tc_get_config_var_as_long_wd(const atf_tc_t *tc, const char *name,
+ const long defval)
+{
+long val;
+
+if (!atf_tc_has_config_var(tc, name))
+val = defval;
+else
+val = atf_tc_get_config_var_as_long(tc, name);
+
+return val;
+}
+
 const char *
 atf_tc_get_md_var(const atf_tc_t *tc, const char *name)
 {

Index: src/external/bsd/atf/dist/atf-c++/tests.cpp
diff -u src/external/bsd/atf/dist/atf-c++/tests.cpp:1.5 src/external/bsd/atf/dist/atf-c++/tests.cpp:1.6
--- src/external/bsd/atf/dist/atf-c++/tests.cpp:1.5	Wed Oct 20 09:17:23 2010
+++ src/external/bsd/atf/dist/atf-c++/tests.cpp	Sun Nov  7 17:45:22 2010
@@ -111,6 +111,16 @@
 }
 
 // 
+// Free helper functions.
+// 
+
+bool
+detail::match(const std::string regexp, const std::string str)
+{
+return atf::text::match(str, regexp);
+}
+
+// 
 // The tc class.
 // 
 

Index: src/external/bsd/atf/dist/atf-c++/tests.hpp
diff -u src/external/bsd/atf/dist/atf-c++/tests.hpp:1.4 src/external/bsd/atf/dist/atf-c++/tests.hpp:1.5
--- src/external/bsd/atf/dist/atf-c++/tests.hpp:1.4	Wed Oct 20 09:17:23 2010
+++ src/external/bsd/atf/dist/atf-c++/tests.hpp	Sun Nov  7 17:45:22 2010
@@ -34,6 +34,10 @@
 #include memory
 #include string
 
+extern C {
+#include atf-c/defs.h
+}
+
 #include atf-c++/utils.hpp
 
 namespace atf {
@@ -54,6 +58,8 @@
 void tc_meta_data(const std::string, const std::string);
 };
 
+bool match(const std::string, const std::string);
+
 } // namespace
 
 // 
@@ -99,10 +105,10 @@
 void run_cleanup(void) const;
 
 // To be called from the child process only.
-static void pass(void);
-static void fail(const std::string);
+static void pass(void) ATF_DEFS_ATTRIBUTE_NORETURN;
+static void fail(const std::string) ATF_DEFS_ATTRIBUTE_NORETURN;
 static void fail_nonfatal(const std::string);
-static void skip(const std::string);
+static void skip(const std::string) ATF_DEFS_ATTRIBUTE_NORETURN;
 static void check_errno(const char*, const int, const int, const char*,
 const bool);
 static void require_errno(const char*, const int, const int, const char*,


CVS commit: src/external/bsd/atf/dist/atf-run

2010-11-07 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Nov  7 17:54:03 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-run: config_test.cpp integration_test.sh

Log Message:
Pull in post-release fix 3d5597b0076ade841abf03fc274da72d17cb3ad6 to resolve
issues with the default NetBSD settings.  Tests were producing invalid results
because they were unexpectedly reading the system-wide settings.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/atf/dist/atf-run/config_test.cpp
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/bsd/atf/dist/atf-run/integration_test.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/config_test.cpp
diff -u src/external/bsd/atf/dist/atf-run/config_test.cpp:1.1.1.2 src/external/bsd/atf/dist/atf-run/config_test.cpp:1.2
--- src/external/bsd/atf/dist/atf-run/config_test.cpp:1.1.1.2	Wed Oct 20 09:14:23 2010
+++ src/external/bsd/atf/dist/atf-run/config_test.cpp	Sun Nov  7 17:54:03 2010
@@ -27,7 +27,9 @@
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
+#include atf-c++/detail/env.hpp
 #include atf-c++/detail/test_helpers.hpp
+#include atf-c++/config.hpp
 #include atf-c++/macros.hpp
 
 #include config.hpp
@@ -37,6 +39,14 @@
 
 using atf::tests::vars_map;
 
+namespace atf {
+namespace config {
+
+void __reinit(void);
+
+}  // namespace config
+}  // namespace atf
+
 // -
 // Tests for the config parser.
 // -
@@ -351,6 +361,8 @@
 ATF_TEST_CASE(read_config_files_none);
 ATF_TEST_CASE_HEAD(read_config_files_none) {}
 ATF_TEST_CASE_BODY(read_config_files_none) {
+atf::env::set(ATF_CONFDIR, .);
+atf::config::__reinit();
 ATF_REQUIRE(vars_map() == impl::read_config_files(test-suite));
 }
 

Index: src/external/bsd/atf/dist/atf-run/integration_test.sh
diff -u src/external/bsd/atf/dist/atf-run/integration_test.sh:1.1.1.3 src/external/bsd/atf/dist/atf-run/integration_test.sh:1.2
--- src/external/bsd/atf/dist/atf-run/integration_test.sh:1.1.1.3	Sun Nov  7 17:43:28 2010
+++ src/external/bsd/atf/dist/atf-run/integration_test.sh	Sun Nov  7 17:54:03 2010
@@ -29,6 +29,8 @@
 
 create_atffile()
 {
+ATF_CONFDIR=$(pwd); export ATF_CONFDIR
+
 cat Atffile EOF
 Content-Type: application/X-atf-atffile; version=1
 



CVS commit: src/external/bsd/atf/dist

2010-10-20 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Oct 20 09:14:32 UTC 2010

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv19089

Log Message:
Import atf-0.11:

Experimental version released on October 20th, 2010.

* The ATF_CHECK* macros in atf-c++ were renamed to ATF_REQUIRE* to match
  their counterparts in atf-c.

* Clearly separated the modules in atf-c that are supposed to be public
  from those that are implementation details.  The header files for the
  internal modules are not installed any more.

* Made the atf-check tool private.  It is only required by atf-sh and being
  public has the danger of causing confusion.  Also, making it private
  simplifies the public API of atf.

* Changed atf-sh to enable per-command error checking (set -e) by default.
  This catches many cases in which a test case is broken but it is not
  reported as such because execution continues.

* Fixed the XSTL and CSS stylesheets to support expected failures.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-11

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
N src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
U src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
C src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
N src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
U src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
N src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c/Atffile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
N src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
N src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
N src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
N src/external/bsd/atf/dist/atf-c/detail/dynstr.c
N src/external/bsd/atf/dist/atf-c/detail/dynstr.h
N src/external/bsd/atf/dist/atf-c/detail/env.c
N src/external/bsd/atf/dist/atf-c/detail/env.h
N src/external/bsd/atf/dist/atf-c/detail/fs.c
N src/external/bsd/atf/dist/atf-c/detail/fs.h
N src/external/bsd/atf/dist/atf-c/detail/list.c
N src/external/bsd/atf/dist/atf-c/detail/list.h
N src/external/bsd/atf/dist/atf-c/detail/map.c
N src/external/bsd/atf/dist/atf-c/detail/map.h
N src/external/bsd/atf/dist/atf-c/detail/process.c
N src/external/bsd/atf/dist/atf-c/detail/process.h
N src/external/bsd/atf/dist/atf-c/detail/sanity.c
N src/external/bsd/atf/dist/atf-c/detail/sanity.h
N src/external/bsd/atf/dist/atf-c/detail/text.c
N src/external/bsd/atf/dist/atf-c/detail/text.h
N src/external/bsd/atf/dist/atf-c/detail/tp_main.c
N src/external/bsd/atf/dist/atf-c/detail/user.c
N src/external/bsd/atf/dist/atf-c/detail/user.h
N src/external/bsd/atf/dist/atf-c/detail/dynstr_test.c
N src/external/bsd/atf/dist/atf-c/detail/env_test.c
N src/external/bsd/atf/dist/atf-c/detail/fs_test.c
N src/external/bsd/atf/dist/atf-c/detail/list_test.c
N src/external/bsd/atf/dist/atf-c/detail/map_test.c
N src/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c
N src/external/bsd/atf/dist/atf-c/detail/process_test.c
N src/external/bsd/atf/dist/atf-c/detail/sanity_test.c
N src/external/bsd/atf/dist/atf-c/detail/text_test.c
N src/external/bsd/atf/dist/atf-c/detail/user_test.c
N src/external/bsd/atf/dist/atf-c/detail/Atffile
U src/external/bsd/atf/dist/atf-c++/atf-c++-api.3
U src/external/bsd/atf/dist/atf-c++/build.hpp
U src/external/bsd/atf/dist/atf-c++/check.hpp
U src/external/bsd/atf/dist/atf-c++/config.hpp
U src/external/bsd/atf/dist/atf-c++/macros.hpp
C src/external/bsd/atf/dist/atf-c++/tests.hpp
U src/external/bsd/atf/dist/atf-c++/utils.hpp
U src/external/bsd/atf/dist/atf-c++/macros_hpp_test.cpp
U src/external/bsd/atf/dist/atf-c++/build.cpp
U src/external/bsd/atf/dist/atf-c++/check.cpp
U src/external/bsd/atf/dist/atf-c++/config.cpp
C src/external/bsd/atf/dist/atf-c++/tests.cpp

CVS commit: src/external/bsd/atf/dist

2010-10-20 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Oct 20 09:17:24 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-c: tc.c
src/external/bsd/atf/dist/atf-c++: tests.cpp tests.hpp
src/external/bsd/atf/dist/atf-report: atf-report.cpp tests-results.css
tests-results.xsl
src/external/bsd/atf/dist/atf-run: atf-run.cpp test-program.cpp
test-program.hpp
src/external/bsd/atf/dist/atf-version: atf-version.cpp
Removed Files:
src/external/bsd/atf/dist/atf-c: dynstr.c dynstr.h dynstr_test.c env.c
env.h env_test.c fs.c fs.h fs_test.c list.c list.h list_test.c
map.c map.h map_test.c process.c process.h process_helpers.c
process_test.c sanity.c sanity.h sanity_test.c test_helpers.c
test_helpers.h test_helpers_test.c text.c text.h text_test.c
tp_main.c user.c user.h user_test.c
src/external/bsd/atf/dist/atf-c++: application.cpp application.hpp
application_test.cpp env.cpp env.hpp env_test.cpp exceptions.cpp
exceptions.hpp exceptions_test.cpp expand.cpp expand.hpp
expand_test.cpp fs.cpp fs.hpp fs_test.cpp io.cpp io.hpp io_test.cpp
parser.cpp parser.hpp parser_test.cpp process.cpp process.hpp
process_test.cpp sanity.hpp sanity_test.cpp signals.cpp signals.hpp
signals_test.cpp test_helpers.cpp test_helpers.hpp text.cpp
text.hpp text_test.cpp ui.cpp ui.hpp ui_test.cpp user.cpp user.hpp
user_test.cpp
src/external/bsd/atf/dist/atf-check: Atffile atf-check.1 atf-check.cpp
integration_test.sh

Log Message:
Resolve import conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r0 src/external/bsd/atf/dist/atf-c/dynstr.c
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/atf-c/dynstr.h \
src/external/bsd/atf/dist/atf-c/text.c \
src/external/bsd/atf/dist/atf-c/text.h
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/atf-c/dynstr_test.c \
src/external/bsd/atf/dist/atf-c/env.c \
src/external/bsd/atf/dist/atf-c/env.h \
src/external/bsd/atf/dist/atf-c/env_test.c \
src/external/bsd/atf/dist/atf-c/fs_test.c \
src/external/bsd/atf/dist/atf-c/list_test.c \
src/external/bsd/atf/dist/atf-c/map_test.c \
src/external/bsd/atf/dist/atf-c/process_helpers.c \
src/external/bsd/atf/dist/atf-c/process_test.c \
src/external/bsd/atf/dist/atf-c/sanity.c \
src/external/bsd/atf/dist/atf-c/sanity.h \
src/external/bsd/atf/dist/atf-c/sanity_test.c \
src/external/bsd/atf/dist/atf-c/test_helpers.c \
src/external/bsd/atf/dist/atf-c/test_helpers.h \
src/external/bsd/atf/dist/atf-c/test_helpers_test.c \
src/external/bsd/atf/dist/atf-c/text_test.c \
src/external/bsd/atf/dist/atf-c/user.c \
src/external/bsd/atf/dist/atf-c/user.h \
src/external/bsd/atf/dist/atf-c/user_test.c
cvs rdiff -u -r1.5 -r0 src/external/bsd/atf/dist/atf-c/fs.c
cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/atf/dist/atf-c/fs.h \
src/external/bsd/atf/dist/atf-c/map.c
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/atf/dist/atf-c/list.c \
src/external/bsd/atf/dist/atf-c/list.h \
src/external/bsd/atf/dist/atf-c/map.h \
src/external/bsd/atf/dist/atf-c/process.c \
src/external/bsd/atf/dist/atf-c/process.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-c/tc.c
cvs rdiff -u -r1.1.1.5 -r0 src/external/bsd/atf/dist/atf-c/tp_main.c
cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/atf/dist/atf-c++/application.cpp \
src/external/bsd/atf/dist/atf-c++/application.hpp \
src/external/bsd/atf/dist/atf-c++/fs.cpp \
src/external/bsd/atf/dist/atf-c++/fs.hpp \
src/external/bsd/atf/dist/atf-c++/process.hpp
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/atf-c++/application_test.cpp \
src/external/bsd/atf/dist/atf-c++/env.cpp \
src/external/bsd/atf/dist/atf-c++/env.hpp \
src/external/bsd/atf/dist/atf-c++/env_test.cpp \
src/external/bsd/atf/dist/atf-c++/exceptions.hpp \
src/external/bsd/atf/dist/atf-c++/exceptions_test.cpp \
src/external/bsd/atf/dist/atf-c++/expand_test.cpp \
src/external/bsd/atf/dist/atf-c++/fs_test.cpp \
src/external/bsd/atf/dist/atf-c++/parser_test.cpp \
src/external/bsd/atf/dist/atf-c++/process_test.cpp \
src/external/bsd/atf/dist/atf-c++/sanity.hpp \
src/external/bsd/atf/dist/atf-c++/sanity_test.cpp \
src/external/bsd/atf/dist/atf-c++/signals_test.cpp \
src/external/bsd/atf/dist/atf-c++/test_helpers.cpp \
src/external/bsd/atf/dist/atf-c++/test_helpers.hpp \
src/external/bsd/atf/dist/atf-c++/text_test.cpp \
src/external/bsd/atf/dist/atf-c++/ui.hpp \
src/external/bsd/atf/dist/atf-c++/ui_test.cpp \
src/external/bsd/atf/dist/atf-c++/user.cpp \
src/external/bsd/atf/dist/atf-c++/user.hpp \
src/external/bsd/atf/dist/atf-c++/user_test.cpp
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/atf-c++/exceptions.cpp \

CVS commit: src/external/bsd/atf/dist/atf-run

2010-10-20 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Oct 20 16:25:01 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-run: io_test.cpp

Log Message:
Per gson@'s request, make these tests less verbose so that the output of
atf-run is not twice as large as before.  This is a pull-up of
699284e5c0d0a375958293e578af4e02d68d1182.

(I don't think it's reasonable to intentionally cripple tests as I have
just done here.  In the future I would like to only report the output of
failed test cases, which would allow us to undo this, but not there yet.)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/atf-run/io_test.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/io_test.cpp
diff -u src/external/bsd/atf/dist/atf-run/io_test.cpp:1.1.1.1 src/external/bsd/atf/dist/atf-run/io_test.cpp:1.2
--- src/external/bsd/atf/dist/atf-run/io_test.cpp:1.1.1.1	Wed Oct 20 09:14:23 2010
+++ src/external/bsd/atf/dist/atf-run/io_test.cpp	Wed Oct 20 16:25:01 2010
@@ -328,7 +328,12 @@
 class mock_muxer : public atf::atf_run::muxer {
 void line_callback(const size_t index, const std::string line)
 {
-std::cout  line_callback(  index  ,   line  )\n;
+// The following should be enabled but causes the output to be so big
+// that it is annoying.  Reenable at some point if we make atf store
+// the output of the test cases in some other way (e.g. only if a test
+// failes), because this message is the only help in seeing how the
+// test fails.
+//std::cout  line_callback(  index  ,   line  )\n;
 check_stream(std::cout);
 switch (index) {
 case 0: lines0.push_back(line); break;



CVS commit: src/external/bsd/atf/dist/atf-report

2010-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep 11 03:10:58 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-report: tests-results.xsl

Log Message:
Differentiate between the three types of expected failures


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/atf/dist/atf-report/tests-results.xsl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-report/tests-results.xsl
diff -u src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.2 src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.3
--- src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.2	Sat Sep  4 19:19:27 2010
+++ src/external/bsd/atf/dist/atf-report/tests-results.xsl	Sat Sep 11 03:10:57 2010
@@ -411,11 +411,11 @@
 tdpxsl:apply-templates //p/td
   /xsl:template
   xsl:template match=expected_timeout mode=tc
-td class=tcr-exfailpExpected Failure/p/td
+td class=tcr-exfailpExpected Timeout/p/td
 tdpxsl:apply-templates //p/td
   /xsl:template
   xsl:template match=expected_signal mode=tc
-td class=tcr-exfailpExpected Failure/p/td
+td class=tcr-exfailpExpected Signal/p/td
 tdpxsl:apply-templates //p/td
   /xsl:template
 



CVS commit: src/external/bsd/atf/dist/atf-report

2010-09-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep  4 19:19:28 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-report: tests-results.css
tests-results.xsl

Log Message:
First cut at adding support for expected_failures.

Has also been reported/provided to up-stream.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/atf/dist/atf-report/tests-results.css \
src/external/bsd/atf/dist/atf-report/tests-results.xsl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-report/tests-results.css
diff -u src/external/bsd/atf/dist/atf-report/tests-results.css:1.1.1.1 src/external/bsd/atf/dist/atf-report/tests-results.css:1.2
--- src/external/bsd/atf/dist/atf-report/tests-results.css:1.1.1.1	Fri Jun  4 08:23:44 2010
+++ src/external/bsd/atf/dist/atf-report/tests-results.css	Sat Sep  4 19:19:27 2010
@@ -158,3 +158,7 @@
 table.tcs-summary td.tcr-skipped {
 background: #aa;
 }
+
+table.tcs-summary td.tcr-exfail {
+background: #ffaaff;
+}
Index: src/external/bsd/atf/dist/atf-report/tests-results.xsl
diff -u src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.1.1.1 src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.2
--- src/external/bsd/atf/dist/atf-report/tests-results.xsl:1.1.1.1	Fri Jun  4 08:23:44 2010
+++ src/external/bsd/atf/dist/atf-report/tests-results.xsl	Sat Sep  4 19:19:27 2010
@@ -49,6 +49,10 @@
 select=count(tests-results/tp/tc/failed) /
   xsl:variable name=ntcs-skipped
 select=count(tests-results/tp/tc/skipped) /
+  xsl:variable name=ntcs-exp-fail
+select=count(tests-results/tp/tc/expected_signal) +
+			count(tests-results/tp/tc/expected_timeout) +
+			count(tests-results/tp/tc/expected_failure) /
 
   xsl:template match=/
 xsl:copy
@@ -74,6 +78,9 @@
 xsl:if test=$ntcs-failed  0
   xsl:call-template name=failed-tcs-summary /
 /xsl:if
+xsl:if test=$ntcs-exp-fail  0
+  xsl:call-template name=exp-fail-tcs-summary /
+/xsl:if
 xsl:if test=$ntcs-skipped  0
   xsl:call-template name=skipped-tcs-summary /
 /xsl:if
@@ -151,7 +158,7 @@
   tr class=entry
 tdpRoot/p/td
 tdpxsl:value-of
-select=in...@class = 'tests.dir'] //p/td
+select=in...@class = 'tests.root'] //p/td
   /tr
   tr class=entry
 tdpTest programs/p/td
@@ -199,6 +206,23 @@
   /tr
   tr class=entry
 xsl:choose
+  xsl:when test=$ntcs-exp-fail  0
+tdpa href=#exp-fail-tcs-summaryExpected-Fail test
+cases/a/p/td
+td class=numeric-warning
+  pxsl:value-of select=$ntcs-exp-fail //p
+/td
+  /xsl:when
+  xsl:otherwise
+tdpExpected-Fail test cases/p/td
+td class=numeric
+  pxsl:value-of select=$ntcs-exp-fail //p
+/td
+  /xsl:otherwise
+/xsl:choose
+  /tr
+  tr class=entry
+xsl:choose
   xsl:when test=$ntcs-skipped  0
 tdpa href=#skipped-tcs-summarySkipped test
 cases/a/p/td
@@ -256,6 +280,22 @@
 /table
   /xsl:template
 
+  xsl:template name=exp-fail-tcs-summary
+a name=exp-fail-tcs-summary /
+h2 id=exp-fail-tcs-summaryExpected-Fail test cases summary/h2
+
+table class=tcs-summary
+  tr
+thpTest case/p/th
+thpResult/p/th
+thpReason/p/th
+  /tr
+  xsl:apply-templates select=tp mode=summary
+xsl:with-param name=whichexpected/xsl:with-param
+  /xsl:apply-templates
+/table
+  /xsl:template
+
   xsl:template name=failed-tcs-summary
 a name=failed-tcs-summary /
 h2 id=failed-tcs-summaryFailed test cases summary/h2
@@ -295,6 +335,12 @@
   xsl:choose
 xsl:when test=$which = 'passed' and tc/passedyes/xsl:when
 xsl:when test=$which = 'failed' and tc/failedyes/xsl:when
+xsl:when test=$which = 'expected' and
+			tc/expected_failureyes/xsl:when
+xsl:when test=$which = 'expected' and
+			tc/expected_timeoutyes/xsl:when
+xsl:when test=$which = 'expected' and
+			tc/expected_signalyes/xsl:when
 xsl:when test=$which = 'skipped' and tc/skippedyes/xsl:when
 xsl:when test=$which = 'all'yes/xsl:when
 xsl:otherwiseno/xsl:otherwise
@@ -323,6 +369,12 @@
   xsl:choose
 xsl:when test=$which = 'passed' and ./passedyes/xsl:when
 xsl:when test=$which = 'failed' and ./failedyes/xsl:when
+xsl:when test=$which = 'expected' and
+			./expected_signalyes/xsl:when
+xsl:when test=$which = 'expected' and
+			./expected_failureyes/xsl:when
+xsl:when test=$which = 'expected' and
+			./expected_timeoutyes/xsl:when
 xsl:when test=$which = 'skipped' and ./skippedyes/xsl:when
 xsl:when test=$which = 

CVS commit: src/external/bsd/atf/dist

2010-08-26 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Thu Aug 26 15:28:31 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-c++: io.cpp io.hpp io_test.cpp
src/external/bsd/atf/dist/atf-run: test-program.cpp

Log Message:
Partially pull up the following revisions that address ticket #53:

996f9c26e07a86607f373c8f0243d57329c11543
ef98529abaf16e40a2e684496bf3da8f9ff0d09c

These prevent atf-run from stalling/crashing when a subprocess of a test
case stays around after the test case itself exits.

Reported, and verified working, by po...@.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/atf/dist/atf-c++/io.cpp
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-c++/io.hpp
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/atf-c++/io_test.cpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/test-program.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c++/io.cpp
diff -u src/external/bsd/atf/dist/atf-c++/io.cpp:1.1.1.3 src/external/bsd/atf/dist/atf-c++/io.cpp:1.2
--- src/external/bsd/atf/dist/atf-c++/io.cpp:1.1.1.3	Sat Jul  3 08:04:50 2010
+++ src/external/bsd/atf/dist/atf-c++/io.cpp	Thu Aug 26 15:28:31 2010
@@ -368,7 +368,8 @@
 }
 
 void
-impl::std_muxer::read(unbuffered_istream out, unbuffered_istream err)
+impl::std_muxer::read(unbuffered_istream out, unbuffered_istream err,
+  const bool terminate)
 {
 struct pollfd fds[2];
 fds[0].fd = out.get_fh().get();
@@ -379,8 +380,15 @@
 do {
 fds[0].revents = 0;
 fds[1].revents = 0;
-if (::poll(fds, 2, -1) == -1)
-break;
+
+int ret;
+while ((ret = ::poll(fds, 2, 250)) = 0) {
+if (terminate || ret == -1) {
+fds[0].events = 0;
+fds[1].events = 0;
+break;
+}
+}
 
 if (fds[0].revents  POLLIN) {
 std::string line;
@@ -388,7 +396,7 @@
 got_stdout_line(line);
 else
 fds[0].events = ~POLLIN;
-} else if (fds[0].revents  POLLHUP)
+} else if (fds[0].revents  POLLERR || fds[0].revents  POLLHUP)
 fds[0].events = ~POLLIN;
 
 if (fds[1].revents  POLLIN) {
@@ -397,7 +405,7 @@
 got_stderr_line(line);
 else
 fds[1].events = ~POLLIN;
-} else if (fds[1].revents  POLLHUP)
+} else if (fds[1].revents  POLLERR || fds[1].revents  POLLHUP)
 fds[1].events = ~POLLIN;
 } while (fds[0].events  POLLIN || fds[1].events  POLLIN);
 

Index: src/external/bsd/atf/dist/atf-c++/io.hpp
diff -u src/external/bsd/atf/dist/atf-c++/io.hpp:1.1.1.2 src/external/bsd/atf/dist/atf-c++/io.hpp:1.2
--- src/external/bsd/atf/dist/atf-c++/io.hpp:1.1.1.2	Sat May  8 08:05:21 2010
+++ src/external/bsd/atf/dist/atf-c++/io.hpp	Thu Aug 26 15:28:31 2010
@@ -578,7 +578,7 @@
 std_muxer(void);
 virtual ~std_muxer(void);
 
-void read(unbuffered_istream, unbuffered_istream);
+void read(unbuffered_istream, unbuffered_istream, const bool);
 };
 
 // 

Index: src/external/bsd/atf/dist/atf-c++/io_test.cpp
diff -u src/external/bsd/atf/dist/atf-c++/io_test.cpp:1.1.1.1 src/external/bsd/atf/dist/atf-c++/io_test.cpp:1.2
--- src/external/bsd/atf/dist/atf-c++/io_test.cpp:1.1.1.1	Sat Jul  3 08:04:51 2010
+++ src/external/bsd/atf/dist/atf-c++/io_test.cpp	Thu Aug 26 15:28:31 2010
@@ -502,7 +502,8 @@
 atf::io::unbuffered_istream errs(errfh);
 
 test_std_muxer m;
-m.read(outs, errs);
+bool terminate = false;
+m.read(outs, errs, terminate);
 ATF_CHECK(m.m_eof);
 ATF_CHECK(m.m_stdout_lines.empty());
 ATF_CHECK(m.m_stderr_lines.empty());
@@ -530,7 +531,8 @@
 atf::io::unbuffered_istream errs(errfh);
 
 test_std_muxer m;
-m.read(outs, errs);
+bool terminate = false;
+m.read(outs, errs, terminate);
 ATF_CHECK(m.m_eof);
 ATF_CHECK_EQUAL(3, m.m_stdout_lines.size());
 ATF_CHECK_EQUAL(stdout line 1, m.m_stdout_lines[0]);

Index: src/external/bsd/atf/dist/atf-run/test-program.cpp
diff -u src/external/bsd/atf/dist/atf-run/test-program.cpp:1.3 src/external/bsd/atf/dist/atf-run/test-program.cpp:1.4
--- src/external/bsd/atf/dist/atf-run/test-program.cpp:1.3	Sat Jul  3 08:11:26 2010
+++ src/external/bsd/atf/dist/atf-run/test-program.cpp	Thu Aug 26 15:28:31 2010
@@ -646,6 +646,18 @@
 return detail::parse_test_case_result(line);
 }
 
+namespace {
+
+static bool sigchld_received;
+
+static void
+sigchld_handler(const int signo)
+{
+sigchld_received = true;
+}
+
+} // anonymous namespace
+
 std::pair std::string, atf::process::status 
 impl::run_test_case(const atf::fs::path executable,
 const std::string test_case_name,
@@ -683,8 +695,11 @@
 // 

CVS commit: src/external/bsd/atf/dist/atf-c++

2010-07-06 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Jul  6 18:03:37 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-c++: tests.cpp

Log Message:
Pull up revision 3becdd597a7f5f996eeceebf06ac7f77aaa7c30c from upstream:

Catch and report unhandled exceptions before they propagate to C land

The C++ interface to run test cases goes like this:

1) C++ run function - 2) C run function - 3) C++ wrapper for
test case - 4) test case head/body/cleanup

The previous code caught and reported unhandled exceptions in 1).
However, such approach does not seem to work everywhere.  It fails,
for example, in NetBSD/i386 but works in NetBSD/amd64.  I am not sure
which platform implementation is correct nor if there even _is_ a
defined behavior.  No matter what, it feels wrong and clunky.

Move the last-resort exception catching to happen in 3) so that
exceptions don't propagate back to C.

Fixes the test-programs/result_test:result_exception test case in
NetBSD/i386 5.99.34.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c++/tests.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c++/tests.cpp
diff -u src/external/bsd/atf/dist/atf-c++/tests.cpp:1.3 src/external/bsd/atf/dist/atf-c++/tests.cpp:1.4
--- src/external/bsd/atf/dist/atf-c++/tests.cpp:1.3	Sat Jul  3 08:11:25 2010
+++ src/external/bsd/atf/dist/atf-c++/tests.cpp	Tue Jul  6 18:03:37 2010
@@ -119,27 +119,49 @@
 void
 impl::tc::wrap_head(atf_tc_t *tc)
 {
-std::map atf_tc_t*, impl::tc* ::iterator iter = wraps.find(tc);
-INV(iter != wraps.end());
-(*iter).second-head();
+try {
+std::map atf_tc_t*, impl::tc* ::iterator iter = wraps.find(tc);
+INV(iter != wraps.end());
+(*iter).second-head();
+} catch (const std::exception e) {
+std::cerr  Caught unhandled exception:  + std::string(e.what());
+	std::abort();
+} catch (...) {
+std::cerr  Caught unknown exception;
+	std::abort();
+}
 }
 
 void
 impl::tc::wrap_body(const atf_tc_t *tc)
 {
-std::map const atf_tc_t*, const impl::tc* ::const_iterator iter =
-cwraps.find(tc);
-INV(iter != cwraps.end());
-(*iter).second-body();
+try {
+std::map const atf_tc_t*, const impl::tc* ::const_iterator iter =
+cwraps.find(tc);
+INV(iter != cwraps.end());
+(*iter).second-body();
+} catch (const std::exception e) {
+fail(Caught unhandled exception:  + std::string(e.what()));
+} catch (...) {
+fail(Caught unknown exception);
+}
 }
 
 void
 impl::tc::wrap_cleanup(const atf_tc_t *tc)
 {
-std::map const atf_tc_t*, const impl::tc* ::const_iterator iter =
-cwraps.find(tc);
-INV(iter != cwraps.end());
-(*iter).second-cleanup();
+try {
+std::map const atf_tc_t*, const impl::tc* ::const_iterator iter =
+cwraps.find(tc);
+INV(iter != cwraps.end());
+(*iter).second-cleanup();
+} catch (const std::exception e) {
+std::cerr  Caught unhandled exception:  + std::string(e.what());
+	std::abort();
+} catch (...) {
+std::cerr  Caught unknown exception;
+	std::abort();
+}
 }
 
 impl::tc::tc(const std::string ident, const bool has_cleanup) :
@@ -251,15 +273,9 @@
 impl::tc::run(const fs::path resfile)
 const
 {
-try {
-atf_error_t err = atf_tc_run(m_tc, resfile.c_path());
-if (atf_is_error(err))
-throw_atf_error(err);
-} catch (const std::exception e) {
-fail(Caught unhandled exception:  + std::string(e.what()));
-} catch (...) {
-fail(Caught unknown exception);
-}
+atf_error_t err = atf_tc_run(m_tc, resfile.c_path());
+if (atf_is_error(err))
+throw_atf_error(err);
 }
 
 void



CVS commit: src/external/bsd/atf/dist/atf-version

2010-07-05 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jul  5 14:21:00 UTC 2010

Removed Files:
src/external/bsd/atf/dist/atf-version: revision.h

Log Message:
Remove file that should not be in the distribution so that atf-version gets
the correct output.  Fixed upstream as well.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/atf-version/revision.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/atf/dist

2010-07-03 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sat Jul  3 08:04:57 UTC 2010

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv19988

Log Message:
Import atf 0.10:

Miscellaneous features

* Added expected failures support to test cases and atf-run.  These
  include, for example, expected clean exits, expected reception of fatal
  signals, expected timeouts and expected errors in condition checks.
  These statuses can be used to denote test cases that are known to fail
  due to a bug in the code they are testing.  atf-report reports these
  tests separately but they do not count towards the failed test cases
  amount.

* Added the ATF_CHECK_ERRNO and ATF_REQUIRE_ERRNO to the C library to
  allow easy checking of call failures that update errno.

* Added the has.cleanup meta-data property to test caes that specifies
  whether the test case has a cleanup routine or not; its value is
  automatically set.  This property is read by atf-run to know if it has to
  run the cleanup routine; skipping this run for every test case
  significantly speeds up the run time of test suites.

* Reversed the order of the ATF_CHECK_THROW macro in the C++ binding to
  take the expected exception as the first argument and the statement to
  execute as the second argument.

Changes in atf-check

* Changed atf-check to support negating the status and output checks by
  prefixing them with not- and added support to specify multiple checkers
  for stdout and stderr, not only one.

* Added the match output checker to atf-check to look for regular
  expressions in the stdout and stderr of commands.

* Modified the exit checks in atf-check to support checking for the
  reception of signals.

Code simplifications and cleanups

* Removed usage messages from test programs to simplify the
  implementation of every binding by a significant amount.  They just now
  refer the user to the appropriate manual page and do not attempt to wrap
  lines on terminal boundaries.  Test programs are not supposed to be run
  by users directly so this minor interface regression is not important.

* Removed the atf-format internal utility, which is unused after the
  change documented above.

* Removed the atf-cleanup internal utility.  It has been unused since the
  test case isolation was moved to atf-run in 0.8

* Splitted the Makefile.am into smaller files for easier maintenance and
  dropped the use of M4.  Only affects users building from the repository
  sources.

* Intermixed tests with the source files in the source tree to provide
  them more visibility and easier access.  The tests directory is gone from
  the source tree and tests are now suffixed by _test, not prefixed by t_.

* Simplifications to the atf-c library: removed the io, tcr and ui
  modules as they had become unnecessary after all simplifications
  introduced since the 0.8 release.

* Removed the application/X-atf-tcr format introduced in 0.8 release.
  Tests now print a much simplified format that is easy to parse and nicer
  to read by end users.  As a side effect, the default for test cases is
  now to print their results to stdout unless otherwise stated by providing
  the -r flag.

* Removed XML distribution documents and replaced them with plain-text
  documents.  They provided little value and introduced a lot of complexity
  to the build system.

* Simplified the output of atf-version by not attempting to print a
  revision number when building form a distfile.  Makes the build system
  easier to maintain.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-10

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
N src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/dynstr.h
U src/external/bsd/atf/dist/atf-c/env.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/list.h
U src/external/bsd/atf/dist/atf-c/fs.h
U src/external/bsd/atf/dist/atf-c/process.h
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/map.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/sanity.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/text.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/user.h
U src/external/bsd/atf/dist/atf-c/process.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/defs.h.in
N src/external/bsd/atf/dist/atf-c/test_helpers.c
N src/external/bsd/atf/dist/atf-c/test_helpers.h
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/dynstr.c
U 

CVS commit: src/external/bsd/atf/dist/atf-run

2010-06-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Jun 27 20:36:43 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-run: atf-run.cpp

Log Message:
If get_tcr() is called with broken_reason set, apply xfail inversion.
This (at least) makes timeouting tests honor xfail.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/atf-run.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/atf-run.cpp
diff -u src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.3 src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.4
--- src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.3	Wed Jun 16 15:17:37 2010
+++ src/external/bsd/atf/dist/atf-run/atf-run.cpp	Sun Jun 27 20:36:42 2010
@@ -222,7 +222,10 @@
 const bool default_fail = !config_xfail.empty();
 
 if (!broken_reason.empty()) {
-return tcr(tcr::failed_state, broken_reason);
+if (default_fail)
+return tcr(tcr::xfail_state, config_xfail);
+else
+return tcr(tcr::failed_state, broken_reason);
 }
 
 if (s.exited()) {



CVS commit: src/external/bsd/atf/dist

2010-06-18 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Fri Jun 18 15:41:22 UTC 2010

Removed Files:
src/external/bsd/atf/dist: INSTALL Makefile.am Makefile.am.m4
Makefile.in aclocal.m4 bconfig.h.in configure configure.ac
src/external/bsd/atf/dist/admin: check-install.sh check-style-c.awk
check-style-common.awk check-style-cpp.awk check-style-man.awk
check-style-shell.awk check-style.sh choose-revision.sh compile
config.guess config.sub depcomp generate-makefile.sh
generate-revision-dist.sh generate-revision.sh install-sh ltmain.sh
missing
src/external/bsd/atf/dist/doc: authors.xml build-xml.sh copying.xml
install.xml news.xml readme.xml specification.xml
src/external/bsd/atf/dist/doc/standalone: authors.html copying.html
install.html news.html readme.html sdocbook.xsl specification.html
standalone.css
src/external/bsd/atf/dist/doc/text: authors.txt copying.txt install.txt
news.txt readme.txt specification.txt
src/external/bsd/atf/dist/m4: compiler-flags.m4 cxx-std-funcs.m4
developer-mode.m4 doc-build.m4 libtool.m4 ltoptions.m4 ltsugar.m4
ltversion.m4 lt~obsolete.m4 module-application.m4 module-defs.m4
module-env.m4 module-fs.m4 module-sanity.m4 module-signals.m4
runtime-tool.m4

Log Message:
Remove unnecessary files

The just-commited prepare-import.sh script will take care of spotting extra
files that may be unnecessary during a future import.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/atf/dist/INSTALL \
src/external/bsd/atf/dist/Makefile.am.m4 \
src/external/bsd/atf/dist/bconfig.h.in
cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/atf/dist/Makefile.am \
src/external/bsd/atf/dist/Makefile.in src/external/bsd/atf/dist/configure \
src/external/bsd/atf/dist/configure.ac
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/aclocal.m4
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/admin/check-install.sh \
src/external/bsd/atf/dist/admin/check-style-common.awk \
src/external/bsd/atf/dist/admin/check-style-cpp.awk \
src/external/bsd/atf/dist/admin/check-style.sh \
src/external/bsd/atf/dist/admin/compile \
src/external/bsd/atf/dist/admin/depcomp \
src/external/bsd/atf/dist/admin/generate-revision.sh \
src/external/bsd/atf/dist/admin/ltmain.sh \
src/external/bsd/atf/dist/admin/missing
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/admin/check-style-c.awk \
src/external/bsd/atf/dist/admin/check-style-man.awk \
src/external/bsd/atf/dist/admin/choose-revision.sh \
src/external/bsd/atf/dist/admin/generate-makefile.sh \
src/external/bsd/atf/dist/admin/generate-revision-dist.sh \
src/external/bsd/atf/dist/admin/install-sh
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/bsd/atf/dist/admin/check-style-shell.awk \
src/external/bsd/atf/dist/admin/config.guess \
src/external/bsd/atf/dist/admin/config.sub
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/doc/authors.xml \
src/external/bsd/atf/dist/doc/build-xml.sh \
src/external/bsd/atf/dist/doc/readme.xml \
src/external/bsd/atf/dist/doc/specification.xml
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/doc/copying.xml \
src/external/bsd/atf/dist/doc/install.xml
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/atf/dist/doc/news.xml
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/doc/standalone/authors.html \
src/external/bsd/atf/dist/doc/standalone/readme.html \
src/external/bsd/atf/dist/doc/standalone/sdocbook.xsl \
src/external/bsd/atf/dist/doc/standalone/specification.html \
src/external/bsd/atf/dist/doc/standalone/standalone.css
cvs rdiff -u -r1.1.1.2 -r0 \
src/external/bsd/atf/dist/doc/standalone/copying.html \
src/external/bsd/atf/dist/doc/standalone/install.html
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/atf/dist/doc/standalone/news.html
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/doc/text/authors.txt \
src/external/bsd/atf/dist/doc/text/readme.txt \
src/external/bsd/atf/dist/doc/text/specification.txt
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/doc/text/copying.txt \
src/external/bsd/atf/dist/doc/text/install.txt
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/atf/dist/doc/text/news.txt
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/m4/compiler-flags.m4 \
src/external/bsd/atf/dist/m4/cxx-std-funcs.m4 \
src/external/bsd/atf/dist/m4/doc-build.m4 \
src/external/bsd/atf/dist/m4/libtool.m4 \
src/external/bsd/atf/dist/m4/ltoptions.m4 \
src/external/bsd/atf/dist/m4/ltsugar.m4 \
src/external/bsd/atf/dist/m4/ltversion.m4 \
src/external/bsd/atf/dist/m4/lt~obsolete.m4 \
src/external/bsd/atf/dist/m4/module-application.m4 \
src/external/bsd/atf/dist/m4/module-env.m4 \
src/external/bsd/atf/dist/m4/module-sanity.m4 \

CVS commit: src/external/bsd/atf/dist/tests/atf/atf-report

2010-06-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jun 18 16:13:16 UTC 2010

Modified Files:
src/external/bsd/atf/dist/tests/atf/atf-report: t_integration.sh
Added Files:
src/external/bsd/atf/dist/tests/atf/atf-report: h_xfail.cpp

Log Message:
Test that xfail failures are reported as xfails and xfail passes
are reported as pure fails.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/atf/dist/tests/atf/atf-report/h_xfail.cpp
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/atf/dist/tests/atf/atf-report/t_integration.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tests/atf/atf-report/t_integration.sh
diff -u src/external/bsd/atf/dist/tests/atf/atf-report/t_integration.sh:1.2 src/external/bsd/atf/dist/tests/atf/atf-report/t_integration.sh:1.3
--- src/external/bsd/atf/dist/tests/atf/atf-report/t_integration.sh:1.2	Wed Jun 16 15:17:37 2010
+++ src/external/bsd/atf/dist/tests/atf/atf-report/t_integration.sh	Fri Jun 18 16:13:16 2010
@@ -34,6 +34,7 @@
 cp $(atf_get_srcdir)/h_fail dir1/tp2
 cp $(atf_get_srcdir)/h_pass tp3
 cp $(atf_get_srcdir)/h_fail tp4
+cp $(atf_get_srcdir)/h_xfail tp6
 
 cat tp5 EOF
 #! $(atf-config -t atf_shell)
@@ -50,6 +51,7 @@
 tp: tp3
 tp: tp4
 tp: tp5
+tp: tp6
 EOF
 
 cat dir1/Atffile EOF
@@ -180,6 +182,9 @@
 tc, tp4, main, failed, This always fails
 tp, tp4, failed
 tp, tp5, bogus, Invalid format for test case list: 1: Unexpected token \`NEWLINE'; expected \`:'
+tc, tp6, xfail_no, failed, Test case is expected to fail but reported success
+tc, tp6, xfail_yes, xfail, xfailmen
+tp, tp6, failed
 EOF
 # NO_CHECK_STYLE_END
 
@@ -199,31 +204,35 @@
 
 # NO_CHECK_STYLE_BEGIN
 cat expout EOF
-dir1/tp1 (1/5): 1 test cases
+dir1/tp1 (1/6): 1 test cases
 main: Passed.
 
-dir1/tp2 (2/5): 1 test cases
+dir1/tp2 (2/6): 1 test cases
 main: Failed: This always fails
 
-tp3 (3/5): 1 test cases
+tp3 (3/6): 1 test cases
 main: Passed.
 
-tp4 (4/5): 1 test cases
+tp4 (4/6): 1 test cases
 main: Failed: This always fails
 
-tp5 (5/5): 0 test cases
+tp5 (5/6): 0 test cases
 tp5: BOGUS TEST PROGRAM: Cannot trust its results because of \`Invalid format for test case list: 1: Unexpected token \`NEWLINE'; expected \`:''
 
+tp6 (6/6): 2 test cases
+xfail_no: Failed: Test case is expected to fail but reported success
+xfail_yes: Expected failure: xfailmen
+
 Failed (bogus) test programs:
 tp5
 
 Failed test cases:
-dir1/tp2:main, tp4:main
+dir1/tp2:main, tp4:main, tp6:xfail_no
 
-Summary for 5 test programs:
+Summary for 6 test programs:
 2 passed test cases.
-2 failed test cases.
-0 expected failures.
+3 failed test cases.
+1 expected failures.
 0 skipped test cases.
 EOF
 
@@ -272,6 +281,14 @@
 tp id=tp5
 failedInvalid format for test case list: 1: Unexpected token \`lt;lt;NEWLINEgt;gt;'; expected \`:'/failed
 /tp
+tp id=tp6
+tc id=xfail_no
+failedTest case is expected to fail but reported success/failed
+/tc
+tc id=xfail_yes
+xfailxfailmen/xfail
+/tc
+/tp
 info class=endinfoAnother value/info
 /tests-results
 EOF

Added files:

Index: src/external/bsd/atf/dist/tests/atf/atf-report/h_xfail.cpp
diff -u /dev/null src/external/bsd/atf/dist/tests/atf/atf-report/h_xfail.cpp:1.1
--- /dev/null	Fri Jun 18 16:13:16 2010
+++ src/external/bsd/atf/dist/tests/atf/atf-report/h_xfail.cpp	Fri Jun 18 16:13:16 2010
@@ -0,0 +1,58 @@
+//
+// Automated Testing Framework (atf)
+//
+// Copyright (c) 2007, 2008 The NetBSD Foundation, 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:
+// 1. Redistributions of source code must retain the above copyright
+//notice, this list of conditions and the following disclaimer.
+// 2. 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.
+//
+// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+//
+

CVS commit: src/external/bsd/atf/dist/atf-report

2010-06-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jun 18 16:13:56 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-report: atf-report.cpp

Log Message:
Handle xfail in a few more places.  Found by, la la la, the new tests.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-report/atf-report.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-report/atf-report.cpp
diff -u src/external/bsd/atf/dist/atf-report/atf-report.cpp:1.2 src/external/bsd/atf/dist/atf-report/atf-report.cpp:1.3
--- src/external/bsd/atf/dist/atf-report/atf-report.cpp:1.2	Wed Jun 16 15:17:37 2010
+++ src/external/bsd/atf/dist/atf-report/atf-report.cpp	Fri Jun 18 16:13:56 2010
@@ -154,6 +154,9 @@
 } else if (tcr.get_state() == atf::tests::tcr::skipped_state) {
 str += m_tpname + ,  + m_tcname + , skipped,  +
tcr.get_reason();
+} else if (tcr.get_state() == atf::tests::tcr::xfail_state) {
+str += m_tpname + ,  + m_tcname + , xfail,  +
+   tcr.get_reason();
 } else
 UNREACHABLE;
 (*m_os)  str  std::endl;
@@ -425,6 +428,9 @@
 } else if (s == atf::tests::tcr::skipped_state) {
 (*m_os)  skipped  elemval(tcr.get_reason())
  /skipped  std::endl;
+} else if (s == atf::tests::tcr::xfail_state) {
+(*m_os)  xfail  elemval(tcr.get_reason())
+ /xfail  std::endl;
 } else
 UNREACHABLE;
 (*m_os)  /tc  std::endl;



CVS commit: src/external/bsd/atf/dist

2010-06-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jun 16 15:17:37 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-c: tcr.c tcr.h
src/external/bsd/atf/dist/atf-c++: formats.cpp tests.cpp tests.hpp
src/external/bsd/atf/dist/atf-report: atf-report.cpp
src/external/bsd/atf/dist/atf-run: atf-run.cpp
src/external/bsd/atf/dist/tests/atf/atf-c: t_macros.c
src/external/bsd/atf/dist/tests/atf/atf-report: t_integration.sh

Log Message:
Introduce expected failures to atf.  They can be used to flag tests
which are known to fail, e.g.:

atf_tc_set_md_var(tc, xfail, PR kern/43456);

Expected failures do not count towards the ultimate pass/fail result
from the test run:

pain-rustique:39:~/2src/tests/fs/ptyfs atf-run t_nullpts | atf-report
Tests root: /home/pooka/src/wholesrc2/src/tests/fs/ptyfs

t_nullpts (1/1): 1 test cases
nullrevoke: Expected failure: PR kern/43456

Summary for 1 test programs:
0 passed test cases.
0 failed test cases.
1 expected failures.
0 skipped test cases.
pain-rustique:40:~/2src/tests/fs/ptyfs echo $?
0

However, an xfail test which passes will count as a failure, i.e.
xfail inverts test case success/fail.  This way we can get a better
sense from the ultimate verdict of the NetBSD atf run by seeing if
there were any unexpected failures, i.e. new regressions.

This feature will be present in the upcoming atf 0.10 release,
possibly with finer grained control.

patch reviewed by jmmv


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/atf/dist/atf-c/tcr.c
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/atf/dist/atf-c/tcr.h
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/atf/dist/atf-c++/formats.cpp
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/atf/dist/atf-c++/tests.cpp \
src/external/bsd/atf/dist/atf-c++/tests.hpp
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/atf/dist/atf-report/atf-report.cpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-run/atf-run.cpp
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/atf/dist/tests/atf/atf-c/t_macros.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/atf/dist/tests/atf/atf-report/t_integration.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/tcr.c
diff -u src/external/bsd/atf/dist/atf-c/tcr.c:1.1.1.4 src/external/bsd/atf/dist/atf-c/tcr.c:1.2
--- src/external/bsd/atf/dist/atf-c/tcr.c:1.1.1.4	Fri Jun  4 08:23:43 2010
+++ src/external/bsd/atf/dist/atf-c/tcr.c	Wed Jun 16 15:17:37 2010
@@ -48,7 +48,8 @@
 bool
 state_allows_reason(atf_tcr_state_t state)
 {
-return state == atf_tcr_failed_state || state == atf_tcr_skipped_state;
+return state == atf_tcr_failed_state || state == atf_tcr_skipped_state
+	|| state == atf_tcr_xfail_state;
 }
 
 static
@@ -106,6 +107,7 @@
 const atf_tcr_state_t atf_tcr_passed_state = 0;
 const atf_tcr_state_t atf_tcr_failed_state = 1;
 const atf_tcr_state_t atf_tcr_skipped_state = 2;
+const atf_tcr_state_t atf_tcr_xfail_state = 3;
 
 /*
  * Constructors/destructors.

Index: src/external/bsd/atf/dist/atf-c/tcr.h
diff -u src/external/bsd/atf/dist/atf-c/tcr.h:1.1.1.3 src/external/bsd/atf/dist/atf-c/tcr.h:1.2
--- src/external/bsd/atf/dist/atf-c/tcr.h:1.1.1.3	Fri Jun  4 08:23:42 2010
+++ src/external/bsd/atf/dist/atf-c/tcr.h	Wed Jun 16 15:17:37 2010
@@ -54,6 +54,7 @@
 extern const atf_tcr_state_t atf_tcr_passed_state;
 extern const atf_tcr_state_t atf_tcr_failed_state;
 extern const atf_tcr_state_t atf_tcr_skipped_state;
+extern const atf_tcr_state_t atf_tcr_xfail_state;
 
 /* Constructors/destructors. */
 atf_error_t atf_tcr_init(atf_tcr_t *, int);

Index: src/external/bsd/atf/dist/atf-c++/formats.cpp
diff -u src/external/bsd/atf/dist/atf-c++/formats.cpp:1.1.1.3 src/external/bsd/atf/dist/atf-c++/formats.cpp:1.2
--- src/external/bsd/atf/dist/atf-c++/formats.cpp:1.1.1.3	Fri Jun  4 08:23:44 2010
+++ src/external/bsd/atf/dist/atf-c++/formats.cpp	Wed Jun 16 15:17:37 2010
@@ -463,6 +463,7 @@
 static const atf::parser::token_type passed_type = 12;
 static const atf::parser::token_type failed_type = 13;
 static const atf::parser::token_type skipped_type = 14;
+static const atf::parser::token_type xfail_type = 15;
 static const atf::parser::token_type info_type = 16;
 
 class tokenizer : public atf::parser::tokenizer std::istream  {
@@ -483,6 +484,7 @@
 add_keyword(passed, passed_type);
 add_keyword(failed, failed_type);
 add_keyword(skipped, skipped_type);
+add_keyword(xfail, xfail_type);
 add_keyword(info, info_type);
 }
 };
@@ -860,6 +862,9 @@
 throw parse_error(lineno, The use.fs property requires a boolean
value);
 }
+} else if (name == xfail) {
+if (value.empty())
+	throw parse_error(lineno, 'xfail' requires a non-empty reason);
 } else if (name.size()  2  

CVS commit: src/external/bsd/atf/dist/tests/atf/formats

2010-06-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jun 16 17:29:07 UTC 2010

Modified Files:
src/external/bsd/atf/dist/tests/atf/formats: d_tps_55.experr
d_tps_56.experr

Log Message:
i missed some changes to expected output caused by xfail change


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/atf/dist/tests/atf/formats/d_tps_55.experr \
src/external/bsd/atf/dist/tests/atf/formats/d_tps_56.experr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tests/atf/formats/d_tps_55.experr
diff -u src/external/bsd/atf/dist/tests/atf/formats/d_tps_55.experr:1.1.1.1 src/external/bsd/atf/dist/tests/atf/formats/d_tps_55.experr:1.2
--- src/external/bsd/atf/dist/tests/atf/formats/d_tps_55.experr:1.1.1.1	Mon Jan 19 07:11:52 2009
+++ src/external/bsd/atf/dist/tests/atf/formats/d_tps_55.experr	Wed Jun 16 17:29:07 2010
@@ -6,5 +6,5 @@
 13: Unexpected token `NEWLINE'; expected test case name
 15: Test case name used in terminator does not match opening
 17: Unexpected token `NEWLINE'; expected `,'
-19: Unexpected token `NEWLINE'; expected passed, failed or skipped
+19: Unexpected token `NEWLINE'; expected passed, failed, skipped or xfail
 20: Unexpected token `tp-end'; expected start of test case
Index: src/external/bsd/atf/dist/tests/atf/formats/d_tps_56.experr
diff -u src/external/bsd/atf/dist/tests/atf/formats/d_tps_56.experr:1.1.1.1 src/external/bsd/atf/dist/tests/atf/formats/d_tps_56.experr:1.2
--- src/external/bsd/atf/dist/tests/atf/formats/d_tps_56.experr:1.1.1.1	Mon Jan 19 07:11:52 2009
+++ src/external/bsd/atf/dist/tests/atf/formats/d_tps_56.experr	Wed Jun 16 17:29:07 2010
@@ -1,4 +1,4 @@
-6: Unexpected token `passe'; expected passed, failed or skipped
+6: Unexpected token `passe'; expected passed, failed, skipped or xfail
 8: Unexpected token `,'; expected new line
 10: Unexpected token `NEWLINE'; expected `,'
 12: Empty reason for failed test case result



CVS commit: src/external/bsd/atf/dist

2010-06-10 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Thu Jun 10 15:27:03 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-run: atf-run.cpp test-program.cpp
test-program.hpp
src/external/bsd/atf/dist/tests/atf/atf-run: t_integration.sh

Log Message:
Pull up revision 2f7a426c0f4149d59a7f3717ebedd6c55998e8bc from upstream:

--
Fix detection of crashed test cases

Prevent cross-test-case contamination that occured when a first test case
passed and the second crashed.  The second could pick up the result of the
first test case and not be reported as failed.

Similarly, change the way timed out test cases are reported back to the
caller.  The creation of a temporary results file was just a really stupid
way of passing information around and introduced false positives if the
test case creates a results file before timing out.

Fixes ticket #35.
--

Problem originally reported by po...@.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-run/atf-run.cpp \
src/external/bsd/atf/dist/atf-run/test-program.cpp
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/atf/dist/atf-run/test-program.hpp
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/atf/dist/tests/atf/atf-run/t_integration.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-run/atf-run.cpp
diff -u src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.1.1.2 src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.2
--- src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.1.1.2	Fri Jun  4 08:23:45 2010
+++ src/external/bsd/atf/dist/atf-run/atf-run.cpp	Thu Jun 10 15:27:02 2010
@@ -97,7 +97,7 @@
  const atf::tests::vars_map,
  const atf::fs::path);
 
-atf::tests::tcr get_tcr(const atf::process::status,
+atf::tests::tcr get_tcr(const std::string, const atf::process::status,
 const atf::fs::path) const;
 
 public:
@@ -212,12 +212,16 @@
 }
 
 atf::tests::tcr
-atf_run::get_tcr(const atf::process::status s,
+atf_run::get_tcr(const std::string broken_reason,
+ const atf::process::status s,
  const atf::fs::path resfile)
 const
 {
 using atf::tests::tcr;
 
+if (!broken_reason.empty())
+return tcr(tcr::failed_state, broken_reason);
+
 if (s.exited()) {
 try {
 const tcr ret = tcr::read(resfile);
@@ -244,14 +248,10 @@
std::string(e.what()));
 }
 } else if (s.signaled()) {
-try {
-return tcr::read(resfile);
-} catch (...) {
-return tcr(tcr::failed_state,
-   Test program received signal  +
-   atf::text::to_string(s.termsig()) +
-   (s.coredump() ?  (core dumped) : ));
-}
+return tcr(tcr::failed_state,
+   Test program received signal  +
+   atf::text::to_string(s.termsig()) +
+   (s.coredump() ?  (core dumped) : ));
 } else {
 UNREACHABLE;
 throw std::runtime_error(Unknown exit status);
@@ -311,6 +311,7 @@
 }
 
 const atf::fs::path resfile = resdir.get_path() / tcr;
+INV(!atf::fs::exists(resfile));
 try {
 const bool use_fs = atf::text::to_bool(
 (*tcmd.find(use.fs)).second);
@@ -321,34 +322,35 @@
 atf::fs::temp_dir workdir(atf::fs::path(atf::config::get(
 atf_workdir)) / atf-run.XX);
 
-const atf::process::status body_status =
+std::pair std::string, const atf::process::status  s =
 impl::run_test_case(tp, tcname, body, tcmd, config,
 resfile, workdir.get_path(), w);
-const atf::process::status cleanup_status =
-impl::run_test_case(tp, tcname, cleanup, tcmd, config,
-resfile, workdir.get_path(), w);
+(void)impl::run_test_case(tp, tcname, cleanup, tcmd, config,
+  resfile, workdir.get_path(), w);
 
 // TODO: Force deletion of workdir.
 
-tcr = get_tcr(body_status, resfile);
+tcr = get_tcr(s.first, s.second, resfile);
 } else {
-const atf::process::status body_status =
+std::pair std::string, const atf::process::status  s =
 impl::run_test_case(tp, tcname, body, tcmd, config,
 resfile, ro_workdir, w);
-const atf::process::status cleanup_status =
-impl::run_test_case(tp, tcname, cleanup, 

CVS commit: src/external/bsd/atf/dist

2010-06-04 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Fri Jun  4 08:24:03 UTC 2010

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv8120

Log Message:
Import atf 0.9:

* Added atf-sh, an interpreter to process test programs written using
  the shell API. This is not really a shell interpreter by itself
  though: it is just a wrapper around the system shell that eases the
  loading of the necessary ATF libraries.

* Removed atf-compile in favour of atf-sh.

* Added the use.fs metadata property to test case, which is used to
  specify which test cases require file system access. This is to
  highlight dependencies on external resources more clearly and to speed
  up the execution of test suites by skipping the creation of many
  unnecessary work directories.

* Fixed test programs to get a sane default value for their source
  directory. This means that it should not be necessary any more to pass
  -s when running test programs that do not live in the current
  directory.

* Defining test case headers became optional. This is trivial to achieve
  in shell-based tests but a bit ugly in C and C++. In C, use the new
  ATF_TC_WITHOUT_HEAD macro to define the test case, and in C++ use
  ATF_TEST_CASE_WITHOUT_HEAD.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-9

U src/external/bsd/atf/dist/configure.ac
U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Makefile.am.m4
U src/external/bsd/atf/dist/aclocal.m4
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/Makefile.am
U src/external/bsd/atf/dist/Makefile.in
U src/external/bsd/atf/dist/bconfig.h.in
U src/external/bsd/atf/dist/configure
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/INSTALL
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/admin/config.guess
U src/external/bsd/atf/dist/admin/compile
U src/external/bsd/atf/dist/admin/check-install.sh
U src/external/bsd/atf/dist/admin/config.sub
U src/external/bsd/atf/dist/admin/depcomp
U src/external/bsd/atf/dist/admin/install-sh
U src/external/bsd/atf/dist/admin/ltmain.sh
U src/external/bsd/atf/dist/admin/missing
U src/external/bsd/atf/dist/admin/check-style-common.awk
U src/external/bsd/atf/dist/admin/check-style-c.awk
U src/external/bsd/atf/dist/admin/check-style-cpp.awk
U src/external/bsd/atf/dist/admin/check-style-man.awk
U src/external/bsd/atf/dist/admin/check-style-shell.awk
U src/external/bsd/atf/dist/admin/check-style.sh
U src/external/bsd/atf/dist/admin/choose-revision.sh
U src/external/bsd/atf/dist/admin/generate-makefile.sh
U src/external/bsd/atf/dist/admin/generate-revision.sh
U src/external/bsd/atf/dist/admin/revision-dist.h
U src/external/bsd/atf/dist/admin/generate-revision-dist.sh
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/dynstr.h
U src/external/bsd/atf/dist/atf-c/env.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/list.h
U src/external/bsd/atf/dist/atf-c/fs.h
U src/external/bsd/atf/dist/atf-c/io.h
U src/external/bsd/atf/dist/atf-c/process.h
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/map.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/sanity.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tcr.h
U src/external/bsd/atf/dist/atf-c/text.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/ui.h
U src/external/bsd/atf/dist/atf-c/user.h
U src/external/bsd/atf/dist/atf-c/process.c
C src/external/bsd/atf/dist/atf-c/dynstr.c
U src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/env.c
U src/external/bsd/atf/dist/atf-c/error.c
C src/external/bsd/atf/dist/atf-c/fs.c
U src/external/bsd/atf/dist/atf-c/io.c
U src/external/bsd/atf/dist/atf-c/list.c
U src/external/bsd/atf/dist/atf-c/map.c
U src/external/bsd/atf/dist/atf-c/tp_main.c
U src/external/bsd/atf/dist/atf-c/sanity.c
U src/external/bsd/atf/dist/atf-c/text.c
U src/external/bsd/atf/dist/atf-c/ui.c
U src/external/bsd/atf/dist/atf-c/user.c
C src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tcr.c
U src/external/bsd/atf/dist/atf-c/tp.c
N src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c++/application.hpp
U src/external/bsd/atf/dist/atf-c++/atffile.hpp
U src/external/bsd/atf/dist/atf-c++/build.hpp
U src/external/bsd/atf/dist/atf-c++/check.hpp
U src/external/bsd/atf/dist/atf-c++/config.hpp
U src/external/bsd/atf/dist/atf-c++/env.hpp
U src/external/bsd/atf/dist/atf-c++/exceptions.hpp
U src/external/bsd/atf/dist/atf-c++/expand.hpp
U 

CVS commit: src/external/bsd/atf/dist

2010-06-04 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Fri Jun  4 08:32:15 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-c: dynstr.c fs.c tc.c
src/external/bsd/atf/dist/atf-version: atf-version.cpp
Removed Files:
src/external/bsd/atf/dist/atf-c: object.c object.h
src/external/bsd/atf/dist/atf-compile: atf-compile.1 atf-compile.cpp
atf-host-compile.sh
src/external/bsd/atf/dist/atf-run: atf-run.hooks
src/external/bsd/atf/dist/atf-sh: atf.footer.subr atf.header.subr
atf.init.subr
src/external/bsd/atf/dist/data: atf-c++.pc.in atf-c.pc.in atf-run.hooks
tests-results.css tests-results.dtd tests-results.xsl
src/external/bsd/atf/dist/doc: roadmap.xml
src/external/bsd/atf/dist/doc/standalone: roadmap.html
src/external/bsd/atf/dist/doc/text: roadmap.txt
src/external/bsd/atf/dist/tests/atf/atf-c: d_include_object_h.c
src/external/bsd/atf/dist/tests/atf/atf-compile: Atffile h_mode.cpp
t_integration.sh
src/external/bsd/atf/dist/tests/atf/data: Atffile t_pkg_config.sh

Log Message:
Fix import conflicts for atf 0.9.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c/dynstr.c \
src/external/bsd/atf/dist/atf-c/fs.c
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/atf-c/object.c \
src/external/bsd/atf/dist/atf-c/object.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-c/tc.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/atf-compile/atf-compile.1 \
src/external/bsd/atf/dist/atf-compile/atf-compile.cpp \
src/external/bsd/atf/dist/atf-compile/atf-host-compile.sh
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/atf-run/atf-run.hooks
cvs rdiff -u -r1.2 -r0 src/external/bsd/atf/dist/atf-sh/atf.footer.subr
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/atf-sh/atf.header.subr \
src/external/bsd/atf/dist/atf-sh/atf.init.subr
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/atf/dist/atf-version/atf-version.cpp
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/data/atf-c++.pc.in \
src/external/bsd/atf/dist/data/atf-c.pc.in \
src/external/bsd/atf/dist/data/atf-run.hooks \
src/external/bsd/atf/dist/data/tests-results.css \
src/external/bsd/atf/dist/data/tests-results.dtd \
src/external/bsd/atf/dist/data/tests-results.xsl
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/doc/roadmap.xml
cvs rdiff -u -r1.1.1.2 -r0 \
src/external/bsd/atf/dist/doc/standalone/roadmap.html
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/doc/text/roadmap.txt
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/atf/atf-c/d_include_object_h.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/atf/atf-compile/Atffile \
src/external/bsd/atf/dist/tests/atf/atf-compile/h_mode.cpp \
src/external/bsd/atf/dist/tests/atf/atf-compile/t_integration.sh
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/tests/atf/data/Atffile
cvs rdiff -u -r1.1.1.2 -r0 \
src/external/bsd/atf/dist/tests/atf/data/t_pkg_config.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-c/dynstr.c
diff -u src/external/bsd/atf/dist/atf-c/dynstr.c:1.3 src/external/bsd/atf/dist/atf-c/dynstr.c:1.4
--- src/external/bsd/atf/dist/atf-c/dynstr.c:1.3	Tue Dec 22 13:36:56 2009
+++ src/external/bsd/atf/dist/atf-c/dynstr.c	Fri Jun  4 08:32:14 2010
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,7 @@
 
 #include errno.h
 #include stdarg.h
+#include stdint.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -121,22 +122,17 @@
 {
 atf_error_t err;
 
-atf_object_init(ad-m_object);
-
 ad-m_data = (char *)malloc(sizeof(char));
 if (ad-m_data == NULL) {
 err = atf_no_memory_error();
-goto err_object;
+goto out;
 }
 
 ad-m_data[0] = '\0';
 ad-m_datasize = 1;
 ad-m_length = 0;
 err = atf_no_error();
-goto out;
 
-err_object:
-atf_object_fini(ad-m_object);
 out:
 return err;
 }
@@ -146,8 +142,6 @@
 {
 atf_error_t err;
 
-atf_object_init(ad-m_object);
-
 ad-m_datasize = strlen(fmt) + 1;
 ad-m_length = 0;
 
@@ -159,7 +153,7 @@
 ad-m_data = (char *)malloc(ad-m_datasize);
 if (ad-m_data == NULL) {
 err = atf_no_memory_error();
-goto err_object;
+goto out;
 }
 
 va_copy(ap2, ap);
@@ -168,7 +162,7 @@
 if (ret  0) {
 free(ad-m_data);
 err = atf_libc_error(errno, Cannot format string);
-goto err_object;
+goto out;
 }
 
  

CVS commit: src/external/bsd/atf/dist/atf-sh

2010-06-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun  3 18:52:46 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-sh: atf.footer.subr

Log Message:
Use proper signal names. Prefixing them with SIG is an extension which
is not supported by posix shells.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-sh/atf.footer.subr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-sh/atf.footer.subr
diff -u src/external/bsd/atf/dist/atf-sh/atf.footer.subr:1.1.1.2 src/external/bsd/atf/dist/atf-sh/atf.footer.subr:1.2
--- src/external/bsd/atf/dist/atf-sh/atf.footer.subr:1.1.1.2	Sat May  8 04:05:23 2010
+++ src/external/bsd/atf/dist/atf-sh/atf.footer.subr	Thu Jun  3 14:52:46 2010
@@ -535,7 +535,7 @@
 #
 _atf_sighup_handler()
 {
-Held_Signals=${Held_Signals} SIGHUP
+Held_Signals=${Held_Signals} HUP
 }
 
 #
@@ -546,7 +546,7 @@
 #
 _atf_sigint_handler()
 {
-Held_Signals=${Held_Signals} SIGINT
+Held_Signals=${Held_Signals} INT
 }
 
 #
@@ -557,7 +557,7 @@
 #
 _atf_sigterm_handler()
 {
-Held_Signals=${Held_Signals} SIGTERM
+Held_Signals=${Held_Signals} TERM
 }
 
 #



CVS commit: src/external/bsd/atf/dist/atf-check

2010-05-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 14 01:48:12 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-check: atf-check.1

Log Message:
\\ - \e


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/atf-check/atf-check.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/atf-check/atf-check.1
diff -u src/external/bsd/atf/dist/atf-check/atf-check.1:1.1.1.1 src/external/bsd/atf/dist/atf-check/atf-check.1:1.2
--- src/external/bsd/atf/dist/atf-check/atf-check.1:1.1.1.1	Sat May  8 08:05:22 2010
+++ src/external/bsd/atf/dist/atf-check/atf-check.1	Fri May 14 01:48:11 2010
@@ -107,8 +107,8 @@
 
 # Checking stdout/stderr
 echo foobar expout
-atf-check -o file:expout -e inline:xx\\tyy\\n \\
-'echo foobar ; printf xx\\tyy\\n 2' || atf_fail
+atf-check -o file:expout -e inline:xx\etyy\en \e
+'echo foobar ; printf xx\etyy\en 2' || atf_fail
 .Ed
 .Sh SEE ALSO
 .Xr atf 7



CVS commit: src/external/bsd/atf/dist

2010-05-08 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Sat May  8 08:05:40 UTC 2010

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv18487

Log Message:
Import atf 0.8.  Changes in this release:

* Test programs no longer run several test cases in a row. The execution
  of a test program now requires a test case name, and that single test
  case is executed. To execute several test cases, use the atf-run
  utility as usual.

* Test programs no longer fork a subprocess to isolate the execution of
  test cases. They run the test case code in-process, and a crash of the
  test case will result in a crash of the test program. This is to ease
  debugging of faulty test cases.

* Test programs no longer isolate their test cases. This means that they
  will not create temporary directories nor sanitize the environment any
  more. Yes: running a test case that depends on system state by hand
  will most likely yield different results depending on where (machine,
  directory, user environment, etc.) it is run. Isolation has been moved
  to atf-run.

* Test programs no longer print a cryptic format (application/X-atf-tcs)
  on a special file channel. They can now print whatever they want on
  the screen. Because test programs can now only run one test case every
  time, providing controlled output is not necessary any more.

* Test programs no longer write their status into a special file
  descriptor. Instead, they create a file with the results, which is
  later parsed by atf-run. This changes the semantics of the -r flag.

* atf-run has been adjusted to perform the test case isolation. As a
  result, there is now a single canonical place that implements the
  isolation of test caes. In previous releases, the three language
  bindings (C, C++ and shell) had to be kept in sync with each other
  (read: not a nice thing to do at all). As a side effect of this
  change, writing bindings for other languages will be much, much easier
  from now on.

* atf-run forks test programs on a test case basis, instead of on a test
  program basis as it did before. This is to provide the test case
  isolation that was before implemented by the test programs themselves.

* Removed the atf-exec tool. This was used to implement test case
  isolation in atf-sh, but it is now unnecessary.

* It is now optional to define the descr meta-data property. It has been
  proven to be mostly useless, because test cases often carry a
  descriptive name of their own.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-8

U src/external/bsd/atf/dist/configure.ac
U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Makefile.am.m4
U src/external/bsd/atf/dist/aclocal.m4
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/Makefile.am
U src/external/bsd/atf/dist/Makefile.in
U src/external/bsd/atf/dist/bconfig.h.in
U src/external/bsd/atf/dist/configure
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/INSTALL
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/admin/config.guess
U src/external/bsd/atf/dist/admin/compile
U src/external/bsd/atf/dist/admin/check-install.sh
U src/external/bsd/atf/dist/admin/config.sub
U src/external/bsd/atf/dist/admin/depcomp
U src/external/bsd/atf/dist/admin/install-sh
U src/external/bsd/atf/dist/admin/ltmain.sh
U src/external/bsd/atf/dist/admin/missing
U src/external/bsd/atf/dist/admin/check-style-common.awk
U src/external/bsd/atf/dist/admin/check-style-c.awk
U src/external/bsd/atf/dist/admin/check-style-cpp.awk
U src/external/bsd/atf/dist/admin/check-style-man.awk
U src/external/bsd/atf/dist/admin/check-style-shell.awk
U src/external/bsd/atf/dist/admin/check-style.sh
U src/external/bsd/atf/dist/admin/choose-revision.sh
U src/external/bsd/atf/dist/admin/generate-makefile.sh
U src/external/bsd/atf/dist/admin/generate-revision.sh
U src/external/bsd/atf/dist/admin/revision-dist.h
U src/external/bsd/atf/dist/admin/generate-revision-dist.sh
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/dynstr.h
U src/external/bsd/atf/dist/atf-c/env.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/list.h
U src/external/bsd/atf/dist/atf-c/fs.h
U src/external/bsd/atf/dist/atf-c/io.h
U src/external/bsd/atf/dist/atf-c/process.h
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/map.h
U src/external/bsd/atf/dist/atf-c/object.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/sanity.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tcr.h
U src/external/bsd/atf/dist/atf-c/text.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/ui.h
U src/external/bsd/atf/dist/atf-c/user.h
U 

CVS commit: src/external/bsd/atf/dist

2010-05-08 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Sat May  8 08:11:05 UTC 2010

Modified Files:
src/external/bsd/atf/dist/atf-c: tc.c
Removed Files:
src/external/bsd/atf/dist: revision.h
src/external/bsd/atf/dist/atf-c: expand.c expand.h signals.c signals.h
src/external/bsd/atf/dist/tests/atf/atf-c: d_include_expand_h.c
d_include_signals_h.c t_expand.c t_signals.c
src/external/bsd/atf/dist/tests/atf/formats: d_tcs_1 d_tcs_1.errin
d_tcs_1.expout d_tcs_1.outin d_tcs_2 d_tcs_2.errin d_tcs_2.expout
d_tcs_2.outin d_tcs_3 d_tcs_3.errin d_tcs_3.expout d_tcs_3.outin
d_tcs_4 d_tcs_4.errin d_tcs_4.expout d_tcs_4.outin d_tcs_5
d_tcs_5.errin d_tcs_5.expout d_tcs_5.outin d_tcs_50 d_tcs_50.experr
d_tcs_51 d_tcs_51.experr d_tcs_52 d_tcs_52.experr d_tcs_53
d_tcs_53.experr d_tcs_53.expout d_tcs_54 d_tcs_54.experr
d_tcs_54.expout d_tcs_55 d_tcs_55.experr d_tcs_55.expout d_tcs_56
d_tcs_56.errin d_tcs_56.experr d_tcs_56.expout d_tcs_56.outin
d_tcs_57 d_tcs_57.errin d_tcs_57.experr d_tcs_57.expout
d_tcs_57.outin
src/external/bsd/atf/dist/tests/atf/test_programs: t_cleanup.sh
t_env.sh t_workdir.sh
src/external/bsd/atf/dist/tests/atf/tools: Atffile h_fail.cpp
h_misc.cpp h_mode.cpp h_pass.cpp t_atf_check.sh t_atf_cleanup.sh
t_atf_compile.sh t_atf_config.sh t_atf_exec.sh t_atf_report.sh
t_atf_run.sh
src/external/bsd/atf/dist/tools: atf-check.1 atf-check.cpp
atf-cleanup.1 atf-cleanup.cpp atf-compile.1 atf-compile.cpp
atf-config.1 atf-config.cpp atf-exec.1 atf-exec.cpp atf-format.1
atf-format.cpp atf-host-compile.sh atf-report.1 atf-report.cpp
atf-run.1 atf-run.cpp atf-run.hooks atf-version.1 atf-version.cpp

Log Message:
Merge atf 0.8.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/revision.h
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/atf/dist/atf-c/expand.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/atf-c/expand.h \
src/external/bsd/atf/dist/atf-c/signals.c \
src/external/bsd/atf/dist/atf-c/signals.h
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c/tc.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/atf/atf-c/d_include_expand_h.c \
src/external/bsd/atf/dist/tests/atf/atf-c/d_include_signals_h.c
cvs rdiff -u -r1.1.1.2 -r0 \
src/external/bsd/atf/dist/tests/atf/atf-c/t_expand.c \
src/external/bsd/atf/dist/tests/atf/atf-c/t_signals.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_1 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_1.errin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_1.expout \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_1.outin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_2 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_2.errin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_2.expout \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_2.outin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_3 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_3.errin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_3.expout \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_3.outin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_4 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_4.errin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_4.expout \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_4.outin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_5 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_5.errin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_5.expout \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_5.outin \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_50 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_50.experr \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_51 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_51.experr \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_52 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_52.experr \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_53 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_53.experr \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_53.expout \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_54 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_54.experr \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_54.expout \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_55 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_55.experr \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_55.expout \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_56 \
src/external/bsd/atf/dist/tests/atf/formats/d_tcs_56.errin 

CVS commit: src/external/bsd/atf/dist/tools

2010-04-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Apr  8 06:58:27 UTC 2010

Modified Files:
src/external/bsd/atf/dist/tools: atf-report.1

Log Message:
Fix typo reported by Ryo HAYASAKA in PR 43136.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/tools/atf-report.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/atf-report.1
diff -u src/external/bsd/atf/dist/tools/atf-report.1:1.1.1.1 src/external/bsd/atf/dist/tools/atf-report.1:1.2
--- src/external/bsd/atf/dist/tools/atf-report.1:1.1.1.1	Mon Jan 19 07:11:52 2009
+++ src/external/bsd/atf/dist/tools/atf-report.1	Thu Apr  8 06:58:26 2010
@@ -63,7 +63,7 @@
 .Fl o
 options are provided (more than one are allowed), they specify the complete
 list of reports to generate.
-They are all generated simulatneously, and for obvious reasons, two reports
+They are all generated simultaneously, and for obvious reasons, two reports
 cannot be written to the same file.
 Note that the default output is suppressed when
 .Fl o



CVS commit: src/external/bsd/atf/dist/tools

2010-04-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr  7 07:32:48 UTC 2010

Modified Files:
src/external/bsd/atf/dist/tools: atf-format.1

Log Message:
Fix typo, reported by Ryo HAYASAKA in PR 43134.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/tools/atf-format.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/atf-format.1
diff -u src/external/bsd/atf/dist/tools/atf-format.1:1.1.1.1 src/external/bsd/atf/dist/tools/atf-format.1:1.2
--- src/external/bsd/atf/dist/tools/atf-format.1:1.1.1.1	Mon Jan 19 07:11:52 2009
+++ src/external/bsd/atf/dist/tools/atf-format.1	Wed Apr  7 07:32:48 2010
@@ -76,7 +76,7 @@
 .It Fl h
 Shows a short summary of all available options and their purpose.
 .It Fl l Ar length
-Specifies the length in characters of te tag.
+Specifies the length in characters of the tag.
 Useful if the tag is shorter than the desired length, which happens when
 formatting two-column tables.
 .It Fl r



CVS commit: src/external/bsd/atf/dist/tools

2009-12-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 23 09:54:22 UTC 2009

Modified Files:
src/external/bsd/atf/dist/tools: atf-check.1 atf-run.1

Log Message:
Make HTML-ready.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/tools/atf-check.1 \
src/external/bsd/atf/dist/tools/atf-run.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/dist/tools/atf-check.1
diff -u src/external/bsd/atf/dist/tools/atf-check.1:1.1.1.1 src/external/bsd/atf/dist/tools/atf-check.1:1.2
--- src/external/bsd/atf/dist/tools/atf-check.1:1.1.1.1	Mon Jan 19 07:11:52 2009
+++ src/external/bsd/atf/dist/tools/atf-check.1	Wed Dec 23 09:54:22 2009
@@ -68,27 +68,27 @@
 .It Fl s Ar qual:value
 Analyzes exit code.
 Must be one of:
-.Bl -tag -width eq:value -compact
+.Bl -tag -width eq:XvalueX -compact
 .It Ar ignore
 ignores exit status
-.It Ar eq:value
+.It Ar eq: Ns Aq value
 checks that exit status is equal to value
-.It Ar ne:value
+.It Ar ne: Ns Aq value
 checks that exit status is other than value
 .El
 .It Fl o Ar action:arg
 Analyzes standard output.
 Must be one of:
-.Bl -tag -width inline:value -compact
+.Bl -tag -width inline:XvalueX -compact
 .It Ar empty
 checks that stdout is empty
 .It Ar ignore
 ignores stdout
-.It Ar file:path
+.It Ar file: Ns Aq path
 compares stdout with given file
-.It Ar inline:value
+.It Ar inline: Ns Aq value
 compares stdout with inline value
-.It Ar save:path
+.It Ar save: Ns Aq path
 saves stdout to given file
 .El
 .It Fl e Ar action:arg
@@ -106,9 +106,9 @@
 atf-check -s ne:0 'false' || atf_fail
 
 # Checking stdout/stderr
-echo foobar expout
+echo foobar \*[Gt]expout
 atf-check -o file:expout -e inline:xx\\tyy\\n \\
-'echo foobar ; printf xx\\tyy\\n 2' || atf_fail
+'echo foobar ; printf xx\\tyy\\n \*[Gt]\*[Aq]2' || atf_fail
 .Ed
 .Sh SEE ALSO
 .Xr atf 7
Index: src/external/bsd/atf/dist/tools/atf-run.1
diff -u src/external/bsd/atf/dist/tools/atf-run.1:1.1.1.1 src/external/bsd/atf/dist/tools/atf-run.1:1.2
--- src/external/bsd/atf/dist/tools/atf-run.1:1.1.1.1	Mon Jan 19 07:11:52 2009
+++ src/external/bsd/atf/dist/tools/atf-run.1	Wed Dec 23 09:54:22 2009
@@ -108,7 +108,7 @@
 Configuration variables defined in the system-wide test-suite-specific
 configuration file.
 This lives in
-.Pa ${ATF_CONFDIR}/test-suite.conf .
+.Pa ${ATF_CONFDIR}/\*[Lt]test-suite\*[Gt].conf .
 .It
 Configuration variables defined in the user-specific configuration file
 shared among all test suites.
@@ -118,7 +118,7 @@
 Configuration variables defined in the user-specific test-suite-specific
 configuration file.
 This lives in
-.Pa ${HOME}/.atf/test-suite.conf .
+.Pa ${HOME}/.atf/\*[Lt]test-suite\*[Gt].conf .
 .It
 Configuration variables provided as part of the command line through the
 .Fl v
@@ -171,7 +171,7 @@
 .El
 .Pp
 All hooks are accompanied by a function named
-.Sq default_hook_name
+.Sq default_\*[Lt]hook_name\*[Gt]
 that can be executed by them to invoke the default behavior built into
 .Nm .
 For example, in order to extend the default



CVS commit: src/external/bsd/atf/dist

2009-12-22 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Tue Dec 22 13:26:15 UTC 2009

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv23161

Log Message:
Import atf 0.7.  Changes in this release:

* Added build-time checks to atf-c and atf-c++.  A binding for atf-sh
  will come later.

* Migrated all build-time checks for header files to proper ATF tests.
  This demonstrates the use of the new feature described above.

* Added an internal API for child process management.

* Converted all plain-text distribution documents to a Docbook canonical
  version, and include pre-generated plain text and HTML copies in the
  distribution file.

* Simplified the contents of the Makefile.am by regenerating it from a
  canonical Makefile.am.m4 source.  As a side-effect, some dependency
  specifications were fixed.

* Migrated all checks from the check target to installcheck, as these
  require ATF to be installed.

* Fixed sign comparison mismatches triggered by the now-enabled
  -Wsign-compare.

* Fixed many memory and object leaks.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-7

U src/external/bsd/atf/dist/configure.ac
U src/external/bsd/atf/dist/README
N src/external/bsd/atf/dist/Makefile.am.m4
U src/external/bsd/atf/dist/aclocal.m4
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/Makefile.am
U src/external/bsd/atf/dist/Makefile.in
U src/external/bsd/atf/dist/bconfig.h.in
U src/external/bsd/atf/dist/configure
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/INSTALL
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/revision.h
U src/external/bsd/atf/dist/admin/config.guess
U src/external/bsd/atf/dist/admin/compile
U src/external/bsd/atf/dist/admin/check-install.sh
U src/external/bsd/atf/dist/admin/config.sub
U src/external/bsd/atf/dist/admin/depcomp
U src/external/bsd/atf/dist/admin/install-sh
U src/external/bsd/atf/dist/admin/ltmain.sh
U src/external/bsd/atf/dist/admin/missing
U src/external/bsd/atf/dist/admin/check-style-common.awk
U src/external/bsd/atf/dist/admin/check-style-c.awk
U src/external/bsd/atf/dist/admin/check-style-cpp.awk
U src/external/bsd/atf/dist/admin/check-style-man.awk
U src/external/bsd/atf/dist/admin/check-style-shell.awk
U src/external/bsd/atf/dist/admin/check-style.sh
N src/external/bsd/atf/dist/admin/choose-revision.sh
N src/external/bsd/atf/dist/admin/generate-makefile.sh
N src/external/bsd/atf/dist/admin/generate-revision.sh
U src/external/bsd/atf/dist/admin/revision-dist.h
N src/external/bsd/atf/dist/admin/generate-revision-dist.sh
U src/external/bsd/atf/dist/atf-c/error_fwd.h
N src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/dynstr.h
U src/external/bsd/atf/dist/atf-c/env.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/process.h
U src/external/bsd/atf/dist/atf-c/expand.h
U src/external/bsd/atf/dist/atf-c/fs.h
U src/external/bsd/atf/dist/atf-c/io.h
U src/external/bsd/atf/dist/atf-c/list.h
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/map.h
U src/external/bsd/atf/dist/atf-c/object.h
U src/external/bsd/atf/dist/atf-c/signals.h
U src/external/bsd/atf/dist/atf-c/sanity.h
U src/external/bsd/atf/dist/atf-c/tcr.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/text.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/ui.h
U src/external/bsd/atf/dist/atf-c/user.h
U src/external/bsd/atf/dist/atf-c/process.c
N src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
C src/external/bsd/atf/dist/atf-c/dynstr.c
U src/external/bsd/atf/dist/atf-c/env.c
U src/external/bsd/atf/dist/atf-c/error.c
U src/external/bsd/atf/dist/atf-c/expand.c
C src/external/bsd/atf/dist/atf-c/fs.c
C src/external/bsd/atf/dist/atf-c/io.c
U src/external/bsd/atf/dist/atf-c/list.c
U src/external/bsd/atf/dist/atf-c/map.c
U src/external/bsd/atf/dist/atf-c/object.c
U src/external/bsd/atf/dist/atf-c/signals.c
U src/external/bsd/atf/dist/atf-c/sanity.c
U src/external/bsd/atf/dist/atf-c/tp_main.c
U src/external/bsd/atf/dist/atf-c/text.c
U src/external/bsd/atf/dist/atf-c/ui.c
U src/external/bsd/atf/dist/atf-c/user.c
C src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tcr.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c++/application.hpp
U src/external/bsd/atf/dist/atf-c++/atffile.hpp
N src/external/bsd/atf/dist/atf-c++/build.hpp
U src/external/bsd/atf/dist/atf-c++/check.hpp
U src/external/bsd/atf/dist/atf-c++/config.hpp
U src/external/bsd/atf/dist/atf-c++/env.hpp
U src/external/bsd/atf/dist/atf-c++/exceptions.hpp
U 

CVS commit: src/external/bsd/atf/dist

2009-12-22 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Tue Dec 22 13:36:57 UTC 2009

Modified Files:
src/external/bsd/atf/dist/atf-c: dynstr.c fs.c io.c tc.c
Removed Files:
src/external/bsd/atf/dist: ChangeLog ROADMAP
src/external/bsd/atf/dist/tests/atf/atf-c: h_check.c h_macros.h
src/external/bsd/atf/dist/tests/build: t_include_atf_c++_hpp.cpp
t_include_atf_c_h.cpp
src/external/bsd/atf/dist/tests/build/atf-c: t_include_check_h.c
t_include_config_h.c t_include_dynstr_h.c t_include_env_h.c
t_include_error_fwd_h.c t_include_error_h.c t_include_expand_h.c
t_include_fs_h.c t_include_io_h.c t_include_list_h.c
t_include_macros_h.c t_include_map_h.c t_include_object_h.c
t_include_process_h.c t_include_sanity_h.c t_include_signals_h.c
t_include_tc_h.c t_include_tcr_h.c t_include_text_h.c
t_include_tp_h.c t_include_ui_h.c t_use_macros_h.c
src/external/bsd/atf/dist/tests/build/atf-c++:
t_include_application_hpp.cpp t_include_atffile_hpp.cpp
t_include_check_hpp.cpp t_include_config_hpp.cpp
t_include_env_hpp.cpp t_include_exceptions_hpp.cpp
t_include_expand_hpp.cpp t_include_formats_hpp.cpp
t_include_fs_hpp.cpp t_include_io_hpp.cpp t_include_macros_hpp.cpp
t_include_parser_hpp.cpp t_include_process_hpp.cpp
t_include_sanity_hpp.cpp t_include_signals_hpp.cpp
t_include_tests_hpp.cpp t_include_text_hpp.cpp t_include_ui_hpp.cpp
t_include_user_hpp.cpp t_include_utils_hpp.cpp t_use_macros_hpp.cpp

Log Message:
Merge atf 0.7.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/ChangeLog \
src/external/bsd/atf/dist/ROADMAP
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-c/dynstr.c \
src/external/bsd/atf/dist/atf-c/fs.c src/external/bsd/atf/dist/atf-c/io.c \
src/external/bsd/atf/dist/atf-c/tc.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/atf/atf-c/h_check.c \
src/external/bsd/atf/dist/tests/atf/atf-c/h_macros.h
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/build/t_include_atf_c++_hpp.cpp \
src/external/bsd/atf/dist/tests/build/t_include_atf_c_h.cpp
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_check_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_config_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_dynstr_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_env_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_error_fwd_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_error_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_expand_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_fs_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_io_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_list_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_macros_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_map_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_object_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_process_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_sanity_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_signals_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_tc_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_tcr_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_text_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_tp_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_ui_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_use_macros_h.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_application_hpp.cpp 
\
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_atffile_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_check_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_config_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_env_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_exceptions_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_expand_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_formats_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_fs_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_io_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_macros_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_parser_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_process_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_sanity_hpp.cpp \