Test failures for Sockets ,Base.runtests("Sockets")

Error in testset Sockets:
Error During Test at /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/test/runtests.jl:376
Got exception outside of a @test
InexactError: trunc(UInt16, 65536)
Stacktrace:
[1] throw_inexacterror(f::Symbol, #unused#::Type{UInt16}, val::Int64)
@ Core ./boot.jl:614
[2] checked_trunc_uint
@ ./boot.jl:644 [inlined]
[3] toUInt16
@ ./boot.jl:717 [inlined]
[4] UInt16
@ ./boot.jl:767 [inlined]
[5] convert
@ ./number.jl:7 [inlined]
[6] InetAddr
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/src/IPAddr.jl:273 [inlined]
[7] InetAddr
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/src/IPAddr.jl:288 [inlined]
[8] listenany(host::Sockets.IPv6, default_port::UInt16)
@ Sockets /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/src/Sockets.jl:730
[9] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/test/runtests.jl:381 [inlined]
[10] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[11] top-level scope
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/test/runtests.jl:377
[12] include
@ ./Base.jl:419 [inlined]
[13] macro expansion
@ /julia/juliabuild/usr/share/julia/test/testdefs.jl:24 [inlined]
[14] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[15] macro expansion
@ /julia/juliabuild/usr/share/julia/test/testdefs.jl:23 [inlined]
[16] macro expansion
@ ./timing.jl:463 [inlined]
[17] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
@ Main /julia/juliabuild/usr/share/julia/test/testdefs.jl:21
[18] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
@ Base ./essentials.jl:731
[19] (::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}})()
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:285
[20] run_work_thunk(thunk::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:70
[21] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:285 [inlined]
[22] (::Distributed.var"#109#111"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
@ Distributed ./task.jl:484
Error in testset Sockets:
Error During Test at /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/test/runtests.jl:419
Got exception outside of a @test
IOError: uv_udp_set_membership: no such device (ENODEV)
Stacktrace:
[1] uv_error
@ ./libuv.jl:97 [inlined]
[2] udp_set_membership(sock::Sockets.UDPSocket, group_addr::String, interface_addr::Nothing, operation::Int64)
@ Sockets /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/src/Sockets.jl:747
[3] join_multicast_group
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/src/Sockets.jl:760 [inlined]
[4] join_multicast_group
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/src/Sockets.jl:767 [inlined]
[5] join_multicast_group(sock::Sockets.UDPSocket, group_addr::Sockets.IPv6)
@ Sockets /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/src/Sockets.jl:764
[6] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/test/runtests.jl:469 [inlined]
[7] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[8] top-level scope
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/test/runtests.jl:420
[9] include
@ ./Base.jl:419 [inlined]
[10] macro expansion
@ /julia/juliabuild/usr/share/julia/test/testdefs.jl:24 [inlined]
[11] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[12] macro expansion
@ /julia/juliabuild/usr/share/julia/test/testdefs.jl:23 [inlined]
[13] macro expansion
@ ./timing.jl:463 [inlined]
[14] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
@ Main /julia/juliabuild/usr/share/julia/test/testdefs.jl:21
[15] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
@ Base ./essentials.jl:731
[16] (::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}})()
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:285
[17] run_work_thunk(thunk::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:70
[18] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:285 [inlined]
[19] (::Distributed.var"#109#111"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
@ Distributed ./task.jl:484
Error in testset Pkg:
Error During Test at none:1
Got exception outside of a @test
ProcessExitedException(7)
Stacktrace:
[1] try_yieldto(undo::typeof(Base.ensure_rescheduled))
@ Base ./task.jl:871
[2] wait()
@ Base ./task.jl:931
[3] wait(c::Base.GenericCondition{ReentrantLock})
@ Base ./condition.jl:124
[4] take_buffered(c::Channel{Any})
@ Base ./channels.jl:416
[5] take!(c::Channel{Any})
@ Base ./channels.jl:410
[6] take!(::Distributed.RemoteValue)
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:726
[7] remotecall_fetch(::Function, ::Distributed.Worker, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:461
[8] remotecall_fetch(::Function, ::Int64, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:492
[9] macro expansion
@ /julia/juliabuild/usr/share/julia/test/runtests.jl:260 [inlined]
[10] (::var"#43#55"{Vector{Task}, var"#print_testworker_errored#51"{ReentrantLock, Int64, Int64}, var"#print_testworker_stats#49"{ReentrantLock, Int64, Int64, Int64, Int64, Int64, Int64}, Vector{Any}, Dict{String, DateTime}})()
@ Main ./task.jl:484

I have a fix up that I think would lead to a more clear error: Ensure port in listenany stays UInt16 by quinnj · Pull Request #47213 · JuliaLang/julia · GitHub. It seems in this case that the tests are unable to listen on any ports on the host for some reason, so we end up cycling all the way to > typemax(UInt16) which then throws an error in the InetAddr constructor. Maybe this is a docker container where the port listening is restricted or something?

After adding that above suggestion to code facing this no ports available:

Test Summary: | Pass Error Total Time
Overall | 121 1 122 7.4s
Sockets | 121 1 122 6.2s
FAILURE

The global RNG seed was 0xd39dc8723bf2e33213002fd59645f42d.

Error in testset Sockets:
Error During Test at /julia/juliabuild/usr/share/julia/test/testdefs.jl:21
Got exception outside of a @test
LoadError: no ports available
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] listenany(host::IPv4, default_port::UInt16)
@ Sockets /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/src/Sockets.jl:732
[3] top-level scope
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/test/runtests.jl:292
[4] include
@ ./Base.jl:419 [inlined]
[5] macro expansion
@ /julia/juliabuild/usr/share/julia/test/testdefs.jl:24 [inlined]
[6] macro expansion
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[7] macro expansion
@ /julia/juliabuild/usr/share/julia/test/testdefs.jl:23 [inlined]
[8] macro expansion
@ ./timing.jl:463 [inlined]
[9] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
@ Main /julia/juliabuild/usr/share/julia/test/testdefs.jl:21
[10] #invokelatest#2
@ ./essentials.jl:731 [inlined]
[11] #153
@ /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:425 [inlined]
[12] run_work_thunk(thunk::Distributed.var"#153#154"{typeof(runtests), Tuple{String, String}, Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}}}, print_error::Bool)
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:70
[13] remotecall_fetch(::Function, ::Distributed.LocalProcess, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:450
[14] remotecall_fetch(::Function, ::Int64, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
@ Distributed /julia/juliabuild/usr/share/julia/stdlib/v1.8/Distributed/src/remotecall.jl:492
[15] macro expansion
@ /julia/juliabuild/usr/share/julia/test/runtests.jl:260 [inlined]
[16] (::var"#43#55"{Vector{Task}, var"#print_testworker_errored#51"{ReentrantLock, Int64, Int64}, var"#print_testworker_stats#49"{ReentrantLock, Int64, Int64, Int64, Int64, Int64, Int64}, Vector{Any}, Dict{String, DateTime}})()
@ Main ./task.jl:484
in expression starting at /julia/juliabuild/usr/share/julia/stdlib/v1.8/Sockets/test/runtests.jl:285
ERROR: LoadError: Test run finished with errors