summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exception_lists/check_rtime5
-rw-r--r--usr/src/cmd/zhack/Makefile49
-rw-r--r--usr/src/cmd/zhack/Makefile.com76
-rw-r--r--usr/src/cmd/zhack/amd64/Makefile30
-rw-r--r--usr/src/cmd/zhack/i386/Makefile29
-rw-r--r--usr/src/cmd/zhack/sparcv9/Makefile30
-rw-r--r--usr/src/cmd/zinject/Makefile42
-rw-r--r--usr/src/cmd/zinject/Makefile.com71
-rw-r--r--usr/src/cmd/zinject/amd64/Makefile31
-rw-r--r--usr/src/cmd/zinject/i386/Makefile30
-rw-r--r--usr/src/cmd/zinject/sparcv9/Makefile31
-rw-r--r--usr/src/cmd/zlook/Makefile31
-rw-r--r--usr/src/cmd/zlook/Makefile.com51
-rw-r--r--usr/src/cmd/zlook/amd64/Makefile30
-rw-r--r--usr/src/cmd/zlook/i386/Makefile29
-rw-r--r--usr/src/cmd/zlook/sparcv9/Makefile30
-rw-r--r--usr/src/cmd/ztest/Makefile58
-rw-r--r--usr/src/cmd/ztest/Makefile.com84
-rw-r--r--usr/src/cmd/ztest/amd64/Makefile32
-rw-r--r--usr/src/cmd/ztest/i386/Makefile31
-rw-r--r--usr/src/cmd/ztest/sparcv9/Makefile32
-rw-r--r--usr/src/cmd/ztest/ztest.c20
-rw-r--r--usr/src/pkg/manifests/system-file-system-zfs-tests.mf18
23 files changed, 115 insertions, 755 deletions
diff --git a/exception_lists/check_rtime b/exception_lists/check_rtime
index 69796247aa..13a07c417b 100644
--- a/exception_lists/check_rtime
+++ b/exception_lists/check_rtime
@@ -232,11 +232,8 @@ FORBIDDEN_DEP usr/lib/netsvc/yp/ypxfrd # C++
# libfakekernel is a test environment, not intended for general use
FORBIDDEN libfakekernel\.so
FORBIDDEN_DEP usr/MACH(lib)/libzpool.so.1
-FORBIDDEN_DEP usr/bin/amd64/ztest
-FORBIDDEN_DEP usr/bin/i86/ztest
+FORBIDDEN_DEP usr/bin/ztest
FORBIDDEN_DEP usr/bin/raidz_test
-FORBIDDEN_DEP usr/bin/sparcv7/ztest
-FORBIDDEN_DEP usr/bin/sparcv9/ztest
FORBIDDEN_DEP usr/lib/MACH(smbfs)/libfknsmb.so.1
FORBIDDEN_DEP usr/lib/MACH(smbfs)/libfksmbfs.so.1
FORBIDDEN_DEP usr/lib/MACH(smbsrv)/libfksmbsrv.so.1
diff --git a/usr/src/cmd/zhack/Makefile b/usr/src/cmd/zhack/Makefile
index d4f3018fd7..fa6c3bb99e 100644
--- a/usr/src/cmd/zhack/Makefile
+++ b/usr/src/cmd/zhack/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# 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.
@@ -19,39 +18,51 @@
#
# CDDL HEADER END
#
+
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
-# Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
+# Copyright 2017 RackTop Systems.
+# Copyright 2020 Joyent, Inc.
#
PROG= zhack
+OBJS= $(PROG).o
include ../Makefile.cmd
+include ../Makefile.cmd.64
+include ../Makefile.ctf
+
+INCS += -I../../lib/libzpool/common
+INCS += -I../../uts/common/fs/zfs
+INCS += -I../../uts/common/fs/zfs/lua
+INCS += -I../../common/zfs
+INCS += -I../../lib/libzutil/common
+
+LDLIBS += -lzpool -lumem -lnvpair -lzutil
-$(INTEL_BLD)SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
+CSTD= $(CSTD_GNU99)
-all := TARGET = all
-install := TARGET = install
-clean := TARGET = clean
-clobber := TARGET = clobber
-lint := TARGET = lint
+CFLAGS += $(CCVERBOSE)
+CFLAGS64 += $(CCVERBOSE)
+CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
+CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT -DDEBUG $(INCS)
.KEEP_STATE:
-all clean clobber lint: $(SUBDIRS)
+all: $(PROG)
-install: $(SUBDIRS)
- -$(RM) $(ROOTUSRSBINPROG)
- -$(LN) $(ISAEXEC) $(ROOTUSRSBINPROG)
+install: all $(ROOTUSRSBINPROG)
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+$(PROG): $(OBJS)
+ $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
+ $(POST_PROCESS)
-FRC:
+clean:
+ $(RM) $(OBJS)
include ../Makefile.targ
diff --git a/usr/src/cmd/zhack/Makefile.com b/usr/src/cmd/zhack/Makefile.com
deleted file mode 100644
index d45962c16d..0000000000
--- a/usr/src/cmd/zhack/Makefile.com
+++ /dev/null
@@ -1,76 +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 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
-# Copyright 2017 RackTop Systems.
-# Copyright 2020 Joyent, Inc.
-#
-
-PROG= zhack
-SRCS= ../$(PROG).c
-OBJS= $(PROG).o
-
-include ../../Makefile.cmd
-include ../../Makefile.ctf
-
-INCS += -I../../../lib/libzpool/common
-INCS += -I../../../uts/common/fs/zfs
-INCS += -I../../../uts/common/fs/zfs/lua
-INCS += -I../../../common/zfs
-INCS += -I../../../lib/libzutil/common
-
-LDLIBS += -lzpool -lumem -lnvpair -lzutil
-
-CSTD= $(CSTD_GNU99)
-C99LMODE= -Xc99=%all
-
-CFLAGS += $(CCVERBOSE)
-CFLAGS64 += $(CCVERBOSE)
-CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
-CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT -DDEBUG $(INCS)
-
-LINTFLAGS += -erroff=E_STATIC_UNUSED
-LINTFLAGS64 += -erroff=E_STATIC_UNUSED
-
-.KEEP_STATE:
-
-all: $(PROG)
-
-$(PROG): $(OBJS)
- $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
- $(POST_PROCESS)
-
-clean:
- $(RM) $(OBJS)
-
-lint: lint_SRCS
-
-include ../../Makefile.targ
-
-%.o: ../%.c
- $(COMPILE.c) $<
- $(POST_PROCESS_O)
diff --git a/usr/src/cmd/zhack/amd64/Makefile b/usr/src/cmd/zhack/amd64/Makefile
deleted file mode 100644
index 74c7a42a08..0000000000
--- a/usr/src/cmd/zhack/amd64/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTUSRSBINPROG64)
diff --git a/usr/src/cmd/zhack/i386/Makefile b/usr/src/cmd/zhack/i386/Makefile
deleted file mode 100644
index 2ff9c89632..0000000000
--- a/usr/src/cmd/zhack/i386/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTUSRSBINPROG32)
diff --git a/usr/src/cmd/zhack/sparcv9/Makefile b/usr/src/cmd/zhack/sparcv9/Makefile
deleted file mode 100644
index 74c7a42a08..0000000000
--- a/usr/src/cmd/zhack/sparcv9/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTUSRSBINPROG64)
diff --git a/usr/src/cmd/zinject/Makefile b/usr/src/cmd/zinject/Makefile
index f646689967..b40dbf1150 100644
--- a/usr/src/cmd/zinject/Makefile
+++ b/usr/src/cmd/zinject/Makefile
@@ -22,33 +22,43 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
+# Copyright (c) 2016 by Delphix. All rights reserved.
+# Copyright 2017 RackTop Systems.
+# Copyright 2020 Joyent, Inc.
#
-PROG:sh= basename `pwd`
+PROG= zinject
+OBJS= $(PROG).o translate.o
include ../Makefile.cmd
+include ../Makefile.cmd.64
+include ../Makefile.ctf
-$(INTEL_BLD)SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
+INCS += -I../../lib/libzpool/common
+INCS += -I../../uts/common/fs/zfs
+INCS += -I../../uts/common/fs/zfs/lua
-all := TARGET = all
-install := TARGET = install
-clean := TARGET = clean
-clobber := TARGET = clobber
-lint := TARGET = lint
+LDLIBS += -lzfs -lnvpair
+
+CSTD= $(CSTD_GNU99)
+
+CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
+CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
+
+CERRWARN += $(CNOWARN_UNINIT)
+CERRWARN += -_gcc=-Wno-switch
.KEEP_STATE:
-all clean clobber lint: $(SUBDIRS)
+all: $(PROG)
-install: $(SUBDIRS)
- -$(RM) $(ROOTUSRSBINPROG)
- -$(LN) $(ISAEXEC) $(ROOTUSRSBINPROG)
+install: all $(ROOTUSRSBINPROG)
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+$(PROG): $(OBJS)
+ $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
+ $(POST_PROCESS)
-FRC:
+clean:
+ $(RM) $(OBJS)
include ../Makefile.targ
diff --git a/usr/src/cmd/zinject/Makefile.com b/usr/src/cmd/zinject/Makefile.com
deleted file mode 100644
index 220c877b42..0000000000
--- a/usr/src/cmd/zinject/Makefile.com
+++ /dev/null
@@ -1,71 +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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# Copyright (c) 2016 by Delphix. All rights reserved.
-# Copyright 2017 RackTop Systems.
-# Copyright 2020 Joyent, Inc.
-#
-
-PROG:sh= cd ..; basename `pwd`
-OBJS= $(PROG).o translate.o
-SRCS= $(OBJS:%.o=../%.c)
-
-include ../../Makefile.cmd
-
-INCS += -I../../../lib/libzpool/common
-INCS += -I../../../uts/common/fs/zfs
-INCS += -I../../../uts/common/fs/zfs/lua
-
-LDLIBS += -lzfs -lnvpair
-
-CSTD= $(CSTD_GNU99)
-C99LMODE= -Xc99=%all
-
-CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
-CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
-
-CERRWARN += $(CNOWARN_UNINIT)
-CERRWARN += -_gcc=-Wno-switch
-
-LINTFLAGS += -erroff=E_STATIC_UNUSED
-LINTFLAGS64 += -erroff=E_STATIC_UNUSED
-
-.KEEP_STATE:
-
-all: $(PROG)
-
-$(PROG): $(OBJS)
- $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
- $(POST_PROCESS)
-
-clean:
- $(RM) $(OBJS)
-
-lint: lint_SRCS
-
-%.o: ../%.c
- $(COMPILE.c) $<
- $(POST_PROCESS_O)
-
-include ../../Makefile.targ
diff --git a/usr/src/cmd/zinject/amd64/Makefile b/usr/src/cmd/zinject/amd64/Makefile
deleted file mode 100644
index 8740a9f3ac..0000000000
--- a/usr/src/cmd/zinject/amd64/Makefile
+++ /dev/null
@@ -1,31 +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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTUSRSBINPROG64)
diff --git a/usr/src/cmd/zinject/i386/Makefile b/usr/src/cmd/zinject/i386/Makefile
deleted file mode 100644
index d2cb13dcd1..0000000000
--- a/usr/src/cmd/zinject/i386/Makefile
+++ /dev/null
@@ -1,30 +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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-
-install: all $(ROOTUSRSBINPROG32)
diff --git a/usr/src/cmd/zinject/sparcv9/Makefile b/usr/src/cmd/zinject/sparcv9/Makefile
deleted file mode 100644
index 8740a9f3ac..0000000000
--- a/usr/src/cmd/zinject/sparcv9/Makefile
+++ /dev/null
@@ -1,31 +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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTUSRSBINPROG64)
diff --git a/usr/src/cmd/zlook/Makefile b/usr/src/cmd/zlook/Makefile
index fb2ee0ede2..66fc18115b 100644
--- a/usr/src/cmd/zlook/Makefile
+++ b/usr/src/cmd/zlook/Makefile
@@ -23,30 +23,31 @@
# Use is subject to license terms.
#
-PROG:sh= basename `pwd`
+PROG= zlook
+OBJS= $(PROG).o
include ../Makefile.cmd
+include ../Makefile.cmd.64
+include ../Makefile.ctf
-$(INTEL_BLD)SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
+CSTD= $(CSTD_GNU99)
+CFLAGS += $(CCGDEBUG) $(CCVERBOSE)
+CFLAGS64 += $(CCGDEBUG) $(CCVERBOSE)
+CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
-all := TARGET = all
-install := TARGET = install
-clean := TARGET = clean
-clobber := TARGET = clobber
-lint := TARGET = lint
+CERRWARN += $(CNOWARN_UNINIT)
.KEEP_STATE:
-all clean clobber lint: $(SUBDIRS)
+all: $(PROG)
-install: $(SUBDIRS)
- -$(RM) $(ROOTPROG)
- -$(LN) $(ISAEXEC) $(ROOTPROG)
+install: all $(ROOTPROG)
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+$(PROG): $(OBJS)
+ $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
+ $(POST_PROCESS)
-FRC:
+clean:
+ $(RM) $(OBJS)
include ../Makefile.targ
diff --git a/usr/src/cmd/zlook/Makefile.com b/usr/src/cmd/zlook/Makefile.com
deleted file mode 100644
index a634a72d2c..0000000000
--- a/usr/src/cmd/zlook/Makefile.com
+++ /dev/null
@@ -1,51 +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 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-PROG= zlook
-SRCS= ../$(PROG).c
-
-include ../../Makefile.cmd
-
-CSTD= $(CSTD_GNU99)
-C99LMODE= -Xc99=%all
-CFLAGS += $(CCGDEBUG) $(CCVERBOSE)
-CFLAGS64 += $(CCGDEBUG) $(CCVERBOSE)
-CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
-
-CERRWARN += $(CNOWARN_UNINIT)
-
-.KEEP_STATE:
-
-all: $(PROG)
-
-$(PROG): $(SRCS)
- $(LINK.c) -o $(PROG) $(SRCS) $(LDLIBS)
- $(POST_PROCESS)
-
-clean:
-
-lint: lint_SRCS
-
-include ../../Makefile.targ
diff --git a/usr/src/cmd/zlook/amd64/Makefile b/usr/src/cmd/zlook/amd64/Makefile
deleted file mode 100644
index 64da121d75..0000000000
--- a/usr/src/cmd/zlook/amd64/Makefile
+++ /dev/null
@@ -1,30 +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 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/zlook/i386/Makefile b/usr/src/cmd/zlook/i386/Makefile
deleted file mode 100644
index 1bd7915dff..0000000000
--- a/usr/src/cmd/zlook/i386/Makefile
+++ /dev/null
@@ -1,29 +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 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTPROG32)
diff --git a/usr/src/cmd/zlook/sparcv9/Makefile b/usr/src/cmd/zlook/sparcv9/Makefile
deleted file mode 100644
index 64da121d75..0000000000
--- a/usr/src/cmd/zlook/sparcv9/Makefile
+++ /dev/null
@@ -1,30 +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 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/ztest/Makefile b/usr/src/cmd/ztest/Makefile
index 4ae78f4cae..46b79c1383 100644
--- a/usr/src/cmd/ztest/Makefile
+++ b/usr/src/cmd/ztest/Makefile
@@ -19,42 +19,56 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# Copyright (c) 2015 by Delphix. All rights reserved.
-#
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
+# Copyright 2017 RackTop Systems.
+# Copyright 2020 Joyent, Inc.
-PROG:sh= basename `pwd`
+PROG= ztest
BASHPROG= zloop
ROOTBASHPROG= $(ROOTBIN)/$(BASHPROG)
CLOBBERFILES= $(BASHPROG)
+OBJS= $(PROG).o
+
include ../Makefile.cmd
+include ../Makefile.cmd.64
+include ../Makefile.ctf
-$(INTEL_BLD)SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
+INCS += -I../../lib/libzpool/common
+INCS += -I../../uts/common/fs/zfs
+INCS += -I../../uts/common/fs/zfs/lua
+INCS += -I../../common/zfs
+INCS += -I../../lib/libzutil/common
-all := TARGET = all
-install := TARGET = install
-clean := TARGET = clean
-clobber := TARGET = clobber
-lint := TARGET = lint
+LDLIBS += -lumem -lzpool -lcmdutils -lm -lnvpair -lfakekernel -lzutil
-.KEEP_STATE:
+CSTD= $(CSTD_GNU99)
+CFLAGS += -g $(CCVERBOSE)
+CFLAGS64 += -g $(CCVERBOSE)
+CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
+CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) -DDEBUG
-all lint: $(SUBDIRS) $(BASHPROG)
+CERRWARN += -_gcc=-Wno-switch
+
+# false positive
+SMOFF += signed
+
+# needs work
+SMOFF += all_func_returns
+
+.KEEP_STATE:
-clean clobber: $(SUBDIRS)
+all: $(PROG) $(BASHPROG)
-install: $(SUBDIRS) $(ROOTBASHPROG)
- -$(RM) $(ROOTPROG)
- -$(LN) $(ISAEXEC) $(ROOTPROG)
+install: all $(ROOTPROG) $(ROOTBASHPROG)
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+$(PROG): $(OBJS)
+ $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
+ $(POST_PROCESS)
-FRC:
+clean:
+ $(RM) $(OBJS)
include ../Makefile.targ
diff --git a/usr/src/cmd/ztest/Makefile.com b/usr/src/cmd/ztest/Makefile.com
deleted file mode 100644
index 0db755a6f7..0000000000
--- a/usr/src/cmd/ztest/Makefile.com
+++ /dev/null
@@ -1,84 +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 (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
-# Copyright 2017 RackTop Systems.
-# Copyright 2020 Joyent, Inc.
-
-PROG= ztest
-OBJS= $(PROG).o
-SRCS= $(OBJS:%.o=../%.c)
-
-include ../../Makefile.cmd
-include ../../Makefile.ctf
-
-INCS += -I../../../lib/libzpool/common
-INCS += -I../../../uts/common/fs/zfs
-INCS += -I../../../uts/common/fs/zfs/lua
-INCS += -I../../../common/zfs
-INCS += -I../../../lib/libzutil/common
-
-LDLIBS += -lumem -lzpool -lcmdutils -lm -lnvpair -lfakekernel -lzutil
-
-CSTD= $(CSTD_GNU99)
-C99LMODE= -Xc99=%all
-CFLAGS += -g $(CCVERBOSE)
-CFLAGS64 += -g $(CCVERBOSE)
-CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
-CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) -DDEBUG
-
-# lint complains about unused _umem_* functions
-LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
-LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
-
-# lint complains about unused inline functions, even though
-# they are "inline", not "static inline", with "extern inline"
-# implementations and usage in libzpool.
-LINTFLAGS += -erroff=E_STATIC_UNUSED
-LINTFLAGS64 += -erroff=E_STATIC_UNUSED
-
-CERRWARN += -_gcc=-Wno-switch
-
-# false positive
-SMOFF += signed
-
-# needs work
-SMOFF += all_func_returns
-
-.KEEP_STATE:
-
-all: $(PROG)
-
-$(PROG): $(OBJS)
- $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
- $(POST_PROCESS)
-
-clean:
- $(RM) $(OBJS)
-
-lint: lint_SRCS
-
-include ../../Makefile.targ
-
-%.o: ../%.c
- $(COMPILE.c) $<
- $(POST_PROCESS_O)
diff --git a/usr/src/cmd/ztest/amd64/Makefile b/usr/src/cmd/ztest/amd64/Makefile
deleted file mode 100644
index f259815d6e..0000000000
--- a/usr/src/cmd/ztest/amd64/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/ztest/i386/Makefile b/usr/src/cmd/ztest/i386/Makefile
deleted file mode 100644
index 8ca4d0b763..0000000000
--- a/usr/src/cmd/ztest/i386/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-
-install: all $(ROOTPROG32)
diff --git a/usr/src/cmd/ztest/sparcv9/Makefile b/usr/src/cmd/ztest/sparcv9/Makefile
deleted file mode 100644
index f259815d6e..0000000000
--- a/usr/src/cmd/ztest/sparcv9/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/ztest/ztest.c b/usr/src/cmd/ztest/ztest.c
index f4f577e4d3..7870cbe37c 100644
--- a/usr/src/cmd/ztest/ztest.c
+++ b/usr/src/cmd/ztest/ztest.c
@@ -6091,31 +6091,15 @@ ztest_run_zdb(char *pool)
int status;
char zdb[MAXPATHLEN + MAXNAMELEN + 20];
char zbuf[1024];
- char *bin;
- char *ztest;
- char *isa;
- int isalen;
FILE *fp;
- (void) realpath(getexecname(), zdb);
-
- /* zdb lives in /usr/sbin, while ztest lives in /usr/bin */
- bin = strstr(zdb, "/usr/bin/");
- ztest = strstr(bin, "/ztest");
- isa = bin + 8;
- isalen = ztest - isa;
- isa = strdup(isa);
- /* LINTED */
- (void) sprintf(bin,
- "/usr/sbin%.*s/zdb -bcc%s%s -G -d -U %s "
+ (void) snprintf(zdb, sizeof (zdb),
+ "/usr/sbin/zdb -bcc%s%s -G -d -U %s "
"-o zfs_reconstruct_indirect_combinations_max=65536 %s",
- isalen,
- isa,
ztest_opts.zo_verbose >= 3 ? "s" : "",
ztest_opts.zo_verbose >= 4 ? "v" : "",
spa_config_path,
pool);
- free(isa);
if (ztest_opts.zo_verbose >= 5)
(void) printf("Executing %s\n", strstr(zdb, "zdb "));
diff --git a/usr/src/pkg/manifests/system-file-system-zfs-tests.mf b/usr/src/pkg/manifests/system-file-system-zfs-tests.mf
index d39248a2e4..b2d3d84418 100644
--- a/usr/src/pkg/manifests/system-file-system-zfs-tests.mf
+++ b/usr/src/pkg/manifests/system-file-system-zfs-tests.mf
@@ -36,7 +36,6 @@ dir path=kernel/drv group=sys
dir path=kernel/drv/$(ARCH64) group=sys
dir path=usr group=sys
dir path=usr/bin
-$(i386_ONLY)dir path=usr/bin/$(ARCH32)
dir path=usr/bin/$(ARCH64)
dir path=usr/include
dir path=usr/include/sys
@@ -45,27 +44,18 @@ dir path=usr/lib
dir path=usr/lib/devfsadm group=sys
dir path=usr/lib/devfsadm/linkmod group=sys
dir path=usr/sbin
-$(i386_ONLY)dir path=usr/sbin/$(ARCH32)
dir path=usr/sbin/$(ARCH64)
driver name=zut perms="* 0666 root sys"
file path=kernel/drv/$(ARCH64)/zut group=sys
file path=kernel/drv/zut.conf group=sys
-$(i386_ONLY)file path=usr/bin/$(ARCH32)/zlook mode=0555
-$(i386_ONLY)file path=usr/bin/$(ARCH32)/ztest mode=0555
-file path=usr/bin/$(ARCH64)/zlook mode=0555
-file path=usr/bin/$(ARCH64)/ztest mode=0555
file path=usr/bin/raidz_test mode=0555
+file path=usr/bin/zlook mode=0555
file path=usr/bin/zloop mode=0555
+file path=usr/bin/ztest mode=0555
file path=usr/include/sys/fs/zut.h
file path=usr/lib/devfsadm/linkmod/SUNW_zut_link.so group=sys
-$(i386_ONLY)file path=usr/sbin/$(ARCH32)/zhack mode=0555
-$(i386_ONLY)file path=usr/sbin/$(ARCH32)/zinject mode=0555
-file path=usr/sbin/$(ARCH64)/zhack mode=0555
-file path=usr/sbin/$(ARCH64)/zinject mode=0555
-hardlink path=usr/bin/zlook target=../../usr/lib/isaexec
-hardlink path=usr/bin/ztest target=../../usr/lib/isaexec
-hardlink path=usr/sbin/zhack target=../../usr/lib/isaexec
-hardlink path=usr/sbin/zinject target=../../usr/lib/isaexec
+file path=usr/sbin/zhack mode=0555
+file path=usr/sbin/zinject mode=0555
legacy pkg=SUNWonzfs desc="ZFS test commands" name="ZFS unbundled utilities"
legacy pkg=SUNWonzfsr desc="ZFS test driver" name="ZFS unbundled driver"
license cr_Sun license=cr_Sun