]>
git.proxmox.com Git - mirror_zfs-debian.git/blob - tests/zfs-tests/tests/functional/fault/cleanup.ksh
f39f05d6fe8ed3f54356ba6d914e2793958e3e7a
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright (c) 2016, 2017 by Intel Corporation. All rights reserved.
26 .
$STF_SUITE/include
/libtest.shlib
27 .
$STF_SUITE/tests
/functional
/fault
/fault.cfg
29 verify_runnable
"global"
31 cleanup_devices
$DISKS
36 SD
=$
(lsscsi | nawk
'/scsi_debug/ {print $6; exit}')
37 SDDEVICE
=$
(echo $SD | nawk
-F / '{print $3}')
39 # Offline disk and remove scsi_debug module
41 if [ -n "$SDDEVICE" ]; then
42 on_off_disk
$SDDEVICE "offline"
45 modprobe
-r scsi_debug