From 2b23ae478f07e4b347306a351bc6ea7d58789919 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sun, 25 Feb 2024 21:58:16 -0500 Subject: [PATCH 1/2] guard rmprocs in tests --- test/distributed_exec.jl | 4 ++-- test/topology.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/distributed_exec.jl b/test/distributed_exec.jl index 166ea6df962b03..8e880bc98868a5 100644 --- a/test/distributed_exec.jl +++ b/test/distributed_exec.jl @@ -1906,7 +1906,7 @@ end end include("splitrange.jl") # Clear all workers for timeout tests (issue #45785) -rmprocs(workers()) +nprocs() > 1 && rmprocs(workers()) begin # First, assert that we get no messages when we close a cooperative worker w = only(addprocs(1)) @@ -1927,5 +1927,5 @@ end # Run topology tests last after removing all workers, since a given # cluster at any time only supports a single topology. -rmprocs(workers()) +nprocs() > 1 && rmprocs(workers()) include("topology.jl") diff --git a/test/topology.jl b/test/topology.jl index fc969323bc5874..a24efb2642162e 100644 --- a/test/topology.jl +++ b/test/topology.jl @@ -134,7 +134,7 @@ for (i, (from,to)) in enumerate(combinations) end # With lazy=false, all connections ought to be setup during `addprocs` -rmprocs(workers()) +nprocs() > 1 && rmprocs(workers()) addprocs_with_testenv(8; lazy=false) def_count_conn() @test sum(asyncmap(p->remotecall_fetch(count_connected_workers,p), workers())) == 64 From 41cd14f5db601365b388964135ec678bb6fbbc14 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sun, 25 Feb 2024 22:16:27 -0500 Subject: [PATCH 2/2] suppress interrupt trace from SIGTERM test --- test/distributed_exec.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/distributed_exec.jl b/test/distributed_exec.jl index 8e880bc98868a5..7b5c983da1bf91 100644 --- a/test/distributed_exec.jl +++ b/test/distributed_exec.jl @@ -1920,6 +1920,8 @@ begin remote_do(w) do # Cause the 'exit()' message that `rmprocs()` sends to do nothing Core.eval(Base, :(exit() = nothing)) + # Hide the trace that `rmprocs()` will cause this worker to show + redirect_stderr(devnull) end wait(rmprocs([w])) end