Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Linux NativeAOT debug info regression test #81612

Merged
merged 13 commits into from
Feb 14, 2023
Merged

Conversation

agocke
Copy link
Member

@agocke agocke commented Feb 3, 2023

The test runs llvm-dwarfdump and verifies that the number of warnings and errors is expected. As we improve the debug information we can start tracking individual warnings and errors, hopefully bringing this number to zero.

@ghost
Copy link

ghost commented Feb 3, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

The test runs llvm-dwarfdump and verifies that the number of warnings and errors is expected. As we improve the debug information we can start tracking individual warnings and errors, hopefully bringing this number to zero.

Author: agocke
Assignees: agocke
Labels:

area-NativeAOT-coreclr

Milestone: -

The test runs llvm-dwarfdump and verifies that the number of warnings
and errors is expected. As we improve the debug information we can
start tracking individual warnings and errors, hopefully bringing
this number to zero.
agocke and others added 2 commits February 13, 2023 10:00
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
@agocke agocke marked this pull request as ready for review February 13, 2023 18:01
@agocke
Copy link
Member Author

agocke commented Feb 13, 2023

@dotnet/illink-contrib for review

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise!

Comment on lines 64 to 67
Console.WriteLine($"Found {count} warnings and errors, expected between {MinWarnings} and {MaxWarnings}");
Console.WriteLine("This is likely a result of debug info changes. To see the new output, run the following command:");
Console.WriteLine("\tllvm-dwarfdump --verify " + Environment.ProcessPath);
return 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to have this print the stdout and stderr of the --verify we just ran so that we can see the detail of the problem?

I'm just imagining myself in the shoes of the person seeing this failure and saying "great, do I need to spin up a Linux machine to get a repro of this?".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might also be useful to print the count all the time so that if it fails, one can go to a different PR and see if the count already was very close to the threshold and the fix is to just update the range.

Basically, if I can fix a test failure by looking at logs, I'm happier than if I have to repro the failure locally first.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think output the log makes a ton of sense -- but only when the log is smaller than 50000 lines. I'm happy to make that change when we get the warnings down to a reasonable number.

Always printing the count is a great idea, though.


proc = Process.Start(new ProcessStartInfo
{
FileName = "/bin/sh",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we wrap this in /bin/sh and don't wrap the --version one before?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. This was a remnant from when I was using grep to do the filtering, instead of doing it directly in C#. I'll remove.

src/tests/nativeaot/SmokeTests/DwarfDump/DwarfDump.csproj Outdated Show resolved Hide resolved
agocke and others added 2 commits February 13, 2023 20:34
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
@agocke agocke merged commit 34bec26 into dotnet:main Feb 14, 2023
@agocke agocke deleted the dwarf-dump-test branch February 14, 2023 19:48
@ghost ghost locked as resolved and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants