[libnanomsg-raw-perl] 01/04: Add patch from upstream Git repo to fix tests
gregor herrmann
gregoa at debian.org
Tue May 3 20:28:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libnanomsg-raw-perl.
commit 953c2163bfaefed07c71e1308d9319848cd6780f
Author: gregor herrmann <gregoa at debian.org>
Date: Tue May 3 22:22:16 2016 +0200
Add patch from upstream Git repo to fix tests
with newer libnanomsg.
Closes: #823310
---
...01-Fix-test-cases-with-libnanomsg-0.8beta.patch | 100 +++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 101 insertions(+)
diff --git a/debian/patches/0001-Fix-test-cases-with-libnanomsg-0.8beta.patch b/debian/patches/0001-Fix-test-cases-with-libnanomsg-0.8beta.patch
new file mode 100644
index 0000000..f0c2e61
--- /dev/null
+++ b/debian/patches/0001-Fix-test-cases-with-libnanomsg-0.8beta.patch
@@ -0,0 +1,100 @@
+From 42e2d40aa6f0ed363e2788607d893597ba3c6204 Mon Sep 17 00:00:00 2001
+From: Boris Zentner <bzm at 2bz.de>
+Date: Fri, 18 Dec 2015 20:48:07 +0100
+Subject: [PATCH] Fix test cases with libnanomsg-0.8beta
+
+libnanomsg-0.8's error message is more specific and return ETIMEDOUT instead of
+EAGAIN
+---
+ t/inproc.t | 4 ++--
+ t/separation.t | 8 ++++----
+ t/timeo.t | 4 ++--
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/t/inproc.t b/t/inproc.t
+index 008a1c4..cd79c25 100644
+--- a/t/inproc.t
++++ b/t/inproc.t
+@@ -52,7 +52,7 @@ my $socket_address = 'inproc://test';
+ while (1) {
+ my $ret = nn_send $sc, '0123456789', 0;
+ if (!defined $ret) {
+- ok nn_errno == EAGAIN;
++ ok ( nn_errno == EAGAIN or nn_errno == ETIMEDOUT );
+ last;
+ }
+ is $ret, 10;
+@@ -63,7 +63,7 @@ my $socket_address = 'inproc://test';
+ is nn_recv($sb, my $buf, 256, 0), 10;
+ is nn_send($sc, '0123456789', 0), 10;
+ ok !defined nn_send($sc, '0123456789', 0);
+- ok nn_errno == EAGAIN;
++ ok ( nn_errno == EAGAIN or nn_errno == ETIMEDOUT );
+
+ is nn_recv($sb, $buf, 256, 0), 10 for 1 .. 20;
+
+diff --git a/t/separation.t b/t/separation.t
+index 84a9b7d..d0e34bd 100644
+--- a/t/separation.t
++++ b/t/separation.t
+@@ -21,7 +21,7 @@ my $socket_address_tcp = 'tcp://127.0.0.1:' . empty_port;
+ ok nn_setsockopt($pair, NN_SOL_SOCKET, NN_SNDTIMEO, 100);
+
+ is nn_send($pair, 'ABC', 0), undef;
+- ok nn_errno == EAGAIN;
++ ok ( nn_errno == EAGAIN or nn_errno == ETIMEDOUT );
+
+ ok nn_close $_ for $pull, $pair;
+ }
+@@ -38,7 +38,7 @@ my $socket_address_tcp = 'tcp://127.0.0.1:' . empty_port;
+ ok nn_setsockopt($pair, NN_SOL_SOCKET, NN_SNDTIMEO, 100);
+
+ is nn_send($pair, 'ABC', 0), undef;
+- ok nn_errno == EAGAIN;
++ ok ( nn_errno == EAGAIN or nn_errno == ETIMEDOUT );
+
+ ok nn_close $_ for $pull, $pair;
+ }
+@@ -55,7 +55,7 @@ my $socket_address_tcp = 'tcp://127.0.0.1:' . empty_port;
+ ok nn_setsockopt($pair, NN_SOL_SOCKET, NN_SNDTIMEO, 100);
+
+ is nn_send($pair, 'ABC', 0), undef;
+- ok nn_errno == EAGAIN;
++ ok ( nn_errno == EAGAIN or nn_errno == ETIMEDOUT );
+
+ ok nn_close $_ for $pull, $pair;
+ }
+@@ -72,7 +72,7 @@ my $socket_address_tcp = 'tcp://127.0.0.1:' . empty_port;
+ ok nn_setsockopt($pair, NN_SOL_SOCKET, NN_SNDTIMEO, 100);
+
+ is nn_send($pair, 'ABC', 0), undef;
+- ok nn_errno == EAGAIN;
++ ok ( nn_errno == EAGAIN or nn_errno == ETIMEDOUT );
+
+ ok nn_close $_ for $pull, $pair;
+ }
+diff --git a/t/timeo.t b/t/timeo.t
+index eafd257..0fe311f 100644
+--- a/t/timeo.t
++++ b/t/timeo.t
+@@ -25,7 +25,7 @@ my ($elapsed, $ret) = timeit {
+ };
+
+ ok !defined $ret;
+-ok nn_errno == EAGAIN;
++ok ( nn_errno == EAGAIN or nn_errno == ETIMEDOUT );
+ cmp_ok $elapsed, '>=', 0.1;
+ cmp_ok $elapsed, '<=', 0.12;
+
+@@ -36,7 +36,7 @@ ok nn_setsockopt($s, NN_SOL_SOCKET, NN_SNDTIMEO, $timeo);
+ };
+
+ ok !defined $ret;
+-ok nn_errno == EAGAIN;
++ok ( nn_errno == EAGAIN or nn_errno == ETIMEDOUT );
+ cmp_ok $elapsed, '>=', 0.1;
+ cmp_ok $elapsed, '<=', 0.12;
+
+--
+2.8.1
+
diff --git a/debian/patches/series b/debian/patches/series
index b05c295..fb65003 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
fix_spelling_error_in_manpage.patch
+0001-Fix-test-cases-with-libnanomsg-0.8beta.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnanomsg-raw-perl.git
More information about the Pkg-perl-cvs-commits
mailing list