xref: /illumos-gate/usr/src/test/zfs-tests/tests/functional/trim/cleanup.ksh (revision 084fd14f7c3336eb67ee283cabad2da8998b00d6)
1*084fd14fSBrian Behlendorf#!/bin/ksh -p
2*084fd14fSBrian Behlendorf#
3*084fd14fSBrian Behlendorf# CDDL HEADER START
4*084fd14fSBrian Behlendorf#
5*084fd14fSBrian Behlendorf# The contents of this file are subject to the terms of the
6*084fd14fSBrian Behlendorf# Common Development and Distribution License (the "License").
7*084fd14fSBrian Behlendorf# You may not use this file except in compliance with the License.
8*084fd14fSBrian Behlendorf#
9*084fd14fSBrian Behlendorf#!/bin/ksh -p
10*084fd14fSBrian Behlendorf#
11*084fd14fSBrian Behlendorf# CDDL HEADER START
12*084fd14fSBrian Behlendorf#
13*084fd14fSBrian Behlendorf# This file and its contents are supplied under the terms of the
14*084fd14fSBrian Behlendorf# Common Development and Distribution License ("CDDL"), version 1.0.
15*084fd14fSBrian Behlendorf# You may only use this file in accordance with the terms of version
16*084fd14fSBrian Behlendorf# 1.0 of the CDDL.
17*084fd14fSBrian Behlendorf#
18*084fd14fSBrian Behlendorf# A full copy of the text of the CDDL should have accompanied this
19*084fd14fSBrian Behlendorf# source.  A copy of the CDDL is also available via the Internet at
20*084fd14fSBrian Behlendorf# http://www.illumos.org/license/CDDL.
21*084fd14fSBrian Behlendorf#
22*084fd14fSBrian Behlendorf# CDDL HEADER END
23*084fd14fSBrian Behlendorf#
24*084fd14fSBrian Behlendorf
25*084fd14fSBrian Behlendorf#
26*084fd14fSBrian Behlendorf# Copyright (c) 2019 by Tim Chase. All rights reserved.
27*084fd14fSBrian Behlendorf# Copyright (c) 2019 Lawrence Livermore National Security, LLC.
28*084fd14fSBrian Behlendorf#
29*084fd14fSBrian Behlendorf
30*084fd14fSBrian Behlendorf. $STF_SUITE/include/libtest.shlib
31*084fd14fSBrian Behlendorf
32*084fd14fSBrian Behlendorfverify_runnable "global"
33*084fd14fSBrian Behlendorf
34*084fd14fSBrian Behlendorfif poolexists $TESTPOOL; then
35*084fd14fSBrian Behlendorf	destroy_pool $TESTPOOL
36*084fd14fSBrian Behlendorffi
37*084fd14fSBrian Behlendorf
38*084fd14fSBrian Behlendorfif poolexists $TESTPOOL1; then
39*084fd14fSBrian Behlendorf	destroy_pool $TESTPOOL1
40*084fd14fSBrian Behlendorffi
41*084fd14fSBrian Behlendorf
42*084fd14fSBrian BehlendorfTRIM_DIR="$TEST_BASE_DIR"
43*084fd14fSBrian BehlendorfTRIM_VDEVS="$TRIM_DIR/trim-vdev1 $TRIM_DIR/trim-vdev2 \
44*084fd14fSBrian Behlendorf    $TRIM_DIR/trim-vdev3 $TRIM_DIR/trim-vdev4"
45*084fd14fSBrian Behlendorf
46*084fd14fSBrian Behlendorfrm -rf $TRIM_VDEVS
47*084fd14fSBrian Behlendorf
48*084fd14fSBrian Behlendorfdefault_cleanup
49