Many fixes after CPANTESTERS report
[Config-Perl-V.git] / t / 25_plv5162.t
blob5b3694be60e12010499e89b541788bc79d7f299a
1 #!/pro/bin/perl
3 use strict;
4 use warnings;
6 BEGIN {
7 use Test::More;
8 my $tests = 150;
9 unless ($ENV{PERL_CORE}) {
10 require Test::NoWarnings;
11 Test::NoWarnings->import ();
12 $tests++;
15 plan tests => $tests;
18 use Config::Perl::V;
20 ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block");
21 ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc );
23 is ($conf->{build}{osname}, $conf->{config}{osname}, "osname");
24 is ($conf->{build}{stamp}, "Aug 25 2013 01:24:40", "Build time");
25 is ($conf->{config}{version}, "5.16.2", "reconstructed \%Config{version}");
26 is ($conf->{config}{ccversion}, "", "Using gcc. non-gcc version should not be defined");
28 my $opt = Config::Perl::V::plv2hash ("")->{build}{options};
29 foreach my $o (sort qw(
30 HAS_TIMES MULTIPLICITY PERLIO_LAYERS
31 PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
32 PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
33 USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
34 USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
35 USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
36 USE_REENTRANT_API
37 )) {
38 is ($conf->{build}{options}{$o}, 1, "Runtime option $o set");
39 delete $opt->{$o};
41 foreach my $o (sort keys %$opt) {
42 is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset");
45 is_deeply ($conf->{build}{patches}, [
46 "/Library/Perl/Updates/<version> comes before system perl directories",
47 "installprivlib and installarchlib points to the Updates directory",
48 "CVE-2013-1667 hashtable DOS fix",
49 ], "Local patches");
51 my %check = (
53 archname => "darwin-thread-multi-2level",
54 bincompat5005 => "undef",
55 config_args => "-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc",
56 d_sfio => "undef",
57 d_sigaction => "define",
58 hint => "recommended",
59 myuname => "darwin jackson.apple.com 13.0 darwin kernel version 13.0.0: tue jul 30 20:52:22 pdt 2013; root:xnu-2422.1.53~3release_x86_64 x86_64",
60 use64bitall => "define",
61 use64bitint => "define",
62 useithreads => "define",
63 uselargefiles => "define",
64 uselongdouble => "undef",
65 usemultiplicity => "define",
66 usemymalloc => "n",
67 useperlio => "define",
68 useposix => "true",
69 usesocks => "undef",
71 alignbytes => 8,
72 byteorder => "12345678",
73 cc => "cc",
74 ccflags => "-arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include",
75 ccversion => "",
76 cppflags => "-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include",
77 d_longdbl => "define",
78 d_longlong => "define",
79 doublesize => 8,
80 gccosandvers => "",
81 gccversion => "4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)",
82 intsize => 4,
83 ivsize => 8,
84 ivtype => "long",
85 longdblsize => 16,
86 longlongsize => 8,
87 longsize => 8,
88 lseeksize => 8,
89 nvsize => 8,
90 nvtype => "double",
91 lseektype => "off_t",
92 optimize => "-Os",
93 prototype => "define",
94 ptrsize => 8,
96 gnulibc_version => "",
97 ld => "cc -mmacosx-version-min=10.9",
98 ldflags => "-arch x86_64 -arch i386 -fstack-protector -L/usr/local/lib",
99 libc => "",
100 libperl => "libperl.dylib",
101 libpth => "/usr/local/lib /usr/lib",
102 libs => "",
103 perllibs => "",
104 so => "dylib",
105 useshrplib => "true",
107 cccdlflags => "",
108 ccdlflags => "",
109 d_dlsymun => "undef",
110 dlext => "bundle",
111 dlsrc => "dl_dlopen.xs",
112 lddlflags => "-arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector",
114 is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check;
117 __END__
118 Summary of my perl5 (revision 5 version 16 subversion 2) configuration:
120 Platform:
121 osname=darwin, osvers=13.0, archname=darwin-thread-multi-2level
122 uname='darwin jackson.apple.com 13.0 darwin kernel version 13.0.0: tue jul 30 20:52:22 pdt 2013; root:xnu-2422.1.53~3release_x86_64 x86_64 '
123 config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc'
124 hint=recommended, useposix=true, d_sigaction=define
125 useithreads=define, usemultiplicity=define
126 useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
127 use64bitint=define, use64bitall=define, uselongdouble=undef
128 usemymalloc=n, bincompat5005=undef
129 Compiler:
130 cc='cc', ccflags ='-arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include',
131 optimize='-Os',
132 cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include'
133 ccversion='', gccversion='4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)', gccosandvers=''
134 intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
135 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
136 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
137 alignbytes=8, prototype=define
138 Linker and Libraries:
139 ld='cc -mmacosx-version-min=10.9', ldflags ='-arch x86_64 -arch i386 -fstack-protector -L/usr/local/lib'
140 libpth=/usr/local/lib /usr/lib
141 libs=
142 perllibs=
143 libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
144 gnulibc_version=''
145 Dynamic Linking:
146 dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
147 cccdlflags=' ', lddlflags='-arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector'
150 Characteristics of this binary (from libperl):
151 Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
152 PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
153 PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
154 USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
155 USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
156 USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
157 USE_REENTRANT_API
158 Locally applied patches:
159 /Library/Perl/Updates/<version> comes before system perl directories
160 installprivlib and installarchlib points to the Updates directory
161 CVE-2013-1667 hashtable DOS fix
162 Built under darwin
163 Compiled at Aug 25 2013 01:24:40
164 %ENV:
165 PERL5LIB=""
166 PERL5OPT=""
167 PERL5_CPANPLUS_IS_RUNNING="37393"
168 PERL5_CPAN_IS_RUNNING="37393"
169 @INC:
170 /Library/Perl/5.16/darwin-thread-multi-2level
171 /Library/Perl/5.16
172 /Network/Library/Perl/5.16/darwin-thread-multi-2level
173 /Network/Library/Perl/5.16
174 /Library/Perl/Updates/5.16.2/darwin-thread-multi-2level
175 /Library/Perl/Updates/5.16.2
176 /System/Library/Perl/5.16/darwin-thread-multi-2level
177 /System/Library/Perl/5.16
178 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level
179 /System/Library/Perl/Extras/5.16