Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch
This commit is contained in:
commit
78e1e91c7c
|
@ -39,12 +39,20 @@
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--path=zpios \
|
--path=zpios \
|
||||||
--chunksize=1M \
|
--threadcount=1 \
|
||||||
|
--regioncount=16 \
|
||||||
--regionsize=4M \
|
--regionsize=4M \
|
||||||
--regioncount=256 \
|
--chunksize=1M \
|
||||||
--threadcount=4 \
|
|
||||||
--offset=4M \
|
--offset=4M \
|
||||||
--cleanup \
|
--cleanup \
|
||||||
--verbose \
|
--verbose \
|
||||||
--human-readable \
|
--human-readable \
|
||||||
${ZPIOS_OPTIONS}"
|
${ZPIOS_OPTIONS}"
|
||||||
|
|
||||||
|
zpios_start() {
|
||||||
|
echo ${ZPIOS_CMD}
|
||||||
|
$ZPIOS_CMD || exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
zpios_stop() {
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
1th-16rc-4rs-1cs-4off.sh
|
|
@ -95,11 +95,11 @@ print_stats() {
|
||||||
check_test() {
|
check_test() {
|
||||||
|
|
||||||
if [ ! -f ${ZPIOS_TEST} ]; then
|
if [ ! -f ${ZPIOS_TEST} ]; then
|
||||||
local NAME=`basename ${ZPIOS_TEST} .cfg`
|
local NAME=`basename ${ZPIOS_TEST} .sh`
|
||||||
ERROR="Unknown test '${NAME}', available tests are:\n"
|
ERROR="Unknown test '${NAME}', available tests are:\n"
|
||||||
|
|
||||||
for TST in `ls ${TOPDIR}/scripts/zpios-test/`; do
|
for TST in `ls ${TOPDIR}/scripts/zpios-test/`; do
|
||||||
local NAME=`basename ${TST} .cfg`
|
local NAME=`basename ${TST} .sh`
|
||||||
ERROR="${ERROR}${NAME}\n"
|
ERROR="${ERROR}${NAME}\n"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -110,8 +110,8 @@ check_test() {
|
||||||
}
|
}
|
||||||
|
|
||||||
PROFILE=
|
PROFILE=
|
||||||
ZPOOL_CONFIG=zpool-config.cfg
|
ZPOOL_CONFIG=zpool-config.sh
|
||||||
ZPIOS_TEST=zpios-test.cfg
|
ZPIOS_TEST=zpios-test.sh
|
||||||
ZPOOL_NAME=zpios
|
ZPOOL_NAME=zpios
|
||||||
|
|
||||||
while getopts 'hvpc:t:' OPTION; do
|
while getopts 'hvpc:t:' OPTION; do
|
||||||
|
@ -131,7 +131,7 @@ while getopts 'hvpc:t:' OPTION; do
|
||||||
ZPOOL_CONFIG=${OPTARG}
|
ZPOOL_CONFIG=${OPTARG}
|
||||||
;;
|
;;
|
||||||
t)
|
t)
|
||||||
ZPIOS_TEST=${TOPDIR}/scripts/zpios-test/${OPTARG}.cfg
|
ZPIOS_TEST=${TOPDIR}/scripts/zpios-test/${OPTARG}.sh
|
||||||
;;
|
;;
|
||||||
?)
|
?)
|
||||||
usage
|
usage
|
||||||
|
@ -144,8 +144,9 @@ if [ $(id -u) != 0 ]; then
|
||||||
die "Must run as root"
|
die "Must run as root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Validate your using a known test
|
# Validate and source your test config
|
||||||
check_test || die "${ERROR}"
|
check_test || die "${ERROR}"
|
||||||
|
. ${ZPIOS_TEST}
|
||||||
|
|
||||||
# Pull in the zpios test module is not loaded. If this fails it is
|
# Pull in the zpios test module is not loaded. If this fails it is
|
||||||
# likely because the full module stack was not yet loaded with zfs.sh
|
# likely because the full module stack was not yet loaded with zfs.sh
|
||||||
|
@ -168,14 +169,6 @@ fi
|
||||||
# Create the zpool configuration
|
# Create the zpool configuration
|
||||||
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} || exit 1
|
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} || exit 1
|
||||||
|
|
||||||
if [ -n "${ZPIOS_PRE}" ]; then
|
|
||||||
msg "Executing ${ZPIOS_PRE}"
|
|
||||||
${ZPIOS_PRE} || exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Source the zpios test configuration
|
|
||||||
. ${ZPIOS_TEST}
|
|
||||||
|
|
||||||
if [ $PROFILE ]; then
|
if [ $PROFILE ]; then
|
||||||
ZPIOS_CMD="${ZPIOS_CMD} --log=${PROFILE_ZPIOS_LOG}"
|
ZPIOS_CMD="${ZPIOS_CMD} --log=${PROFILE_ZPIOS_LOG}"
|
||||||
ZPIOS_CMD="${ZPIOS_CMD} --prerun=${PROFILE_ZPIOS_PRE}"
|
ZPIOS_CMD="${ZPIOS_CMD} --prerun=${PROFILE_ZPIOS_PRE}"
|
||||||
|
@ -184,19 +177,14 @@ fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
date
|
date
|
||||||
echo ${ZPIOS_CMD}
|
zpios_start
|
||||||
$ZPIOS_CMD || exit 1
|
zpios_stop
|
||||||
|
|
||||||
print_stats
|
print_stats
|
||||||
|
|
||||||
if [ -n "${ZPIOS_POST}" ]; then
|
# Destroy the zpool configuration
|
||||||
msg "Executing ${ZPIOS_POST}"
|
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} -d || exit 1
|
||||||
${ZPIOS_POST} || exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg "${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}"
|
|
||||||
${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
|
|
||||||
|
|
||||||
|
# Unload the test module stack
|
||||||
unload_modules
|
unload_modules
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue