mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
ZTS: Misc fixes for FreeBSD
* Set geom debug flags in corrupt_blocks_at_level * Use the right time zone for history tests * Add missing commands.cfg entry for diskinfo * Rewrite get_last_txg_synced to use zdb * Don't check ulimits for sparse files * Suspend removal before removing a vdev, not after Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10054
This commit is contained in:
@@ -577,6 +577,11 @@ function corrupt_blocks_at_level # input_file corrupt_level
|
||||
|
||||
[[ -f $input_file ]] || log_fail "Couldn't find $input_file"
|
||||
|
||||
if is_freebsd; then
|
||||
# Temporarily allow corrupting an inuse device.
|
||||
debugflags=$(sysctl -n kern.geom.debugflags)
|
||||
sysctl kern.geom.debugflags=16
|
||||
fi
|
||||
|
||||
log_must list_file_blocks $input_file | \
|
||||
while read level path offset length; do
|
||||
@@ -586,6 +591,10 @@ function corrupt_blocks_at_level # input_file corrupt_level
|
||||
fi
|
||||
done
|
||||
|
||||
if is_freebsd; then
|
||||
sysctl kern.geom.debugflags=$debugflags
|
||||
fi
|
||||
|
||||
# This is necessary for pools made of loop devices.
|
||||
sync
|
||||
}
|
||||
|
||||
@@ -113,6 +113,7 @@ export SYSTEM_FILES_COMMON='arp
|
||||
|
||||
export SYSTEM_FILES_FREEBSD='chflags
|
||||
compress
|
||||
diskinfo
|
||||
dumpon
|
||||
env
|
||||
fsck
|
||||
|
||||
Reference in New Issue
Block a user