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:
Ryan Moeller
2020-02-27 12:38:34 -05:00
committed by GitHub
parent ab9646166d
commit 3d5ba1cf29
9 changed files with 35 additions and 54 deletions
+9
View File
@@ -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
}
+1
View File
@@ -113,6 +113,7 @@ export SYSTEM_FILES_COMMON='arp
export SYSTEM_FILES_FREEBSD='chflags
compress
diskinfo
dumpon
env
fsck