Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libnanomsg-raw-perl
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Perl Group
modules
packages
libnanomsg-raw-perl
Commits
953c2163
Commit
953c2163
authored
9 years ago
by
gregor herrmann
Browse files
Options
Downloads
Patches
Plain Diff
Add patch from upstream Git repo to fix tests
with newer libnanomsg. Closes: #823310
parent
ebe4cc76
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/0001-Fix-test-cases-with-libnanomsg-0.8beta.patch
+100
-0
100 additions, 0 deletions
...patches/0001-Fix-test-cases-with-libnanomsg-0.8beta.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
101 additions
and
0 deletions
debian/patches/0001-Fix-test-cases-with-libnanomsg-0.8beta.patch
0 → 100644
+
100
−
0
View file @
953c2163
From 42e2d40aa6f0ed363e2788607d893597ba3c6204 Mon Sep 17 00:00:00 2001
From: Boris Zentner <bzm@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
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
953c2163
fix_spelling_error_in_manpage.patch
0001-Fix-test-cases-with-libnanomsg-0.8beta.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment