]> git.proxmox.com Git - mirror_zfs.git/blame - scripts/zfs-tests.sh
Fix inverted check for --enable-pyzfs
[mirror_zfs.git] / scripts / zfs-tests.sh
CommitLineData
6bb24f4d
BB
1#!/bin/bash
2#
3# CDDL HEADER START
4#
5# The contents of this file are subject to the terms of the
6# Common Development and Distribution License, Version 1.0 only
7# (the "License"). You may not use this file except in compliance
8# with the License.
9#
10# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11# or http://www.opensolaris.org/os/licensing.
12# See the License for the specific language governing permissions
13# and limitations under the License.
14#
15# When distributing Covered Code, include this CDDL HEADER in each
16# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17# If applicable, add the following below this CDDL HEADER, with the
18# fields enclosed by brackets "[]" replaced with your own identifying
19# information: Portions Copyright [yyyy] [name of copyright owner]
20#
21# CDDL HEADER END
22#
6bb24f4d 23
c8f9061f 24BASE_DIR=$(dirname "$0")
6bb24f4d 25SCRIPT_COMMON=common.sh
c8f9061f
BB
26if [ -f "${BASE_DIR}/${SCRIPT_COMMON}" ]; then
27. "${BASE_DIR}/${SCRIPT_COMMON}"
6bb24f4d
BB
28else
29echo "Missing helper script ${SCRIPT_COMMON}" && exit 1
30fi
31
6bb24f4d 32PROG=zfs-tests.sh
c8f9061f 33VERBOSE="no"
6bb24f4d 34QUIET=
c8f9061f
BB
35CLEANUP="yes"
36CLEANUPALL="no"
37LOOPBACK="yes"
d7958b4c 38FILESIZE="4G"
6bb24f4d
BB
39RUNFILE=${RUNFILE:-"linux.run"}
40FILEDIR=${FILEDIR:-/var/tmp}
41DISKS=${DISKS:-""}
d8fa599f
GDN
42SINGLETEST=()
43SINGLETESTUSER="root"
271955da 44TAGS=""
9a810efb 45ITERATIONS=1
00481e7d
BB
46ZFS_DBGMSG="$STF_SUITE/callbacks/zfs_dbgmsg.ksh"
47ZFS_DMESG="$STF_SUITE/callbacks/zfs_dmesg.ksh"
379ca9cf
OF
48ZFS_MMP="$STF_SUITE/callbacks/zfs_mmp.ksh"
49TESTFAIL_CALLBACKS=${TESTFAIL_CALLBACKS:-"$ZFS_DBGMSG:$ZFS_DMESG:$ZFS_MMP"}
c8f9061f
BB
50LOSETUP=${LOSETUP:-/sbin/losetup}
51DMSETUP=${DMSETUP:-/sbin/dmsetup}
52
53#
54# Log an informational message when additional verbosity is enabled.
55#
56msg() {
57 if [ "$VERBOSE" = "yes" ]; then
58 echo "$@"
59 fi
60}
61
62#
63# Log a failure message, cleanup, and return an error.
64#
65fail() {
66 echo -e "$PROG: $1" >&2
67 cleanup
68 exit 1
69}
6bb24f4d
BB
70
71#
72# Attempt to remove loopback devices and files which where created earlier
73# by this script to run the test framework. The '-k' option may be passed
74# to the script to suppress cleanup for debugging purposes.
75#
76cleanup() {
c8f9061f 77 if [ "$CLEANUP" = "no" ]; then
6bb24f4d
BB
78 return 0
79 fi
80
c8f9061f 81 if [ "$LOOPBACK" = "yes" ]; then
6bb24f4d 82 for TEST_LOOPBACK in ${LOOPBACKS}; do
c552fbc5 83 LOOP_DEV=$(basename "$TEST_LOOPBACK")
c1d9abf9 84 DM_DEV=$(sudo "${DMSETUP}" ls 2>/dev/null | \
c552fbc5 85 grep "${LOOP_DEV}" | cut -f1)
6bb24f4d
BB
86
87 if [ -n "$DM_DEV" ]; then
c1d9abf9 88 sudo "${DMSETUP}" remove "${DM_DEV}" ||
6bb24f4d
BB
89 echo "Failed to remove: ${DM_DEV}"
90 fi
91
92 if [ -n "${TEST_LOOPBACK}" ]; then
c1d9abf9 93 sudo "${LOSETUP}" -d "${TEST_LOOPBACK}" ||
6bb24f4d
BB
94 echo "Failed to remove: ${TEST_LOOPBACK}"
95 fi
96 done
97 fi
98
99 for TEST_FILE in ${FILES}; do
c552fbc5 100 rm -f "${TEST_FILE}" &>/dev/null
6bb24f4d 101 done
c1d9abf9 102
c8f9061f 103 if [ "$STF_PATH_REMOVE" = "yes" ] && [ -d "$STF_PATH" ]; then
c1d9abf9
JWK
104 rm -Rf "$STF_PATH"
105 fi
6bb24f4d
BB
106}
107trap cleanup EXIT
108
109#
110# Attempt to remove all testpools (testpool.XXX), unopened dm devices,
111# loopback devices, and files. This is a useful way to cleanup a previous
112# test run failure which has left the system in an unknown state. This can
113# be dangerous and should only be used in a dedicated test environment.
114#
115cleanup_all() {
c552fbc5 116 local TEST_POOLS
74698631 117 TEST_POOLS=$(sudo "$ZPOOL" list -H -o name | grep testpool)
c552fbc5 118 local TEST_LOOPBACKS
c1d9abf9 119 TEST_LOOPBACKS=$(sudo "${LOSETUP}" -a|grep file-vdev|cut -f1 -d:)
c552fbc5
GDN
120 local TEST_FILES
121 TEST_FILES=$(ls /var/tmp/file-vdev* 2>/dev/null)
6bb24f4d
BB
122
123 msg
124 msg "--- Cleanup ---"
c552fbc5 125 msg "Removing pool(s): $(echo "${TEST_POOLS}" | tr '\n' ' ')"
6bb24f4d 126 for TEST_POOL in $TEST_POOLS; do
74698631 127 sudo "$ZPOOL" destroy "${TEST_POOL}"
6bb24f4d
BB
128 done
129
c1d9abf9 130 msg "Removing dm(s): $(sudo "${DMSETUP}" ls |
6bb24f4d 131 grep loop | tr '\n' ' ')"
c1d9abf9 132 sudo "${DMSETUP}" remove_all
6bb24f4d 133
c552fbc5 134 msg "Removing loopback(s): $(echo "${TEST_LOOPBACKS}" | tr '\n' ' ')"
6bb24f4d 135 for TEST_LOOPBACK in $TEST_LOOPBACKS; do
c1d9abf9 136 sudo "${LOSETUP}" -d "${TEST_LOOPBACK}"
6bb24f4d
BB
137 done
138
c552fbc5 139 msg "Removing files(s): $(echo "${TEST_FILES}" | tr '\n' ' ')"
6bb24f4d 140 for TEST_FILE in $TEST_FILES; do
c1d9abf9 141 sudo rm -f "${TEST_FILE}"
6bb24f4d
BB
142 done
143}
144
6bb24f4d
BB
145#
146# Takes a name as the only arguments and looks for the following variations
147# on that name. If one is found it is returned.
148#
c8f9061f
BB
149# $RUNFILE_DIR/<name>
150# $RUNFILE_DIR/<name>.run
6bb24f4d
BB
151# <name>
152# <name>.run
153#
154find_runfile() {
155 local NAME=$1
156 local RESULT=""
157
c8f9061f
BB
158 if [ -f "$RUNFILE_DIR/$NAME" ]; then
159 RESULT="$RUNFILE_DIR/$NAME"
160 elif [ -f "$RUNFILE_DIR/$NAME.run" ]; then
161 RESULT="$RUNFILE_DIR/$NAME.run"
6bb24f4d
BB
162 elif [ -f "$NAME" ]; then
163 RESULT="$NAME"
164 elif [ -f "$NAME.run" ]; then
165 RESULT="$NAME.run"
166 fi
167
168 echo "$RESULT"
169}
170
c1d9abf9
JWK
171#
172# Symlink file if it appears under any of the given paths.
173#
174create_links() {
175 local dir_list="$1"
176 local file_list="$2"
177
74698631 178 [ -n "$STF_PATH" ] || fail "STF_PATH wasn't correctly set"
c1d9abf9
JWK
179
180 for i in $file_list; do
181 for j in $dir_list; do
182 [ ! -e "$STF_PATH/$i" ] || continue
183
74698631
GDN
184 if [ ! -d "$j/$i" ] && [ -e "$j/$i" ]; then
185 ln -s "$j/$i" "$STF_PATH/$i" || \
c1d9abf9
JWK
186 fail "Couldn't link $i"
187 break
188 fi
189 done
190
74698631 191 [ ! -e "$STF_PATH/$i" ] && STF_MISSING_BIN="$STF_MISSING_BIN$i "
c1d9abf9
JWK
192 done
193}
194
195#
196# Constrain the path to limit the available binaries to a known set.
197# When running in-tree a top level ./bin/ directory is created for
198# convenience, otherwise a temporary directory is used.
199#
200constrain_path() {
74698631 201 . "$STF_SUITE/include/commands.cfg"
c1d9abf9 202
c8f9061f
BB
203 if [ "$INTREE" = "yes" ]; then
204 # Constrained path set to ./zfs/bin/
205 STF_PATH="$BIN_DIR"
206 STF_PATH_REMOVE="no"
207 STF_MISSING_BIN=""
c1d9abf9
JWK
208 if [ ! -d "$STF_PATH" ]; then
209 mkdir "$STF_PATH"
c8f9061f 210 chmod 755 "$STF_PATH" || fail "Couldn't chmod $STF_PATH"
c1d9abf9 211 fi
c8f9061f
BB
212
213 # Special case links for standard zfs utilities
214 DIRS="$(find "$CMD_DIR" -type d \( ! -name .deps -a \
215 ! -name .libs \) -print | tr '\n' ' ')"
216 create_links "$DIRS" "$ZFS_FILES"
217
218 # Special case links for zfs test suite utilities
219 DIRS="$(find "$STF_SUITE" -type d \( ! -name .deps -a \
220 ! -name .libs \) -print | tr '\n' ' ')"
221 create_links "$DIRS" "$ZFSTEST_FILES"
c1d9abf9 222 else
c8f9061f 223 # Constrained path set to /var/tmp/constrained_path.*
c1d9abf9
JWK
224 SYSTEMDIR=${SYSTEMDIR:-/var/tmp/constrained_path.XXXX}
225 STF_PATH=$(/bin/mktemp -d "$SYSTEMDIR")
c8f9061f
BB
226 STF_PATH_REMOVE="yes"
227 STF_MISSING_BIN=""
c1d9abf9 228
c8f9061f 229 chmod 755 "$STF_PATH" || fail "Couldn't chmod $STF_PATH"
c1d9abf9 230
c1d9abf9
JWK
231 # Special case links for standard zfs utilities
232 create_links "/bin /usr/bin /sbin /usr/sbin" "$ZFS_FILES"
233
c8f9061f
BB
234 # Special case links for zfs test suite utilities
235 create_links "$STF_SUITE/bin" "$ZFSTEST_FILES"
c1d9abf9
JWK
236 fi
237
c8f9061f
BB
238 # Standard system utilities
239 create_links "/bin /usr/bin /sbin /usr/sbin" "$SYSTEM_FILES"
240
c1d9abf9 241 # Exceptions
74698631 242 ln -fs "$STF_PATH/awk" "$STF_PATH/nawk"
5c214ae3
BB
243 ln -fs /sbin/fsck.ext4 "$STF_PATH/fsck"
244 ln -fs /sbin/mkfs.ext4 "$STF_PATH/newfs"
74698631
GDN
245 ln -fs "$STF_PATH/gzip" "$STF_PATH/compress"
246 ln -fs "$STF_PATH/gunzip" "$STF_PATH/uncompress"
247 ln -fs "$STF_PATH/exportfs" "$STF_PATH/share"
248 ln -fs "$STF_PATH/exportfs" "$STF_PATH/unshare"
c1d9abf9
JWK
249}
250
6bb24f4d
BB
251#
252# Output a useful usage message.
253#
254usage() {
255cat << EOF
256USAGE:
d25534f8 257$0 [hvqxkf] [-s SIZE] [-r RUNFILE] [-t PATH] [-u USER]
6bb24f4d
BB
258
259DESCRIPTION:
260 ZFS Test Suite launch script
261
262OPTIONS:
263 -h Show this message
264 -v Verbose zfs-tests.sh output
265 -q Quiet test-runner output
266 -x Remove all testpools, dm, lo, and files (unsafe)
267 -k Disable cleanup after test failure
268 -f Use files only, disables block device tests
c8f9061f 269 -c Only create and populate constrained path
9a810efb 270 -I NUM Number of iterations
6bb24f4d 271 -d DIR Use DIR for files and loopback devices
d7958b4c 272 -s SIZE Use vdevs of SIZE (default: 4G)
6bb24f4d 273 -r RUNFILE Run tests in RUNFILE (default: linux.run)
d25534f8 274 -t PATH Run single test at PATH relative to test suite
271955da 275 -T TAGS Comma separated list of tags (default: 'functional')
d8fa599f 276 -u USER Run single test as USER (default: root)
6bb24f4d
BB
277
278EXAMPLES:
279# Run the default (linux) suite of tests and output the configuration used.
280$0 -v
281
282# Run a smaller suite of tests designed to run more quickly.
283$0 -r linux-fast
284
285# Cleanup a previous run of the test suite prior to testing, run the
286# default (linux) suite of tests and perform no cleanup on exit.
e6123796 287$0 -x
6bb24f4d
BB
288
289EOF
290}
291
9a810efb 292while getopts 'hvqxkfcd:s:r:?t:T:u:I:' OPTION; do
6bb24f4d
BB
293 case $OPTION in
294 h)
295 usage
296 exit 1
297 ;;
298 v)
c552fbc5 299 # shellcheck disable=SC2034
c8f9061f 300 VERBOSE="yes"
6bb24f4d
BB
301 ;;
302 q)
303 QUIET="-q"
304 ;;
305 x)
c8f9061f 306 CLEANUPALL="yes"
6bb24f4d
BB
307 ;;
308 k)
c8f9061f 309 CLEANUP="no"
6bb24f4d
BB
310 ;;
311 f)
c8f9061f
BB
312 LOOPBACK="no"
313 ;;
314 c)
315 constrain_path
316 exit
6bb24f4d
BB
317 ;;
318 d)
319 FILEDIR="$OPTARG"
320 ;;
9a810efb
GDN
321 I)
322 ITERATIONS="$OPTARG"
323 if [ "$ITERATIONS" -le 0 ]; then
324 fail "Iterations must be greater than 0."
325 fi
326 ;;
6bb24f4d
BB
327 s)
328 FILESIZE="$OPTARG"
329 ;;
330 r)
331 RUNFILE="$OPTARG"
332 ;;
d8fa599f
GDN
333 t)
334 if [ ${#SINGLETEST[@]} -ne 0 ]; then
335 fail "-t can only be provided once."
336 fi
337 SINGLETEST+=("$OPTARG")
338 ;;
9a810efb
GDN
339 T)
340 TAGS="$OPTARG"
341 ;;
d8fa599f
GDN
342 u)
343 SINGLETESTUSER="$OPTARG"
344 ;;
6bb24f4d
BB
345 ?)
346 usage
347 exit
348 ;;
349 esac
350done
351
352shift $((OPTIND-1))
353
354FILES=${FILES:-"$FILEDIR/file-vdev0 $FILEDIR/file-vdev1 $FILEDIR/file-vdev2"}
355LOOPBACKS=${LOOPBACKS:-""}
356
d8fa599f 357if [ ${#SINGLETEST[@]} -ne 0 ]; then
271955da 358 if [ -n "$TAGS" ]; then
359 fail "-t and -T are mutually exclusive."
360 fi
c8f9061f 361 RUNFILE_DIR="/var/tmp"
d8fa599f
GDN
362 RUNFILE="zfs-tests.$$.run"
363 SINGLEQUIET="False"
364
365 if [ -n "$QUIET" ]; then
366 SINGLEQUIET="True"
367 fi
368
c8f9061f 369 cat >$RUNFILE_DIR/$RUNFILE << EOF
d8fa599f
GDN
370[DEFAULT]
371pre =
372quiet = $SINGLEQUIET
373pre_user = root
374user = $SINGLETESTUSER
375timeout = 600
376post_user = root
377post =
378outputdir = /var/tmp/test_results
379EOF
380 for t in "${SINGLETEST[@]}"
381 do
382 SINGLETESTDIR=$(dirname "$t")
383 SINGLETESTFILE=$(basename "$t")
384 SETUPSCRIPT=
385 CLEANUPSCRIPT=
386
d25534f8 387 if [ -f "$STF_SUITE/$SINGLETESTDIR/setup.ksh" ]; then
d8fa599f
GDN
388 SETUPSCRIPT="setup"
389 fi
390
d25534f8 391 if [ -f "$STF_SUITE/$SINGLETESTDIR/cleanup.ksh" ]; then
d8fa599f
GDN
392 CLEANUPSCRIPT="cleanup"
393 fi
394
c8f9061f 395 cat >>$RUNFILE_DIR/$RUNFILE << EOF
d8fa599f
GDN
396
397[$SINGLETESTDIR]
398tests = ['$SINGLETESTFILE']
399pre = $SETUPSCRIPT
400post = $CLEANUPSCRIPT
271955da 401tags = ['functional']
d8fa599f
GDN
402EOF
403 done
404fi
405
271955da 406#
407# Use default tag if none was specified
408#
409TAGS=${TAGS:='functional'}
410
6bb24f4d
BB
411#
412# Attempt to locate the runfile describing the test workload.
413#
414if [ -n "$RUNFILE" ]; then
415 SAVED_RUNFILE="$RUNFILE"
416 RUNFILE=$(find_runfile "$RUNFILE")
417 [ -z "$RUNFILE" ] && fail "Cannot find runfile: $SAVED_RUNFILE"
418fi
419
420if [ ! -r "$RUNFILE" ]; then
421 fail "Cannot read runfile: $RUNFILE"
422fi
423
424#
425# This script should not be run as root. Instead the test user, which may
426# be a normal user account, needs to be configured such that it can
427# run commands via sudo passwordlessly.
428#
c552fbc5 429if [ "$(id -u)" = "0" ]; then
6bb24f4d
BB
430 fail "This script must not be run as root."
431fi
432
c552fbc5 433if [ "$(sudo whoami)" != "root" ]; then
6bb24f4d
BB
434 fail "Passwordless sudo access required."
435fi
436
c1d9abf9 437#
c8f9061f 438# Constrain the available binaries to a known set.
c1d9abf9
JWK
439#
440constrain_path
441
e6123796
JX
442#
443# Check if ksh exists
444#
74698631 445[ -e "$STF_PATH/ksh" ] || fail "This test suite requires ksh."
3f03fc8d
BB
446[ -e "$STF_SUITE/include/default.cfg" ] || fail \
447 "Missing $STF_SUITE/include/default.cfg file."
e6123796 448
6bb24f4d 449#
c8f9061f 450# Verify the ZFS module stack is loaded.
6bb24f4d 451#
c1d9abf9 452sudo "${ZFS_SH}" &>/dev/null
6bb24f4d
BB
453
454#
455# Attempt to cleanup all previous state for a new test run.
456#
c8f9061f 457if [ "$CLEANUPALL" = "yes" ]; then
6bb24f4d
BB
458 cleanup_all
459fi
460
461#
462# By default preserve any existing pools
3fd3e56c 463# NOTE: Since 'zpool list' outputs a newline-delimited list convert $KEEP from
464# space-delimited to newline-delimited.
6bb24f4d
BB
465#
466if [ -z "${KEEP}" ]; then
3fd3e56c 467 KEEP="$(sudo "$ZPOOL" list -H -o name)"
6bb24f4d
BB
468 if [ -z "${KEEP}" ]; then
469 KEEP="rpool"
470 fi
3fd3e56c 471else
472 KEEP="$(echo -e "${KEEP//[[:blank:]]/\n}")"
6bb24f4d
BB
473fi
474
3fd3e56c 475#
476# NOTE: The following environment variables are undocumented
477# and should be used for testing purposes only:
478#
479# __ZFS_POOL_EXCLUDE - don't iterate over the pools it lists
480# __ZFS_POOL_RESTRICT - iterate only over the pools it lists
481#
482# See libzfs/libzfs_config.c for more information.
483#
484__ZFS_POOL_EXCLUDE="$(echo "$KEEP" | sed ':a;N;s/\n/ /g;ba')"
d21d5b82 485
74698631 486. "$STF_SUITE/include/default.cfg"
c1d9abf9 487
6bb24f4d
BB
488msg
489msg "--- Configuration ---"
490msg "Runfile: $RUNFILE"
491msg "STF_TOOLS: $STF_TOOLS"
492msg "STF_SUITE: $STF_SUITE"
c1d9abf9 493msg "STF_PATH: $STF_PATH"
6bb24f4d
BB
494
495#
496# No DISKS have been provided so a basic file or loopback based devices
497# must be created for the test suite to use.
498#
499if [ -z "${DISKS}" ]; then
500 #
501 # Create sparse files for the test suite. These may be used
502 # directory or have loopback devices layered on them.
503 #
504 for TEST_FILE in ${FILES}; do
505 [ -f "$TEST_FILE" ] && fail "Failed file exists: ${TEST_FILE}"
c552fbc5 506 truncate -s "${FILESIZE}" "${TEST_FILE}" ||
6bb24f4d 507 fail "Failed creating: ${TEST_FILE} ($?)"
5c596ba7
TC
508 if [[ "$DISKS" ]]; then
509 DISKS="$DISKS $TEST_FILE"
510 else
511 DISKS="$TEST_FILE"
512 fi
6bb24f4d
BB
513 done
514
515 #
516 # If requested setup loopback devices backed by the sparse files.
517 #
c8f9061f 518 if [ "$LOOPBACK" = "yes" ]; then
6bb24f4d 519 DISKS=""
c8f9061f
BB
520
521 test -x "$LOSETUP" || fail "$LOSETUP utility must be installed"
6bb24f4d
BB
522
523 for TEST_FILE in ${FILES}; do
c1d9abf9
JWK
524 TEST_LOOPBACK=$(sudo "${LOSETUP}" -f)
525 sudo "${LOSETUP}" "${TEST_LOOPBACK}" "${TEST_FILE}" ||
6bb24f4d
BB
526 fail "Failed: ${TEST_FILE} -> ${TEST_LOOPBACK}"
527 LOOPBACKS="${LOOPBACKS}${TEST_LOOPBACK} "
c552fbc5 528 BASELOOPBACKS=$(basename "$TEST_LOOPBACK")
5c596ba7
TC
529 if [[ "$DISKS" ]]; then
530 DISKS="$DISKS $BASELOOPBACKS"
531 else
532 DISKS="$BASELOOPBACKS"
533 fi
6bb24f4d
BB
534 done
535 fi
536fi
537
c8f9061f 538NUM_DISKS=$(echo "${DISKS}" | awk '{print NF}')
c552fbc5 539[ "$NUM_DISKS" -lt 3 ] && fail "Not enough disks ($NUM_DISKS/3 minimum)"
6bb24f4d
BB
540
541#
542# Disable SELinux until the ZFS Test Suite has been updated accordingly.
543#
c1d9abf9
JWK
544if [ -x "$STF_PATH/setenforce" ]; then
545 sudo setenforce permissive &>/dev/null
6bb24f4d
BB
546fi
547
00481e7d 548#
27ef66ef 549# Enable internal ZFS debug log and clear it.
00481e7d
BB
550#
551if [ -e /sys/module/zfs/parameters/zfs_dbgmsg_enable ]; then
552 sudo /bin/sh -c "echo 1 >/sys/module/zfs/parameters/zfs_dbgmsg_enable"
553 sudo /bin/sh -c "echo 0 >/proc/spl/kstat/zfs/dbgmsg"
554fi
555
6bb24f4d
BB
556msg "FILEDIR: $FILEDIR"
557msg "FILES: $FILES"
558msg "LOOPBACKS: $LOOPBACKS"
559msg "DISKS: $DISKS"
560msg "NUM_DISKS: $NUM_DISKS"
561msg "FILESIZE: $FILESIZE"
9a810efb
GDN
562msg "ITERATIONS: $ITERATIONS"
563msg "TAGS: $TAGS"
6bb24f4d 564msg "Keep pool(s): $KEEP"
c1d9abf9 565msg "Missing util(s): $STF_MISSING_BIN"
6bb24f4d
BB
566msg ""
567
568export STF_TOOLS
569export STF_SUITE
c1d9abf9 570export STF_PATH
6bb24f4d 571export DISKS
3fd3e56c 572export FILEDIR
6bb24f4d 573export KEEP
d21d5b82 574export __ZFS_POOL_EXCLUDE
00481e7d 575export TESTFAIL_CALLBACKS
c1d9abf9 576export PATH=$STF_PATH
6bb24f4d 577
9a810efb
GDN
578msg "${TEST_RUNNER} ${QUIET} -c ${RUNFILE} -T ${TAGS} -i ${STF_SUITE}" \
579 "-I ${ITERATIONS}"
580${TEST_RUNNER} ${QUIET} -c "${RUNFILE}" -T "${TAGS}" -i "${STF_SUITE}" \
581 -I "${ITERATIONS}"
6bb24f4d
BB
582RESULT=$?
583echo
584
d8fa599f 585if [ ${#SINGLETEST[@]} -ne 0 ]; then
d25534f8 586 rm -f "$RUNFILE" &>/dev/null
d8fa599f
GDN
587fi
588
6bb24f4d 589exit ${RESULT}