New testcase 'verify_smb_linux' for CIFS module validation#4503
Open
SRIKKANTH wants to merge 3 commits into
Open
New testcase 'verify_smb_linux' for CIFS module validation#4503SRIKKANTH wants to merge 3 commits into
SRIKKANTH wants to merge 3 commits into
Conversation
New testcase 'verify_smb_linux' A test to verify CIFS module and SMB share functionality between two Linux VMs. SMB server and client tools are added which are useful in validating samba file share with Linux OS and CIFS module in kernel.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an SMB/CIFS validation scenario to the storage test suite and introduces reusable SMB server/client tools for Linux nodes.
Changes:
- Added
SmbServerandSmbClienttools for Samba setup, CIFS mounting, and cleanup. - Added CIFS as a mount filesystem type.
- Added
verify_smb_linux, a two-node Linux test that validates SMB versions and file I/O over a share.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
lisa/tools/smb.py |
Adds SMB server/client tool implementations. |
lisa/tools/mkfs.py |
Adds cifs to the filesystem enum for mount usage. |
lisa/tools/__init__.py |
Exports the new SMB tools. |
lisa/microsoft/testsuites/core/storage.py |
Adds the SMB Linux validation test case. |
Comment on lines
+803
to
+805
| assert_that(file_content_client).described_as( | ||
| "SMB file content should match written content on client" | ||
| ).is_equal_to(test_content) |
Comment on lines
+821
to
+823
| assert_that(file_content_server).described_as( | ||
| "SMB file content should match on server VM" | ||
| ).is_equal_to(test_content) |
| ) | ||
| from lisa.node import Node | ||
| from lisa.operating_system import BSD, Fedora, Posix, Windows | ||
| from lisa.operating_system import BSD, Debian, Fedora, Posix, Ubuntu, Windows |
Comment on lines
+745
to
+747
| except Exception as e: | ||
| log.info(f"SMB version {smb_version} failed: {e}") | ||
| failed_versions.append(smb_version) |
Comment on lines
+752
to
+753
| except Exception: | ||
| pass |
Comment on lines
+847
to
+852
| except Exception as e: | ||
| log.info( | ||
| f"Failed to cleanup SMB client mount point {mount_point}: " | ||
| f"{e}. Continuing cleanup..." | ||
| ) | ||
| client_node.mark_dirty() |
Comment on lines
+859
to
+864
| except Exception as e: | ||
| log.info( | ||
| f"Failed to remove share {share_path} from SMB server: " | ||
| f"{e}. Finishing cleanup..." | ||
| ) | ||
| server_node.mark_dirty() |
Comment on lines
+116
to
+117
| # stop firewall to allow SMB traffic | ||
| self.node.tools[Firewall].stop() |
❌ AI Test Selection — FAILED74 test case(s) selected (view run) Marketplace image: suse sles-15-sp6 gen2 latest
Test case details
|
LiliDeng
reviewed
Jun 1, 2026
| timeout=TIME_OUT, | ||
| requirement=simple_requirement( | ||
| min_count=2, | ||
| supported_os=[Debian, Ubuntu], |
Collaborator
There was a problem hiding this comment.
supported_os=[Debian], should be enough.
LiliDeng
reviewed
Jun 1, 2026
| mount_point = f"/mnt/{share_name}" | ||
|
|
||
| failed_versions: List[str] = [] | ||
| try: |
Collaborator
There was a problem hiding this comment.
This try doesn't have except.
❌ AI Test Selection — FAILED74 test case(s) selected (view run) Marketplace image: suse sles-15-sp6 gen2 latest
Test case details
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
New testcase 'verify_smb_linux'
A test to verify CIFS module and SMB share functionality between two Linux VMs. SMB server and client tools are added which are useful in validating samba file share with Linux OS and CIFS module in kernel.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
verify_smb_linux
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results