Fixed new massive IP test thing to work with ruby1.8 and also non-root users
This commit is contained in:
@@ -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 }
|
||||
|
||||
|
Reference in New Issue
Block a user