Skip to content

Commit e1ac9f7

Browse files
use proper test skip mechanism for SO_REUSEPORT
1 parent c09b034 commit e1ac9f7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/distributed_exec.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,18 +1734,16 @@ function reuseport_tests()
17341734
end
17351735

17361736
# Ensure that the code has indeed been successfully executed everywhere
1737-
@test all(in(results), procs())
1737+
return all(in(results), procs())
17381738
end
17391739

17401740
# Test that the client port is reused. SO_REUSEPORT may not be supported on
17411741
# all UNIX platforms, Linux kernels prior to 3.9 and older versions of OSX
17421742
@assert nprocs() == 1
17431743
addprocs_with_testenv(4; lazy=false)
1744-
if ccall(:jl_has_so_reuseport, Int32, ()) == 1
1745-
reuseport_tests()
1746-
else
1747-
@info "SO_REUSEPORT is unsupported, skipping reuseport tests"
1748-
end
1744+
1745+
skip_reuseexport = ccall(:jl_has_so_reuseport, Int32, ()) != 1
1746+
@test reuseport_tests() skip = skip_reuseexport
17491747

17501748
# issue #27933
17511749
a27933 = :_not_defined_27933

0 commit comments

Comments
 (0)