From 00c8a85237e92952e9853f74dac17c4081ab67ee Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand - Tux" Date: Sat, 2 Aug 2014 12:59:12 +0200 Subject: [PATCH] Many fixes after CPANTESTERS report MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit • Misparsed locally applied patches (passed only first line) • Misparsed compile-time options (passed only first line) • Some settings run unquoted to end-of-line • Not all key-value pairs were separated by ',' in older perl • Small typo in test comment --- Changelog | 8 ++- MANIFEST | 1 + V.pm | 19 ++++-- t/20_plv56.t | 13 ++++- t/21_plv58.t | 16 ++++- t/22_plv510.t | 7 ++- t/23_plv512.t | 15 ++++- t/24_plv514.t | 16 ++++- t/25_plv516.t | 19 +++++- t/25_plv5162.t | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ t/26_plv518.t | 23 ++++++-- t/26_plv5182.t | 51 ++++++---------- t/27_plv5200.t | 50 +++++++--------- 13 files changed, 338 insertions(+), 81 deletions(-) create mode 100644 t/25_plv5162.t diff --git a/Changelog b/Changelog index 2db2e36..7a3a620 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,9 @@ -0.22 - 01 Aug 2014, H.Merijn Brand - - +0.22 - 02 Aug 2014, H.Merijn Brand + * Fixed parsing locally applied patches (passed only first line) + * Fixed parsing compile-time options (passed only first line) + * Some settings run unquoted to end-of-line + * Not all key-value pairs were separated by ',' in older perl + * Small typo in test comment 0.21 - 01 Aug 2014, H.Merijn Brand * Add tests for each major distribution since 5.6.2 diff --git a/MANIFEST b/MANIFEST index 2a02320..532132b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -12,6 +12,7 @@ t/22_plv510.t t/23_plv512.t t/24_plv514.t t/25_plv516.t +t/25_plv5162.t t/26_plv518.t t/26_plv5182.t t/27_plv5200.t diff --git a/V.pm b/V.pm index fbdf6a4..4cbf6fe 100644 --- a/V.pm +++ b/V.pm @@ -250,13 +250,22 @@ sub plv2hash $config{git_commit_id} = $2; } - if (my %kv = ($pv =~ m/\b(\w+)\s*=\s*('[^']+?'|\S+)/g)) { + if (my %kv = ($pv =~ m{\b + (\w+) # key + \s*= # assign + ( '\s*[^']*?\s*' # quoted value + | \S+[^=]*?\s*\n # unquoted running till end of line + | \S+ # unquoted value + | \s*\n # empty + ) + (?:,?\s+|\s*\n)? # separator (5.8.x reports did not have a ',' + }gx)) { # between every kv pair while (my ($k, $v) = each %kv) { $k =~ s/\s+$//; + $v =~ s/\s*\n\z//; $v =~ s/,$//; $v =~ m/^'(.*)'$/ and $v = $1; - $v =~ s/^\s+//; $v =~ s/\s+$//; $config{$k} = $v; } @@ -266,9 +275,9 @@ sub plv2hash $pv =~ m{^\s+Compiled at\s+(.*)}m and $build->{stamp} = $1; - $pv =~ m{^\s+Locally applied patches:(?:\s+|\n)(.*)}m - and $build->{patches} = [ split m/\n+/, $1 ]; - $pv =~ m{^\s+Compile-time options:(?:\s+|\n)(.*)}m + $pv =~ m{^\s+Locally applied patches:(?:\s+|\n)(.*?)(?:[\s\n]+Buil[td] under)}ms + and $build->{patches} = [ split m/\n+\s*/, $1 ]; + $pv =~ m{^\s+Compile-time options:(?:\s+|\n)(.*?)(?:[\s\n]+(?:Locally applied|Buil[td] under))}ms and map { $build->{options}{$_} = 1 } split m/\s+|\n/ => $1; $build->{osname} = $config{osname}; diff --git a/t/20_plv56.t b/t/20_plv56.t index f4cc998..5b37572 100644 --- a/t/20_plv56.t +++ b/t/20_plv56.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 9; + my $tests = 92; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -25,6 +25,17 @@ is ($conf->{build}{stamp}, "Mar 23 2010 17:34:56", "Build time"); is ($conf->{config}{"package"}, "perl5", "reconstructed \%Config{package}"); is ($conf->{config}{version}, "5.6.2", "reconstructed \%Config{version}"); +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + DEBUGGING USE_64_BIT_INT USE_LARGE_FILES + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + __END__ Summary of my perl5 (revision 5.0 version 6 subversion 2) configuration: Platform: diff --git a/t/21_plv58.t b/t/21_plv58.t index 1e6ce62..300cc31 100644 --- a/t/21_plv58.t +++ b/t/21_plv58.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 9; + my $tests = 92; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -25,6 +25,20 @@ is ($conf->{build}{stamp}, "Oct 21 2010 14:50:53", "Build time"); is ($conf->{config}{version}, "5.8.9", "reconstructed \%Config{version}"); is ($conf->{config}{usethreads}, "define", "This was a threaded perl"); +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + DEBUGGING MULTIPLICITY PERL_IMPLICIT_CONTEXT + PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_64_BIT_INT + USE_FAST_STDIO USE_ITHREADS USE_LARGE_FILES + USE_LONG_DOUBLE USE_PERLIO USE_REENTRANT_API + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + __END__ Summary of my perl5 (revision 5 version 8 subversion 9) configuration: Platform: diff --git a/t/22_plv510.t b/t/22_plv510.t index 4b1e267..a61d041 100644 --- a/t/22_plv510.t +++ b/t/22_plv510.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 8; + my $tests = 91; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -24,6 +24,11 @@ is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); is ($conf->{build}{stamp}, 0, "No build time known"); is ($conf->{config}{version}, "5.10.0", "reconstructed \%Config{version}"); +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + __END__ Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: diff --git a/t/23_plv512.t b/t/23_plv512.t index 9f4b146..9a219f1 100644 --- a/t/23_plv512.t +++ b/t/23_plv512.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 10; + my $tests = 93; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -26,6 +26,19 @@ is ($conf->{config}{version}, "5.12.2", "reconstructed \%Config{version}"); is ($conf->{config}{gccversion}, "", "not built with gcc"); is ($conf->{config}{ccversion}, "B3910B", "built with HP C-ANSI-C"); +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL + USE_64_BIT_INT USE_LARGE_FILES USE_LONG_DOUBLE + USE_PERLIO USE_PERL_ATOF + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + __END__ Summary of my perl5 (revision 5 version 12 subversion 2) configuration: diff --git a/t/24_plv514.t b/t/24_plv514.t index 81a8016..ddc7902 100644 --- a/t/24_plv514.t +++ b/t/24_plv514.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 10; + my $tests = 93; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -26,6 +26,20 @@ is ($conf->{config}{version}, "5.14.2", "reconstructed \%Config{version}"); is ($conf->{config}{gccversion}, "", "not built with gcc"); is ($conf->{config}{ccversion}, "11.1.0.8", "xlc version"); +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + DEBUGGING PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP + PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL + USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO + USE_PERL_ATOF + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + __END__ Summary of my perl5 (revision 5 version 14 subversion 2) configuration: diff --git a/t/25_plv516.t b/t/25_plv516.t index 734940a..2e48c98 100644 --- a/t/25_plv516.t +++ b/t/25_plv516.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 9; + my $tests = 92; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -23,7 +23,22 @@ ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); is ($conf->{build}{stamp}, "Mar 12 2013 08:36:17", "Build time"); is ($conf->{config}{version}, "5.16.3", "reconstructed \%Config{version}"); -is ($conf->{config}{ccversion}, "", "Using gcc. nonn-gcc version should not be defined"); +is ($conf->{config}{ccversion}, "", "Using gcc. non-gcc version should not be defined"); + +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV + PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_INT + USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE + USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO + USE_PERL_ATOF + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } __END__ Summary of my perl5 (revision 5 version 16 subversion 3) configuration: diff --git a/t/25_plv5162.t b/t/25_plv5162.t new file mode 100644 index 0000000..5b3694b --- /dev/null +++ b/t/25_plv5162.t @@ -0,0 +1,181 @@ +#!/pro/bin/perl + +use strict; +use warnings; + +BEGIN { + use Test::More; + my $tests = 150; + unless ($ENV{PERL_CORE}) { + require Test::NoWarnings; + Test::NoWarnings->import (); + $tests++; + } + + plan tests => $tests; + } + +use Config::Perl::V; + +ok (my $conf = Config::Perl::V::plv2hash (), "Read perl -v block"); +ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); + +is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); +is ($conf->{build}{stamp}, "Aug 25 2013 01:24:40", "Build time"); +is ($conf->{config}{version}, "5.16.2", "reconstructed \%Config{version}"); +is ($conf->{config}{ccversion}, "", "Using gcc. non-gcc version should not be defined"); + +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + HAS_TIMES MULTIPLICITY PERLIO_LAYERS + PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT + PERL_MALLOC_WRAP PERL_PRESERVE_IVUV 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 + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + +is_deeply ($conf->{build}{patches}, [ + "/Library/Perl/Updates/ comes before system perl directories", + "installprivlib and installarchlib points to the Updates directory", + "CVE-2013-1667 hashtable DOS fix", + ], "Local patches"); + +my %check = ( + + archname => "darwin-thread-multi-2level", + bincompat5005 => "undef", + config_args => "-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc", + d_sfio => "undef", + d_sigaction => "define", + hint => "recommended", + 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", + use64bitall => "define", + use64bitint => "define", + useithreads => "define", + uselargefiles => "define", + uselongdouble => "undef", + usemultiplicity => "define", + usemymalloc => "n", + useperlio => "define", + useposix => "true", + usesocks => "undef", + + alignbytes => 8, + byteorder => "12345678", + cc => "cc", + ccflags => "-arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include", + ccversion => "", + cppflags => "-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include", + d_longdbl => "define", + d_longlong => "define", + doublesize => 8, + gccosandvers => "", + gccversion => "4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)", + intsize => 4, + ivsize => 8, + ivtype => "long", + longdblsize => 16, + longlongsize => 8, + longsize => 8, + lseeksize => 8, + nvsize => 8, + nvtype => "double", + lseektype => "off_t", + optimize => "-Os", + prototype => "define", + ptrsize => 8, + + gnulibc_version => "", + ld => "cc -mmacosx-version-min=10.9", + ldflags => "-arch x86_64 -arch i386 -fstack-protector -L/usr/local/lib", + libc => "", + libperl => "libperl.dylib", + libpth => "/usr/local/lib /usr/lib", + libs => "", + perllibs => "", + so => "dylib", + useshrplib => "true", + + cccdlflags => "", + ccdlflags => "", + d_dlsymun => "undef", + dlext => "bundle", + dlsrc => "dl_dlopen.xs", + lddlflags => "-arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector", + ); +is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check; + + +__END__ +Summary of my perl5 (revision 5 version 16 subversion 2) configuration: + + Platform: + osname=darwin, osvers=13.0, archname=darwin-thread-multi-2level + 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 ' + config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc' + 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 ='-arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include', + optimize='-Os', + cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include' + ccversion='', gccversion='4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)', 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 -mmacosx-version-min=10.9', ldflags ='-arch x86_64 -arch i386 -fstack-protector -L/usr/local/lib' + libpth=/usr/local/lib /usr/lib + libs= + perllibs= + libc=, so=dylib, useshrplib=true, libperl=libperl.dylib + gnulibc_version='' + Dynamic Linking: + dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' + cccdlflags=' ', lddlflags='-arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -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_IMPLICIT_CONTEXT + PERL_MALLOC_WRAP PERL_PRESERVE_IVUV 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 + Locally applied patches: + /Library/Perl/Updates/ comes before system perl directories + installprivlib and installarchlib points to the Updates directory + CVE-2013-1667 hashtable DOS fix + Built under darwin + Compiled at Aug 25 2013 01:24:40 + %ENV: + PERL5LIB="" + PERL5OPT="" + PERL5_CPANPLUS_IS_RUNNING="37393" + PERL5_CPAN_IS_RUNNING="37393" + @INC: + /Library/Perl/5.16/darwin-thread-multi-2level + /Library/Perl/5.16 + /Network/Library/Perl/5.16/darwin-thread-multi-2level + /Network/Library/Perl/5.16 + /Library/Perl/Updates/5.16.2/darwin-thread-multi-2level + /Library/Perl/Updates/5.16.2 + /System/Library/Perl/5.16/darwin-thread-multi-2level + /System/Library/Perl/5.16 + /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level + /System/Library/Perl/Extras/5.16 + . + diff --git a/t/26_plv518.t b/t/26_plv518.t index 330fe34..f9dbc9a 100644 --- a/t/26_plv518.t +++ b/t/26_plv518.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 35; + my $tests = 111; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -24,10 +24,23 @@ is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); is ($conf->{build}{stamp}, "May 18 2013 17:34:20", "Build time"); is ($conf->{config}{version}, "5.18.0", "reconstructed \$Config{version}"); -# Some random checks -is ($conf->{build}{options}{$_}, 0, "Runtime option $_") for qw( - DEBUG_LEAKING_SCALARS NO_HASH_SEED PERL_MEM_LOG_STDERR PERL_MEM_LOG_ENV - PERL_MEM_LOG_TIMESTAMP PERL_MICRO USE_ATTRIBUTES_FOR_PERLIO VMS_DO_SOCKETS ); +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV + PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP + PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_INT + USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE + USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE + USE_PERLIO USE_PERL_ATOF + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + +is_deeply ($conf->{build}{patches}, [], "No local patches"); my %check = ( alignbytes => 4, diff --git a/t/26_plv5182.t b/t/26_plv5182.t index b8ee12c..f093d99 100644 --- a/t/26_plv5182.t +++ b/t/26_plv5182.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 118; + my $tests = 111; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -24,38 +24,23 @@ is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); is ($conf->{build}{stamp}, "Jan 9 2014 09:22:04", "Build time"); is ($conf->{config}{version}, "5.18.2", "reconstructed \$Config{version}"); -# Some random checks -is ($conf->{build}{options}{$_}, 0, "Runtime option $_") for qw( - DEBUG_LEAKING_SCALARS NO_HASH_SEED PERL_MEM_LOG_STDERR PERL_MEM_LOG_ENV - PERL_MEM_LOG_TIMESTAMP PERL_MICRO USE_ATTRIBUTES_FOR_PERLIO VMS_DO_SOCKETS ); -is ($conf->{build}{options}{$_}, 0, "Runtime option $_ unset") for qw( - DEBUGGING DEBUG_LEAKING_SCALARS DEBUG_LEAKING_SCALARS_FORK_DUMP - DECCRTL_SOCKETS FAKE_THREADS FCRYPT HAVE_INTERP_INTERN MULTIPLICITY - MYMALLOC NO_HASH_SEED NO_MATHOMS NO_TAINT_SUPPORT PERL_BOOL_AS_CHAR - PERL_DEBUG_READONLY_COW PERL_DEBUG_READONLY_OPS PERL_DISABLE_PMC - PERL_EXTERNAL_GLOB PERL_GLOBAL_STRUCT PERL_GLOBAL_STRUCT_PRIVATE - PERL_HASH_FUNC_DJB2 PERL_HASH_FUNC_MURMUR3 PERL_HASH_FUNC_ONE_AT_A_TIME - PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_HASH_FUNC_ONE_AT_A_TIME_OLD - PERL_HASH_FUNC_SDBM PERL_HASH_FUNC_SIPHASH PERL_HASH_FUNC_SUPERFAST - PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_IS_MINIPERL PERL_MAD - PERL_MALLOC_WRAP PERL_MEM_LOG PERL_MEM_LOG_ENV PERL_MEM_LOG_ENV_FD - PERL_MEM_LOG_NOIMPL PERL_MEM_LOG_STDERR PERL_MEM_LOG_TIMESTAMP PERL_MICRO - PERL_NEED_APPCTX PERL_NEED_TIMESBASE PERL_NEW_COPY_ON_WRITE - PERL_OLD_COPY_ON_WRITE PERL_PERTURB_KEYS_DETERMINISTIC - PERL_PERTURB_KEYS_DISABLED PERL_PERTURB_KEYS_RANDOM PERL_POISON - PERL_PRESERVE_IVUV PERL_RELOCATABLE_INCPUSH PERL_SAWAMPERSAND - PERL_TRACK_MEMPOOL PERL_USES_PL_PIDSTATUS PERL_USE_DEVEL - PERL_USE_SAFE_PUTENV PL_OP_SLAB_ALLOC THREADS_HAVE_PIDS UNLINK_ALL_VERSIONS - USE_64_BIT_ALL USE_64_BIT_INT USE_ATTRIBUTES_FOR_PERLIO USE_FAST_STDIO - USE_HASH_SEED_EXPLICIT USE_IEEE USE_ITHREADS USE_LARGE_FILES USE_LOCALE - USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME - USE_LONG_DOUBLE USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API USE_SFIO - USE_SITECUSTOMIZE USE_SOCKS VMS_DO_SOCKETS VMS_SHORTEN_LONG_SYMBOLS - VMS_SYMBOL_CASE_AS_IS - ); -is ($conf->{build}{options}{$_}, 1, "Runtime option $_ set") for qw( - HAS_TIMES PERL_DONT_CREATE_GVSV PERLIO_LAYERS - ); +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV + PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP + PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_INT + USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE + USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE + USE_PERLIO USE_PERL_ATOF + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + +is_deeply ($conf->{build}{patches}, [], "No local patches"); my %check = ( alignbytes => 4, diff --git a/t/27_plv5200.t b/t/27_plv5200.t index fac2dc4..2b3fa5d 100644 --- a/t/27_plv5200.t +++ b/t/27_plv5200.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 110; + my $tests = 111; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -24,34 +24,26 @@ is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); is ($conf->{build}{stamp}, "Jun 30 2014 15:37:09", "Build time"); is ($conf->{config}{version}, "5.20.0", "reconstructed \$Config{version}"); -is ($conf->{build}{options}{$_}, 0, "Runtime option $_ unset") for qw( - DEBUGGING DEBUG_LEAKING_SCALARS DEBUG_LEAKING_SCALARS_FORK_DUMP - DECCRTL_SOCKETS FAKE_THREADS FCRYPT HAVE_INTERP_INTERN MYMALLOC NO_HASH_SEED - NO_MATHOMS NO_TAINT_SUPPORT PERL_BOOL_AS_CHAR PERL_DEBUG_READONLY_COW - PERL_DEBUG_READONLY_OPS PERL_DISABLE_PMC PERL_DONT_CREATE_GVSV - PERL_EXTERNAL_GLOB PERL_GLOBAL_STRUCT PERL_GLOBAL_STRUCT_PRIVATE - PERL_HASH_FUNC_DJB2 PERL_HASH_FUNC_MURMUR3 PERL_HASH_FUNC_ONE_AT_A_TIME - PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_HASH_FUNC_ONE_AT_A_TIME_OLD - PERL_HASH_FUNC_SDBM PERL_HASH_FUNC_SIPHASH PERL_HASH_FUNC_SUPERFAST - PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_IS_MINIPERL PERL_MAD - PERL_MALLOC_WRAP PERL_MEM_LOG PERL_MEM_LOG_ENV PERL_MEM_LOG_ENV_FD - PERL_MEM_LOG_NOIMPL PERL_MEM_LOG_STDERR PERL_MEM_LOG_TIMESTAMP PERL_MICRO - PERL_NEED_APPCTX PERL_NEED_TIMESBASE PERL_NEW_COPY_ON_WRITE - PERL_OLD_COPY_ON_WRITE PERL_PERTURB_KEYS_DETERMINISTIC - PERL_PERTURB_KEYS_DISABLED PERL_PERTURB_KEYS_RANDOM PERL_POISON - PERL_PRESERVE_IVUV PERL_RELOCATABLE_INCPUSH PERL_SAWAMPERSAND - PERL_TRACK_MEMPOOL PERL_USES_PL_PIDSTATUS PERL_USE_DEVEL - PERL_USE_SAFE_PUTENV PL_OP_SLAB_ALLOC THREADS_HAVE_PIDS UNLINK_ALL_VERSIONS - USE_64_BIT_ALL USE_64_BIT_INT USE_ATTRIBUTES_FOR_PERLIO USE_FAST_STDIO - USE_HASH_SEED_EXPLICIT USE_IEEE USE_ITHREADS USE_LARGE_FILES USE_LOCALE - USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME - USE_LONG_DOUBLE USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API USE_SFIO - USE_SITECUSTOMIZE USE_SOCKS VMS_DO_SOCKETS VMS_SHORTEN_LONG_SYMBOLS - VMS_SYMBOL_CASE_AS_IS - ); -is ($conf->{build}{options}{$_}, 1, "Runtime option $_ set") for qw( - HAS_TIMES MULTIPLICITY PERLIO_LAYERS - ); +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + 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_INT USE_ITHREADS + USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE + USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE + USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + +is_deeply ($conf->{build}{patches}, [], "No local patches"); my %check = ( alignbytes => 4, -- 2.11.4.GIT