diff options
-rw-r--r-- | ChangeLog | 29 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 29 | ||||
-rw-r--r-- | bin/PerlACE/Process.pm | 4 | ||||
-rw-r--r-- | bin/PerlACE/Process_Unix.pm | 11 | ||||
-rw-r--r-- | bin/PerlACE/Process_Win32.pm | 38 | ||||
-rw-r--r-- | bin/PerlACE/Run_Test.pm | 2 |
6 files changed, 81 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog index 9577811de5c..90d50ecc87f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Tue Dec 10 13:23:37 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * bin/PerlACE/Process.pm: + * bin/PerlACE/Process_Win32.pm: + * bin/PerlACE/Process_Unix.pm: Changed WAIT_DELAY_FACTORY from a + data member in Process_Win32 to a global data in + PerlACE::Process. You can now define an environment variable + "ACE_RUNTEST_DELAY" on both Win32 and UNIX to multiply the wait + time with the number. The same trick that I added last time + into Process_Win32 to invoke tests with purify should also work + with valgrind. + + * bin/PerlACE/Run_Test.pm (waitforfile): Changed to multiply the + wait time with the PerlACE::Process::WAIT_DELAY_FACTOR . + Tue Dec 10 10:20:35 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * ace/Synch.cpp: Commented out the dump () call on ACE_cond_t, @@ -6,11 +21,11 @@ Tue Dec 10 10:20:35 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb no dump method on ACE_cond_t. Fixed the return type of the implementation to match the - declaration. + declaration. Mon Dec 9 18:54:09 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> - * ace/Synch.{h,cpp}: Added a dump() method to the template + * ace/Synch.{h,cpp}: Added a dump() method to the template specialization of ACE_Condition<ACE_Recursive_Thread_Mutex>. Thanks to Mathias Waack <mathias.waack@schlund.de> for reporting this. @@ -51,7 +66,7 @@ Mon Dec 9 15:42:39 UTC 2002 Don Hinton <dhinton@ieee.org> Mon Dec 9 07:41:39 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * tests/OS_Test.cpp: - * ace/OS_String.cpp (strsncpy): Fixed a cut and paste error. + * ace/OS_String.cpp (strsncpy): Fixed a cut and paste error. Mon Dec 9 00:09:55 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> @@ -62,15 +77,15 @@ Sun Dec 8 23:56:09 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb * ace/OS_String.cpp: Applied patches from Alain Decamps to make strsncpy () more robust. If dst == src, the return string will - have utmost 'maxlen'. - + have utmost 'maxlen'. + * tests/OS_Test.cpp: Added a test case for strsncpy (). Thanks to Alain Decamps for donating the patch. Sun Dec 08 22:44:07 2002 Balachandran Natarajan <bala@cs.wustl.edu> - * ace/Functor.h (void *): - * ace/Functor.i: Added a template specialization for ACE_Hash <void *>. + * ace/Functor.h (void *): + * ace/Functor.i: Added a template specialization for ACE_Hash <void *>. Sun Dec 08 09:45:34 UTC 2002 Johnny Willemsen <jwillemsen@remedy.nl> diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 9577811de5c..90d50ecc87f 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,18 @@ +Tue Dec 10 13:23:37 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * bin/PerlACE/Process.pm: + * bin/PerlACE/Process_Win32.pm: + * bin/PerlACE/Process_Unix.pm: Changed WAIT_DELAY_FACTORY from a + data member in Process_Win32 to a global data in + PerlACE::Process. You can now define an environment variable + "ACE_RUNTEST_DELAY" on both Win32 and UNIX to multiply the wait + time with the number. The same trick that I added last time + into Process_Win32 to invoke tests with purify should also work + with valgrind. + + * bin/PerlACE/Run_Test.pm (waitforfile): Changed to multiply the + wait time with the PerlACE::Process::WAIT_DELAY_FACTOR . + Tue Dec 10 10:20:35 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * ace/Synch.cpp: Commented out the dump () call on ACE_cond_t, @@ -6,11 +21,11 @@ Tue Dec 10 10:20:35 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb no dump method on ACE_cond_t. Fixed the return type of the implementation to match the - declaration. + declaration. Mon Dec 9 18:54:09 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> - * ace/Synch.{h,cpp}: Added a dump() method to the template + * ace/Synch.{h,cpp}: Added a dump() method to the template specialization of ACE_Condition<ACE_Recursive_Thread_Mutex>. Thanks to Mathias Waack <mathias.waack@schlund.de> for reporting this. @@ -51,7 +66,7 @@ Mon Dec 9 15:42:39 UTC 2002 Don Hinton <dhinton@ieee.org> Mon Dec 9 07:41:39 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * tests/OS_Test.cpp: - * ace/OS_String.cpp (strsncpy): Fixed a cut and paste error. + * ace/OS_String.cpp (strsncpy): Fixed a cut and paste error. Mon Dec 9 00:09:55 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> @@ -62,15 +77,15 @@ Sun Dec 8 23:56:09 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb * ace/OS_String.cpp: Applied patches from Alain Decamps to make strsncpy () more robust. If dst == src, the return string will - have utmost 'maxlen'. - + have utmost 'maxlen'. + * tests/OS_Test.cpp: Added a test case for strsncpy (). Thanks to Alain Decamps for donating the patch. Sun Dec 08 22:44:07 2002 Balachandran Natarajan <bala@cs.wustl.edu> - * ace/Functor.h (void *): - * ace/Functor.i: Added a template specialization for ACE_Hash <void *>. + * ace/Functor.h (void *): + * ace/Functor.i: Added a template specialization for ACE_Hash <void *>. Sun Dec 08 09:45:34 UTC 2002 Johnny Willemsen <jwillemsen@remedy.nl> diff --git a/bin/PerlACE/Process.pm b/bin/PerlACE/Process.pm index 52df7aa6c8f..62c0565cb2c 100644 --- a/bin/PerlACE/Process.pm +++ b/bin/PerlACE/Process.pm @@ -11,7 +11,7 @@ $PerlACE::Process::ExeSubDir = './'; my @new_argv = (); for(my $i = 0; $i <= $#ARGV; ++$i) { - if ($ARGV[$i] eq '-ExeSubDir') { + if ($ARGV[$i] eq '-ExeSubDir') { if (defined $ARGV[$i + 1]) { $PerlACE::Process::ExeSubDir = $ARGV[++$i].'/'; } @@ -26,6 +26,8 @@ for(my $i = 0; $i <= $#ARGV; ++$i) { } @ARGV = @new_argv; +$PerlACE::Process::WAIT_DELAY_FACTOR = $ENV{"ACE_RUNTEST_DELAY"}; + if ($OSNAME eq "MSWin32") { require PerlACE::Process_Win32; } diff --git a/bin/PerlACE/Process_Unix.pm b/bin/PerlACE/Process_Unix.pm index b6ae698d3f5..4b8966cb2c0 100644 --- a/bin/PerlACE/Process_Unix.pm +++ b/bin/PerlACE/Process_Unix.pm @@ -71,6 +71,15 @@ sub new $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; + if (!defined $PerlACE::Process::WAIT_DELAY_FACTOR) { +# if (defined $self->{PURIFY_CMD}) { +# $self->{WAIT_DELAY_FACTOR} = 10; +# } +# else { + $PerlACE::Process::WAIT_DELAY_FACTOR = 1; +# } + } + bless ($self, $class); return $self; } @@ -324,6 +333,8 @@ sub TimedWait ($) my $self = shift; my $timeout = shift; + $timeout *= $PerlACE::Process::WAIT_DELAY_FACTOR; + while ($timeout-- != 0) { my $pid = waitpid ($self->{PROCESS}, &WNOHANG); if ($pid != 0 && $? != -1) { diff --git a/bin/PerlACE/Process_Win32.pm b/bin/PerlACE/Process_Win32.pm index 5b2bb1913ab..18912185c0b 100644 --- a/bin/PerlACE/Process_Win32.pm +++ b/bin/PerlACE/Process_Win32.pm @@ -36,14 +36,13 @@ sub new $self->{EXECUTABLE} = shift; $self->{ARGUMENTS} = shift; $self->{PURIFY_CMD} = $ENV{"ACE_RUN_PURIFY_CMD"}; - $self->{WAIT_DELAY_FACTOR} = $ENV{"ACE_RUNTEST_DELAY"}; - - if (!defined $self->{WAIT_DELAY_FACTOR}) { + $self->{PURIFY_OPT} = $ENV{"ACE_RUN_PURIFY_OPT"}; + if (!defined $PerlACE::Process::WAIT_DELAY_FACTOR) { if (defined $self->{PURIFY_CMD}) { - $self->{WAIT_DELAY_FACTOR} = 10; + $PerlACE::Process::WAIT_DELAY_FACTOR = 10; } else { - $self->{WAIT_DELAY_FACTOR} = 1; + $PerlACE::Process::WAIT_DELAY_FACTOR = 1; } } @@ -168,19 +167,24 @@ sub Spawn () my $orig_cmdline = $self->CommandLine (); $executable = $self->{PURIFY_CMD}; my $basename = basename ($self->{EXECUTABLE}); + + my $PurifyOptions = $self->{PURIFY_OPT}; + if (!defined $PurifyOptions) { + $PurifyOptions = + "/run ". +# "/save-data=$basename.pfy ". + "/save-text-data=$basename.pfytxt ". + "/AllocCallStackLength=20 ". + "/ErrorCallStackLength=20 ". + "/HandlesInUseAtExit ". + "/InUseAtExit ". + "/LeaksAtExit "; + } + my $basename = basename ($self->{EXECUTABLE}); $cmdline = "purify " . - "/run ". - "/save-data=$basename.pfy ". - "/save-text-data=$basename.txt ". - "/AllocCallStackLength=20 ". - "/ErrorCallStackLength=20 ". - "/HandlesInUseAtExit ". - "/InUseAtExit ". - "/LeaksAtExit ". - "$orig_cmdline" - - ; + "$PurifyOptions ". + "$orig_cmdline" ; } else { $executable = $self->Executable (); @@ -296,7 +300,7 @@ sub TimedWait ($) } if (Win32::Process::Wait ($self->{PROCESS}, - $timeout * 1000 * $self->{WAIT_DELAY_FACTOR}) == 0) { + $timeout * 1000 * $PerlACE::Process::WAIT_DELAY_FACTOR) == 0) { return -1; } diff --git a/bin/PerlACE/Run_Test.pm b/bin/PerlACE/Run_Test.pm index 3dbf541653f..d56899d5ae6 100644 --- a/bin/PerlACE/Run_Test.pm +++ b/bin/PerlACE/Run_Test.pm @@ -70,6 +70,8 @@ sub waitforfile_timed { my $file = shift; my $maxtime = shift; + $maxtime *= $PerlACE::Process::WAIT_DELAY_FACTOR; + while ($maxtime-- != 0) { if (-e $file && -s $file) { return 0; |