[R-gregmisc-users] SF.net SVN: r-gregmisc: [1069] trunk/fork/tests
Brought to you by:
warnes
From: <wa...@us...> - 2007-03-06 23:28:29
|
Revision: 1069 http://svn.sourceforge.net/r-gregmisc/?rev=1069&view=rev Author: warnes Date: 2007-03-06 15:28:27 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Improve regression tests, add saved .Rout files for doing regression testing. Modified Paths: -------------- trunk/fork/tests/checkZombies.R trunk/fork/tests/test_many_fork_BSD.R trunk/fork/tests/test_many_fork_SysV.R trunk/fork/tests/test_many_fork_broken.R Added Paths: ----------- trunk/fork/tests/test_many_fork_BSD.Rout.save trunk/fork/tests/test_many_fork_SysV.Rout.save trunk/fork/tests/test_many_fork_broken.Rout.save Modified: trunk/fork/tests/checkZombies.R =================================================================== --- trunk/fork/tests/checkZombies.R 2007-03-06 23:17:34 UTC (rev 1068) +++ trunk/fork/tests/checkZombies.R 2007-03-06 23:28:27 UTC (rev 1069) @@ -32,6 +32,7 @@ if(length(zombies)>50) { retval = TRUE + warning(length(zombies), " Zombie Processes Present!\n") cat(length(zombies), " Zombie Processes Present!\n") } else Modified: trunk/fork/tests/test_many_fork_BSD.R =================================================================== --- trunk/fork/tests/test_many_fork_BSD.R 2007-03-06 23:17:34 UTC (rev 1068) +++ trunk/fork/tests/test_many_fork_BSD.R 2007-03-06 23:28:27 UTC (rev 1069) @@ -12,11 +12,5 @@ nZombies <- checkZombies() -if(nZombies) { - stop("Zombie processes created") -} else { - cat("Success!\n") -} - # remove signal handler restoreSIGCLD() Added: trunk/fork/tests/test_many_fork_BSD.Rout.save =================================================================== --- trunk/fork/tests/test_many_fork_BSD.Rout.save (rev 0) +++ trunk/fork/tests/test_many_fork_BSD.Rout.save 2007-03-06 23:28:27 UTC (rev 1069) @@ -0,0 +1,40 @@ + +R version 2.4.1 (2006-12-18) +Copyright (C) 2006 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> ## This script starts child processes, and sets up a 'dummy' SIGCLD +> ## hander to handle child process notifications. Hopefully on both BSD +> ## and Sys5 derived systems, this should cause child processes to exit +> ## and die cleanly, IE without becoming zombies. +> +> library(fork) +> +> ## start signal handler +> handleSIGCLD() +Installing SIGCHLD signal handler...Done. +> +> source("checkZombies.R") +> +> nZombies <- checkZombies() +Generating 100 child processes (to become zombies)... +Give them 10 seconds to die and exit.. +Check the process table to see if there are any zombies... +Done. No Zombies present. +> +> # remove signal handler +> restoreSIGCLD() +Restoring original SIGCHLD signal handler...Done. +> Modified: trunk/fork/tests/test_many_fork_SysV.R =================================================================== --- trunk/fork/tests/test_many_fork_SysV.R 2007-03-06 23:17:34 UTC (rev 1068) +++ trunk/fork/tests/test_many_fork_SysV.R 2007-03-06 23:28:27 UTC (rev 1069) @@ -12,8 +12,3 @@ nZombies <- checkZombies() -if(nZombies) - stop("Zombie processes created") -else - cat("Success!\n") - Added: trunk/fork/tests/test_many_fork_SysV.Rout.save =================================================================== --- trunk/fork/tests/test_many_fork_SysV.Rout.save (rev 0) +++ trunk/fork/tests/test_many_fork_SysV.Rout.save 2007-03-06 23:28:27 UTC (rev 1069) @@ -0,0 +1,36 @@ + +R version 2.4.1 (2006-12-18) +Copyright (C) 2006 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> ## This script starts child processes, and sets the SIGCHLD hander to +> ## "ignore". On Sys5 derived systems, this should cause child +> ## processes to exit and die cleanly without the parent process +> ## querying the exit state. IE, no zombie processes will be created. +> +> library(fork) +> +> ## ignore sigchld signals so child processes will die cleanly +> signal("SIGCHLD","ignore") +> +> source("checkZombies.R") +> +> nZombies <- checkZombies() +Generating 100 child processes (to become zombies)... +Give them 10 seconds to die and exit.. +Check the process table to see if there are any zombies... +Done. No Zombies present. +> +> Modified: trunk/fork/tests/test_many_fork_broken.R =================================================================== --- trunk/fork/tests/test_many_fork_broken.R 2007-03-06 23:17:34 UTC (rev 1068) +++ trunk/fork/tests/test_many_fork_broken.R 2007-03-06 23:28:27 UTC (rev 1069) @@ -8,7 +8,3 @@ nZombies <- checkZombies() -if(nZombies) - stop("Zombie processes created") -else - cat("Success!\n") Added: trunk/fork/tests/test_many_fork_broken.Rout.save =================================================================== --- trunk/fork/tests/test_many_fork_broken.Rout.save (rev 0) +++ trunk/fork/tests/test_many_fork_broken.Rout.save 2007-03-06 23:28:27 UTC (rev 1069) @@ -0,0 +1,35 @@ + +R version 2.4.1 (2006-12-18) +Copyright (C) 2006 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> ## This script starts child processes, but doesn't do anything about +> ## collecting or ignoring child process return status. Consequently, it should +> ## generate zombie child processes. +> +> library(fork) +> +> source("checkZombies.R") +> +> nZombies <- checkZombies() +Generating 100 child processes (to become zombies)... +Give them 10 seconds to die and exit.. +Check the process table to see if there are any zombies... +100 Zombie Processes Present! +Warning message: +100 Zombie Processes Present! + in: checkZombies() +> +> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |