-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[lldb][test] Fix running TestWithLimitDebugInfo.py on Windows #150579
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
Merged
igorkudrin
merged 3 commits into
llvm:main
from
igorkudrin:lldb-fix-TestWithLimitDebugInfo-on-Windows
Jul 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1775,16 +1775,20 @@ def no_reason(_): | |||||||||||||||||||||||||||
| attrvalue, "__no_debug_info_test__", False | ||||||||||||||||||||||||||||
| ): | ||||||||||||||||||||||||||||
| # If any debug info categories were explicitly tagged, assume that list to be | ||||||||||||||||||||||||||||
| # authoritative. If none were specified, try with all debug | ||||||||||||||||||||||||||||
| # info formats. | ||||||||||||||||||||||||||||
| all_dbginfo_categories = set( | ||||||||||||||||||||||||||||
| # authoritative. If none were specified, try with all debug info formats. | ||||||||||||||||||||||||||||
| test_method_categories = getattr(attrvalue, "categories", []) | ||||||||||||||||||||||||||||
| dbginfo_categories = set(test_method_categories) & set( | ||||||||||||||||||||||||||||
| test_categories.debug_info_categories.keys() | ||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||
| categories = ( | ||||||||||||||||||||||||||||
| set(getattr(attrvalue, "categories", [])) & all_dbginfo_categories | ||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||
| if not categories: | ||||||||||||||||||||||||||||
| categories = [ | ||||||||||||||||||||||||||||
| if dbginfo_categories: | ||||||||||||||||||||||||||||
| other_categories = [ | ||||||||||||||||||||||||||||
| category | ||||||||||||||||||||||||||||
| for category in test_method_categories | ||||||||||||||||||||||||||||
| if category not in dbginfo_categories | ||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||
| else: | ||||||||||||||||||||||||||||
| other_categories = test_method_categories | ||||||||||||||||||||||||||||
| dbginfo_categories = [ | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
| if dbginfo_categories: | |
| other_categories = [ | |
| category | |
| for category in test_method_categories | |
| if category not in dbginfo_categories | |
| ] | |
| else: | |
| other_categories = test_method_categories | |
| dbginfo_categories = [ | |
| dbginfo_categories = test_method_categories & all_dbginfo_categories | |
| other_categories = test_method_categories.difference(all_dbginfo_categories) | |
| if not dbginfo_categories: | |
| dbginfo_categories = [ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this:
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change, the property may have different types in different cases. Would this be OK? I mean, from the design perspective, because, of course, Python is lenient enough for this to work. And I suppose that you are also suggesting replacing
other_categories + [cat]withother_categories | {cat}, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the type consistent, but you can do that by converting the result to a list with
list(xxx)at an appropriate time. The thing that was bothering me was the combination of list- and set-based operations, which made it hard to follow.Changing the property type to always be a set might also be good idea, but I'd do that separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've updated the patch accordingly.
I wouldn't expect any noticeable performance gain from changing the property type, so I'm not inclined to work on it.