Subject: | t/readonly.t: TODO-ed test now passing on thread build |
In the course of investigating https://rt.perl.org/rt3/Ticket/Display.html?id=119507 tonight, I had occasion to build a threaded perl on the dromedary server. (Caution: I have no expertise in threaded perls. I simply wanted to test James Avera's complaint with fewer configuration arguments than he used.)
In the test output I noticed that one TODO-ed test in the file named above is now PASSing:
#####
$ cd t;./perl harness -v ../cpan/List-Util/t/readonly.t;cd -
ok 1 - number constant
ok 2 - number variable
ok 3 - no change to number variable
ok 4 - string constant
ok 5 - string variable
ok 6 - no change to string variable
ok 7 - reference to constant
ok 8 - de-reference to constant
ok 9 - glob
ok 10 - reference a constant in a sub # TODO doesn't work with threads
ok 11 - reference a non-constant in a sub
ok
All tests successful.
Test Summary Report
-------------------
../cpan/List-Util/t/readonly.t (Wstat: 0 Tests: 11 Failed: 0)
TODO passed: 10
Files=1, Tests=11, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.03 cusr 0.00 csys = 0.05 CPU)
Result: PASS
#####
Per recommendation from Father C, submitting upstream patch.
Thank you very much.
Jim Keenan
perl_V_threaded_dromedary.txt
Summary of my perl5 (revision 5 version 19 subversion 4) configuration:
Commit id: 5b903226e771166eeb3a78d139181139a3759c2d
Platform:
osname=linux, osvers=2.6.32-358.el6.x86_64, archname=x86_64-linux-thread-multi
uname='linux dromedary-001.ams6.corp.booking.com 2.6.32-358.el6.x86_64 #1 smp fri feb 22 00:31:26 utc 2013 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Dusedevel -Dusethreads'
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
Compiler:
cc='cc', 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',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-3)', 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='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.12.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.12'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
USE_ITHREADS USE_LARGE_FILES USE_LOCALE
USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API
Built under linux
Compiled at Aug 29 2013 01:24:57
%ENV:
PERLBREW_BASHRC_VERSION="0.63"
PERLBREW_HOME="/home/jkeenan/.perlbrew"
PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew"
@INC:
lib
/usr/local/lib/perl5/site_perl/5.19.4/x86_64-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.19.4
/usr/local/lib/perl5/5.19.4/x86_64-linux-thread-multi
/usr/local/lib/perl5/5.19.4
/usr/local/lib/perl5/site_perl
.
Subject: | 0001-De-TODO-test-10-which-now-passes-on-a-threaded-perl.patch |
From c473a1fcc9243ef31aa77bb576a4642e67f19695 Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Thu, 29 Aug 2013 03:51:54 +0200
Subject: [PATCH] De-TODO test 10, which now passes on a threaded perl.
---
cpan/List-Util/t/readonly.t | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/cpan/List-Util/t/readonly.t b/cpan/List-Util/t/readonly.t
index 42ed3d8..5fcd5ee 100644
--- a/cpan/List-Util/t/readonly.t
+++ b/cpan/List-Util/t/readonly.t
@@ -44,8 +44,5 @@ sub try
}
$var = 123;
-{
- local $TODO = $Config::Config{useithreads} ? "doesn't work with threads" : undef;
- ok( try ("abc"), 'reference a constant in a sub');
-}
+ok( try ("abc"), 'reference a constant in a sub');
ok( !try ($var), 'reference a non-constant in a sub');
--
1.7.1