[libmojolicious-plugin-cgi-perl] 02/02: trying to catch the 'no leaky pipes' test fail

Alex Muntada alexm-guest at moszumanska.debian.org
Wed Apr 16 10:25:00 UTC 2014


This is an automated email from the git hooks/post-receive script.

alexm-guest pushed a commit to branch master
in repository libmojolicious-plugin-cgi-perl.

commit e2d62bc22a678eee7974966405e3e8bd9e69df5b
Author: Alex Muntada <alexm at alexm.org>
Date:   Wed Apr 16 12:23:49 2014 +0200

    trying to catch the 'no leaky pipes' test fail
---
 debian/changelog                    |  1 +
 debian/patches/no-leaky-pipes.patch | 32 ++++++++++++++++++++++++++++++++
 debian/patches/series               |  1 +
 3 files changed, 34 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b8390a8..0b1590e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 libmojolicious-plugin-cgi-perl (0.07-1) UNRELEASED; urgency=low
 
   * Initial Release. (Closes: #742195)
+  * Trying a patch for 'no leaky pipes' test.
 
  -- Alex Muntada <alexm at alexm.org>  Tue, 15 Apr 2014 19:10:09 +0200
diff --git a/debian/patches/no-leaky-pipes.patch b/debian/patches/no-leaky-pipes.patch
new file mode 100644
index 0000000..949fd22
--- /dev/null
+++ b/debian/patches/no-leaky-pipes.patch
@@ -0,0 +1,32 @@
+Index: libmojolicious-plugin-cgi-perl/t/post.t
+===================================================================
+--- libmojolicious-plugin-cgi-perl.orig/t/post.t	2014-04-16 12:00:54.994101100 +0200
++++ libmojolicious-plugin-cgi-perl/t/post.t	2014-04-16 12:05:48.790115439 +0200
+@@ -22,19 +22,23 @@
+ 
+ if($pid) {
+   ok !(kill 0, $pid), 'child is taken care of';
++  diag "waiting for $pid";
++  waitpid $pid, 0;
+ }
+ else {
+   ok $pid, 'could not get pid';
++  diag 'no need to wait';
+ }
+ 
+ # FIXME? possibly not the best way to test if there is a pipe leak
+ if (-d "/proc/$$/fd") {
+-  my $pipes = grep { defined $_ ? /pipe:/ : undef }
+-    map { readlink("/proc/$$/fd/".(split '/')[-1]) }
++  my @pipes = grep { $_->[1] =~ /pipe:/ }
++    map { [ $_, readlink $_ ] }
+       glob "/proc/$$/fd/*";
+ 
+-  note "pipes:$pipes";
+-  ok( !($pipes % 2),'no leaky pipes');
++  use Data::Dumper();
++  diag "pipes: " . Data::Dumper::Dumper(\@pipes);
++  ok( !(@pipes % 2),'no leaky pipes');
+ }
+ 
+ done_testing;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5a1d0c6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+no-leaky-pipes.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmojolicious-plugin-cgi-perl.git



More information about the Pkg-perl-cvs-commits mailing list