Add -p switch to "zpool get"
[zfs.git] / scripts / zfault.sh
index 08d8225..a5f1f3c 100755 (executable)
@@ -42,7 +42,7 @@ PROG=zfault.sh
 usage() {
 cat << EOF
 USAGE:
-$0 [hvc]
+$0 [hvcts]
 
 DESCRIPTION:
        ZPOOL fault verification tests
@@ -86,8 +86,12 @@ if [ $(id -u) != 0 ]; then
        die "Must run as root"
 fi
 
+# Initialize the test suite
+init
+
 # Perform pre-cleanup is requested
 if [ ${CLEANUP} ]; then
+       ${ZFS_SH} -u
        cleanup_md_devices
        cleanup_loop_devices
        rm -f /tmp/zpool.cache.*
@@ -915,7 +919,7 @@ test_write_timeout_hard() {
        # resilvered without error and we should see minimally the zfs.io,
        # zfs.statechange (VDEV_STATE_HEALTHY (0x7)), and zfs.resilver.*
        # events posted.
-       ${ZPOOL} online ${POOL_NAME} ${VDEV_FAULTY}1 || fail 51
+       ${ZPOOL} online ${POOL_NAME} ${VDEV_FAULTY} || fail 51
        sleep 3
        test `zpool_event "zfs.io" "zio_err"` = "0x5" || fail 52
        test `zpool_event "zfs.statechange" "vdev_state"` = "0x7" || fail 53