From 51b8bbcd8a6b92c138e4b42c6649e73630929ad9 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 1 Apr 2015 23:05:41 +0100 Subject: [PATCH] Fixed new massive IP test thing to work with ruby1.8 and also non-root users --- test/t_route.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/t_route.rb b/test/t_route.rb index acab915..cc48948 100644 --- a/test/t_route.rb +++ b/test/t_route.rb @@ -42,6 +42,7 @@ class TestAddr < Test::Unit::TestCase test "massively parallel IP address addition" do @ifname = create_test_interface + return if @ifname.nil? ips = (10..20).map {|y| (1..254).map {|z| "10.100.#{y}.#{z}" } }.flatten.compact @@ -55,7 +56,7 @@ class TestAddr < Test::Unit::TestCase } } - threads.map(&:join) + threads.map{|t| t.join } created = @ip.addr.list(:index => @ifname, :family => Socket::AF_INET). map {|ifaddr| ifaddr.address.to_s }