Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t/op/pack.t fails two tests in GCC "long doubles" builds on Windows #16265

Closed
p5pRT opened this issue Nov 21, 2017 · 6 comments
Closed

t/op/pack.t fails two tests in GCC "long doubles" builds on Windows #16265

p5pRT opened this issue Nov 21, 2017 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 21, 2017

Migrated from rt.perl.org#132479 (status was 'resolved')

Searchable as RT132479$

@p5pRT
Copy link
Author

p5pRT commented Nov 21, 2017

From @steve-m-hay

Created by @steve-m-hay

As noted in https://rt-archive.perl.org/perl5/Ticket/Display.html?id=123113#txn-1317316
there are two test failures when doing a GCC "long doubles" build on Windows​:

C​:\Dev\Git\perl\t>.\perl harness op\pack.t
op/pack.t .. 1/14713 # Failed test 13177 - at op/pack.t line 1418
# got "173 1.28347651700000004e-045 42 215 173
1.28347651700000004e-045 42215"
# expected "173 1.283476517e-045 42 215 173 1.283476517e-045 42 215"
# Failed test 13180 - at op/pack.t line 1431
# got "173 1.28347651700000004e-045 42 215"
# expected "173 1.283476517e-045 42 215"
op/pack.t .. Failed 2/14713 subtests
  (less 270 skipped subtests​: 14441 okay)

These failures are being recorded here in a separate ticket so that the earlier
one can now be closed. (The other outstanding work from it -- adding ICC support
for "long doubles" -- is also now logged in a separate ticket​: #132478.)

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.27.7:

Configured by shay at Tue Nov 21 13:25:42 2017.

Summary of my perl5 (revision 5 version 27 subversion 7) configuration:

  Platform:
    osname=MSWin32
    osvers=6.3.9600
    archname=MSWin32-x86-multi-thread-ld
    uname=''
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=undef
    use64bitall=undef
    uselongdouble=define
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags =' -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -D__USE_MINGW_ANSI_STDIO
-fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-s -O2'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='7.1.0'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=4
    doublesize=8
    byteorder=1234
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=12
    longdblkind=3
    ivtype='long'
    ivsize=4
    nvtype='long double'
    nvsize=12
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-s -L"c:\perl\lib\CORE"
-L"C:\Dev\Software\MinGW-w64\x86\7.1.0\lib"'
    libpth=C:\Dev\Software\MinGW-w64\x86\7.1.0\lib
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
-lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=
    so=dll
    useshrplib=true
    libperl=libperl527.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-mdll -s -L"c:\perl\lib\CORE"
-L"C:\Dev\Software\MinGW-w64\x86\7.1.0\lib"'



@INC for perl 5.27.7:
    C:/perl/site/lib
    C:/perl/lib


Environment for perl 5.27.7:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Dev\Software\MinGW-w64\x86\7.1.0\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\perl\bin
    PERL_BADLANG (unset)
    SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Nov 21, 2017

From @sisyphus

As noted in https://rt-archive.perl.org/perl5/Ticket/Display.html?id=123113#txn-1317316
there are two test failures when doing a GCC "long doubles" build on
Windows​:

Just attaching the simple patch to pack.t that fixes the bug.

Steve, could you apply it please ?

(Then *both* tickets can be closed ;-)

Cheers,
Rob

@p5pRT
Copy link
Author

p5pRT commented Nov 21, 2017

From @sisyphus

pack.t.patch
--- pack.t_orig	2017-10-21 23:32:24 +1100
+++ pack.t	2017-10-21 23:34:37 +1100
@@ -1414,7 +1414,7 @@
   my @b = unpack "$t X[$t] $t", $p;	# Extract, step back, extract again
   is(scalar @b, 2 * scalar @a);
   $b = "@b";
-  $b =~ s/(?:17000+|16999+)\d+(e-45) /17$1 /gi; # stringification is gamble
+  $b =~ s/(?:17000+|16999+)\d+(e-0?45) /17$1 /gi; # stringification is gamble
   is($b, "@a @a");
 
   use warnings qw(NONFATAL all);;
@@ -1427,7 +1427,7 @@
   is($warning, undef);
   is(scalar @b, scalar @a);
   $b = "@b";
-  $b =~ s/(?:17000+|16999+)\d+(e-45) /17$1 /gi; # stringification is gamble
+  $b =~ s/(?:17000+|16999+)\d+(e-0?45) /17$1 /gi; # stringification is gamble
   is($b, "@a");
 }

@p5pRT
Copy link
Author

p5pRT commented Nov 21, 2017

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 22, 2017

From @steve-m-hay

On Tue, 21 Nov 2017 13​:49​:10 -0800, sisyphus wrote​:

As noted in https://rt-archive.perl.org/perl5/Ticket/Display.html?id=123113#txn-1317316
there are two test failures when doing a GCC "long doubles" build on
Windows​:

Just attaching the simple patch to pack.t that fixes the bug.

Steve, could you apply it please ?

Great! Thanks for the quick fix! Applied in commit 0e45f48.

@p5pRT
Copy link
Author

p5pRT commented Nov 22, 2017

@steve-m-hay - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant