From dc2fe24ca22392a589fbafdf15e4c32f42442006 Mon Sep 17 00:00:00 2001 From: John Wren Kennedy Date: Thu, 15 Sep 2022 14:14:35 -0600 Subject: [PATCH] ZTS: parameter expansion in zfs_unshare_006_pos zfs_unshare_006 checks to see if a dataset still has an active SMB share after doing an NFS unshare -a. The test could fail because the check for the SMB share does not expect dashes in a dataset name to be converted to underscores as pathname delimiters are. Reviewed-by: Tony Nguyen Signed-off-by: John Kennedy Closes #13893 --- tests/zfs-tests/include/libtest.shlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index 435dcb81c3..d163fc7c8c 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -1265,7 +1265,7 @@ function is_shared_smb datasetexists "$fs" || return if is_linux; then - net usershare list | grep -xFq "${fs//\//_}" + net usershare list | grep -xFq "${fs//[-\/]/_}" else log_note "SMB on $UNAME currently unsupported by the test framework" return 1