develooper Front page | perl.perl5.porters | Postings from July 2010

[perl #76740] Isolate ext/IO/t/io_dir.t test to pass parallel tests

Thread Next
Petr Pisar
July 27, 2010 11:08
[perl #76740] Isolate ext/IO/t/io_dir.t test to pass parallel tests
Message ID:
# New Ticket Created by  Petr Pisar 
# Please include the string:  [perl #76740]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.39 running under perl 5.10.1.

[Please describe your issue here]

As perl5101delta documents, ext/IO/t/io_dir.t breaks parallel testing.

Problem is the test operates on common directory that is touched by other
tests. Because io_dir compares directory content with previous state,
concurently running tests break assumption about non-volatility of the

This patch fixes the problem by moving io_dir tests into private directory.
Similar code is bundled with perl-5.12.

diff -Naur perl-5.10.1.orig/ext/IO/t/io_dir.t perl-5.10.1/ext/IO/t/io_dir.t
--- perl-5.10.1.orig/ext/IO/t/io_dir.t	2009-06-23 22:02:03.000000000 +0200
+++ perl-5.10.1/ext/IO/t/io_dir.t	2010-07-26 18:00:28.186773222 +0200
@@ -20,6 +20,13 @@
 use strict;
+# Prepare standalone directory to avoid influence of other parallel tests
+# mangling CWD content.
+my $new_dir = "io_dir_test";
+mkdir "$new_dir" unless -d "$new_dir";
+mkdir "$new_dir/subdir" unless -d "$new_dir/subdir";
+chdir "$new_dir" or die "Could not change directory to $new_dir: $!";
 my $DIR = $^O eq 'MacOS' ? ":" : ".";
 my $CLASS = "IO::Dir";

[Please do not change anything below this line]
This perlbug was built using Perl 5.10.1 in the Fedora build system.
It is being executed now by Perl 5.10.1 - Fri Jul 23 13:22:58 UTC 2010.

Site configuration information for perl 5.10.1:

Configured by Red Hat, Inc. at Fri Jul 23 13:22:58 UTC 2010.

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
    osname=linux, osvers=2.6.32-44.el6.x86_64, archname=x86_64-linux-thread-multi
    uname='linux 2.6.32-44.el6.x86_64 #1 smp wed jul 7 15:47:50 edt 2010 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DDEBUGGING=-g -Dversion=5.10.1 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share/perl5 -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr/lib64/perl5 -Dinc_version_list=5.10.0 -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud
 _setservent_r_proto -Dscriptdir=/usr/bin -Dotherlibdirs=/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi:/usr/local/lib/perl5/site_perl/5.10.0:/usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl:/usr/lib/perl5/site_perl'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.4.4 20100630 (Red Hat 4.4.4-10)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -fstack-protector'
    libpth=/usr/local/lib64 /lib64 /usr/lib64
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'

Locally applied patches:

@INC for perl 5.10.1:

Environment for perl 5.10.1:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About