From 8b864fb8e243c8212dd70f136a5da9fb4240309a Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Tue, 30 Nov 2021 16:46:20 +0100 Subject: [PATCH] Couple of debug info test fixes It looks like in CI we are seeing a null method ID in some cases when this test is run under R2R and GC stress. Add a check for this, and also mark the test as stress incompatible like other ETW tests, since it runs very slowly under stress modes. Fix #62118 --- src/tests/JIT/Directed/debugging/debuginfo/tester.cs | 3 +++ src/tests/JIT/Directed/debugging/debuginfo/tester.csproj | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/tests/JIT/Directed/debugging/debuginfo/tester.cs b/src/tests/JIT/Directed/debugging/debuginfo/tester.cs index 6f501c96f0020b..b784fd4a6f56b0 100644 --- a/src/tests/JIT/Directed/debugging/debuginfo/tester.cs +++ b/src/tests/JIT/Directed/debugging/debuginfo/tester.cs @@ -64,6 +64,9 @@ private static Func ValidateMappings(EventPipeEventSource source) source.Clr.MethodLoadVerbose += e => methodTier[e.MethodID] = e.OptimizationTier; source.Clr.MethodILToNativeMap += e => { + if (e.MethodID == 0) + return; + var mappings = new (int, int)[e.CountOfMapEntries]; for (int i = 0; i < mappings.Length; i++) mappings[i] = (e.ILOffset(i), e.NativeOffset(i)); diff --git a/src/tests/JIT/Directed/debugging/debuginfo/tester.csproj b/src/tests/JIT/Directed/debugging/debuginfo/tester.csproj index f3501e7c79878d..2545e6ceb3c2aa 100644 --- a/src/tests/JIT/Directed/debugging/debuginfo/tester.csproj +++ b/src/tests/JIT/Directed/debugging/debuginfo/tester.csproj @@ -4,6 +4,8 @@ PdbOnly True True + true + true