CVS commit: src/external/bsd/atf/dist/doc
Module Name:src Committed By: gutteridge Date: Sun Aug 27 19:27:23 UTC 2023 Modified Files: src/external/bsd/atf/dist/doc: atf-test-case.4 Log Message: atf-test-case.4: better explain custom metadata properties Apply upstream change https://github.com/jmmv/atf/commit/e8021f3b376f72702c612d4ae4eceb1bf70d85c6 (Only differences to upstream are "meta-data" is spelled consistently with the rest of the project documentation and the date.) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 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/doc/atf-test-case.4 diff -u src/external/bsd/atf/dist/doc/atf-test-case.4:1.7 src/external/bsd/atf/dist/doc/atf-test-case.4:1.8 --- src/external/bsd/atf/dist/doc/atf-test-case.4:1.7 Sat Feb 8 19:13:44 2014 +++ src/external/bsd/atf/dist/doc/atf-test-case.4 Sun Aug 27 19:27:23 2023 @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 13, 2011 +.Dd August 27, 2023 .Dt ATF-TEST-CASE 4 .Os .Sh NAME @@ -153,11 +153,7 @@ APIs to implement the test cases. The standard input of the test cases is unconditionally connected to .Sq /dev/zero . .Ss Meta-data -The following list describes all meta-data properties interpreted -internally by ATF. -You are free to define new properties in your test cases and use them as -you wish, but non-standard properties must be prefixed by -.Sq X- . +The following meta-data properties can be exposed via the test case's head: .Bl -tag -width requireXmachineXX .It descr Type: textual. @@ -271,6 +267,17 @@ test program. Can optionally be set to zero, in which case the test case has no run-time limit. This is discouraged. +.It X- Ns Sq NAME +Type: textual. +Optional. +.Pp +A user-defined property named +.Sq NAME . +These properties are free form, have no special meaning within ATF, and can +be specified at will by the test case. +The runtime engine should propagate these properties from the test case to +the end user so that the end user can rely on custom properties for test case +tagging and classification. .El .Ss Environment Every time a test case is executed, several environment variables are
CVS commit: src/external/bsd/atf/dist/doc
Module Name:src Committed By: gutteridge Date: Sun Aug 27 19:27:23 UTC 2023 Modified Files: src/external/bsd/atf/dist/doc: atf-test-case.4 Log Message: atf-test-case.4: better explain custom metadata properties Apply upstream change https://github.com/jmmv/atf/commit/e8021f3b376f72702c612d4ae4eceb1bf70d85c6 (Only differences to upstream are "meta-data" is spelled consistently with the rest of the project documentation and the date.) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 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.
CVS commit: src/external/bsd/atf/dist/atf-sh
Module Name:src Committed By: gutteridge Date: Wed May 10 22:14:54 UTC 2023 Modified Files: src/external/bsd/atf/dist/atf-sh: atf-check.1 atf-sh.1 Log Message: atf-check.1 & atf-sh.1: remove references to -h option These had their -h option removed in the ATF 0.19 release, but these references in the man pages weren't (mostly) removed upstream until a later commit (that hasn't been released). 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.1 \ src/external/bsd/atf/dist/atf-sh/atf-sh.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-sh/atf-check.1 diff -u src/external/bsd/atf/dist/atf-sh/atf-check.1:1.1.1.2 src/external/bsd/atf/dist/atf-sh/atf-check.1:1.2 --- src/external/bsd/atf/dist/atf-sh/atf-check.1:1.1.1.2 Mon Jan 16 22:36:52 2012 +++ src/external/bsd/atf/dist/atf-sh/atf-check.1 Wed May 10 22:14:54 2023 @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 27, 2010 +.Dd May 10, 2023 .Dt ATF-CHECK 1 .Os .Sh NAME @@ -39,14 +39,11 @@ .Op Fl e Ar action:arg ... .Op Fl x .Ar command -.Nm -.Fl h .Sh DESCRIPTION .Nm executes a given command and analyzes its results, including exit code, stdout and stderr. .Pp -In the first synopsis form, .Nm will execute the provided command and apply checks specified by arguments. @@ -61,14 +58,8 @@ Multiple checks for the same output chan their results will be combined as a logical and (meaning that the output must match all the provided checks). .Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp The following options are available: .Bl -tag -width XqualXvalueXX -.It Fl h -Shows a short summary of all available options and their purpose. .It Fl s Ar qual:value Analyzes termination status. Must be one of: Index: src/external/bsd/atf/dist/atf-sh/atf-sh.1 diff -u src/external/bsd/atf/dist/atf-sh/atf-sh.1:1.1.1.2 src/external/bsd/atf/dist/atf-sh/atf-sh.1:1.2 --- src/external/bsd/atf/dist/atf-sh/atf-sh.1:1.1.1.2 Sat Feb 8 19:11:32 2014 +++ src/external/bsd/atf/dist/atf-sh/atf-sh.1 Wed May 10 22:14:54 2023 @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 15, 2013 +.Dd May 10, 2023 .Dt ATF-SH 1 .Os .Sh NAME @@ -35,8 +35,6 @@ .Sh SYNOPSIS .Nm .Ar script -.Nm -.Fl h .Sh DESCRIPTION .Nm is an interpreter that runs the test program given in @@ -62,12 +60,6 @@ should start with: .Bd -literal -offset indent #! /usr/bin/env atf-sh .Ed -.Pp -The following options are available: -.Bl -tag -width XhXX -.It Fl h -Shows a short summary of all available options and their purpose. -.El .Sh SEE ALSO .Xr atf-config 1 , .Xr atf-sh-api 3 ,
CVS commit: src/external/bsd/atf/dist/atf-sh
Module Name:src Committed By: gutteridge Date: Wed May 10 22:14:54 UTC 2023 Modified Files: src/external/bsd/atf/dist/atf-sh: atf-check.1 atf-sh.1 Log Message: atf-check.1 & atf-sh.1: remove references to -h option These had their -h option removed in the ATF 0.19 release, but these references in the man pages weren't (mostly) removed upstream until a later commit (that hasn't been released). 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.1 \ src/external/bsd/atf/dist/atf-sh/atf-sh.1 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
Module Name:src Committed By: gutteridge Date: Mon Apr 3 16:26:50 UTC 2023 Modified Files: src/external/bsd/atf/dist/tools: atf-run_test.sh Log Message: atf-run_test.sh: fix spelling of "through" Reported by Jim Spath in PR misc/57318. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/tools/atf-run_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/tools/atf-run_test.sh diff -u src/external/bsd/atf/dist/tools/atf-run_test.sh:1.1.1.1 src/external/bsd/atf/dist/tools/atf-run_test.sh:1.2 --- src/external/bsd/atf/dist/tools/atf-run_test.sh:1.1.1.1 Sat Feb 8 19:11:34 2014 +++ src/external/bsd/atf/dist/tools/atf-run_test.sh Mon Apr 3 16:26:50 2023 @@ -219,11 +219,11 @@ vflag_body() atf_check -s eq:1 -o ignore -e ignore -x \ "ATF_CONFDIR=$(pwd)/etc atf-run helper" -echo "Checking that defining 'testvar' trough '-v' works." +echo "Checking that defining 'testvar' through '-v' works." atf_check -s eq:0 -o match:'testvar: a value' -e ignore -x \ "ATF_CONFDIR=$(pwd)/etc atf-run -v testvar='a value' helper" -echo "Checking that defining 'testvar' trough the configuration" \ +echo "Checking that defining 'testvar' through the configuration" \ "file works." mkdir etc cat >etc/common.conf <>Atffile atf_check -s eq:0 -o match:'testvar: a value' -e ignore -x \ "ATF_CONFDIR=$(pwd)/etc atf-run helper" -echo "Checking that defining 'testvar' trough the configuration" \ +echo "Checking that defining 'testvar' through the configuration" \ "file overrides the one in the Atffile." mkdir etc cat >etc/common.conf <
CVS commit: src/external/bsd/atf/dist/tools
Module Name:src Committed By: gutteridge Date: Mon Apr 3 16:26:50 UTC 2023 Modified Files: src/external/bsd/atf/dist/tools: atf-run_test.sh Log Message: atf-run_test.sh: fix spelling of "through" Reported by Jim Spath in PR misc/57318. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/tools/atf-run_test.sh 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/atf-c
Module Name:src Committed By: gutteridge Date: Tue Mar 14 00:55:31 UTC 2023 Modified Files: src/external/bsd/atf/dist/atf-c: atf-c-api.3 Log Message: atf-c-api.3: correct ATF_TP_ADD_TC() examples to use "tp" To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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.5 src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.6 --- src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.5 Fri Jul 3 19:22:38 2020 +++ src/external/bsd/atf/dist/atf-c/atf-c-api.3 Tue Mar 14 00:55:31 2023 @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 15, 2013 +.Dd March 14, 2023 .Dt ATF-C-API 3 .Os .Sh NAME @@ -243,9 +243,9 @@ ATF_TC_BODY(tc3, tc) ATF_TP_ADD_TCS(tp) { -ATF_TP_ADD_TC(tcs, tc1); -ATF_TP_ADD_TC(tcs, tc2); -ATF_TP_ADD_TC(tcs, tc3); +ATF_TP_ADD_TC(tp, tc1); +ATF_TP_ADD_TC(tp, tc2); +ATF_TP_ADD_TC(tp, tc3); ... add additional test cases ... return atf_no_error();
CVS commit: src/external/bsd/atf/dist/atf-c
Module Name:src Committed By: gutteridge Date: Tue Mar 14 00:55:31 UTC 2023 Modified Files: src/external/bsd/atf/dist/atf-c: atf-c-api.3 Log Message: atf-c-api.3: correct ATF_TP_ADD_TC() examples to use "tp" To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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.
Re: CVS commit: src/external/bsd/atf/dist/tools
"Andreas Gustafsson" wrote: > 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. Thank you! This will be useful to debug individual test case failures. Cheers, Simon.
CVS commit: src/external/bsd/atf/dist
Module Name:src Committed By: christos Date: Wed Oct 9 01:18:55 UTC 2019 Modified Files: src/external/bsd/atf/dist/atf-c++: build.cpp src/external/bsd/atf/dist/atf-sh: atf-check.cpp src/external/bsd/atf/dist/tools: process.cpp Log Message: the cast police is looking for me. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-c++/build.cpp cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/dist/atf-sh/atf-check.cpp cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/tools/process.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++/build.cpp diff -u src/external/bsd/atf/dist/atf-c++/build.cpp:1.1.1.2 src/external/bsd/atf/dist/atf-c++/build.cpp:1.2 --- src/external/bsd/atf/dist/atf-c++/build.cpp:1.1.1.2 Wed Oct 20 05:14:20 2010 +++ src/external/bsd/atf/dist/atf-c++/build.cpp Tue Oct 8 21:18:55 2019 @@ -63,7 +63,7 @@ atf::process::argv_array cargv_to_argv_and_free(char** l) { try { -atf::process::argv_array argv((const char* const*)l); +atf::process::argv_array argv(const_cast(l)); atf_utils_free_charpp(l); return argv; } catch (...) { Index: src/external/bsd/atf/dist/atf-sh/atf-check.cpp diff -u src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.11 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.12 --- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.11 Fri Oct 4 05:19:18 2019 +++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp Tue Oct 8 21:18:55 2019 @@ -498,7 +498,7 @@ decode(const std::string& s) { int count = 3; c = 0; -while (--count >= 0 && (unsigned)(s[i] - '0') < 8) +while (--count >= 0 && static_cast(s[i] - '0') < 8) c = (c << 3) + (s[i++] - '0'); break; } Index: src/external/bsd/atf/dist/tools/process.cpp diff -u src/external/bsd/atf/dist/tools/process.cpp:1.5 src/external/bsd/atf/dist/tools/process.cpp:1.6 --- src/external/bsd/atf/dist/tools/process.cpp:1.5 Sat Feb 3 20:41:05 2018 +++ src/external/bsd/atf/dist/tools/process.cpp Tue Oct 8 21:18:55 2019 @@ -102,8 +102,7 @@ static int const_execvp(const char *file, const char *const *argv) { -#define UNCONST(a) ((void *)(unsigned long)(const void *)(a)) -return ::execvp(file, (char* const*)(UNCONST(argv))); +return ::execvp(file, const_cast(argv)); #undef UNCONST }
CVS commit: src/external/bsd/atf/dist
Module Name:src Committed By: christos Date: Wed Oct 9 01:18:55 UTC 2019 Modified Files: src/external/bsd/atf/dist/atf-c++: build.cpp src/external/bsd/atf/dist/atf-sh: atf-check.cpp src/external/bsd/atf/dist/tools: process.cpp Log Message: the cast police is looking for me. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-c++/build.cpp cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/dist/atf-sh/atf-check.cpp cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/tools/process.cpp 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/atf-sh
Module Name:src Committed By: mrg Date: Fri Oct 4 09:19:19 UTC 2019 Modified Files: src/external/bsd/atf/dist/atf-sh: atf-check.cpp Log Message: give a catch() a variable. gcc 8 is picky: atf-check.cpp:221:23: error: catching polymorphic type 'class std::runtime_error' by value [-Werror=catch-value=] To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 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.10 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.11 --- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.10 Fri Dec 4 01:43:58 2015 +++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp Fri Oct 4 09:19:18 2019 @@ -218,7 +218,7 @@ parse_signal(const std::string& str) if (signo == INT_MIN) { try { return atf::text::to_type< int >(str); -} catch (std::runtime_error) { +} catch (std::runtime_error ) { throw atf::application::usage_error("Invalid signal name or number " "in -s option"); }
CVS commit: src/external/bsd/atf/dist/atf-sh
Module Name:src Committed By: mrg Date: Fri Oct 4 09:19:19 UTC 2019 Modified Files: src/external/bsd/atf/dist/atf-sh: atf-check.cpp Log Message: give a catch() a variable. gcc 8 is picky: atf-check.cpp:221:23: error: catching polymorphic type 'class std::runtime_error' by value [-Werror=catch-value=] To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 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.
Re: CVS commit: src/external/bsd/atf/dist/atf-sh
In article CADyfeQVHtEkhfydkA_XwgPhvqKirnUMRYjRV29c=6goznir...@mail.gmail.com, Julio Merino ju...@meroh.net wrote: On Fri, Jan 10, 2014 at 1:39 AM, Christos Zoulas chris...@netbsd.org wrote: Module Name:src Committed By: christos Date: Fri Jan 10 01:39:32 UTC 2014 Modified Files: src/external/bsd/atf/dist/atf-sh: libatf-sh.subr Log Message: Undo previous; unfortunately the cleanup routine gets called in a different shell so it can't cleanup stuff set in the environment of the first shell. What are you trying to fix? In the test case for t_hostent in lib/libc/net/, the tests initially contained the cleanup code after the test. If the test failed, then the cleanup did not get called. So I decided to use the _cleanup() feature of ATF. I ran the test with atf-run and the cleanup did not work. I wanted to examine the single test case that failed and I did not know how to run a single test case with atf-run. So I ran the test directly. The cleanup code did not get called which was unexpected. So I made that change and it worked for the most part but not in the error case. Then I realized that all the tests do set -e, so that makes the shell exit on error. That made me realize that the reason the cleanup does not work when it gets called from atf-run is because the cleanup is invoked in a separate shell, so the state of the test is lost (like shell variables set by the setup code). So I decided to set all the variables again during the cleanup. I would have preferred that the cleanup functionality was implemented differently, running in the context of the shell that ran the test. This could have been done by issuing a 'trap test_cleanup 0' before invoking the test, instead of all the complex stuff that is currently been done (unless I am missing something). I don't see how this prevents running tests in parallel. You just need to maintain one work directory for every test body/cleanup pair and delete the directory only after cleanup... and you cannot share work directories among tests anyway so you have to do that one way or another. If I need to pass state between the body of the test function and the cleanup function, where do I put that state? christos
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On 12/19/11 10:25 PM, Christos Zoulas wrote: 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 This was still broken. timer_t and itimerspec do not exist, so the timer.hpp file is unusable. The definition of HAVE_POSIX_TIMER does not work because SIGEV_NONE is defined in OS X. The change of sys/time.h and signal.h to ctime and csignal seems to cause issues too. I have had to fix this by adding a configure test for timer_t, using the pimpl idiom for the timer class definition to prevent further ifdef mess in timer.hpp, and had to sprinkle some more ifdef stuff in the code. The result is incredibly ugly, and I doubt there is any real benefit other than using modern interfaces. Was it really worth it? (I have not committed these fixes to the NetBSD tree because I cannot test them at the moment.) -- Julio Merino / @jmmv
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On Dec 23, 10:47am, j...@netbsd.org (Julio Merino) wrote: -- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-run | On 12/19/11 10:25 PM, Christos Zoulas wrote: | 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 | | This was still broken. | | timer_t and itimerspec do not exist, so the timer.hpp file is unusable. | The definition of HAVE_POSIX_TIMER does not work because SIGEV_NONE is | defined in OS X. The change of sys/time.h and signal.h to ctime and | csignal seems to cause issues too. | | I have had to fix this by adding a configure test for timer_t, using the | pimpl idiom for the timer class definition to prevent further ifdef mess | in timer.hpp, and had to sprinkle some more ifdef stuff in the code. | | The result is incredibly ugly, and I doubt there is any real benefit | other than using modern interfaces. Was it really worth it? (I have | not committed these fixes to the NetBSD tree because I cannot test | them at the moment.) I don't know. I would not have guessed that OS/X is lacking them, since they've been around for more than a decade. christos
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On Sun, Dec 18, 2011 at 10:34 PM, Christos Zoulas chris...@netbsd.orgwrote: 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. Interesting; didn't know about these. But what's the point of this change? It breaks OS X at least and does not fix anything AFAICT. -- Julio Merino / @jmmv
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On Mon, Dec 19, 2011 at 5:58 PM, Christos Zoulas chris...@zoulas.comwrote: On Dec 19, 5:00pm, j...@netbsd.org (Julio Merino) wrote: -- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-run | Interesting; didn't know about these. | | But what's the point of this change? It breaks OS X at least and does not | fix anything AFAICT. I am just trying to use modern POSIX API's to improve portability Well... modern has come to mean less portable in my book. (I like using modern APIs, but they tend to break grgrgr.) (and functionality in this case). For example, by using sigevent, one doesn't need to have global variables and he can pass the struct he wants to modify in the signal. In addition, one can use the monotonic clock, which is immune against time changes, and also use timespec which is more precise. Finally one is not limited to sigalrm for timers, but can send any signal. Thanks. I am really suprised that OS/X does not have them; I would have expected it to work on more systems than it does currently... I could only check with Snow Leopard and there is no timer_t there. I don't have access to Lion at the moment; when I do, I'll check again. If there is no support in it, I'll have to implement some conditional logic to use the new timers only if available (unless you have a better alternative?). If there is support, then I won't care about backwards compatibility. -- Julio Merino / @jmmv
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On Mon, Dec 19, 2011 at 8:32 PM, Christos Zoulas chris...@zoulas.comwrote: On Dec 19, 6:06pm, j...@netbsd.org (Julio Merino) wrote: -- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-run | I could only check with Snow Leopard and there is no timer_t there. I | don't have access to Lion at the moment; when I do, I'll check again. If | there is no support in it, I'll have to implement some conditional logic to | use the new timers only if available (unless you have a better | alternative?). If there is support, then I won't care about backwards | compatibility. Since it is my fault that I broke it, I will add a shim for OS/X that does not do anything fancy and implements the previous basic functionality that setitimer had. Could you check if this support exists in Lion first? If that's the case, I personally don't think it is a big deal. But thanks if you do that! -- Julio Merino / @jmmv
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On Dec 19, 5:00pm, j...@netbsd.org (Julio Merino) wrote: -- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-run | Interesting; didn't know about these. | | But what's the point of this change? It breaks OS X at least and does not | fix anything AFAICT. I am just trying to use modern POSIX API's to improve portability (and functionality in this case). For example, by using sigevent, one doesn't need to have global variables and he can pass the struct he wants to modify in the signal. In addition, one can use the monotonic clock, which is immune against time changes, and also use timespec which is more precise. Finally one is not limited to sigalrm for timers, but can send any signal. I am really suprised that OS/X does not have them; I would have expected it to work on more systems than it does currently... christos
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On Dec 19, 6:06pm, j...@netbsd.org (Julio Merino) wrote: -- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-run | I could only check with Snow Leopard and there is no timer_t there. I | don't have access to Lion at the moment; when I do, I'll check again. If | there is no support in it, I'll have to implement some conditional logic to | use the new timers only if available (unless you have a better | alternative?). If there is support, then I won't care about backwards | compatibility. Since it is my fault that I broke it, I will add a shim for OS/X that does not do anything fancy and implements the previous basic functionality that setitimer had. christos
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On Dec 19, 8:37pm, j...@netbsd.org (Julio Merino) wrote: -- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-run | Could you check if this support exists in Lion first? If that's the case, | I personally don't think it is a big deal. But thanks if you do that! It does not, and I've put compatibility code back. christos
Re: CVS commit: src/external/bsd/atf/dist
On 11/16/11 12:46 PM, Christos Zoulas wrote: 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 Could you run intrusive changes to atf for review please? The current changes are incomplete and inappropriate, so they are going to make integration upstream a pain. +int64_t +impl::to_number(const std::string str) +{ + int64_t num; + ::dehumanize_number(str.c_str(),num); This adds a dependency on NetBSD that should not be there. [...] +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) { Same here and below in the same function. This is NetBSD specific and there is no provisions to support other systems. [...] Lastly, this has been added without absolutely no tests and no documentation. (And there seem to be whitespace issues, although I can't tell if these are my mua's fault...)
Re: CVS commit: src/external/bsd/atf/dist
In article 4ec3f8f7.8020...@netbsd.org, Julio Merino j...@netbsd.org wrote: On 11/16/11 12:46 PM, Christos Zoulas wrote: 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 Could you run intrusive changes to atf for review please? The current changes are incomplete and inappropriate, so they are going to make integration upstream a pain. Well, there is really no portable way to find the total available memory of the system that I know of and I did not want to add ifdefs or machinery to get this working on other OS's. If you know otherwise, feel free to fix it. The changes are really small and they are additions only. I fail to see how it is going to be difficult to integrate. The only difficulty here is to make them portable across OS's, and that can be done with a getrealmemory() stub function per OS, and include the sources for humanize_number for the ones that don't have it. christos
Re: CVS commit: src/external/bsd/atf/dist
On 11/16/11 1:51 PM, Christos Zoulas wrote: In article4ec3f8f7.8020...@netbsd.org, Julio Merinoj...@netbsd.org wrote: On 11/16/11 12:46 PM, Christos Zoulas wrote: 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 Could you run intrusive changes to atf for review please? The current changes are incomplete and inappropriate, so they are going to make integration upstream a pain. Well, there is really no portable way to find the total available memory of the system that I know of and I did not want to add ifdefs or machinery to get this working on other OS's. If you know otherwise, feel free to fix it. I know there is no portable way, but at least we can default to do nothing if this is not supported. It's better than not building :-P The changes are really small and they are additions only. I fail to see how it is going to be difficult to integrate. Yes, they are small because this is just one change. But more may come. I'll then have to go and rewrite all these local changes with portability in mind. When the time to integrate a new release comes, I'll have to mess around with lots merge conflicts, because the upstream code will look nothing like what we have (hence why I asked for this to be reviewed first). Of course, if we assume I keep good track of all local changes and integrate them upstream (I do try), I could ignore the local changes altogether during the conflicts resolution and use the upstream copies... but that's... dangerous because I can miss some little thing. Specially if the local changes are made without tests, because then it'll be impossible for me to spot when such changes are not preserved.
Re: CVS commit: src/external/bsd/atf/dist
In article 4ec40d98.4070...@netbsd.org, Julio Merino j...@netbsd.org wrote: I know there is no portable way, but at least we can default to do nothing if this is not supported. It's better than not building :-P Oh, I can arrange that. #ifdef __NetBSD__ :-) But in my view this is worse... Yes, they are small because this is just one change. But more may come. I'll then have to go and rewrite all these local changes with portability in mind. When the time to integrate a new release comes, I'll have to mess around with lots merge conflicts, because the upstream code will look nothing like what we have (hence why I asked for this to be reviewed first). Well, this is the world we live in. Next time be the one to upgrade gdb or binutils or ssh and have to deal with 10-50K lines of diffs. You will not be complaining about a 100 line conflict after that :-) Of course, if we assume I keep good track of all local changes and integrate them upstream (I do try), I could ignore the local changes altogether during the conflicts resolution and use the upstream copies... but that's... dangerous because I can miss some little thing. Specially if the local changes are made without tests, because then it'll be impossible for me to spot when such changes are not preserved. I understand, and when I get more time I will write tests. I just wanted to stop our tests from failing in a non-hacky way quickly and I have achieved my goal with less than 30 minutes of coding. christos
Re: CVS commit: src/external/bsd/atf/dist
On 11/16/11 3:11 PM, Christos Zoulas wrote: In article4ec40d98.4070...@netbsd.org, Julio Merinoj...@netbsd.org wrote: I know there is no portable way, but at least we can default to do nothing if this is not supported. It's better than not building :-P Oh, I can arrange that. #ifdef __NetBSD__ :-) But in my view this is worse... Yeah, leave it as is for now. I'll have to do something similar anyway though, but if I can implement the code for the most common systems, that's probably good enough. Yes, they are small because this is just one change. But more may come. I'll then have to go and rewrite all these local changes with portability in mind. When the time to integrate a new release comes, I'll have to mess around with lots merge conflicts, because the upstream code will look nothing like what we have (hence why I asked for this to be reviewed first). Well, this is the world we live in. Next time be the one to upgrade gdb or binutils or ssh and have to deal with 10-50K lines of diffs. You will not be complaining about a 100 line conflict after that :-) That's true... but do we have a chance of getting things integrated into gdb quickly and/or on our own to prevent those 10-50K diffs? For atf we do ;-) (OK, I can definitely try to improve on the quickly side...) Anyway, just something to keep in mind. Still, I'd appreciate running changes for review at least. I'm open to overlooking details like these that don't fit upstream if that's going to make things easier temporarily.
Re: CVS commit: src/external/bsd/atf/dist/atf-c
On 11/9/11 9:42 AM, Christos Zoulas wrote: 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 Thanks; it seems to work now.
Re: CVS commit: src/external/bsd/atf/dist/atf-c
In article 2007202432.ga7...@britannica.bec.de, Joerg Sonnenberger jo...@britannica.bec.de wrote: On Mon, Nov 07, 2011 at 04:06:30PM +, Christos Zoulas wrote: Well, I tried to print the failing pattern in t_expand, and it silently got truncated. dprintf(3) has been part of TOG since 2006: (http://pubs.opengroup.org/onlinepubs/9699919799/functions/dprintf.html) So it would be preferable to implement it in terms of asprintf/write + or snprintf/malloc/write or even fdopen/fprintf instead of open coding it. From reading the patch, there are three different brances, right? Why don't you use writev for this with up to 6 elements in the vector? Done. christos
Re: CVS commit: src/external/bsd/atf/dist/atf-c
On 11/8/11 3:25 PM, Christos Zoulas wrote: In article 2007202432.ga7...@britannica.bec.de, Joerg Sonnenberger jo...@britannica.bec.de wrote: On Mon, Nov 07, 2011 at 04:06:30PM +, Christos Zoulas wrote: Well, I tried to print the failing pattern in t_expand, and it silently got truncated. dprintf(3) has been part of TOG since 2006: (http://pubs.opengroup.org/onlinepubs/9699919799/functions/dprintf.html) So it would be preferable to implement it in terms of asprintf/write + or snprintf/malloc/write or even fdopen/fprintf instead of open coding it. From reading the patch, there are three different brances, right? Why don't you use writev for this with up to 6 elements in the vector? Done. Did you even run any tests after doing this? This is broken. The assertion you added triggers immediately. -- Julio Merino / @jmmv
Re: CVS commit: src/external/bsd/atf/dist/atf-c
On Nov 8, 6:48pm, j...@netbsd.org (Julio Merino) wrote: -- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-c | On 11/8/11 3:25 PM, Christos Zoulas wrote: | In article 2007202432.ga7...@britannica.bec.de, | Joerg Sonnenberger jo...@britannica.bec.de wrote: | On Mon, Nov 07, 2011 at 04:06:30PM +, Christos Zoulas wrote: | Well, I tried to print the failing pattern in t_expand, and it silently | got truncated. dprintf(3) has been part of TOG since 2006: | (http://pubs.opengroup.org/onlinepubs/9699919799/functions/dprintf.html) | So it would be preferable to implement it in terms of asprintf/write + | or snprintf/malloc/write or even fdopen/fprintf instead of open coding it. | | From reading the patch, there are three different brances, right? | Why don't you use writev for this with up to 6 elements in the vector? | | Done. | | Did you even run any tests after doing this? | | This is broken. The assertion you added triggers immediately. Yes, I did. I actually wrote the test backwards 2ice because INV has inverted logic than regular assert for some reason. christos
Re: CVS commit: src/external/bsd/atf/dist/atf-c
On 11/8/11 7:32 PM, Christos Zoulas wrote: Yes, I did. I actually wrote the test backwards 2ice because INV has inverted logic than regular assert for some reason. It doesn't. INV(x) is the same as assert(x) -- or it is supposed to be -- but if it wasn't, things would have broken much earlier everywhere. -- Julio Merino / @jmmv
Re: CVS commit: src/external/bsd/atf/dist/atf-c
On 11/6/11 1:18 PM, Christos Zoulas wrote: 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. The use of dprintf cannot be merged back upstream because this function does not appear to be widely available. A bunch of write()s should have the same effect and remove the 1K limit; will do this. Anyway, where have you spot error messages longer than 1K? That seems... ugly.
Re: CVS commit: src/external/bsd/atf/dist/atf-c
In article 4eb7f47c.4040...@netbsd.org, Julio Merino j...@netbsd.org wrote: On 11/6/11 1:18 PM, Christos Zoulas wrote: 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. The use of dprintf cannot be merged back upstream because this function does not appear to be widely available. A bunch of write()s should have the same effect and remove the 1K limit; will do this. Anyway, where have you spot error messages longer than 1K? That seems... ugly. Well, I tried to print the failing pattern in t_expand, and it silently got truncated. dprintf(3) has been part of TOG since 2006: (http://pubs.opengroup.org/onlinepubs/9699919799/functions/dprintf.html) So it would be preferable to implement it in terms of asprintf/write + or snprintf/malloc/write or even fdopen/fprintf instead of open coding it. christos
Re: CVS commit: src/external/bsd/atf/dist/atf-c
On Mon, Nov 07, 2011 at 04:06:30PM +, Christos Zoulas wrote: Well, I tried to print the failing pattern in t_expand, and it silently got truncated. dprintf(3) has been part of TOG since 2006: (http://pubs.opengroup.org/onlinepubs/9699919799/functions/dprintf.html) So it would be preferable to implement it in terms of asprintf/write + or snprintf/malloc/write or even fdopen/fprintf instead of open coding it. From reading the patch, there are three different brances, right? Why don't you use writev for this with up to 6 elements in the vector? Joerg
Re: CVS commit: src/external/bsd/atf/dist/atf-c/detail
On 6/16/11 3:57 PM, Joerg Sonnenberger wrote: 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. I presume you found this with clang, right? I only hit the issue in OS X and didn't bother to pull it up to NetBSD because gcc did not encounter the problem. Thanks! -- Julio Merino / @jmmv
Re: CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: jmmv Date: Wed Mar 30 11:10:56 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: fs.cpp Log Message: Pull up upstream revision 648ed6360b2b7cda81a6079b00dc436d09c745b8: Retry calls that raise file system errors during cleanup Does this fix the occassional failures similar to the following? fs/psshfs/t_psshfs (94/365): 3 test cases inode_nos: atf-run: ERROR: XXX: Cannot get information of /tmp/atf-run.00369p/mnt; lstat(2) failed: Device not configured Passed. atf-report: ERROR: 5704: Unexpected token `EOF'; expected start of test atf-report: case - | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com| | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net | | Kernel Developer | | pgoyette at netbsd.org | -
Re: CVS commit: src/external/bsd/atf/dist/atf-run
In article 20110317194537.13adb17...@cvs.netbsd.org, Julio Merino source-changes-d@NetBSD.org wrote: -=-=-=-=-=- 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); This is not very polite, as you are not giving them a chance to cleanup. christos
Re: CVS commit: src/external/bsd/atf/dist/atf-sh
On Fri, Nov 26, 2010 at 12:04:36PM +, Antti Kantee wrote: 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 XXX: Likewise for error messages. -- Nicolas Joly Biological Software and Databanks. Institut Pasteur, Paris.
Re: CVS commit: src/external/bsd/atf/dist
On Thu, 26 Aug 2010, Julio Merino wrote: 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...@. Just wondering - does this address PR bin/43802 that I just filed? - | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com| | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net | | Kernel Developer | | pgoyette at netbsd.org | -
Re: CVS commit: src/external/bsd/atf/dist
On Thu Aug 26 2010 at 08:43:53 -0700, Paul Goyette wrote: 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...@. Just wondering - does this address PR bin/43802 that I just filed? Partially yes (it doesn't fix the test, but fixes the run).
Re: CVS commit: src/external/bsd/atf/dist
On Aug 26, 2010, at 4:43 PM, Paul Goyette wrote: On Thu, 26 Aug 2010, Julio Merino wrote: 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...@. Just wondering - does this address PR bin/43802 that I just filed? Yup, but I had no idea about this PR :-P
Re: CVS commit: src/external/bsd/atf/dist
On Thu, 26 Aug 2010, Julio Merino wrote: 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...@. Just wondering - does this address PR bin/43802 that I just filed? Yup, but I had no idea about this PR :-P I was filing it while you were doing your commit! Ships crossing in the night and all that! - | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com| | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net | | Kernel Developer | | pgoyette at netbsd.org | -