Fixed new massive IP test thing to work with ruby1.8 and also non-root users

This commit is contained in:
Patrick J Cherry
2015-04-01 23:05:41 +01:00
parent aa45b7fa3e
commit 51b8bbcd8a

View File

@@ -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 }