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 <behlendorf1@llnl.gov>
  • Loading branch information
behlendorf committed Oct 9, 2023
1 parent 008baa0 commit 4af86e3
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 4af86e3

Please sign in to comment.