From 3c856de6a6e7456fcd546cdd56d76bd8fcf9b59c Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 12 May 2026 14:04:07 +0200 Subject: [PATCH] Silence a test warning on nightly. --- test/newpm.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/newpm.jl b/test/newpm.jl index e8fecbb9..bd244e6e 100644 --- a/test/newpm.jl +++ b/test/newpm.jl @@ -130,7 +130,7 @@ end @testset "passes" begin function test_passes(typ, passes, skips=String[]) - @dispose ctx=Context() mod=test_module() begin + @dispose ctx=Context() begin for pass in passes if startswith(pass, "print") || startswith(pass, "dot") || startswith(pass, "view") || pass in skips @@ -139,14 +139,16 @@ end # the first pass determines the pass manager's type, so add the pass and # then a no-op one that would trigger an error in case of type mismatches. - @dispose pb=NewPMPassBuilder() begin + # use a fresh module per run so instrumentation passes (tsan/asan/hwasan) + # don't trip their redundant-instrumentation check on the second invocation. + @dispose pb=NewPMPassBuilder() mod=test_module() begin add!(pb, pass) add!(pb, "no-op-$typ") @test run!(pb, mod) === nothing end # same, but to catch type mismatches in the other direction - @dispose pb=NewPMPassBuilder() begin + @dispose pb=NewPMPassBuilder() mod=test_module() begin add!(pb, "no-op-$typ") add!(pb, pass) @test run!(pb, mod) === nothing