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

path_utilities.py: Prevent path case modification in GetContainingModules() #205

Merged

Conversation

makubacki
Copy link
Member

@makubacki makubacki commented Nov 10, 2022

Closes #204

Updates Edk2Path.GetContainingModules() to preserve case the case
for each absolute path returned in the list of absolute paths.

This allows callers dependent on case comparison to get the expected
result.

Also adds a new test case used to verify this change:

  • test_get_containing_modules_path_format()
    Used to confirm the case in paths returned from
    Edk2Path.GetContainingModules()

Signed-off-by: Michael Kubacki michael.kubacki@microsoft.com

@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

Base: 78.42% // Head: 78.51% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (e8e47e2) compared to base (392f87a).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head e8e47e2 differs from pull request most recent head e920a29. Consider uploading reports for the commit e920a29 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #205      +/-   ##
==========================================
+ Coverage   78.42%   78.51%   +0.08%     
==========================================
  Files          91       91              
  Lines       10125    10167      +42     
==========================================
+ Hits         7941     7983      +42     
  Misses       2184     2184              
Flag Coverage Δ
Linux 75.86% <100.00%> (+0.10%) ⬆️
Windows_NT 78.47% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
edk2toollib/uefi/edk2/path_utilities.py 99.31% <100.00%> (ø)
edk2toollib/uefi/edk2/test_path_utilities.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

…ules()

Closes tianocore#204

Updates `Edk2Path.GetContainingModules()` to preserve case the case
for each absolute path returned in the list of absolute paths.

This allows callers dependent on case comparison to get the expected
result.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki makubacki force-pushed the update_edk2path_path_str_format branch from c6f7552 to e920a29 Compare November 10, 2022 23:29
@Javagedes Javagedes added this to the 0.12.1 milestone Nov 11, 2022
@Javagedes Javagedes merged commit 5a01a69 into tianocore:master Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: GetContainingModules() can alter path case
2 participants