Skip to content

Conversation

@lubaihua33
Copy link
Collaborator

  1. Add a check for the result of modprobe script.
  2. 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.

Copy link
Contributor

Copilot AI left a 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 noexec filesystem 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

Copy link
Contributor

Copilot AI commented Dec 26, 2025

@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.

Copy link
Contributor

Copilot AI left a 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.

@lubaihua33 lubaihua33 force-pushed the baihua/fix_netvsc branch 3 times, most recently from 0ba26fe to d0e7863 Compare December 30, 2025 04:14
@lubaihua33 lubaihua33 requested a review from Copilot December 31, 2025 00:27
Copy link
Contributor

Copilot AI left a 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>
@lubaihua33 lubaihua33 merged commit 9ce62b4 into main Jan 4, 2026
58 checks passed
@lubaihua33 lubaihua33 deleted the baihua/fix_netvsc branch January 4, 2026 02:39
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.

3 participants