mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-10 01:50:53 +09:00
Add C library detection to processinfo3 test (#88260)
This commit is contained in:
parent
89d6fd50a3
commit
e40d6e165c
1 changed files with 23 additions and 1 deletions
|
@ -288,7 +288,29 @@ namespace Tracing.Tests.ProcessInfoValidation
|
|||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
expectedPortableRidOs = "linux";
|
||||
// Check process modules for C library type indication to determine
|
||||
// which linux RID OS is applicable.
|
||||
Logger.logger.Log("Begin checking process modules to determine C library type.");
|
||||
for (int i = 0; i < currentProcess.Modules.Count; i++)
|
||||
{
|
||||
ProcessModule module = currentProcess.Modules[i];
|
||||
Logger.logger.Log($"- {module.ModuleName}");
|
||||
|
||||
if (module.ModuleName.StartsWith("libc.", StringComparison.Ordinal) ||
|
||||
module.ModuleName.StartsWith("libc-", StringComparison.Ordinal))
|
||||
{
|
||||
Logger.logger.Log("Found gnu libc indicator.");
|
||||
expectedPortableRidOs = "linux";
|
||||
break;
|
||||
}
|
||||
else if (module.ModuleName.StartsWith("ld-musl-", StringComparison.Ordinal))
|
||||
{
|
||||
Logger.logger.Log("Found musl libc indicator.");
|
||||
expectedPortableRidOs = "linux-musl";
|
||||
break;
|
||||
}
|
||||
}
|
||||
Logger.logger.Log("Finished checking process modules.");
|
||||
}
|
||||
|
||||
Utils.Assert(!string.IsNullOrEmpty(expectedPortableRidOs), $"Unable to calculate expected portable RID OS.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue