mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
ZTS: Another round of changes for FreeBSD
Highlights: * is_linux -> is_illumos swaps * make block_device_wait more clever when paths are given * slightly optimize default_cleanup_noexit * remove platform differences in user_run * temporarily expect non-libfetch behavior for keylocation=/foo/bar * fix sharenfs exceptions * don't test multihost property * fix misc broken platform checks * clear zinjected faults in removal_resume_export callback Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10092
This commit is contained in:
@@ -74,14 +74,33 @@ function block_device_wait
|
||||
{
|
||||
if is_linux; then
|
||||
udevadm trigger $*
|
||||
typeset local start=$SECONDS
|
||||
typeset start=$SECONDS
|
||||
udevadm settle
|
||||
typeset local elapsed=$((SECONDS - start))
|
||||
typeset elapsed=$((SECONDS - start))
|
||||
[[ $elapsed > 60 ]] && \
|
||||
log_note udevadm settle time too long: $elapsed
|
||||
elif is_freebsd; then
|
||||
sleep 3
|
||||
if [[ ${#@} -eq 0 ]]; then
|
||||
sleep 3
|
||||
return
|
||||
fi
|
||||
fi
|
||||
# Poll for the given paths to appear, but give up eventually.
|
||||
typeset -i i
|
||||
for (( i = 0; i < 5; ++i )); do
|
||||
typeset missing=false
|
||||
typeset dev
|
||||
for dev in "${@}"; do
|
||||
if ! [[ -f $dev ]]; then
|
||||
missing=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if ! $missing; then
|
||||
break
|
||||
fi
|
||||
sleep ${#@}
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
@@ -612,8 +612,8 @@ function default_cleanup_noexit
|
||||
then
|
||||
destroy_pool $pool
|
||||
fi
|
||||
ALL_POOLS=$(get_all_pools)
|
||||
done
|
||||
ALL_POOLS=$(get_all_pools)
|
||||
done
|
||||
|
||||
zfs mount -a
|
||||
@@ -3315,13 +3315,7 @@ function user_run
|
||||
shift
|
||||
|
||||
log_note "user:$user $@"
|
||||
if is_freebsd; then
|
||||
eval "su \$user -c \"$@\"" > $TEST_BASE_DIR/out 2>$TEST_BASE_DIR/err
|
||||
return $?
|
||||
else
|
||||
eval su - \$user -c \"$@\" > $TEST_BASE_DIR/out 2>$TEST_BASE_DIR/err
|
||||
return $?
|
||||
fi
|
||||
eval su - \$user -c \"$@\" > $TEST_BASE_DIR/out 2>$TEST_BASE_DIR/err
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user