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
[Win32] op/pack.t test failures on extended precision long double builds of 32-bit perl-5.27.5 #16205
Comments
From @sisyphusEver since it has been possible to build 32-bit perl on Windows with an Patch to t/op/pack.t is attached. Note: This patch fixes t/op/pack.t for 32-bit builds only. With 64-bit Cheers, |
From @sisyphuspack.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");
}
|
From @jkeenanOn Sat, 21 Oct 2017 13:36:12 GMT, sisyphus wrote:
There are nearly 15,000 unit tests in t/op/pack.t, most of them lacking descriptions. I took the liberty of adding descriptions to the tests in the relevant block simply so I and other readers would not get lost in the output. However, before I apply it, I want to ask the list: Is there any reason to believe that applying this patch would have a negative impact on tests on any other platform (including other configurations of Windows)? Thank you very much. -- |
From @jkeenan132338-0001-32-bit-perl-on-Windows-with-nytype-of-extended-preci.patchFrom a970be27cf6308e63f2821f5339317feaeec9615 Mon Sep 17 00:00:00 2001
From: Sisyphus <sisyphus1@optusnet.com.au>
Date: Mon, 23 Oct 2017 16:55:27 -0400
Subject: [PATCH] 32-bit perl on Windows with nytype of (extended precision)
long double.
Enable tests to pass on that platform for:
struct {char c1; double d; char cc[2];}
Committer: add descriptions to tests in relevant block.
For: RT #132338
---
t/op/pack.t | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/t/op/pack.t b/t/op/pack.t
index 919e4c5..5dde642 100644
--- a/t/op/pack.t
+++ b/t/op/pack.t
@@ -1410,12 +1410,13 @@ is(scalar unpack('A /A /A Z20', '3004bcde'), 'bcde');
my $t = 'C x![d] d C[2]';
my @a = (173, 1.283476517e-45, 42, 215);
my $p = pack $t, @a;
- ok( length $p);
+ ok( length $p, "Packed string has nonzero length");
my @b = unpack "$t X[$t] $t", $p; # Extract, step back, extract again
- is(scalar @b, 2 * scalar @a);
+ is(scalar @b, 2 * scalar @a,
+ "Array unpacked per template has twice number of elements as original array");
$b = "@b";
- $b =~ s/(?:17000+|16999+)\d+(e-45) /17$1 /gi; # stringification is gamble
- is($b, "@a @a");
+ $b =~ s/(?:17000+|16999+)\d+(e-0?45) /17$1 /gi; # stringification is gamble
+ is($b, "@a @a", "Got expected stringification of unpacked array");
use warnings qw(NONFATAL all);;
my $warning;
@@ -1424,11 +1425,12 @@ is(scalar unpack('A /A /A Z20', '3004bcde'), 'bcde');
};
@b = unpack "x[C] x[$t] X[$t] X[C] $t", "$p\0";
- is($warning, undef);
- is(scalar @b, scalar @a);
+ is($warning, undef, "Got no warning from unpack, as expected");
+ is(scalar @b, scalar @a,
+ "Array unpacked per second template has same number of elements as original array");
$b = "@b";
- $b =~ s/(?:17000+|16999+)\d+(e-45) /17$1 /gi; # stringification is gamble
- is($b, "@a");
+ $b =~ s/(?:17000+|16999+)\d+(e-0?45) /17$1 /gi; # stringification is gamble
+ is($b, "@a", "Got expected stringification of unpacked array");
}
is(length(pack("j", 0)), $Config{ivsize});
--
2.7.4
|
The RT System itself - Status changed from 'new' to 'open' |
From @sisyphus-----Original Message-----
=========
|
From @tonycozOn Sat, 21 Oct 2017 06:36:12 -0700, sisyphus wrote:
This appears to have been fixed by 0e45f48 using your patch.
Is that still a problem for you? Tony |
From @sisyphusThis ticket can be closed. I can't recall how the particular issue with the 64-bit build was resolved, Cheers, On Tue, Jan 8, 2019 at 10:21 AM Tony Cook via RT <perlbug-followup@perl.org>
|
@tonycoz - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.30.0, this and 160 other issues have been Perl 5.30.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#132338 (status was 'resolved')
Searchable as RT132338$
The text was updated successfully, but these errors were encountered: