svn commit: r292667 - in projects/zfsd/head/tests/sys/cddl/zfs: bin include tests/cli_root/zpool_import tests/cli_user/misc tests/threadsappend tests/txg_integrity
Alan Somers
asomers at FreeBSD.org
Wed Dec 23 20:27:25 UTC 2015
Author: asomers
Date: Wed Dec 23 20:27:23 2015
New Revision: 292667
URL: https://svnweb.freebsd.org/changeset/base/292667
Log:
Fix build after recent merges into the zfsd branch
cddl/zfs/include/testenv.kshlib
cddl/zfs/tests/cli_root/zpool_import/zpool_import.kshlib
cddl/zfs/tests/cli_user/misc/setup_basic.ksh
Add missing files
cddl/zfs/bin/Makefile
cddl/zfs/tests/threadsappend/Makefile
cddl/zfs/tests/txg_integrity/Makefile
s/LDADD/LIBADD
Sponsored by: Spectra Logic Corp
Added:
projects/zfsd/head/tests/sys/cddl/zfs/include/testenv.kshlib
projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import.kshlib
projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/misc/setup_basic.ksh
Modified:
projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile
projects/zfsd/head/tests/sys/cddl/zfs/tests/threadsappend/Makefile
projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/Makefile
Modified: projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile Wed Dec 23 20:25:01 2015 (r292666)
+++ projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile Wed Dec 23 20:27:23 2015 (r292667)
@@ -54,7 +54,7 @@ PROGS+= rm_lnkcnt_zero_file
SRCS.$p= $p.c
.endfor
-LDADD.mmapwrite+= -lpthread
-LDADD.rm_lnkcnt_zero_file+= -lpthread
+LIBADD.mmapwrite+= pthread
+LIBADD.rm_lnkcnt_zero_file+= pthread
.include <bsd.progs.mk>
Added: projects/zfsd/head/tests/sys/cddl/zfs/include/testenv.kshlib
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/zfsd/head/tests/sys/cddl/zfs/include/testenv.kshlib Wed Dec 23 20:27:23 2015 (r292667)
@@ -0,0 +1,19 @@
+. ${STF_SUITE}/include/libtest.kshlib
+. ${STF_SUITE}/include/commands.cfg
+
+# Environment-dependent constants.
+for d in `geom disk list | awk '/Name:/ {print $3}'`; do
+ # Clear the GPT label first to avoid spurious create failures.
+ gpart destroy -F $d >/dev/null 2>&1
+ if gpart create -s gpt $d >/dev/null 2>&1 ; then
+ gpart destroy $d >/dev/null 2>&1 || continue
+ DISKS=("${DISKS[@]}" "/dev/$d") #"$DISKS $d"
+ fi
+ # Don't bother testing any more if we have enough already.
+ # Currently we use at most 5 disks plus 1 for temporary disks.
+ [ ${#DISKS[@]} -eq 6 ] && break
+done
+export KEEP="$(zpool list -H -o name)"
+
+# Pull in constants.
+. ${STF_SUITE}/include/constants.cfg
Added: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import.kshlib
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import.kshlib Wed Dec 23 20:27:23 2015 (r292667)
@@ -0,0 +1,32 @@
+# Common routines used by zpool_import*.
+
+function setup_missing_test_pool # <tvd_type>
+{
+ typeset tvd_type=$1
+
+ setup_filesystem "$DEVICE_FILES" $TESTPOOL1 $TESTFS $TESTDIR1 \
+ "" $tvd_type
+ log_must $CP $MYTESTFILE $TESTDIR1/$TESTFILE0
+ log_must $ZPOOL export $TESTPOOL1
+}
+
+function recreate_missing_files
+{
+ destroy_pool $TESTPOOL1
+ log_must $RM -rf $DEVICE_DIR/*
+ for (( devnum=0 ; $devnum < $MAX_NUM ; devnum += 1 )); do
+ log_must create_vdevs ${DEVICE_DIR}/${DEVICE_FILE}$devnum
+ done
+}
+
+function cleanup_missing
+{
+ log_note "State of pools at the end of the test:"
+ poolexists $TESTPOOL1 && log_must $ZPOOL status $TESTPOOL1
+ log_note "State of $DEVICE_DIR at the end of the test:"
+ log_cmd $ZPOOL import -d $DEVICE_DIR
+ destroy_pool $TESTPOOL1
+ log_must $RM -rf $DEVICE_DIR/*
+ [[ -d $ALTER_ROOT ]] && log_must $RM -rf $ALTER_ROOT
+ [[ -d $BACKUP_DEVICE_DIR ]] && log_must $RM -rf $BACKUP_DEVICE_DIR
+}
Added: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/misc/setup_basic.ksh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/misc/setup_basic.ksh Wed Dec 23 20:27:23 2015 (r292667)
@@ -0,0 +1,30 @@
+#!/usr/local/bin/ksh93 -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 2015 Spectra Logic Corporation. All rights reserved.
+# Use is subject to license terms.
+
+. $STF_SUITE/include/libtest.kshlib
+
+# Allow unprivileged user to touch log files in our temp dir
+chmod 1777 ${TMPDIR}
+chmod 666 ${TMPDIR}/* || true
Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/threadsappend/Makefile
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/threadsappend/Makefile Wed Dec 23 20:25:01 2015 (r292666)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/threadsappend/Makefile Wed Dec 23 20:27:23 2015 (r292667)
@@ -13,7 +13,7 @@ FILES+= threadsappend_001_pos.ksh
FILES+= threadsappend.cfg
FILES+= setup.ksh
PROG+= threadsappend
-LDADD+= -lpthread
+LIBADD+= pthread
MAN=
.include <bsd.test.mk>
Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/Makefile
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/Makefile Wed Dec 23 20:25:01 2015 (r292666)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/Makefile Wed Dec 23 20:27:23 2015 (r292667)
@@ -15,7 +15,7 @@ FILES+= cleanup.ksh
FILES+= txg_integrity.cfg
PROGS+= txg_integrity
PROGS+= fsync_integrity
-LDADD+= -lpthread
+LIBADD+= pthread
SRCS.fsync_integrity= fsync_integrity.c
SRCS.txg_integrity= txg_integrity.c
More information about the svn-src-projects
mailing list