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 and improve debuginfo tests for Windows #135192

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

jdupak-ms
Copy link

@jdupak-ms jdupak-ms commented Jan 7, 2025

Adds new test for closures and function pointers.
Improves robustness of existing tests by sorting wildcard matched outputs.

try-job: i686-msvc

@rustbot
Copy link
Collaborator

rustbot commented Jan 7, 2025

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 7, 2025
@jdupak-ms
Copy link
Author

CC @wesleywiser

@jieyouxu jieyouxu added O-windows Operating system: Windows A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) labels Jan 7, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Do these tests need to be gated by some kind of minimum cdb version?

@jieyouxu jieyouxu added the A-testsuite Area: The testsuite used to check the correctness of rustc label Jan 7, 2025
@jdupak-ms
Copy link
Author

Do these tests need to be gated by some kind of minimum cdb version?

They should not. I will try to get some old cdb and verify.

@jieyouxu
Copy link
Member

jieyouxu commented Jan 7, 2025

FTR, that is mostly relevant in periods of times where our CI has like a weird mix of 2 cdb versions, e.g. when github gradually rolls out Windows server version bumps. Probably not needed in this case.

Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

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

Thanks @jdupak-ms! I don't see anything here that should require a particularly recent version of cdb to work but if you can test on an older version, that would be great!

If not, let us know and we can merge.

@jieyouxu
Copy link
Member

jieyouxu commented Jan 8, 2025

I don't really expect a cdb version problem since we're currently not in a cdb transition period, so let's just send this off to see if this passes full CI.

@bors r=@wesleywiser rollup=iffy (debuginfo windows tests)

@bors
Copy link
Contributor

bors commented Jan 8, 2025

📌 Commit f86ca11 has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 8, 2025
@jdupak-ms
Copy link
Author

I don't really expect a cdb version problem since we're currently not in a cdb transition period, so let's just send this off to see if this passes full CI.

@bors r=@wesleywiser rollup=iffy (debuginfo windows tests)

OK, sorry for the delay. I had trouble with getting the older cdb to be picked up on my machine.

@jieyouxu
Copy link
Member

jieyouxu commented Jan 8, 2025

OK, sorry for the delay. I had trouble with getting the older cdb to be picked up on my machine.

Thanks for trying anyway!

@bors
Copy link
Contributor

bors commented Jan 8, 2025

⌛ Testing commit f86ca11 with merge 7d9573b...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2025
Add and improve debuginfo tests for Windows

Adds new test for closures and function pointers.
Improves robustness of existing tests by sorting wildcard matched outputs.
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 8, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 8, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jan 8, 2025

Ah, you may have to add a // ignore-tidy-linelength in the two tests

2025-01-08T15:28:24.6649510Z tidy error: /Users/runner/work/rust/rust/tests/debuginfo/type-names.rs:172: line longer than 100 chars
2025-01-08T15:28:24.6667640Z tidy error: /Users/runner/work/rust/rust/tests/debuginfo/lexical-scope-in-if-let.rs:50: line longer than 100 chars

@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 8, 2025
@jdupak-ms
Copy link
Author

Fixed, python ./x.py test tidy --bless now does not complain.

@bors
Copy link
Contributor

bors commented Jan 10, 2025

⌛ Testing commit 50bdfeb with merge fae14a7...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 10, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 10, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jan 11, 2025

The failure seems genuine. I added a i686-msvc try-job to PR description, please ping me if you'd like to run changes on i686-msvc (this is not a job that's run in PR CI by default).

A cursory glance suggests this is primarily due to pointer-width differences (i686-msvc is 32-bit msvc, so if you have a 64-bit msvc it won't fail locally), where the output is int * vs __int64 * on 64-bit msvc.

@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2025
@jieyouxu
Copy link
Member

@bors try

@bors
Copy link
Contributor

bors commented Jan 13, 2025

⌛ Trying commit 75e9b19 with merge b2a0169...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
Add and improve debuginfo tests for Windows

Adds new test for closures and function pointers.
Improves robustness of existing tests by sorting wildcard matched outputs.

try-job: i686-msvc
@jdupak-ms
Copy link
Author

Thanks a lot (for all your help really). I had an isize in one of the new tests which obviously caused an issues.

Sorry for taking so many tries.

@jieyouxu
Copy link
Member

Sorry for taking so many tries.

No need to be sorry, debuginfo tests are bound to take Several Attempts™.

@jieyouxu
Copy link
Member

jieyouxu commented Jan 13, 2025

Thanks a lot (for all your help really). I had an isize in one of the new tests which obviously caused an issues.

FWIW, this is kinda of a limitation of the present debuginfo test infra. Ideally you'd be able to have a revision matrix of sorts (and thus be able to use isize or usize by explicitly accounting for the ptr width), where on one dimension it's the debuggers [cdb, gdb, lldb], and on the other dimension it might be ptr width [32bit, 64bit]. Then the check would be something possibly like //@[[cdb, 64bit]] check: __int64 * vs //@[[cdb, 32bit]] check: int *. The flattened poor man's version of this revision matrix is the manually flattened 3x2=6 revisions. But I don't really want to implement this in the current compiletest iteration.

@bors
Copy link
Contributor

bors commented Jan 13, 2025

☀️ Try build successful - checks-actions
Build commit: b2a0169 (b2a0169a5be4a1d204c7120829e78bda50966a15)

@jdupak-ms
Copy link
Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 13, 2025
@wesleywiser
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 13, 2025

📌 Commit 75e9b19 has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 13, 2025
@bors
Copy link
Contributor

bors commented Jan 13, 2025

⌛ Testing commit 75e9b19 with merge 2ae9916...

@bors
Copy link
Contributor

bors commented Jan 13, 2025

☀️ Test successful - checks-actions
Approved by: wesleywiser
Pushing 2ae9916 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 13, 2025
@bors bors merged commit 2ae9916 into rust-lang:master Jan 13, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 13, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2ae9916): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 0.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 763.215s -> 763.959s (0.10%)
Artifact size: 326.11 MiB -> 326.03 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants