[libdevel-size-perl] 01/05: Add 3 patches to make tests pass under Perl 5.20.
gregor herrmann
gregoa at debian.org
Fri Jul 18 13:41:41 UTC 2014
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libdevel-size-perl.
commit e4196a5dc933a73b95c58d964c7e29532b0fc4ac
Author: gregor herrmann <gregoa at debian.org>
Date: Fri Jul 18 15:35:35 2014 +0200
Add 3 patches to make tests pass under Perl 5.20.
Two taken from CPAN RT, the third added after investigation from Niko Tyni.
Closes: #750235
---
debian/patches/perl5.20-magic_read_shrink.patch | 28 +++++++++++++++++++++++
debian/patches/perl5.20-ook.patch | 30 +++++++++++++++++++++++++
debian/patches/perl5.20-sv_magical.patch | 18 +++++++++++++++
debian/patches/series | 3 +++
4 files changed, 79 insertions(+)
diff --git a/debian/patches/perl5.20-magic_read_shrink.patch b/debian/patches/perl5.20-magic_read_shrink.patch
new file mode 100644
index 0000000..87d4df6
--- /dev/null
+++ b/debian/patches/perl5.20-magic_read_shrink.patch
@@ -0,0 +1,28 @@
+Description: One of Devel-Size's tests, for a tied scalar visibly growing
+ when the underlying tie object grows, is failing on Perl 5.19.3 because an
+ earlier read of the scalar clears its PV buffer, causing the scalar to
+ shrink. Attached patch makes the test allow for such shrinkage.
+Origin: https://rt.cpan.org/Public/Bug/Display.html?id=88182
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=88182
+Bug-Debian: http://bugs.debian.org/750235
+Author: zefram [...] fysh.org
+Last-Update: 2014-07-18
+
+--- a/t/magic.t 2012-02-10 19:54:28.000000000 +0000
++++ b/t/magic.t 2013-08-27 15:15:25.000000000 +0000
+@@ -46,13 +46,14 @@
+ my $after_size = total_size($string);
+ cmp_ok($after_size, '>', $before_size, 'size increases due to magic');
+ is($string, undef, 'No value yet');
++ my $small_size = total_size($string);
+ # This is defineately cheating, in that we're poking inside the
+ # implementation of Tie::StdScalar, but if we just write to $string, the way
+ # magic works, the (nice long) value is first written to the regular scalar,
+ # then picked up by the magic. So it grows, which defeats the purpose of the
+ # test.
+ ${tied $string} = 'X' x 1024;
+- cmp_ok(total_size($string), '>', $after_size + 1024,
++ cmp_ok(total_size($string), '>', $small_size + 1024,
+ 'the magic object is counted');
+ }
+
diff --git a/debian/patches/perl5.20-ook.patch b/debian/patches/perl5.20-ook.patch
new file mode 100644
index 0000000..deedfb7
--- /dev/null
+++ b/debian/patches/perl5.20-ook.patch
@@ -0,0 +1,30 @@
+Description: mark a test as TODO
+ ntyni: "I've filed [perl #122322] about OOK (Offset OK) not triggering
+ anymore in such cases; it changed with the enabling of COW (Copy on Write)
+ for 5.19.1.
+ .
+ The problem isn't about Devel-Size counting the size of an SV wrong when
+ OOK is used, but rather the fact that OOK doesn't get used anymore.
+ .
+ (See the 'Offsets' section in perlguts for information about OOK.)"
+Origin: vendor
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=95493
+Bug-Debian: http://bugs.debian.org/750235
+Forwarded: no, this is a temporary workaround
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-07-18
+
+--- a/t/basic.t
++++ b/t/basic.t
+@@ -119,8 +119,11 @@
+ my $before_length = length $uurk;
+ cmp_ok($before_size, '>', $before_length, 'Size before is sane');
+ $uurk =~ s/Perl //;
++TODO: {
++ local $TODO = '[perl #122322]: OOK (Offset OK) not triggering anymore';
+ is(total_size($uurk), $before_size,
+ "Size doesn't change because OOK is used");
++ }
+ cmp_ok(length $uurk, '<', $before_size, 'but string is shorter');
+ }
+
diff --git a/debian/patches/perl5.20-sv_magical.patch b/debian/patches/perl5.20-sv_magical.patch
new file mode 100644
index 0000000..4ab2203
--- /dev/null
+++ b/debian/patches/perl5.20-sv_magical.patch
@@ -0,0 +1,18 @@
+Description: *** FIXME ***
+Origin: https://rt.cpan.org/Public/Bug/Display.html?id=88180
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=88180
+Bug-Debian: http://bugs.debian.org/750235
+Author: zefram [...] fysh.org
+Last-Update: 2014-07-18
+
+--- a/Size.xs 2013-05-10 12:35:23.000000000 +0000
++++ b/Size.xs 2013-08-27 14:52:53.000000000 +0000
+@@ -707,7 +707,7 @@
+ }
+ st->total_size += sizeof(SV) + body_sizes[type];
+
+- if (type >= SVt_PVMG) {
++ if (SvMAGICAL(thing)) {
+ magic_size(aTHX_ thing, st);
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..17b12c8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+perl5.20-magic_read_shrink.patch
+perl5.20-sv_magical.patch
+perl5.20-ook.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdevel-size-perl.git
More information about the Pkg-perl-cvs-commits
mailing list