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