Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void ValidateNativeLibraryGlibcCompatibility(

Version FindMaxGlibcVersion(AbsolutePath libraryPath, IEnumerable<string> allowedSymbols)
{
var output = Nm.Value($"--with-symbol-versions -D {libraryPath} ").Select(x => x.Text).ToList();
var output = Nm.Value($"--with-symbol-versions -D {libraryPath} ", logOutput: false).Select(x => x.Text).ToList();

// Gives output similar to this:
// 0000000000170498 T SetGitMetadataForApplication
Expand Down Expand Up @@ -90,7 +90,7 @@ Version FindMaxGlibcVersion(AbsolutePath libraryPath, IEnumerable<string> allowe

public void ValidateNativeSymbols(AbsolutePath libraryPath, string snapshotNamePrefix)
{
var output = Nm.Value($"-D {libraryPath}").Select(x => x.Text).ToList();
var output = Nm.Value($"-D {libraryPath}", logOutput: false).Select(x => x.Text).ToList();

// Gives output similar to this:
// 0000000000006bc8 D DdDotnetFolder
Expand All @@ -116,7 +116,7 @@ public void ValidateNativeSymbols(AbsolutePath libraryPath, string snapshotNameP
//
// We only care about the Undefined symbols - we don't want to accidentally add more of them

Logger.Debug("NM output: {Output}", string.Join(Environment.NewLine, output));
Logger.Debug("Read {SymbolCount} dynamic symbols from {LibraryPath}", output.Count, libraryPath);

var symbols = output
.Select(x => x.Trim())
Expand Down Expand Up @@ -165,7 +165,7 @@ bool HasValidSnapshot()
var received = string.Join(Environment.NewLine, symbols);
var verifiedPath = BuildProjectDirectory / nameof(NativeValidation) / $"{snapshotNamePrefix}.verified.txt";
var verified = File.Exists(verifiedPath)
? File.ReadAllText(verifiedPath)
? File.ReadAllText(verifiedPath).TrimEnd()
: string.Empty;

Logger.Information("Comparing snapshot of Undefined symbols in the {LibraryName} using {Path}...", libraryName, verifiedPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ abort
atexit
bcmp
btowc
ceil
clock_gettime
close
dl_iterate_phdr
Expand Down Expand Up @@ -149,4 +148,4 @@ wmemcpy
wmemmove
wmemset
write
writev
writev
Loading