CVS commit: src/external/cddl/osnet/usr.bin/ztest
Module Name:src Committed By: sevan Date: Sat Dec 8 01:28:27 UTC 2018 Added Files: src/external/cddl/osnet/usr.bin/ztest: ztest.1 Log Message: Add a draft manual for ztest(1), based on the comments from zfstest.c (WIP). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/usr.bin/ztest/ztest.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/cddl/osnet/usr.bin/ztest/ztest.1 diff -u /dev/null src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.1 --- /dev/null Sat Dec 8 01:28:27 2018 +++ src/external/cddl/osnet/usr.bin/ztest/ztest.1 Sat Dec 8 01:28:27 2018 @@ -0,0 +1,154 @@ +.\" $NetBSD: ztest.1,v 1.1 2018/12/08 01:28:27 sevan Exp $ +.\" +.\" Copyright (c) 2018 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Sevan Janiyan +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\"/ +.Dd December 8, 2018 +.Dt ZTEST 1 +.Os +.Sh NAME +.Nm ztest +.Nd ZFS stress test utility +.Sh SYNOPSIS +.Nm +.Op Fl vsamrRdtgikpfVETFPBh +.Sh DESCRIPTION +The +.Nm +utility stress tests the DMU, ZAP, SPA components of ZFS from user space. +.Pp +.Nm +provides a simple routine to test the functionality of a component task. +These simple routines can then be used to stress test through parallel +execution. +Tests are run as child processes of the main process. +.Pp +The checksum and compression functions are changed each time a dataset is +opened to introduce varying combinations of checksum and compression from block +to block among objects. +.Pp +While tests are running, faults are injected into the pool to verify +self-healing ability. +.Pp +To verify that the on-disk consistency is never lost after a crash, child +processes are killed at random with a SIGKILL signal, after which the parent +process invokes a new child to run the test again on the same storage pool. +.Pp +The main +.Nm +process uses an +.Xr mmap 2 +temporary file to pass information to child processes which allows shared +memory to survive +.Xr exec 3 +syscall. +A copy of the ztest_shared_hdr_t struct containing information on the size and +number of shared structures in the file is always stored at offset 0 of the +file. +.Pp +For backwards compatibility testing +.Nm +can invoke an alternative version of +.Nm +after a SIGLKILL using the +.Fl B +flag. +.sp +The following options are available: +.sp +.Fl v +vdevs (default: 5) +.sp +.Fl s +size of each vdev (default: 256M) +.sp +.Fl a +alignment shift (default: 9) use 0 for random +.sp +.Fl m +mirror copies (default: 2) +.sp +.Fl r +raidz disks (default: 4) +.sp +.Fl R +raidz parity (default: 1) +.sp +.Fl d +datasets (default: 7) +.sp +.Fl t +threads (default: 23) +.sp +.Fl g +gang block threshold (default: 32K) +.sp +.Fl i +init count (default: 1) initialize pool i times +.sp +.Fl k +kill percentage (default: 70%) +.sp +.Fl p +pool name (default: ztest) +.sp +.Fl f +dir (default: /tmp) file directory for vdev files +.sp +.Fl V +verbose (use multiple times to increase verbosity) +.sp +.Fl E +use existing pool instead of creating new one +.sp +.Fl T +time (default: 300 sec) total run time +.sp +.Fl F +freezeloops (default: 50) max loops in +.Fn spa_freeze +.sp +.Fl P +passtime (default: 60 sec) time per pass +.sp +.Fl B +alt ztest (default: ) alternate ztest path +.sp +.Fl h +(print help) +.Sh AUTHORS +This man page was written by +.An Sevan Janiyan +.Aq se...@netbsd.org . +.Sh CAVEATS +To allow for backward compatibilty testing using older versions of +.Nm +the information stored in the +.Xr mma
CVS commit: src/external/cddl/osnet/usr.bin/ztest
Module Name:src Committed By: wiz Date: Sat Dec 8 12:18:37 UTC 2018 Modified Files: src/external/cddl/osnet/usr.bin/ztest: ztest.1 Log Message: Improve man page. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/usr.bin/ztest/ztest.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/usr.bin/ztest/ztest.1 diff -u src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.1 src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.2 --- src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.1 Sat Dec 8 01:28:27 2018 +++ src/external/cddl/osnet/usr.bin/ztest/ztest.1 Sat Dec 8 12:18:37 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ztest.1,v 1.1 2018/12/08 01:28:27 sevan Exp $ +.\" $NetBSD: ztest.1,v 1.2 2018/12/08 12:18:37 wiz Exp $ .\" .\" Copyright (c) 2018 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -35,7 +35,24 @@ .Nd ZFS stress test utility .Sh SYNOPSIS .Nm -.Op Fl vsamrRdtgikpfVETFPBh +.Op Fl EhV +.Op Fl a Ar shift +.Op Fl B Ar path +.Op Fl d Ar datasets +.Op Fl F Ar loops +.Op Fl f Ar path +.Op Fl g Ar threshold +.Op Fl i Ar count +.Op Fl k Ar percent +.Op Fl m Ar copies +.Op Fl P Ar passtime +.Op Fl p Ar name +.Op Fl R Ar parity +.Op Fl r Ar disks +.Op Fl s Ar size +.Op Fl T Ar time +.Op Fl t Ar threads +.Op Fl v Ar vdevs .Sh DESCRIPTION The .Nm @@ -66,84 +83,73 @@ temporary file to pass information to ch memory to survive .Xr exec 3 syscall. -A copy of the ztest_shared_hdr_t struct containing information on the size and -number of shared structures in the file is always stored at offset 0 of the -file. +A copy of the +.Vt ztest_shared_hdr_t +struct containing information on the size and number of shared +structures in the file is always stored at offset 0 of the file. .Pp For backwards compatibility testing .Nm can invoke an alternative version of .Nm -after a SIGLKILL using the +after a +.Dv SIGKILL +signal using the .Fl B flag. -.sp +.Pp The following options are available: -.sp -.Fl v -vdevs (default: 5) -.sp -.Fl s -size of each vdev (default: 256M) -.sp -.Fl a +.Bl -tag -width 5n +.It Fl a Ar shift alignment shift (default: 9) use 0 for random -.sp -.Fl m -mirror copies (default: 2) -.sp -.Fl r -raidz disks (default: 4) -.sp -.Fl R -raidz parity (default: 1) -.sp -.Fl d +.It Fl B Ar path +alt ztest (default: ) alternate ztest path +.It Fl d Ar datasets datasets (default: 7) -.sp -.Fl t -threads (default: 23) -.sp -.Fl g -gang block threshold (default: 32K) -.sp -.Fl i -init count (default: 1) initialize pool i times -.sp -.Fl k -kill percentage (default: 70%) -.sp -.Fl p -pool name (default: ztest) -.sp -.Fl f -dir (default: /tmp) file directory for vdev files -.sp -.Fl V -verbose (use multiple times to increase verbosity) -.sp -.Fl E +.It Fl E use existing pool instead of creating new one -.sp -.Fl T -time (default: 300 sec) total run time -.sp -.Fl F +.It Fl F Ar loops freezeloops (default: 50) max loops in .Fn spa_freeze -.sp -.Fl P +.It Fl f Ar path +dir (default: +.Pa /tmp ) +file directory for vdev files +.It Fl g Ar threshold +gang block threshold (default: 32K) +.It Fl h +print help +.It Fl i Ar count +init count (default: 1) initialize pool +.Ar count +times +.It Fl k Ar percent +kill percentage (default: 70%) +.It Fl m Ar copies +mirror copies (default: 2) +.It Fl P Ar passtime passtime (default: 60 sec) time per pass -.sp -.Fl B -alt ztest (default: ) alternate ztest path -.sp -.Fl h -(print help) +.It Fl p Ar name +pool name (default: ztest) +.It Fl R Ar parity +raidz parity (default: 1) +.It Fl r Ar disks +raidz disks (default: 4) +.It Fl s Ar size +size of each vdev (default: 256M) +.It Fl T Ar time +time (default: 300 sec) total run time +.It Fl t Ar threads +threads (default: 23) +.It Fl V +verbose (use multiple times to increase verbosity) +.It Fl v Ar vdevs +number of vdevs (default: 5) +.El .Sh AUTHORS This man page was written by .An Sevan Janiyan -.Aq se...@netbsd.org . +.Aq Mt se...@netbsd.org . .Sh CAVEATS To allow for backward compatibilty testing using older versions of .Nm
CVS commit: src/external/cddl/osnet/usr.bin/ztest
Module Name:src Committed By: sevan Date: Sat Dec 8 14:55:53 UTC 2018 Modified Files: src/external/cddl/osnet/usr.bin/ztest: ztest.1 Log Message: Spelling To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/usr.bin/ztest/ztest.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/usr.bin/ztest/ztest.1 diff -u src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.2 src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.3 --- src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.2 Sat Dec 8 12:18:37 2018 +++ src/external/cddl/osnet/usr.bin/ztest/ztest.1 Sat Dec 8 14:55:53 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ztest.1,v 1.2 2018/12/08 12:18:37 wiz Exp $ +.\" $NetBSD: ztest.1,v 1.3 2018/12/08 14:55:53 sevan Exp $ .\" .\" Copyright (c) 2018 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -151,7 +151,7 @@ This man page was written by .An Sevan Janiyan .Aq Mt se...@netbsd.org . .Sh CAVEATS -To allow for backward compatibilty testing using older versions of +To allow for backward compatibility testing using older versions of .Nm the information stored in the .Xr mmap 2
CVS commit: src/external/cddl/osnet/usr.bin/ztest
Module Name:src Committed By: sevan Date: Mon Dec 10 03:58:30 UTC 2018 Modified Files: src/external/cddl/osnet/usr.bin/ztest: ztest.1 Log Message: Describe how unaccounted changes are detected without Star Trek references, for everyone in 2018. Thanks to maya & gdt To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/usr.bin/ztest/ztest.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/usr.bin/ztest/ztest.1 diff -u src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.3 src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.4 --- src/external/cddl/osnet/usr.bin/ztest/ztest.1:1.3 Sat Dec 8 14:55:53 2018 +++ src/external/cddl/osnet/usr.bin/ztest/ztest.1 Mon Dec 10 03:58:30 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ztest.1,v 1.3 2018/12/08 14:55:53 sevan Exp $ +.\" $NetBSD: ztest.1,v 1.4 2018/12/10 03:58:30 sevan Exp $ .\" .\" Copyright (c) 2018 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\"/ -.Dd December 8, 2018 +.Dd December 10, 2018 .Dt ZTEST 1 .Os .Sh NAME @@ -75,6 +75,15 @@ To verify that the on-disk consistency i processes are killed at random with a SIGKILL signal, after which the parent process invokes a new child to run the test again on the same storage pool. .Pp +Many of the tests record the transaction group number as part of their data. +When reading old data, tests verify that the transaction group number is less +than the current, open state, transaction group to ensure the consistency of +tests and detect unaccounted changes. +It is advised that any new tests added to +.Nm +should also perform the same check with transaction group numbers, if +applicable. +.Pp The main .Nm process uses an
CVS commit: src/external/cddl/osnet/usr.bin/ztest
Module Name:src Committed By: haad Date: Wed Sep 16 09:17:29 UTC 2009 Modified Files: src/external/cddl/osnet/usr.bin/ztest: Makefile Log Message: Remove bogus -L entry. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/usr.bin/ztest/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/usr.bin/ztest/Makefile diff -u src/external/cddl/osnet/usr.bin/ztest/Makefile:1.1 src/external/cddl/osnet/usr.bin/ztest/Makefile:1.2 --- src/external/cddl/osnet/usr.bin/ztest/Makefile:1.1 Fri Aug 7 20:57:59 2009 +++ src/external/cddl/osnet/usr.bin/ztest/Makefile Wed Sep 16 09:17:29 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2009/08/07 20:57:59 haad Exp $ +# $NetBSD: Makefile,v 1.2 2009/09/16 09:17:29 haad Exp $ .include "../../Makefile.zfs" @@ -8,8 +8,6 @@ DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} ${LIBPTHREAD} \ ${LIBZ} ${LIBAVL} -LDADD+=-Lhehehe - LIBAVL_OBJDIR!= cd ${LIBAVL_SRCDIR} && ${PRINTOBJDIR} LDADD+= -L${LIBAVL_OBJDIR} -lavl
CVS commit: src/external/cddl/osnet/usr.bin/ztest
Module Name:src Committed By: justin Date: Thu Oct 30 21:15:13 UTC 2014 Modified Files: src/external/cddl/osnet/usr.bin/ztest: Makefile Log Message: Add libraries in order that they will link if static as well as dynamic To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/usr.bin/ztest/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/usr.bin/ztest/Makefile diff -u src/external/cddl/osnet/usr.bin/ztest/Makefile:1.2 src/external/cddl/osnet/usr.bin/ztest/Makefile:1.3 --- src/external/cddl/osnet/usr.bin/ztest/Makefile:1.2 Wed Sep 16 09:17:29 2009 +++ src/external/cddl/osnet/usr.bin/ztest/Makefile Thu Oct 30 21:15:13 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2009/09/16 09:17:29 haad Exp $ +# $NetBSD: Makefile,v 1.3 2014/10/30 21:15:13 justin Exp $ .include "../../Makefile.zfs" @@ -8,9 +8,6 @@ MKMAN= no DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} ${LIBPTHREAD} \ ${LIBZ} ${LIBAVL} -LIBAVL_OBJDIR!= cd ${LIBAVL_SRCDIR} && ${PRINTOBJDIR} -LDADD+= -L${LIBAVL_OBJDIR} -lavl - LIBNVPAIR_OBJDIR!= cd ${LIBNVPAIR_SRCDIR} && ${PRINTOBJDIR} LDADD+= -L${LIBNVPAIR_OBJDIR} -lnvpair @@ -20,6 +17,9 @@ LDADD+= -L${LIBUMEM_OBJDIR} -lum LIBZPOOL_OBJDIR!= cd ${LIBZPOOL_SRCDIR} && ${PRINTOBJDIR} LDADD+= -L${LIBZPOOL_OBJDIR} -lzpool +LIBAVL_OBJDIR!= cd ${LIBAVL_SRCDIR} && ${PRINTOBJDIR} +LDADD+= -L${LIBAVL_OBJDIR} -lavl + LDADD+= -lm -lpthread -lz .PATH: ${ZFSDIR}/dist/cmd/ztest