mirror of
https://github.com/opnsense/src.git
synced 2026-02-25 19:05:20 -05:00
It was originally written by Sun as part of the STF (Solaris test framework). They open sourced it in OpenSolaris, then HighCloud partially ported it to FreeBSD, and Spectra Logic finished the port. We also added many testcases, fixed many broken ones, and converted them all to the ATF framework. We've had help along the way from avg, araujo, smh, and brd. By default most of the tests are disabled. Set the disks Kyua variable to enable them. Submitted by: asomers, will, justing, ken, brd, avg, araujo, smh Sponsored by: Spectra Logic Corp, HighCloud
21 lines
689 B
Bash
21 lines
689 B
Bash
. ${STF_SUITE}/include/libtest.kshlib
|
|
. ${STF_SUITE}/include/commands.cfg
|
|
|
|
# $FreeBSD$
|
|
|
|
# Environment-dependent constants.
|
|
for d in `geom disk list | awk '/Name:/ {print $3}'`; do
|
|
# Clear the GPT label first to avoid spurious create failures.
|
|
gpart destroy -F $d >/dev/null 2>&1
|
|
if gpart create -s gpt $d >/dev/null 2>&1 ; then
|
|
gpart destroy $d >/dev/null 2>&1 || continue
|
|
DISKS=("${DISKS[@]}" "/dev/$d") #"$DISKS $d"
|
|
fi
|
|
# Don't bother testing any more if we have enough already.
|
|
# Currently we use at most 5 disks plus 1 for temporary disks.
|
|
[ ${#DISKS[@]} -eq 6 ] && break
|
|
done
|
|
export KEEP="$(zpool list -H -o name)"
|
|
|
|
# Pull in constants.
|
|
. ${STF_SUITE}/include/constants.cfg
|