Compare commits
7 Commits
0.17-1+whe
...
debian/whe
Author | SHA1 | Date | |
---|---|---|---|
![]() |
83884e9449 | ||
![]() |
06d78d4168 | ||
![]() |
4a248b5a76 | ||
![]() |
2ceb0fbf6d | ||
![]() |
654f6df6cb | ||
![]() |
51b8bbcd8a | ||
![]() |
5c2b81524f |
@@ -42,8 +42,12 @@ 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
|
||||
link = @ip.link.list.find{|x| x.ifname == @ifname}
|
||||
return if link.nil?
|
||||
|
||||
ips = (10..13).map {|y| (1..254).map {|z| "10.100.#{y}.#{z}" } }.flatten.compact
|
||||
|
||||
threads = ips.map {|ip|
|
||||
Thread.new {
|
||||
@@ -55,7 +59,8 @@ 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