Blob Blame History Raw
diff --git a/stdlib/Sockets/test/runtests.jl b/stdlib/Sockets/test/runtests.jl
index ef5b5f4e46..c304d451d6 100644
--- a/stdlib/Sockets/test/runtests.jl
+++ b/stdlib/Sockets/test/runtests.jl
@@ -194,47 +194,6 @@ end
     close(serv)
 end
 
-
-@testset "getnameinfo on some unroutable IP addresses (RFC 5737)" begin
-    @test getnameinfo(ip"192.0.2.1") == "192.0.2.1"
-    @test getnameinfo(ip"198.51.100.1") == "198.51.100.1"
-    @test getnameinfo(ip"203.0.113.1") == "203.0.113.1"
-    @test getnameinfo(ip"0.1.1.1") == "0.1.1.1"
-    @test getnameinfo(ip"::ffff:0.1.1.1") == "::ffff:0.1.1.1"
-    @test getnameinfo(ip"::ffff:192.0.2.1") == "::ffff:192.0.2.1"
-    @test getnameinfo(ip"2001:db8::1") == "2001:db8::1"
-end
-
-@testset "getnameinfo on some valid IP addresses" begin
-    @test !isempty(getnameinfo(ip"::")::String)
-    @test !isempty(getnameinfo(ip"0.0.0.0")::String)
-    @test !isempty(getnameinfo(ip"10.1.0.0")::String)
-    @test !isempty(getnameinfo(ip"10.1.0.255")::String)
-    @test !isempty(getnameinfo(ip"10.1.255.1")::String)
-    @test !isempty(getnameinfo(ip"255.255.255.255")::String)
-    @test !isempty(getnameinfo(ip"255.255.255.0")::String)
-    @test !isempty(getnameinfo(ip"192.168.0.1")::String)
-    @test !isempty(getnameinfo(ip"::1")::String)
-end
-
-@testset "getaddrinfo" begin
-    let localhost = getnameinfo(ip"127.0.0.1")::String
-        @test !isempty(localhost) && localhost != "127.0.0.1"
-        @test !isempty(getalladdrinfo(localhost)::Vector{IPAddr})
-        @test getaddrinfo(localhost, IPv4)::IPv4 != ip"0.0.0.0"
-        @test try
-            getaddrinfo(localhost, IPv6)::IPv6 != ip"::"
-        catch ex
-            isa(ex, Sockets.DNSError) && ex.code == Base.UV_EAI_NONAME && ex.host == localhost
-        end
-    end
-    @test_throws Sockets.DNSError getaddrinfo(".invalid")
-    @test_throws ArgumentError getaddrinfo("localhost\0") # issue #10994
-    @test_throws Base._UVError("connect", Base.UV_ECONNREFUSED) connect(ip"127.0.0.1", 21452)
-    e = (try; getaddrinfo(".invalid"); catch ex; ex; end)
-    @test startswith(sprint(show, e), "DNSError:")
-end
-
 @testset "invalid port" begin
     @test_throws ArgumentError connect(ip"127.0.0.1", -1)
     @test_throws ArgumentError connect(ip"127.0.0.1", typemax(UInt16)+1)
@@ -389,81 +348,6 @@ end
     end
 end
 
-@testset "Local-machine broadcast" begin
-    let a, b, c
-        # Apple does not support broadcasting on 127.255.255.255
-        bcastdst = Sys.isapple() ? ip"255.255.255.255" : ip"127.255.255.255"
-
-        function create_socket(addr::IPAddr, port)
-            s = UDPSocket()
-            bind(s, addr, port, reuseaddr = true, enable_broadcast = true)
-            return s
-        end
-
-        # Wait for futures to finish with a given timeout
-        function wait_with_timeout(recvs, TIMEOUT_VAL = 3*1e9)
-            t0 = time_ns()
-            recvs_check = copy(recvs)
-            while ((length(filter!(t->!istaskdone(t), recvs_check)) > 0)
-                  && (time_ns() - t0 < TIMEOUT_VAL))
-                sleep(0.05)
-            end
-            length(recvs_check) > 0 && error("timeout")
-            map(wait, recvs)
-        end
-
-        # First, test IPv4 broadcast
-        port = 2000
-        a, b, c = [create_socket(ip"0.0.0.0", port) for i in 1:3]
-        try
-            # bsd family do not allow broadcasting on loopbacks
-            @static if !Sys.isbsd() || Sys.isapple()
-                send(c, bcastdst, port, "hello")
-                recvs = [@async @test String(recv(s)) == "hello" for s in (a, b)]
-                wait_with_timeout(recvs)
-            end
-        catch e
-            if isa(e, Base.IOError) && Base.uverrorname(e.code) == "EPERM"
-                @warn "UDP IPv4 broadcast test skipped (permission denied upon send, restrictive firewall?)"
-            else
-                rethrow()
-            end
-        end
-        [close(s) for s in [a, b, c]]
-
-        # Test ipv6 broadcast groups
-        a, b, c = [create_socket(ip"::", port) for i in 1:3]
-        try
-            # Exemplary Interface-local ipv6 multicast group, if we wanted this to actually be routed
-            # to other computers, we should use a link-local or larger address scope group
-            # bsd family and darwin do not allow broadcasting on loopbacks
-            @static if !Sys.isbsd() && !Sys.isapple()
-                group = ip"ff11::6a75:6c69:61"
-                join_multicast_group(a, group)
-                join_multicast_group(b, group)
-
-                send(c, group, port, "hello")
-                recvs = [@async @test String(recv(s)) == "hello" for s in (a, b)]
-                wait_with_timeout(recvs)
-
-                leave_multicast_group(a, group)
-                leave_multicast_group(b, group)
-
-                send(c, group, port, "hello")
-                recvs = [@async @test String(recv(s)) == "hello" for s in (a, b)]
-                # We only wait 200ms since we're pretty sure this is going to time out
-                @test_throws ErrorException wait_with_timeout(recvs, 2e8)
-            end
-        catch e
-            if isa(e, Base.IOError) && Base.uverrorname(e.code) == "EPERM"
-                @warn "UDP IPv6 broadcast test skipped (permission denied upon send, restrictive firewall?)"
-            else
-                rethrow()
-            end
-        end
-    end
-end
-
 @testset "Pipe" begin
     P = Pipe()
     Base.link_pipe!(P)