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

commit 15899733e changes SKIP to FAIL on Win32 in op/sprintf.t #15445

Closed
p5pRT opened this issue Jul 15, 2016 · 15 comments
Closed

commit 15899733e changes SKIP to FAIL on Win32 in op/sprintf.t #15445

p5pRT opened this issue Jul 15, 2016 · 15 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 15, 2016

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

Searchable as RT128630$

@p5pRT
Copy link
Author

p5pRT commented Jul 15, 2016

From @bulk88

Created by @bulk88

Blead perl on WinXP 32 bits with VC 2003. Git reverting commit "VAX​:
test changes for VAX floats" causes op/sprintf.t to pass.

------------------------------------------------------
ok 228 - >12345.7<
ok 229 - >+12345.7<
ok 230 - >12345.7<
ok 231 - >0 MISSING<
ok 232 - > 0 MISSING<
ok 233 - >0 MISSING<
ok 234 - >0C MISSING<
not ok 235 - >%.0g< >-0.0< >-0< >0< C99 standard mandates minus sign but
C89 does not
ok 236 - >1e+04< >1e+004< three-digit exponent accepted
ok 237 - >1.e+04< >1.e+004< three-digit exponent accepted
ok 238 - >1.2e+04< >1.2e+004< three-digit exponent accepted
ok 239 - >1.2e+04< >1.2e+004< three-digit exponent accepted
ok 240 - >12345.6789<
ok 241 - > 12345.6789<
ok 242 - >0012345.6789<
------------------------------------------------------
ok 548 - >030​:031​:032< perl \#83194​: vector flag + custom separator +
dynamic precision
ok 549 - >118.101.114.115.105.111.110< perl \#102586​: vector flag +
"version"
ok 550 - > 011/ 022/ 033< four reordered args
Failed 1/550 subtests

Test Summary Report
-------------------
op/sprintf.t (Wstat​: 0 Tests​: 550 Failed​: 1)
  Failed test​: 235
Files=1, Tests=550, 0 wallclock secs ( 0.11 usr + 0.00 sys = 0.11 CPU)
Result​: FAIL
------------------------------------------------------

Perl Info

Flags:
      category=library
      severity=medium
      module=locale

Site configuration information for perl 5.25.3:

Configured by Owner at Wed Jul 13 21:11:05 2016.

Summary of my perl5 (revision 5 version 25 subversion 3) configuration:

    Platform:
      osname=MSWin32
      osvers=5.1
      archname=MSWin32-x86-multi-thread
      uname=''
      config_args='undef'
      hint=recommended
      useposix=true
      d_sigaction=undef
      useithreads=define
      usemultiplicity=define
      use64bitint=undef
      use64bitall=undef
      uselongdouble=undef
      usemymalloc=n
      bincompat5005=undef
    Compiler:
      cc='cl'
      ccflags ='-nologo -GF -W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSOLE
-DNO_STRICT  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO'
      optimize='-Od -MD -Zi -DDEBUGGING'
      cppflags='-DWIN32'
      ccversion='13.10.6030'
      gccversion=''
      gccosandvers=''
      intsize=4
      longsize=4
      ptrsize=4
      doublesize=8
      byteorder=1234
      doublekind=3
      d_longlong=undef
      longlongsize=8
      d_longdbl=define
      longdblsize=8
      longdblkind=0
      ivtype='long'
      ivsize=4
      nvtype='double'
      nvsize=8
      Off_t='__int64'
      lseeksize=8
      alignbytes=8
      prototype=define
    Linker and Libraries:
      ld='link'
      ldflags ='-nologo -nodefaultlib -debug -libpath:"c:\perl\lib\CORE"
-machine:x86'
      libpth=\lib
      libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
      perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
      libc=msvcrt.lib
      so=dll
      useshrplib=true
      libperl=perl525.lib
      gnulibc_version=''
    Dynamic Linking:
      dlsrc=dl_win32.xs
      dlext=dll
      d_dlsymun=undef
      ccdlflags=' '
      cccdlflags=' '
      lddlflags='-dll -nologo -nodefaultlib -debug
-libpath:"c:\perl\lib\CORE" -machine:x86'



@INC for perl 5.25.3:
      lib
      C:/perl521/src/lib
      .


Environment for perl 5.25.3:
      HOME (unset)
      LANG (unset)
      LANGUAGE (unset)
      LD_LIBRARY_PATH (unset)
      LOGDIR (unset)
      PATH=C:\sperl\c\bin;C:\WINDOWS\system32;C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin;C:\Program Files\Microsoft Visual Studio
.NET 2003\Common7\IDE;C:\WINDOWS;C:\Program Files\Git\cmd;C:\Program
Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin;C:\perl\bin
      PERL_BADLANG (unset)
      PERL_JSON_BACKEND=Cpanel::JSON::XS
      PERL_YAML_BACKEND=YAML
      SHELL (unset)




@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2016

From @dcollinsn

This refers to commit 1589973, specifically to this test​:

->%.0g< >-0.0< >-0< >C99 standard mandates minus sign but C89 does not skip​: MSWin32 VMS hpux​:10.20 openbsd netbsd​:1.5 irix darwin freebsd​:4.9 android<
+>%.0g< >-0.0< >-0< >C99 standard mandates minus sign but C89 does not skip​: MSWin32 VMS netbsd​:vax-netbsd hpux​:10.20 openbsd netbsd​:1.5 irix darwin freebsd​:4.9 android<

But really this change​:

- } elsif ($os =~ /\b$^O(?​::(\S+))?\b/i) {
+ } elsif ($os =~ /\b$^O(?​::(\S+))\b/i) {

Which makes the skip-by-os only work with a :version or :archname. The patch which I will attach momentarily restores the check for plain "OS".

There's another issue as well, though. The problem commit tried to add support for skip-by-archname, and now skips certain tests for 'netbsd​:vax-netbsd' - but what about 'netbsd​:vax-netbsd-thread-multi'? I'll attach a second patch that fixes that.

--
Respectfully,
Dan Collins

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2016

From @dcollinsn

0001-RT-128630-t-op-sprintf-Fix-skip-by-os.patch
From ee000efb35d066dfc1b0dba0798f6151d3768733 Mon Sep 17 00:00:00 2001
From: Dan Collins <dcollinsn@gmail.com>
Date: Fri, 15 Jul 2016 20:29:20 -0400
Subject: [PATCH 1/2] [RT #128630] t/op/sprintf: Fix skip by os

15899733e modified the search for skip by OS. Previously it would
accept 'OS:ver' or 'OS', where 'ver' was numeric. That commit
added, for example, 'netbsd:vax-netbsd', but removed support for
plain 'OS'. This restores that.
---
 t/op/sprintf.t | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/op/sprintf.t b/t/op/sprintf.t
index 4aef466..8cd32ea 100644
--- a/t/op/sprintf.t
+++ b/t/op/sprintf.t
@@ -115,6 +115,8 @@ for (@tests) {
 	# >comment skip: all<
 	if ($os =~ /\ball\b/i) {
 	    $skip = 1;
+	} elsif ($os =~ /\b$^O\b/i) {
+	    $skip = 1;
 	} elsif ($os =~ /\b$^O(?::(\S+))\b/i) {
             my $cond = $1;
             if ($cond =~ m{^/(.+)/$}) {
-- 
2.8.1

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2016

From @dcollinsn

0002-t-op-sprintf.t-Further-fix-os-archname-skip.patch
From 3e12e4fe409a784a2b3534d231430d4d8f4efb9c Mon Sep 17 00:00:00 2001
From: Dan Collins <dcollinsn@gmail.com>
Date: Fri, 15 Jul 2016 20:42:10 -0400
Subject: [PATCH 2/2] t/op/sprintf.t: Further fix os:archname skip

The tests in t/op/sprintf.t can be skipped by os, os:ver, or
os:archname. However, if it is desired to skip a test on
netbsd:vax-netbsd, then that should also be skipped on the
other perl-specific "flavors" of that archname, such as
netbsd:vax-netbsd-thread-multi, or -64all, or -ld. This commit
checks if the skip command is the prefix of the archname in
config.sh rather than comparing strict equality.
---
 t/op/sprintf.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/op/sprintf.t b/t/op/sprintf.t
index 8cd32ea..4c77f6b 100644
--- a/t/op/sprintf.t
+++ b/t/op/sprintf.t
@@ -132,7 +132,7 @@ for (@tests) {
                 $skip = $vsn ? ($osv <= $vsn ? 1 : 0) : 1;
             } else {
                 # >comment skip: netbsd:vax-netbsd<
-                $skip = $cond eq $archname;
+                $skip = $archname =~ /^$cond/;
             }
 	}
 	$skip and $comment =~ s/$/, failure expected on $^O $osv $archname/;
-- 
2.8.1

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2016

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

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2016

From @tonycoz

On Fri Jul 15 15​:59​:53 2016, bulk88 wrote​:

Blead perl on WinXP 32 bits with VC 2003. Git reverting commit "VAX​:
test changes for VAX floats" causes op/sprintf.t to pass.

This appears to have been fixed by 6151d43.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2016

From @tonycoz

On Fri Jul 15 17​:49​:18 2016, dcollinsn@​gmail.com wrote​:

There's another issue as well, though. The problem commit tried to add
support for skip-by-archname, and now skips certain tests for
'netbsd​:vax-netbsd' - but what about 'netbsd​:vax-netbsd-thread-multi'?
I'll attach a second patch that fixes that.

Should the comment above that, and before the __END__ also be updated?

Tony

@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2016

From @bulk88

On Sun Jul 17 17​:52​:43 2016, tonyc wrote​:

On Fri Jul 15 15​:59​:53 2016, bulk88 wrote​:

Blead perl on WinXP 32 bits with VC 2003. Git reverting commit "VAX​:
test changes for VAX floats" causes op/sprintf.t to pass.

This appears to have been fixed by 6151d43.

Tony

It wasn't fixed by 6151d43

On, SHA-1​: 9648eab

* Add epigraphs for 5.22.3-RC2 and 5.24.1-RC2

I get


C​:\perl521\src\win32>cd ..\t & perl harness -v op/sprintf.t & cd ..\win32
# Failed test 235 - >%.0g< >-0.0< >-0< >0< C99 standard mandates minus sign but C89 does not at op/sprintf.t line 168
op/sprintf.t ..
1..550
ok 1 - >%6. 6s INVALID REDUNDANT< (See use of $w in code above)
ok 2 - >%6 .6s INVALID REDUNDANT<
ok 3 - >%6.6 s INVALID REDUNDANT<
ok 4 - skip %A tested in sprintf2.t, failure expected on MSWin32 5.1 MSWin32-x86-multi-thread
ok 5 - >11111111111111111111111111111111<
ok 6 - >11111111111111111111111111111111<
ok 7 - >0B11111111111111111111111111111111<
ok 8 - >%C INVALID REDUNDANT<
ok 9 - >2147483647< Synonym for %ld
ok 10 - >1.234568E+05< >1.234568E+005< three-digit exponent accepted
ok 11 - >123456.789000< Synonym for %f
ok 12 - >1.23457E+06< >1.23457E+006< three-digit exponent accepted
ok 13 - >1.23457E+102<
ok 14 - >1.23457E-102<
ok 15 - >12345.7<
ok 16 - >1.23457E+102< exponent too big
ok 17 - >1.23457E-102< exponent too small
ok 18 - >%H INVALID REDUNDANT<
ok 19 - >%I INVALID REDUNDANT<
ok 20 - >%J INVALID REDUNDANT<
ok 21 - >%K INVALID REDUNDANT<
ok 22 - >%L INVALID REDUNDANT<
ok 23 - >%M INVALID REDUNDANT<
ok 24 - >%N INVALID REDUNDANT<
ok 25 - >37777777777< Synonym for %lo
ok 26 - >%P INVALID REDUNDANT<
ok 27 - >%Q INVALID REDUNDANT<
****cut*****
ok 229 - >+12345.7<
ok 230 - >12345.7<
ok 231 - >0 MISSING<
ok 232 - > 0 MISSING<
ok 233 - >0 MISSING<
ok 234 - >0C MISSING<
not ok 235 - >%.0g< >-0.0< >-0< >0< C99 standard mandates minus sign but C89 does not
ok 236 - >1e+04< >1e+004< three-digit exponent accepted
ok 237 - >1.e+04< >1.e+004< three-digit exponent accepted
ok 238 - >1.2e+04< >1.2e+004< three-digit exponent accepted
ok 239 - >1.2e+04< >1.2e+004< three-digit exponent accepted
ok 240 - >12345.6789<
ok 241 - > 12345.6789<
ok 242 - >0012345.6789<
ok 243 - >12345.6789 <
ok 244 - >12345.6789 <
ok 245 - >12345.6789 <
ok 246 - >-12345.7<
ok 247 - >-12345.7<
ok 248 - >1.23457e+06< >1.23457e+006< three-digit exponent accepted
ok 249 - >+1.23457e+06< >+1.23457e+006< three-digit exponent accepted
ok 250 - >1.23457e+06< >1.23457e+006< three-digit exponent accepted
ok 251 - >-1.23457e+06< >-1.23457e+006< three-digit exponent accepted
ok 252 - >-1.23457e+06< >-1.23457e+006< three-digit exponent accepted
ok 253 - >-1.23457e+06< >-1.23457e+006< three-digit exponent accepted
ok 254 - >0.00012345<
ok 255 - >1.2345e-05< >1.2345e-005< three-digit exponent accepted
ok 256 - >1.23457e+102<
ok 257 - >1.23457e-102<
ok 258 - >0<
ok 259 - > 1.23457e+06< > 1.23457e+006< three-digit exponent accepted
ok 260 - > +1.23457e+06< >+1.23457e+006< three-digit exponent accepted
******cut******
ok 544 - >30​:31​:32< perl \#83194​: vector flag + custom separator
ok 545 - >030.031.032< perl \#83194​: vector flag + static precision
ok 546 - >030.031.032< perl \#83194​: vector flag + dynamic precision
ok 547 - >030​:031​:032< perl \#83194​: vector flag + custom separator + static precision
ok 548 - >030​:031​:032< perl \#83194​: vector flag + custom separator + dynamic precision
ok 549 - >118.101.114.115.105.111.110< perl \#102586​: vector flag + "version"
ok 550 - > 011/ 022/ 033< four reordered args
Failed 1/550 subtests

Test Summary Report


op/sprintf.t (Wstat​: 0 Tests​: 550 Failed​: 1)
  Failed test​: 235
Files=1, Tests=550, 1 wallclock secs ( 0.08 usr + 0.00 sys = 0.08 CPU)
Result​: FAIL


--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2016

From @dcollinsn

On Mon Jul 25 16​:50​:22 2016, bulk88 wrote​:

It wasn't fixed by 6151d43

I agree with bulk88. These lines handle the skip logic for plain win32​:

140 # >comment skip​: netbsd​:vax-netbsd<
141 $skip = $cond eq $archname;
142 }

That test has a skip condition "MSWin32", but my windows perls have archnames like "archname=MSWin32-x64-multi-thread". I suggest that any fix regex match `$archname =~ /\b$cond\b/` or `$archname =~ /^$cond/` rather than relying on string equality.

Copying/assigning to Jarkko, as he committed 6151d43

--
Respectfully,
Dan Collins

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2016

From @jhi

On Mon Jul 25 17​:07​:03 2016, dcollinsn@​gmail.com wrote​:

On Mon Jul 25 16​:50​:22 2016, bulk88 wrote​:

It wasn't fixed by 6151d43

I agree with bulk88. These lines handle the skip logic for plain
win32​:

140 # >comment skip​: netbsd​:vax-netbsd<
141 $skip = $cond eq $archname;
142 }

That test has a skip condition "MSWin32", but my windows perls have
archnames like "archname=MSWin32-x64-multi-thread". I suggest that any
fix regex match `$archname =~ /\b$cond\b/` or `$archname =~ /^$cond/`
rather than relying on string equality.

Copying/assigning to Jarkko, as he committed 6151d43

Before tweaking any further I would like to understand how the mswin32 case matched before the 1589973.

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2016

From @dcollinsn

Before, it used $^O instead of $archname. Come to think of it, that is also
probably fine - though I don't know if there are any unusual ways to build
perl on Win32 that might end up with a strange $^O...

W​:\buildbot\windows1\win64-mingww64-4_9_3\build>.\perl -Ilib -MConfig -wle
"print $^O; print $Config{archname}"
MSWin32
MSWin32-x64-multi-thread

On Mon, Jul 25, 2016 at 8​:54 PM, Jarkko Hietaniemi via RT <
perlbug-followup@​perl.org> wrote​:

On Mon Jul 25 17​:07​:03 2016, dcollinsn@​gmail.com wrote​:

On Mon Jul 25 16​:50​:22 2016, bulk88 wrote​:

It wasn't fixed by 6151d43

I agree with bulk88. These lines handle the skip logic for plain
win32​:

140 # >comment skip​: netbsd​:vax-netbsd<
141 $skip = $cond eq $archname;
142 }

That test has a skip condition "MSWin32", but my windows perls have
archnames like "archname=MSWin32-x64-multi-thread". I suggest that any
fix regex match `$archname =~ /\b$cond\b/` or `$archname =~ /^$cond/`
rather than relying on string equality.

Copying/assigning to Jarkko, as he committed 6151d43

Before tweaking any further I would like to understand how the mswin32
case matched before the 1589973.

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=128630

@p5pRT
Copy link
Author

p5pRT commented Jul 29, 2016

From @cpansprout

Does dbdc20d fix this?

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 2016

From @bulk88

On Fri Jul 29 00​:27​:33 2016, sprout wrote​:

Does dbdc20d fix this?

Probably that commit fixed it. Blead at Revision​: c7202de
Author​: Karl Williamson <khw@​cpan.org>
Date​: 7/31/2016 5​:34​:47 AM
Message​: locale.c​: Add some DEBUG statements

passes in sprintf.t for me now so I think this ticket can be closed.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 2016

From @khwilliamson

Closed by OP request
--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 2016

@khwilliamson - 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