Skip to content

Commit e4e054d

Browse files
IanButterworthJamesWrigley
authored andcommitted
use proper test skip mechanism for SO_REUSEPORT
1 parent 4a0ecca commit e4e054d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/distributed_exec.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,18 +1707,17 @@ end
17071707
end
17081708

17091709
# Ensure that the code has indeed been successfully executed everywhere
1710-
@test all(in(results), procs())
1710+
return all(in(results), procs())
17111711
end
17121712

17131713
# Test that the client port is reused. SO_REUSEPORT may not be supported on
17141714
# all UNIX platforms, Linux kernels prior to 3.9 and older versions of OSX
17151715
@assert nprocs() == 1
17161716
addprocs_with_testenv(4; lazy=false)
1717-
if ccall(:jl_has_so_reuseport, Int32, ()) == 1
1718-
reuseport_tests()
1719-
else
1720-
@info "SO_REUSEPORT is unsupported, skipping reuseport tests"
1721-
end
1717+
1718+
skip_reuseexport = ccall(:jl_has_so_reuseport, Int32, ()) != 1
1719+
skip_reuseexport && @debug "SO_REUSEPORT support missing, reuseport_tests skipped"
1720+
@test reuseport_tests() skip = skip_reuseexport
17221721
end
17231722

17241723
@testset "Even more various individual issues" begin

0 commit comments

Comments
 (0)