Skip to content

Commit cb1e40b

Browse files
staticfloatvtjnash
andauthored
test cleanup for #44444 (#44993) (#47416)
This warning was un-ironically introduced by "Fix or suppress some noisy tests". ``` ┌ Error: mktemp cleanup │ exception = │ IOError: unlink("C:\\Windows\\TEMP\\jl_A49B.tmp"): resource busy or locked (EBUSY) │ Stacktrace: │ [1] uv_error │ @ .\libuv.jl:100 [inlined] │ [2] unlink(p::String) │ @ Base.Filesystem .\file.jl:968 │ [3] rm(path::String; force::Bool, recursive::Bool) │ @ Base.Filesystem .\file.jl:283 │ [4] rm │ @ .\file.jl:274 [inlined] │ [5] mktemp(fn::Main.Test49Main_misc.var"#110#113", parent::String) │ @ Base.Filesystem .\file.jl:736 │ [6] mktemp(fn::Function) │ @ Base.Filesystem .\file.jl:730 │ [7] macro expansion │ @ C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\test\misc.jl:1065 [inlined] │ [8] macro expansion │ @ C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\stdlib\v1.9\Test\src\Test.jl:1360 [inlined] │ [9] top-level scope │ @ C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\test\misc.jl:1060 │ [10] include │ @ .\Base.jl:427 [inlined] │ [11] macro expansion │ @ C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\test\testdefs.jl:24 [inlined] │ [12] macro expansion │ @ C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\stdlib\v1.9\Test\src\Test.jl:1360 [inlined] │ [13] macro expansion │ @ C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\test\testdefs.jl:23 [inlined] │ [14] macro expansion │ @ .\timing.jl:440 [inlined] │ [15] runtests(name::String, path::String, isolate::Bool; seed::UInt128) │ @ Main C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\test\testdefs.jl:21 │ [16] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}}) │ @ Base .\essentials.jl:798 │ [17] (::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}})() │ @ Distributed C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\stdlib\v1.9\Distributed\src\process_messages.jl:285 │ [18] run_work_thunk(thunk::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}}, print_error::Bool) │ @ Distributed C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\stdlib\v1.9\Distributed\src\process_messages.jl:70 │ [19] macro expansion │ @ C:\buildbot\worker-tabularasa\tester_win64\build\share\julia\stdlib\v1.9\Distributed\src\process_messages.jl:285 [inlined] │ [20] (::Distributed.var"#109#111"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})() │ @ Distributed .\task.jl:490 └ @ Base.Filesystem file.jl:738 ``` (cherry picked from commit d28a0dd) Co-authored-by: Jameson Nash <vtjnash@gmail.com>
1 parent f69b361 commit cb1e40b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/misc.jl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,9 +1175,16 @@ end
11751175

11761176
GC.safepoint()
11771177

1178-
GC.enable_logging(true)
1179-
GC.gc()
1180-
GC.enable_logging(false)
1178+
mktemp() do tmppath, _
1179+
open(tmppath, "w") do tmpio
1180+
redirect_stderr(tmpio) do
1181+
GC.enable_logging(true)
1182+
GC.gc()
1183+
GC.enable_logging(false)
1184+
end
1185+
end
1186+
@test occursin("GC: pause", read(tmppath, String))
1187+
end
11811188
end
11821189

11831190
@testset "fieldtypes Module" begin

0 commit comments

Comments
 (0)