Skip to content

fix: Get module name from argument when absent in modinfo - #3

Merged
adrianlasota merged 1 commit into
intel:mainfrom
lkleinax:fix__Get_module_name_from_argument_when_absent_in_modinfo
Jan 8, 2026
Merged

adrianlasota merged 1 commit into
intel:mainfrom
lkleinax:fix__Get_module_name_from_argument_when_absent_in_modinfo

Conversation

@lkleinax

@lkleinax lkleinax commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor

This pull request updates the behavior for retrieving driver information when the driver's name cannot be found in the output. Instead of defaulting to "N/A", the code now falls back to using the provided driver_name argument. The related unit test is also updated to reflect this new behavior.

Driver info fallback logic:

  • In mfd_package_manager/linux.py, the fallback value for driver_name in get_driver_info is changed from "N/A" to the provided driver_name argument.

Test updates:

  • In tests/unit/test_mfd_package_manager/test_linux.py, the assertion in test_get_driver_info_no_info is updated to expect the fallback to the provided driver name instead of "N/A".

Copilot AI review requested due to automatic review settings August 25, 2025 13:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the driver name was defaulting to "N/A" when module information was absent from modinfo output. The fix ensures that when the driver name cannot be extracted from modinfo, the provided driver_name argument is used instead of a generic "N/A" value.

  • Updated the get_driver_info method to use the input driver_name parameter as fallback when name extraction fails
  • Modified the corresponding test to expect the actual driver name instead of "N/A"

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
mfd_package_manager/linux.py Changed fallback value from "N/A" to the input driver_name parameter
tests/unit/test_mfd_package_manager/test_linux.py Updated test assertion to expect the actual driver name instead of "N/A"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lkleinax
lkleinax force-pushed the fix__Get_module_name_from_argument_when_absent_in_modinfo branch from 4657c6e to 54e5887 Compare January 8, 2026 10:15
Fixes intel#2
Signed-off-by: Łukasz Kleina <lukaszx.kleina@intel.com>
@lkleinax
lkleinax force-pushed the fix__Get_module_name_from_argument_when_absent_in_modinfo branch from c256f3e to 6fe7796 Compare January 8, 2026 14:25
@adrianlasota
adrianlasota merged commit a940a24 into intel:main Jan 8, 2026
23 checks passed
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.

5 participants