Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch

This commit is contained in:
Brian Behlendorf 2009-01-20 14:34:10 -08:00
commit cac715ea81
3 changed files with 24 additions and 27 deletions

View File

@ -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() {
}

1
scripts/zpios-test/tiny.sh Symbolic link
View File

@ -0,0 +1 @@
1th-16rc-4rs-1cs-4off.sh

View File

@ -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