From 4eab410fb63816fe2c0ad0fd18b4c948613f6616 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Wed, 28 Oct 2015 10:21:36 -0700 Subject: [PATCH] 6369 remove SVM tests from ZFS test suite Reviewed by: John Kennedy Reviewed by: Prakash Surya Reviewed by: Albert Lee Approved by: Dan McDonald --- usr/src/pkg/manifests/system-test-zfstest.mf | 9 -- usr/src/test/zfs-tests/include/commands.cfg | 6 +- usr/src/test/zfs-tests/include/libtest.shlib | 27 +---- usr/src/test/zfs-tests/runfiles/delphix.run | 9 +- usr/src/test/zfs-tests/runfiles/omnios.run | 7 +- usr/src/test/zfs-tests/runfiles/openindiana.run | 7 +- usr/src/test/zfs-tests/tests/functional/Makefile | 1 - .../functional/cli_root/zpool_create/Makefile | 3 +- .../cli_root/zpool_create/zpool_create_013_neg.ksh | 104 ------------------- .../zfs-tests/tests/functional/interop/Makefile | 43 -------- .../zfs-tests/tests/functional/interop/cleanup.ksh | 73 -------------- .../zfs-tests/tests/functional/interop/interop.cfg | 81 --------------- .../tests/functional/interop/interop_001_pos.ksh | 88 ---------------- .../zfs-tests/tests/functional/interop/setup.ksh | 83 --------------- .../test/zfs-tests/tests/functional/inuse/Makefile | 3 +- .../tests/functional/inuse/inuse_002_pos.ksh | 111 --------------------- 16 files changed, 12 insertions(+), 643 deletions(-) delete mode 100644 usr/src/test/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_013_neg.ksh delete mode 100644 usr/src/test/zfs-tests/tests/functional/interop/Makefile delete mode 100644 usr/src/test/zfs-tests/tests/functional/interop/cleanup.ksh delete mode 100644 usr/src/test/zfs-tests/tests/functional/interop/interop.cfg delete mode 100644 usr/src/test/zfs-tests/tests/functional/interop/interop_001_pos.ksh delete mode 100644 usr/src/test/zfs-tests/tests/functional/interop/setup.ksh delete mode 100644 usr/src/test/zfs-tests/tests/functional/inuse/inuse_002_pos.ksh diff --git a/usr/src/pkg/manifests/system-test-zfstest.mf b/usr/src/pkg/manifests/system-test-zfstest.mf index dcc0e46d32..ffea12e25b 100644 --- a/usr/src/pkg/manifests/system-test-zfstest.mf +++ b/usr/src/pkg/manifests/system-test-zfstest.mf @@ -99,7 +99,6 @@ dir path=opt/zfs-tests/tests/functional/grow_replicas dir path=opt/zfs-tests/tests/functional/history dir path=opt/zfs-tests/tests/functional/holes dir path=opt/zfs-tests/tests/functional/inheritance -dir path=opt/zfs-tests/tests/functional/interop dir path=opt/zfs-tests/tests/functional/inuse dir path=opt/zfs-tests/tests/functional/large_files dir path=opt/zfs-tests/tests/functional/largest_pool @@ -1057,9 +1056,6 @@ file \ path=opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_012_neg \ mode=0555 file \ - path=opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_013_neg \ - mode=0555 -file \ path=opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_014_neg \ mode=0555 file \ @@ -1788,13 +1784,8 @@ file path=opt/zfs-tests/tests/functional/inheritance/state021.cfg mode=0555 file path=opt/zfs-tests/tests/functional/inheritance/state022.cfg mode=0555 file path=opt/zfs-tests/tests/functional/inheritance/state023.cfg mode=0555 file path=opt/zfs-tests/tests/functional/inheritance/state024.cfg mode=0555 -file path=opt/zfs-tests/tests/functional/interop/cleanup mode=0555 -file path=opt/zfs-tests/tests/functional/interop/interop.cfg mode=0555 -file path=opt/zfs-tests/tests/functional/interop/interop_001_pos mode=0555 -file path=opt/zfs-tests/tests/functional/interop/setup mode=0555 file path=opt/zfs-tests/tests/functional/inuse/inuse.cfg mode=0555 file path=opt/zfs-tests/tests/functional/inuse/inuse_001_pos mode=0555 -file path=opt/zfs-tests/tests/functional/inuse/inuse_002_pos mode=0555 file path=opt/zfs-tests/tests/functional/inuse/inuse_003_pos mode=0555 file path=opt/zfs-tests/tests/functional/inuse/inuse_004_pos mode=0555 file path=opt/zfs-tests/tests/functional/inuse/inuse_005_pos mode=0555 diff --git a/usr/src/test/zfs-tests/include/commands.cfg b/usr/src/test/zfs-tests/include/commands.cfg index 6fd8a66ea1..7f9e7f34c6 100644 --- a/usr/src/test/zfs-tests/include/commands.cfg +++ b/usr/src/test/zfs-tests/include/commands.cfg @@ -10,7 +10,7 @@ # # -# Copyright (c) 2012, 2014 by Delphix. All rights reserved. +# Copyright (c) 2012, 2015 by Delphix. All rights reserved. # export ARP="/usr/sbin/arp" @@ -82,10 +82,6 @@ export LOGNAME="/usr/bin/logname" export LS="/usr/bin/ls" export MD5SUM="/usr/bin/md5sum" export MDB="/usr/bin/mdb" -export METACLEAR="/usr/sbin/metaclear" -export METADB="/usr/sbin/metadb" -export METAINIT="/usr/sbin/metainit" -export METASTAT="/usr/sbin/metastat" export MKDIR="/usr/bin/mkdir" export MKFILE="/usr/sbin/mkfile" export MKTEMP="/usr/bin/mktemp" diff --git a/usr/src/test/zfs-tests/include/libtest.shlib b/usr/src/test/zfs-tests/include/libtest.shlib index ceb62e50fc..e1aa96ce52 100644 --- a/usr/src/test/zfs-tests/include/libtest.shlib +++ b/usr/src/test/zfs-tests/include/libtest.shlib @@ -25,7 +25,7 @@ # # -# Copyright (c) 2012, 2014 by Delphix. All rights reserved. +# Copyright (c) 2012, 2015 by Delphix. All rights reserved. # . ${STF_TOOLS}/contrib/include/logapi.shlib @@ -1368,22 +1368,6 @@ function get_disklist # pool $ECHO $disklist } -# -# Destroy all existing metadevices and state database -# -function destroy_metas -{ - typeset metad - - for metad in $($METASTAT -p | $AWK '{print $1}'); do - log_must $METACLEAR -rf $metad - done - - for metad in $($METADB | $CUT -f6 | $GREP dev | $UNIQ); do - log_must $METADB -fd $metad - done -} - # /** # This function kills a given list of processes after a time period. We use # this in the stress tests instead of STF_TIMEOUT so that we can have processes @@ -1679,8 +1663,7 @@ function get_remote_pkgpath #/** # A function to find and locate free disks on a system or from given # disks as the parameter. It works by locating disks that are in use -# as swap devices, SVM devices, and dump devices, and also disks -# listed in /etc/vfstab +# as swap devices and dump devices, and also disks listed in /etc/vfstab # # $@ given disks to find which are free, default is all disks in # the test system @@ -1690,12 +1673,10 @@ function get_remote_pkgpath function find_disks { sfi=/tmp/swaplist.$$ - msi=/tmp/metastat.$$ dmpi=/tmp/dumpdev.$$ max_finddisksnum=${MAX_FINDDISKSNUM:-6} $SWAP -l > $sfi - $METASTAT -c > $msi 2>/dev/null $DUMPADM > $dmpi 2>/dev/null # write an awk script that can process the output of format @@ -1736,9 +1717,6 @@ EOF # Check for swap $GREP "${disk}[sp]" $sfi >/dev/null (($? == 0)) && continue - # Check for SVM - $GREP "${disk}" $msi >/dev/null - (($? == 0)) && continue # check for dump device $GREP "${disk}[sp]" $dmpi >/dev/null (($? == 0)) && continue @@ -1749,7 +1727,6 @@ EOF unused_candidates="$unused_candidates $disk" done $RM $sfi - $RM $msi $RM $dmpi # now just check to see if those disks do actually exist diff --git a/usr/src/test/zfs-tests/runfiles/delphix.run b/usr/src/test/zfs-tests/runfiles/delphix.run index 895b8d908c..0bac84c12e 100644 --- a/usr/src/test/zfs-tests/runfiles/delphix.run +++ b/usr/src/test/zfs-tests/runfiles/delphix.run @@ -10,7 +10,7 @@ # # -# Copyright (c) 2012, 2014 by Delphix. All rights reserved. +# Copyright (c) 2012, 2015 by Delphix. All rights reserved. # [DEFAULT] @@ -216,7 +216,7 @@ tests = ['zpool_create_001_pos', 'zpool_create_002_pos', 'zpool_create_003_pos', 'zpool_create_004_pos', 'zpool_create_005_pos', 'zpool_create_006_pos', 'zpool_create_007_neg', 'zpool_create_008_pos', 'zpool_create_009_neg', 'zpool_create_010_neg', 'zpool_create_011_neg', - 'zpool_create_012_neg', 'zpool_create_013_neg', 'zpool_create_014_neg', + 'zpool_create_012_neg', 'zpool_create_014_neg', 'zpool_create_015_neg', 'zpool_create_016_pos', 'zpool_create_017_neg', 'zpool_create_018_pos', 'zpool_create_019_pos', 'zpool_create_020_pos', 'zpool_create_021_pos', 'zpool_create_022_pos', 'zpool_create_023_neg', @@ -363,11 +363,8 @@ tests = ['holes_sanity'] tests = ['inherit_001_pos'] pre = -[/opt/zfs-tests/tests/functional/interop] -tests = ['interop_001_pos'] - [/opt/zfs-tests/tests/functional/inuse] -tests = ['inuse_001_pos', 'inuse_002_pos', 'inuse_003_pos', 'inuse_004_pos', +tests = ['inuse_001_pos', 'inuse_003_pos', 'inuse_004_pos', 'inuse_005_pos', 'inuse_006_pos', 'inuse_007_pos', 'inuse_008_pos', 'inuse_009_pos'] post = diff --git a/usr/src/test/zfs-tests/runfiles/omnios.run b/usr/src/test/zfs-tests/runfiles/omnios.run index 0542ddb23c..cafd94b27a 100644 --- a/usr/src/test/zfs-tests/runfiles/omnios.run +++ b/usr/src/test/zfs-tests/runfiles/omnios.run @@ -216,7 +216,7 @@ tests = ['zpool_create_001_pos', 'zpool_create_002_pos', 'zpool_create_003_pos', 'zpool_create_004_pos', 'zpool_create_005_pos', 'zpool_create_006_pos', 'zpool_create_007_neg', 'zpool_create_008_pos', 'zpool_create_009_neg', 'zpool_create_010_neg', 'zpool_create_011_neg', - 'zpool_create_012_neg', 'zpool_create_013_neg', 'zpool_create_014_neg', + 'zpool_create_012_neg', 'zpool_create_014_neg', 'zpool_create_015_neg', 'zpool_create_016_pos', 'zpool_create_017_neg', 'zpool_create_018_pos', 'zpool_create_019_pos', 'zpool_create_020_pos', 'zpool_create_021_pos', 'zpool_create_022_pos', 'zpool_create_023_neg', @@ -363,11 +363,8 @@ tests = ['holes_sanity'] tests = ['inherit_001_pos'] pre = -[/opt/zfs-tests/tests/functional/interop] -tests = ['interop_001_pos'] - [/opt/zfs-tests/tests/functional/inuse] -tests = ['inuse_001_pos', 'inuse_002_pos', 'inuse_003_pos', 'inuse_004_pos', +tests = ['inuse_001_pos', 'inuse_003_pos', 'inuse_004_pos', 'inuse_005_pos', 'inuse_006_pos', 'inuse_007_pos', 'inuse_008_pos', 'inuse_009_pos'] post = diff --git a/usr/src/test/zfs-tests/runfiles/openindiana.run b/usr/src/test/zfs-tests/runfiles/openindiana.run index 7add5337c2..0bac84c12e 100644 --- a/usr/src/test/zfs-tests/runfiles/openindiana.run +++ b/usr/src/test/zfs-tests/runfiles/openindiana.run @@ -216,7 +216,7 @@ tests = ['zpool_create_001_pos', 'zpool_create_002_pos', 'zpool_create_003_pos', 'zpool_create_004_pos', 'zpool_create_005_pos', 'zpool_create_006_pos', 'zpool_create_007_neg', 'zpool_create_008_pos', 'zpool_create_009_neg', 'zpool_create_010_neg', 'zpool_create_011_neg', - 'zpool_create_012_neg', 'zpool_create_013_neg', 'zpool_create_014_neg', + 'zpool_create_012_neg', 'zpool_create_014_neg', 'zpool_create_015_neg', 'zpool_create_016_pos', 'zpool_create_017_neg', 'zpool_create_018_pos', 'zpool_create_019_pos', 'zpool_create_020_pos', 'zpool_create_021_pos', 'zpool_create_022_pos', 'zpool_create_023_neg', @@ -363,11 +363,8 @@ tests = ['holes_sanity'] tests = ['inherit_001_pos'] pre = -[/opt/zfs-tests/tests/functional/interop] -tests = ['interop_001_pos'] - [/opt/zfs-tests/tests/functional/inuse] -tests = ['inuse_001_pos', 'inuse_002_pos', 'inuse_003_pos', 'inuse_004_pos', +tests = ['inuse_001_pos', 'inuse_003_pos', 'inuse_004_pos', 'inuse_005_pos', 'inuse_006_pos', 'inuse_007_pos', 'inuse_008_pos', 'inuse_009_pos'] post = diff --git a/usr/src/test/zfs-tests/tests/functional/Makefile b/usr/src/test/zfs-tests/tests/functional/Makefile index c3561926fd..a182243e60 100644 --- a/usr/src/test/zfs-tests/tests/functional/Makefile +++ b/usr/src/test/zfs-tests/tests/functional/Makefile @@ -36,7 +36,6 @@ SUBDIRS = acl \ history \ holes \ inheritance \ - interop \ inuse \ large_files \ largest_pool \ diff --git a/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_create/Makefile b/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_create/Makefile index c9ea8dcb04..64edee3a1f 100644 --- a/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_create/Makefile +++ b/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_create/Makefile @@ -10,7 +10,7 @@ # # -# Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright (c) 2012, 2015 by Delphix. All rights reserved. # include $(SRC)/Makefile.master @@ -32,7 +32,6 @@ PROGS = cleanup \ zpool_create_010_neg \ zpool_create_011_neg \ zpool_create_012_neg \ - zpool_create_013_neg \ zpool_create_014_neg \ zpool_create_015_neg \ zpool_create_016_pos \ diff --git a/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_013_neg.ksh b/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_013_neg.ksh deleted file mode 100644 index 55a5e5774a..0000000000 --- a/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_013_neg.ksh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/ksh -p -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2012 by Delphix. All rights reserved. -# - -. $STF_SUITE/include/libtest.shlib -. $STF_SUITE/tests/functional/cli_root/zpool_create/zpool_create.shlib - -# -# -# DESCRIPTION: -# 'zpool create' will fail with metadevice in swap -# -# STRATEGY: -# 1. Create a one way strip metadevice -# 2. Try to create a new pool with metadevice in swap -# 3. Verify the creation is failed. -# - -verify_runnable "global" - -function cleanup -{ - # cleanup SVM - $METASTAT $md_name > /dev/null 2>&1 - if [[ $? -eq 0 ]]; then - $SWAP -l | $GREP /dev/md/dsk/$md_name > /dev/null 2>&1 - if [[ $? -eq 0 ]]; then - $SWAP -d /dev/md/dsk/$md_name - fi - $METACLEAR $md_name - fi - - $METADB | $GREP $mddb_dev > /dev/null 2>&1 - if [[ $? -eq 0 ]]; then - $METADB -df /dev/dsk/$mddb_dev - fi - - if poolexists $TESTPOOL; then - destroy_pool $TESTPOOL - fi - -} - -if [[ -n $DISK ]]; then - disk=$DISK -else - disk=$DISK0 -fi - -typeset mddb_dev=${disk}s${SLICE0} -typeset md_dev=${disk}s${SLICE1} -typeset md_name=d0 -typeset MD_DSK=/dev/md/dsk/d0 - -log_assert "'zpool create' should fail with metadevice in swap." -log_onexit cleanup - -# -# use metadevice in swap to create pool, which should fail. -# -$METADB | $GREP $mddb_dev > /dev/null 2>&1 -if [[ $? -ne 0 ]]; then - log_must $METADB -af $mddb_dev -fi - -$METASTAT $md_name > /dev/null 2>&1 -if [[ $? -eq 0 ]]; then - $METACLEAR $md_name -fi - -log_must $METAINIT $md_name 1 1 $md_dev -log_must $SWAP -a $MD_DSK -for opt in "-n" "" "-f"; do - log_mustnot $ZPOOL create $opt $TESTPOOL $MD_DSK -done - -log_pass "'zpool create' passed as expected with inapplicable scenario." diff --git a/usr/src/test/zfs-tests/tests/functional/interop/Makefile b/usr/src/test/zfs-tests/tests/functional/interop/Makefile deleted file mode 100644 index a2c7913ef2..0000000000 --- a/usr/src/test/zfs-tests/tests/functional/interop/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright (c) 2013 by Delphix. All rights reserved. -# - -include $(SRC)/Makefile.master - -ROOTOPTPKG = $(ROOT)/opt/zfs-tests -TESTDIR = $(ROOTOPTPKG)/tests/functional/interop - -PROGS = cleanup \ - interop_001_pos \ - setup - -FILES = interop.cfg - -CMDS = $(PROGS:%=$(TESTDIR)/%) $(FILES:%=$(TESTDIR)/%) -$(CMDS) := FILEMODE = 0555 - -all lint clean clobber: - -install: $(CMDS) - -$(CMDS): $(TESTDIR) - -$(TESTDIR): - $(INS.dir) - -$(TESTDIR)/%: %.ksh - $(INS.rename) - -$(TESTDIR)/%: % - $(INS.file) diff --git a/usr/src/test/zfs-tests/tests/functional/interop/cleanup.ksh b/usr/src/test/zfs-tests/tests/functional/interop/cleanup.ksh deleted file mode 100644 index 4a95fed8f0..0000000000 --- a/usr/src/test/zfs-tests/tests/functional/interop/cleanup.ksh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/ksh -p -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2013 by Delphix. All rights reserved. -# - -. $STF_SUITE/include/libtest.shlib -. $STF_SUITE/tests/functional/interop/interop.cfg - -verify_runnable "global" - -ismounted $TESTPOOL/$TESTFS -(( $? == 0 )) && log_must $ZFS umount -f $TESTDIR -destroy_pool $TESTPOOL - -$METASTAT $META_DEVICE_ID > /dev/null 2>&1 -if (( $? == 0 )); then - log_note "Clearing meta device ($META_DEVICE_ID)" - $METACLEAR -f $META_DEVICE_ID > /dev/null 2>&1 -fi - -typeset metadb="" -typeset i="" - -metadb=`$METADB | $CUT -f6 | $GREP dev | $UNIQ` -for i in $metadb; do - log_note "Clearing meta db ($i)" - $METADB -fd $i > /dev/null 2>&1 -done - -# recreate and destroy a zpool over the disks to restore the partitions to -# normal -case $DISK_COUNT in -0) - log_note "No disk devices to restore" - ;; -1) - log_must cleanup_devices $ZFS_DISK2 - ;; -2) - log_must cleanup_devices $META_DISK0 $ZFS_DISK2 - ;; -*) - log_must cleanup_devices $META_DISK0 $META_DISK1 $ZFS_DISK2 - ;; -esac - -log_pass "Cleanup has been successful" diff --git a/usr/src/test/zfs-tests/tests/functional/interop/interop.cfg b/usr/src/test/zfs-tests/tests/functional/interop/interop.cfg deleted file mode 100644 index f561535d57..0000000000 --- a/usr/src/test/zfs-tests/tests/functional/interop/interop.cfg +++ /dev/null @@ -1,81 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2013 by Delphix. All rights reserved. -# - -. $STF_SUITE/include/libtest.shlib - -set -A disk_array $(find_disks $DISKS) -case "${#disk_array[*]}" in -0) - DISK_COUNT=0 - ;; -1) - # We need to repartition the single disk to two slices - DISK_COUNT=1 - META_DISK0=${disk_array[0]} - SINGLE_DISK=$META_DISK0 - META_DISK1=$META_DISK0 - ZFS_DISK2=$META_DISK0 - META_SIDE0=${SINGLE_DISK}s0 - META_SIDE1=${SINGLE_DISK}s1 - ZFS_SIDE2=${SINGLE_DISK}s3 - ;; -2) - # We need to repartition the single disk to two slices and allocate - # the 2nd disk to ZFS - DISK_COUNT=2 - META_DISK0=${disk_array[0]} - SINGLE_DISK=$META_DISK0 - META_DISK1=$META_DISK0 - ZFS_DISK2=${disk_array[1]} - META_SIDE0=${SINGLE_DISK}s0 - META_SIDE1=${SINGLE_DISK}s1 - ZFS_SIDE2=${ZFS_DISK2}s0 - ;; -*) - # In this case there are at least enough disks to use. - DISK_COUNT=3 - META_DISK0=${disk_array[0]} - META_DISK1=${disk_array[1]} - ZFS_DISK2=${disk_array[2]} - META_SIDE0=${META_DISK0}s0 - META_SIDE1=${META_DISK1}s0 - ZFS_SIDE2=${ZFS_DISK2}s0 - ;; -esac - -export DISK_COUNT META_DISK0 META_DISK1 ZFS_DISK2 -export META_SIDE0 META_SIDE1 ZFS_SIDE2 SINGLE_DISK - -export TESTFILE=testfile -export FS_SIZE=500m -export META_DEVICE_ID=d99 -export META_DEVICE_PATH=/dev/md/dsk/$META_DEVICE_ID -export FILE_COUNT=20 -export FILE_SIZE=$(( 1024 * 1024 )) diff --git a/usr/src/test/zfs-tests/tests/functional/interop/interop_001_pos.ksh b/usr/src/test/zfs-tests/tests/functional/interop/interop_001_pos.ksh deleted file mode 100644 index a10f4af08b..0000000000 --- a/usr/src/test/zfs-tests/tests/functional/interop/interop_001_pos.ksh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/ksh -p -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2013 by Delphix. All rights reserved. -# - -. $STF_SUITE/include/libtest.shlib -. $STF_SUITE/tests/functional/interop/interop.cfg - -# -# DESCRIPTION: -# Create a SVM device and add this to an existing ZFS pool -# -# STRATEGY: -# 1. Create a SVM metadevice -# 2. Create a ZFS file system -# 3. Add SVM metadevice to the ZFS pool -# 4. Create files and fill the pool. -# - - -function cleanup -{ - $RM -rf $TESTDIR/* -} - -log_assert "Create a SVM device and add this to an existing ZFS pool" - -log_onexit cleanup - -# the current size of the test pool -typeset -i oldsize=`$ZFS get -pH -o value available $TESTPOOL` - -log_must $ZPOOL add $TESTPOOL $META_DEVICE_PATH -log_must $ZPOOL iostat -v | $GREP $META_DEVICE_ID - -# the size of the test pool after adding the extra device -typeset -i newsize=`$ZFS get -pH -o value available $TESTPOOL` - -(( $oldsize >= $newsize )) && \ - log_fail "Pool space available ($oldsize) before adding a new device was "\ - "larger than the space available ($newsize) afterwards." - -log_note "Pool space available was ($oldsize), it's now ($newsize)" - -typeset -i odirnum=1 -typeset -i idirnum=0 -typeset -i filenum=0 -typeset -i retval=0 -typeset bg=$TESTDIR/bigdirectory - -fill_fs $bg 20 25 $FILE_SIZE $FILE_COUNT -retval=$? - -afterwritepoolavail=`$ZFS get -pH -o value available $TESTPOOL` -readonly ENOSPC=28 - -(( $retval == $ENOSPC && $afterwritepoolavail < $oldsize)) && \ - log_pass "Successfully used ($(( $newsize - $oldsize )) bytes) in "\ - "pool provided by SVM metadevice" - -log_fail "Failed to use space in pool ($(( $newsize - $oldsize ))bytes) "\ - "provided by SVM metadevice" diff --git a/usr/src/test/zfs-tests/tests/functional/interop/setup.ksh b/usr/src/test/zfs-tests/tests/functional/interop/setup.ksh deleted file mode 100644 index a764216f1a..0000000000 --- a/usr/src/test/zfs-tests/tests/functional/interop/setup.ksh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/ksh -p -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2013 by Delphix. All rights reserved. -# - -. $STF_SUITE/include/libtest.shlib -. $STF_SUITE/tests/functional/interop/interop.cfg - -verify_runnable "global" - -case $DISK_COUNT in -0) - log_untested "Need at least 1 disk device for test" - ;; -1) - log_note "Partitioning a single disk ($SINGLE_DISK)" - ;; -2) - log_note "Partitioning a disks ($SINGLE_DISK) and ($ZFS_DISK2)" - ;; -3) - log_note "Partitioning disks ($META_DISK0 $META_DISK1 $ZFS_DISK2)" - ;; -esac - -log_must set_partition ${META_SIDE0##*s} "" $FS_SIZE $META_DISK0 -if [[ $WRAPPER == *"smi"* && $META_DISK1 == $META_DISK0 ]]; then - typeset i=${META_SIDE0##*s} - typeset cyl=$(get_endslice $META_DISK0 $i) - log_must set_partition ${META_SIDE1##*s} "$cyl" $FS_SIZE $META_DISK1 -else - log_must set_partition ${META_SIDE1##*s} "" $FS_SIZE $META_DISK1 -fi -if [[ $WRAPPER == *"smi"* && $ZFS_DISK2 == $META_DISK1 ]]; then - typeset i=${META_SIDE1##*s} - typeset cyl=$(get_endslice $META_DISK1 $i) - log_must set_partition ${ZFS_SIDE2##*s} "$cyl" $FS_SIZE $ZFS_DISK2 -else - log_must set_partition ${ZFS_SIDE2##*s} "" $FS_SIZE $ZFS_DISK2 -fi - -create_pool $TESTPOOL $ZFS_SIDE2 - -$RM -rf $TESTDIR || log_unresolved Could not remove $TESTDIR -$MKDIR -p $TESTDIR || log_unresolved Could not create $TESTDIR - -log_must $ZFS create $TESTPOOL/$TESTFS -log_must $ZFS set mountpoint=$TESTDIR $TESTPOOL/$TESTFS -log_must $ZFS set compression=off $TESTPOOL/$TESTFS - -log_note "Configuring metadb with $META_SIDE1" -log_must $METADB -a -f -c 3 $META_SIDE1 - -log_note "Configure $META_DEVICE_ID with $META_SIDE0" -log_must $METAINIT $META_DEVICE_ID 1 1 $META_SIDE0 - -log_pass diff --git a/usr/src/test/zfs-tests/tests/functional/inuse/Makefile b/usr/src/test/zfs-tests/tests/functional/inuse/Makefile index e3807308fd..ebdaaf37bc 100644 --- a/usr/src/test/zfs-tests/tests/functional/inuse/Makefile +++ b/usr/src/test/zfs-tests/tests/functional/inuse/Makefile @@ -10,7 +10,7 @@ # # -# Copyright (c) 2013 by Delphix. All rights reserved. +# Copyright (c) 2013, 2015 by Delphix. All rights reserved. # include $(SRC)/Makefile.master @@ -20,7 +20,6 @@ TESTDIR = $(ROOTOPTPKG)/tests/functional/inuse PROGS = cleanup \ inuse_001_pos \ - inuse_002_pos \ inuse_003_pos \ inuse_004_pos \ inuse_005_pos \ diff --git a/usr/src/test/zfs-tests/tests/functional/inuse/inuse_002_pos.ksh b/usr/src/test/zfs-tests/tests/functional/inuse/inuse_002_pos.ksh deleted file mode 100644 index 586aab582c..0000000000 --- a/usr/src/test/zfs-tests/tests/functional/inuse/inuse_002_pos.ksh +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/ksh -p -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2013 by Delphix. All rights reserved. -# - -. $STF_SUITE/include/libtest.shlib -. $STF_SUITE/tests/functional/inuse/inuse.cfg - -# -# DESCRIPTION: -# ZFS will not interfere with devices that are in use by SVM -# -# STRATEGY: -# 1. Create SVM device d99 with a disk -# 2. Try to create a ZFS pool with same disk -# 3. Try a use the same disk as a spare device -# - -verify_runnable "global" - -function cleanup -{ - poolexists $TESTPOOL1 && destroy_pool $TESTPOOL1 - - poolexists $TESTPOOL2 && destroy_pool $TESTPOOL2 - - $METASTAT d99 > /dev/null 2>&1 - (( $? == 0 )) && $METACLEAR -f d99 - - typeset metadb="" - typeset i="" - - metadb=`$METADB | $CUT -f6 | $GREP dev | $UNIQ` - for i in $metadb; do - $METADB -fd $i > /dev/null 2>&1 - done - - # - # Tidy up the disks we used. - # - cleanup_devices $vdisks $sdisks -} - -log_assert "Ensure ZFS does not interfere with devices in use by SVM" - -log_onexit cleanup - -for num in 0 1 2; do - eval typeset slice=\${FS_SIDE$num} - disk=${slice%s*} - slice=${slice##*s} - if [[ $WRAPPER == *"smi"* && \ - $disk == ${saved_disk} ]]; then - cyl=$(get_endslice $disk ${saved_slice}) - log_must set_partition $slice "$cyl" $FS_SIZE $disk - else - log_must set_partition $slice "" $FS_SIZE $disk - fi - saved_disk=$disk - saved_slice=$slice -done - -log_note "Configuring metadb with $FS_SIDE1" -log_must $METADB -a -f -c 3 $FS_SIDE1 - -log_note "Configure d99 with $FS_SIDE0" -log_must $METAINIT d99 1 1 $FS_SIDE0 - -log_note "Attempt to zpool the device in use by SVM" -log_mustnot $ZPOOL create $TESTPOOL1 $FS_SIDE0 -log_mustnot poolexists $TESTPOOL1 - -log_note "Attempt to take device in use by SVM as spare device" -log_mustnot $ZPOOL create $TESTPOOL1 $FS_SIDE2 spare $FS_SIDE0 -log_mustnot poolexists $TESTPOOL1 - -log_note "Attempt to zpool a metadb device in use by SVM" -log_mustnot $ZPOOL create $TESTPOOL2 $FS_SIDE1 -log_mustnot poolexists $TESTPOOL2 - -log_note "Attempt to take device in use by SVM as spare device" -log_mustnot $ZPOOL create $TESTPOOL2 $FS_SIDE2 spare $FS_SIDE1 -log_mustnot poolexists $TESTPOOL2 - -log_pass "Unable to zpool a device in use by SVM" -- 2.11.4.GIT