-
Notifications
You must be signed in to change notification settings - Fork 225
Add fix for modprobe tool #4173
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
Conversation
lubaihua33
commented
Dec 24, 2025
- Add a check for the result of modprobe script.
- Some systems have the security configuration that mount the filesystem with noexec option. Then any files can't be executed. In the PR, the mount option of the file path will be checked. If it has the mount option, the script file will be moved to usr/local/bin directory.
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.
Pull request overview
This pull request enhances the modprobe tool to handle systems with noexec filesystem mount options and improves error handling for the modprobe reloader script. The changes ensure that custom scripts can be executed even when the default working directory is mounted with the noexec option by automatically relocating them to executable directories. Additionally, the PR adds result checking for the modprobe reloader script and fixes an off-by-one error in test count reporting.
Key changes:
- Added detection and handling of
noexecfilesystem mounts for custom scripts - Added result validation for modprobe reloader script execution
- Fixed test count reporting in network interface reload tests
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| lisa/tools/modprobe.py | Added result checking and assertion for modprobe reloader script execution to catch failures early |
| lisa/node.py | Implemented is_path_mounted_noexec() method to detect if a path is on a filesystem mounted with the noexec option |
| lisa/executable.py | Added _move_files_into_executable_dir() method to relocate scripts from noexec filesystems to executable directories, and integrated noexec detection into the install process |
| lisa/microsoft/testsuites/network/netinterface.py | Corrected test count reporting in error messages (changed from test_count - 1 to test_count) |
Test Suggestions:
Key Test Cases:
verify_reload_hyperv_modules|validate_netvsc_reload
Impacted LISA Features:
NetworkInterface, StartStop, Modprobe (tool)
Tested Azure Marketplace Images:
- canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
- redhat rhel 9_5 latest
- microsoftcblmariner azure-linux-3 azure-linux-3-gen2 latest
- debian debian-12 12-gen2 latest
26a7df4 to
9655a1f
Compare
|
@lubaihua33 I've opened a new pull request, #4175, to work on those changes. Once the pull request is ready, I'll request review from you. |
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
0ba26fe to
d0e7863
Compare
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
d0e7863 to
5d2d12c
Compare