Skip to content

Commit

Permalink
Add riscv64 arch to tracing/eventpipe/processinfo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalykov committed Jun 21, 2024
1 parent 3b14b0c commit ef55f8e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/tests/tracing/eventpipe/processinfo/processinfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,15 @@ public static void TestEntryPoint()
Architecture.X64 => "x64",
Architecture.Arm => "arm32",
Architecture.Arm64 => "arm64",
Architecture.RiscV64 => "riscv64",
_ => "Unknown"
};

Utils.Assert(expectedArchValue.Equals(arch), $"OS must match current Operating System. Expected: \"{expectedArchValue}\", Received: \"{arch}\"");
Utils.Assert(expectedArchValue.Equals(arch), $"Arch must match current Architecture. Expected: \"{expectedArchValue}\", Received: \"{arch}\"");

Utils.Assert(end == totalSize, $"Full payload should have been read. Expected: {totalSize}, Received: {end}");

Logger.logger.Log($"\n{{\n\tprocessId: {processId},\n\truntimeCookie: {runtimeCookie},\n\tcommandLine: {commandLine},\n\tOS: {OS},\n\tArch: {arch}\n}}");
}
}
}
}
5 changes: 3 additions & 2 deletions src/tests/tracing/eventpipe/processinfo2/processinfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,11 @@ public static void TestEntryPoint()
Architecture.X64 => "x64",
Architecture.Arm => "arm32",
Architecture.Arm64 => "arm64",
Architecture.RiscV64 => "riscv64",
_ => "Unknown"
};

Utils.Assert(expectedArchValue.Equals(arch), $"OS must match current Operating System. Expected: \"{expectedArchValue}\", Received: \"{arch}\"");
Utils.Assert(expectedArchValue.Equals(arch), $"Arch must match current Architecture. Expected: \"{expectedArchValue}\", Received: \"{arch}\"");

// VALIDATE ManagedEntrypointAssemblyName
start = end;
Expand Down Expand Up @@ -269,4 +270,4 @@ public static void TestEntryPoint()
Logger.logger.Log($"\n{{\n\tprocessId: {processId},\n\truntimeCookie: {runtimeCookie},\n\tcommandLine: {commandLine},\n\tOS: {OS},\n\tArch: {arch},\n\tManagedEntrypointAssemblyName: {managedEntrypointAssemblyName},\n\tClrProductVersion: {clrProductVersion}\n}}");
}
}
}
}
5 changes: 3 additions & 2 deletions src/tests/tracing/eventpipe/processinfo3/processinfo3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ public static void TestEntryPoint()
Architecture.X64 => "x64",
Architecture.Arm => "arm32",
Architecture.Arm64 => "arm64",
Architecture.RiscV64 => "riscv64",
_ => "Unknown"
};

Utils.Assert(expectedArchValue.Equals(arch), $"OS must match current Operating System. Expected: \"{expectedArchValue}\", Received: \"{arch}\"");
Utils.Assert(expectedArchValue.Equals(arch), $"Arch must match current Architecture. Expected: \"{expectedArchValue}\", Received: \"{arch}\"");

// VALIDATE ManagedEntrypointAssemblyName
start = end;
Expand Down Expand Up @@ -341,4 +342,4 @@ public static void TestEntryPoint()
Logger.logger.Log($"\n{{\n\tprocessId: {processId},\n\truntimeCookie: {runtimeCookie},\n\tcommandLine: {commandLine},\n\tOS: {OS},\n\tArch: {arch},\n\tManagedEntrypointAssemblyName: {managedEntrypointAssemblyName},\n\tClrProductVersion: {clrProductVersion},\n\tPortableRid: {portableRid}\n}}");
}
}
}
}

0 comments on commit ef55f8e

Please sign in to comment.