-
Notifications
You must be signed in to change notification settings - Fork 185
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
Xfstests tool & test update to support Azure file Share - SMB testing #3693
base: main
Are you sure you want to change the base?
Conversation
Can you improve the current version directly? |
I will work to update the XFStesting suite in Microsoft folder. It will take some time due to long run durations and validations for each test case. I will modify xfstesting.py to use the new Xfstests tool. |
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.
I will work to update the XFStesting suite in Microsoft folder. It will take some time due to long run durations and validations for each test case. I will modify xfstesting.py to use the new Xfstests tool.
There is a xfstests.py file already, can you directly fix there?
reducing timeout to 4 hours as original since we no longer are seeing issues with quick tests running > 2 hours with new XFStests code
@@ -504,7 +559,7 @@ def verify_btrfs_nvme_datadisk(self, log_path: Path, result: TestResult) -> None | |||
), | |||
timeout=TIME_OUT, | |||
use_new_environment=True, | |||
priority=5, | |||
priority=3, |
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.
no need change this, till it can be pass
if not self.node.shell.exists(result_path): | ||
self._log.debug(f"No files found in path {result_path}") | ||
# non terminating error !!! | ||
result = f"No files found in path {result_path}" |
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.
Why isn't a terminating failure? If there is no result, it means xfstest has no result found. maybe some errors on setup progress, so the case should be failed.
sudo=True, | ||
append=True, | ||
environment: Environment, | ||
names: List[str], |
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.
Sorry, I just found actually it needs key/value pairs. So,
- pass in the pairs to the method like
names: dict[str, str]
. - And then pass into
azure_file_share.create_file_share
likefile_share_names=names.values()
- Set test_folders_share_dict.
test_folders_share_dict : Dict[str, str] = {} for key, value in names: test_folders_share_dict[key] = fs_url_dict[value]
Xfstest is a file system and share testing tool that is maintained by kernel.org and is often used for performance, stability, feature operability and regression testing.
This LISA tool feature is an update to the existing Xfstests.py within Microsoft test cases and has been refactored to be able to run SMB as well as NFS tests in addition of existing set of Managed disks ( XFS, EXT3/4 and BTRFS ) as well as NVME
It's an implementation of "https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git", although users can specify custom repository and forks as well with their own test cases.
It's intended to use this via custom test suites to test SMB and NFS client functionality with various SMB and NFS servers (in addition to AZFiles ) currently in use across cloud and on-premises environments (You can call XFStest to create config file for existing shares, specify custom flags in addition to existing flags and call run_test() to trigger testing // reporting.
Note: detailed docstrings are included in tool class and respective method definitions.
Non-Breaking but Major changes:
TIMEOUT changes to 6 hours to allow additional time for managed disk tests to run.
SMB // CIFS test is hardcoded for specific cases as these are well known tests for Azure Files - SMB Premium // Standard
XFStests will now always pull the 'master' branch which is the last known stable release.
"verify_azure_file_share" test case priority has been reduced back to P3 as the test takes < 60 min to complete for CIFS
Xfstests will by default generate dmesg output per case. This can be found in your runtime / log / /testss / xfstests directory for analysis.
SubtestMessages will now contain diff of input vs output file for failed cases in the additional information field. Can be used for automated reporting when test environment is not preserved.
Upon Failure of any sub test, HTML will output only the failed subtests.
In case of success ( including skipped and expunged ), HTML report will dump the list of passed test cases along with test options.
Usage:
import using "from lisa.testsuite import TestResult"
Instantiate & install using "xfstests = node.tools[Xfstests]"
to create a config:
xfstest.set_local_config(
scratch_dev="/dev/sdb",
scratch_mnt="/mnt/scratch",
test_dev="/dev/sdc",
test_folder="/mnt/test",
file_system="xfs",
test_section="xfs-custom",
mount_opts="noatime",
testfs_mount_opts="noatime",
additional_parameters={"TEST_DEV2": "/dev/sdd"},
overwrite_config=True
)
Note: You can create multiple test sections using this method and call run_test() in sequence.
Please note guidance in "https://github.com/kdave/xfstests/blob/master/README.config-sections"
To exclude global list of tests
xfstests.set_excluded_tests(excluded_tests)
To run tests
xfstests.run_test(
test_section=test_type,
log_path=log_path,
result=result,
data_disk=data_disk,
test_cases=test_cases,
timeout=self.TIME_OUT - 30,
)
Tool instance will create and send sub-test messages to log as well as HTML & Junit.
On failure, it will display the failed sub-test as well as XFStest message to allow for troubleshooting.
On success, it will display list of passed // skipped sub-tests via PassedException.
Note: Expunged cases are treated as skipped
Supported OS:
redhat, suse , fedora, mariner, debian