From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCH] test/rinda/test_rinda: skip multicast tests for unsupported systems
Date: Wed, 11 Jan 2017 23:45:01 +0000 [thread overview]
Message-ID: <20170111234501.15853-1-e@80x24.org> (raw)
This allows "test-all" to pass on systems without multicast
support. I leave CONFIG_IP_MULTICAST unset in my Linux kernel
.config, nowadays.
---
test/rinda/test_rinda.rb | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index aae1a1d7a4..feff342349 100644
--- a/test/rinda/test_rinda.rb
+++ b/test/rinda/test_rinda.rb
@@ -643,7 +643,11 @@ def test_make_socket_unicast
end
def test_make_socket_ipv4_multicast
- v4mc = @rs.make_socket('239.0.0.1')
+ begin
+ v4mc = @rs.make_socket('239.0.0.1')
+ rescue Errno::ENOBUFS => e
+ skip "Missing multicast support in OS: #{e.message}"
+ end
begin
if Socket.const_defined?(:SO_REUSEPORT) then
@@ -670,6 +674,8 @@ def test_make_socket_ipv6_multicast
v6mc = @rs.make_socket('ff02::1')
rescue Errno::EADDRNOTAVAIL
return # IPv6 address for multicast not available
+ rescue Errno::ENOBUFS => e
+ skip "Missing multicast support in OS: #{e.message}"
end
if Socket.const_defined?(:SO_REUSEPORT) then
@@ -684,7 +690,12 @@ def test_make_socket_ipv6_multicast
def test_ring_server_ipv4_multicast
@rs.shutdown
- @rs = Rinda::RingServer.new(@ts, [['239.0.0.1', '0.0.0.0']], @port)
+ begin
+ @rs = Rinda::RingServer.new(@ts, [['239.0.0.1', '0.0.0.0']], @port)
+ rescue Errno::ENOBUFS => e
+ skip "Missing multicast support in OS: #{e.message}"
+ end
+
v4mc = @rs.instance_variable_get('@sockets').first
begin
--
EW
reply other threads:[~2017-01-11 23:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170111234501.15853-1-e@80x24.org \
--to=e@80x24.org \
--cc=spew@80x24.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).