develooper Front page | perl.perl5.porters | Postings from August 2008

Re: Change 34175: Avoid a potential testing race condition inShell.pm's test.

Thread Next
From:
Bram
Date:
August 10, 2008 11:29
Subject:
Re: Change 34175: Avoid a potential testing race condition inShell.pm's test.
Message ID:
20080810202907.0pfnzshsoco8owg4@horde.wizbit.be
Citeren Nicholas Clark <nwc10+p5p4@colon.colondot.net>:

> Change 34175 by nicholas@nicholas-saigo on 2008/08/06 21:36:45
>
> 	Avoid a potential testing race condition in Shell.pm's test.
>
> Affected files ...
>
> ... //depot/perl/lib/Shell.t#9 edit
>
> Differences ...
>
> ==== //depot/perl/lib/Shell.t#9 (text) ====
> Index: perl/lib/Shell.t
> --- perl/lib/Shell.t#8~30905~	2007-04-11 06:05:28.000000000 -0700
> +++ perl/lib/Shell.t	2008-08-06 14:36:45.000000000 -0700
> @@ -41,6 +41,11 @@
>
>  $Shell::capture_stderr = 0;
>
> +# Trying to do two repeated C<ls>s in t in core and expecting the   
> same output
> +# is a race condition when tests are running in parallel, and using it as a
> +# temporary directory. So go somewhere quieter.
> +chdir 'uni' if $ENV{PERL_CORE} && -d 'uni';
> +
>  # someone will have to fill in the blanks for other platforms
>
>  if ($Is_VMS) {
> End of Patch.
>


This changed caused temporay files from Shell.t's tests to be left  
over in t/. (sht0001, ...)

Attached patch fixes it.



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About