1
0
Files
irix-657m-src/eoe/cmd/sun/tests/tree/exercise.1
2022-09-29 17:59:04 +03:00

262 lines
9.9 KiB
Groff

.TH EXERCISE 1 "" "Testing"
.SH NAME
exercise \- exercise file system operations on a directory tree
.br
maketree \- build the directory tree to be used by exercise
.br
checktree \- check a directory tree built by maketree
.br
walktree \- exercise read-only file system operations on a directory tree
.SH SYNOPSIS
.B exercise
[options] [dir1 dir2 ...]
.br
.B maketree
[options] [dir1 dir2 ...]
.SH DESCRIPTION
.B exercise
is an application to exercise file system operations on a directory tree.
The tree may be specified on the command line. If it is not specified,
the environment variable NFSTESTDIR is used (see \fBENVIRONMENT VARIALBES\fP
below). Multiple trees may be specified.
.P
By default,
.B exercise
expects the directory trees to already exist. This may be changed with an
option described below (see \fBOPTIONS\fP).
.P
For each specified tree,
.B exersise
traverses the tree, performing various operations. The total number of
operations is finite. For regular files, the operations read, write, stat,
create, and remove may be performed. For directories, the operations read,
chdir, remove, create, and stat are performed. The operation mix is determined
by the probablity for each operation. Operations are randomly selected
according to the probability of occurrance specified in the configuration
(see \fBCONFIGURATION\fP below).
.P
.B exercise
may optionally create the trees prior to traversal. (See \fBOPTIONS\fP
below).
.P
.B maketree
is an application which constructs a directory tree to be used by
\fBexercise\fP. The tree is constructed randomly within the parameters
defined below (\fB-h\fP, \fB-d\fP, \fB-f\fP, and \fB-s\fP options).
.P
.B checktree
is an application which verifies a tree constructed by
.B maketree
for correctness. It may be used after
.B maketree
has been run or after
.B exercise
has been run.
.P
.B walktree
is similar to
.B exercise
with the exception that it does not perform any file system operations which
modify the tree or any file in the tree.
.SH OPTIONS
Both
.B maketree
and
.B exercise
accept the following options.
.TP 17
.B -V
This turns on "verbose" mode. In this mode,
.B maketree
and
.B exercise
print various messages about what they are doing. They are otherwise silent
about their actions. Silence is the default.
.TP 17
.B -c
This causes
.B maketree
and
.B exercise
to create each directory specified on the
command line. If a directory exists, it and all of its contents are
removed. By default, \fBmaketree\fP expects the specifed directories to
exist but be empty. Further, \fBexercise\fP expects the specified trees to
exist (previously constructed by \fBmaketree\fP). By default, the
specified directories are expected to exist.
.TP 17
.B -p
This causes \fBmaketree\fP to build the directory trees in parallel, forking
one process for each directory given on the command line. For \fBexercise\fP,
the trees are constructed (if \fB-c\fP is used) and traversed in parallel.
By default, tree construction and traversal is serial.
.TP 17
\fB-h\fP \fIheight\fP
This specifies the height (or depth) of the tree to be constructed. The
height is the number of levels of directories in the tree and is specified
by \fIheight\fP. The default height is 5.
.TP 17
\fB-d\fP \fImin,max\fP
This specifies the range for the number of directories to be created at each
level of the tree. The number of directories is randomly selected in the
range [\fImin\fP,\fImax\fP]. The default range is [5,10].
.TP 17
\fB-f\fP \fImin,max\fP
This specifies the range for the number of regular files to be created at each
level of the tree. The number of regular files is randomly selected in the
range [\fImin\fP,\fImax\fP]. The default range is [5,10].
.TP 17
\fB-s\fP \fImin,max\fP
This specifies the range for the size of regular files created.
The size for each regular file is randomly selected in the range
[\fImin\fP,\fImax\fP]. The default range is [4096,16384].
.P
In addition,
.B maketree
accepts the following options.
.TP 17
.B -i
This causes \fBmaketree\fP to not exit immediately when an error is detected
in a constructed tree. By defaults, \fBmaketree\fP will exit on the first
error.
.B checktree
accepts all of the above options except
.B -c
and
.BR -s .
.B walktree
accepts only the
.B -V
and
.B -p
options.
.SH CONFIGURATION
The configuration of
.B exercise
is controlled by a configuration file. The name of this file is is
specified in the environment variable NFSTESTCONF (see
\fBENVIRONMENT VARIABLES\fP below).
.P
The configuration file is arranged as a set of key and value pairs specified
as "key=value". There is one line for each of the parameters to be
configured. It is not necessary to configure all parameters.
.P
Most of the parameters are probability parameters which give the probability
of occurrance for a particular operation. These are grouped into two
types: file and directory. The probabilities within each type must sum to
100 (i.e., all of the file operation probabilites must sum to 100 and all
of the directory operation probabilites must sum to 100).
.P
Note that if one probability parameter is configured, all of the same type
may have to be configured since the probabilities must sum to 100. If one
probability is changed, at least one other of the same type
must also be changed.
.P
Read, write, and stat operations are allowed to loop. This means that the
operation is repeated a specified number of times on each occurrance of
the operation. The looping in not counted against the total operation count.
.P
The configurable parameters are as follows.
.TP 17
\fBRATIO\fP=\fIratio\fP
This parameter sets the ratio file to directory operations. The ration is
specified as a percentage by \fIratio\fP. A value of 60, for example,
yields a mix of 60% file operations and 40% directory operations.
The default ratio is 50 (50% file operations and 50% directory operations).
.TP 17
\fBOPERATIONS\fP=\fIops\fP
This sets the total number of operations to be performed, where \fIops\fP
specifies the operation count. The default is 500.
.TP 17
\fBFREADPROB\fP=\fIprob\fP
This sets the probablility value for file read operations. The probability is
specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBFWRITEPROB\fP=\fIprob\fP
This sets the probablility value for file write operations. The probability is
specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBFSTATPROB\fP=\fIprob\fP
This sets the probablility value for file stat operations. The probability is
specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBFCREATEPROB\fP=\fIprob\fP
This sets the probablility value for file create operations. The probability
is specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBFREMOVEPROB\fP=\fIprob\fP
This sets the probablility value for file remove operations. The probability
is specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBDREADPROB\fP=\fIprob\fP
This sets the probablility value for directory read operations. The
probability is specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBDCHDIRPROB\fP=\fIprob\fP
This sets the probablility value for chdir operations. The
probability is specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBDSTATPROB\fP=\fIprob\fP
This sets the probablility value for directory stat operations. The
probability is specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBDCREATEPROB\fP=\fIprob\fP
This sets the probablility value for directory create operations. The
probability is specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBDREMOVEPROB\fP=\fIprob\fP
This sets the probablility value for directory remove operations. The
probability is specified as a percentage by \fIprob\fP. The default is 20.
.TP 17
\fBFREADLOOP\fP=\fIcount\fP
This sets the loop count for file read operations. This controlls the number
of times a read operation is repeated each time it is selected. This
repetition is NOT counted in the operation count. The loop count is
specified by \fIcount\fP. The default is 1.
.TP 17
\fBFWRITELOOP\fP=\fIcount\fP
This sets the loop count for file write operations. This controlls the number
of times a write operation is repeated each time it is selected. This
repetition is NOT counted in the operation count. The loop count is
specified by \fIcount\fP. The default is 1.
.TP 17
\fBFSTATLOOP\fP=\fIcount\fP
This sets the loop count for file stat operations. This controlls the number
of times a stat operation is repeated each time it is selected. This
repetition is NOT counted in the operation count. The loop count is
specified by \fIcount\fP. The default is 1.
.TP 17
\fBDREADLOOP\fP=\fIcount\fP
This sets the loop count for directory read operations. This controlls the
number of times a read operation is repeated each time it is selected. This
repetition is NOT counted in the operation count. The loop count is
specified by \fIcount\fP. The default is 1.
.TP 17
\fBDSTATLOOP\fP=\fIcount\fP
This sets the loop count for directory stat operations. This controlls the
number of times a stat operation is repeated each time it is selected. This
repetition is NOT counted in the operation count. The loop count is
specified by \fIcount\fP. The default is 1.
.SH ENVIRONMENT VARIABLES
The following environment variables are used.
.TP 17
.B NFSTESTDIR
This contains the pathname of the root of the test directory tree to be used
or constructed. It is consulted if no directory is given on the command line.
If NFSTESTDIR is not set and no directories are specified on the command line,
the default directory
.I /mnt/nfstestdir
will be used.
.TP 17
.B NFSTESTCONF
This contains the name of the configuration file used by \fBexercise\fP. The
default is \fI./.exconf\fP.
.SH WARNINGS
Errors will result if the directory tree specified to \fBexercise\fP is not
of the type constructed by \fBmaketree\fP. There are special files in trees
constructed by
.B maketree
and
.B exercise
which are used in checking the tree for correctness.