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 c456627 commit b32bc0a
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,17 @@ 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)."

for retry in $(seq 1 10); do
is_shared $mntp && return
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 share' works as well.
Expand Down

0 comments on commit b32bc0a

Please sign in to comment.