Skip to content

Commit

Permalink
ZTS: Debug zfs_share_concurrent_shares failure
Browse files Browse the repository at this point in the history
Update zfs_share_concurrent_shares test case to wait a few seconds
and recheck that the filesystem isn't shared.  The intent here is
determine the nature of the error and if it may be a race.

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
behlendorf committed Oct 10, 2023
1 parent 250349f commit bcddd55
Showing 1 changed file with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,26 @@ function test_share # filesystem

zfs set sharenfs=on $filesystem || \
sub_fail "zfs set sharenfs=on $filesystem failed."
is_shared $mntp || \
sub_fail "File system $filesystem is not shared (set sharenfs)."

#
# Verify 'zfs share' works as well.
# Verify 'zfs share' results in a shared mount. We check
# this multiple times because of Fedora 37+ it's been
# observed in the CI that the share may not be reported.
#
for retry in $(seq 1 10); do
is_shared $mntp && break

log_note "Wait $retry / 10 for is_shared $mntp"

if [[ $retry -eq 10 ]]; then
sub_fail "File system $filesystem is not shared (set sharenfs)."
fi

sleep 1
done

#
# Verify 'zfs unshare' works as well.
#
zfs unshare $filesystem || \
sub_fail "zfs unshare $filesystem failed."
Expand Down

0 comments on commit bcddd55

Please sign in to comment.