Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test-info.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ shares:
backend:
# If present override default backend filesystem
name: cephfs
# If present list the variant of the backend filesystem
variant: vfs
# If present list the variant used for samba/ctdb setup
variant: default
# If present list the method used in share configuration
method: vfs
# If present, use these credentials to perform the
# tests for this share
users:
Expand Down
10 changes: 7 additions & 3 deletions testcases/smbtorture/test_smbtorture.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

def flapping_file(backend: str, variant: str = "") -> str:
file = "flapping." + backend
if variant and variant != "default":
file_variant = f"{file}-{variant}"
if variant and "vfs" in variant:
file_variant = f"{file}-vfs"
if os.path.exists(os.path.join(selftest_dir, file_variant)):
return file_variant
if os.path.exists(os.path.join(selftest_dir, file)):
Expand Down Expand Up @@ -62,7 +62,11 @@ def smbtorture(share_name: str, test: str, tmp_output: Path) -> bool:
flapping_list = ["flapping", "flapping.d"]
share = testhelper.get_share(test_info, share_name)
test_backend = share["backend"].get("name")
test_backend_variant = share["backend"].get("variant")
test_backend_variant = (
share["backend"].get("method")
if share["backend"].get("method") is not None
else share["backend"].get("variant")
)
if test_backend is not None:
file = flapping_file(test_backend, test_backend_variant)
if file is not None:
Expand Down
Loading