diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index efcdf52b68093..fb44600886429 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -1080,13 +1080,18 @@ run(pipeline(devnull, `$(joinpath(Sys.BINDIR, Base.julia_exename())) --lisp`, de let exename = `$(Base.julia_cmd()) --startup-file=no` @test readchomp(`$exename --sysimage-native-code=yes -E "Bool(Base.JLOptions().use_sysimage_native_code)"`) == "true" - @test readchomp(`$exename --sysimage-native-code=no -E + # TODO: Make this safe in the presence of two single-thread threadpools + # see https://github.com/JuliaLang/julia/issues/57198 + @test readchomp(`$exename --sysimage-native-code=no -t1,0 -E "Bool(Base.JLOptions().use_sysimage_native_code)"`) == "false" end # backtrace contains line number info (esp. on windows #17179) for precomp in ("yes", "no") - succ, out, bt = readchomperrors(`$(Base.julia_cmd()) --startup-file=no --sysimage-native-code=$precomp -E 'sqrt(-2)'`) + # TODO: Make this safe in the presence of two single-thread threadpools + # see https://github.com/JuliaLang/julia/issues/57198 + threads = precomp == "no" ? `-t1,0` : `` + succ, out, bt = readchomperrors(`$(Base.julia_cmd()) $threads --startup-file=no --sysimage-native-code=$precomp -E 'sqrt(-2)'`) @test !succ @test out == "" @test occursin(r"\.jl:(\d+)", bt)