91 lines
2.6 KiB
Groff
91 lines
2.6 KiB
Groff
.TH LK_TEST 1 "" "Testing"
|
|
.SH NAME
|
|
lk_test \- test file and record locking functionality
|
|
.br
|
|
lk_test_svc \- file and record locking test server
|
|
.SH SYNOPSIS
|
|
.B lk_test
|
|
[-va] [localpath] [host:remotepath]
|
|
.br
|
|
.B lk_test_svc
|
|
.SH DESCRIPTION
|
|
.I lk_test
|
|
is an RPC client/server application designed to test the file
|
|
and record locking functionality of a UNIX file system. The client,
|
|
\fIlk_test\fP, and the server, \fIlk_test_svc\fP,
|
|
form a pair of processes cooperating in the testing. The
|
|
client is the active process in that the test phases are initiated by
|
|
the client. The server is passive, waiting for the client to make
|
|
requests of it.
|
|
.P
|
|
All testing is performed in the current working directory for each
|
|
process unless a directory or test file has been specified by the argument
|
|
.IR localpath .
|
|
If
|
|
.I host:remotepath
|
|
has been supplied, the host name and the remote directory are taken
|
|
to be
|
|
.I host
|
|
and
|
|
.I remotepath
|
|
respectively. Otherwise, the host name and the remote directory name
|
|
are determined from
|
|
.I localpath
|
|
or the current directory. This is done by extracting the information
|
|
from the mounted file system table.
|
|
.P
|
|
If the host and remote path are to be specified, the local path must
|
|
also be specified, even if it is ".".
|
|
.P
|
|
Testing is divided into two phases. In the first phase, exclusive
|
|
locking is tested. In the second phase, shared locking is tested.
|
|
The first phase tests the locking and unlocking of the entire file
|
|
and of a portion of the file followed by tests of record locking
|
|
(locking a range of bytes within the file), overlapping lock requests,
|
|
and lock boundaries. The second phase is similar to phase one with
|
|
variations for testing shared locking.
|
|
Where applicable, testing covers
|
|
.IR fcntl (2),
|
|
.IR lockf (3C),
|
|
and
|
|
.IR flock (3B).
|
|
.P
|
|
In all phases, verification of locking and unlocking is done by
|
|
requests to the process acting as the server.
|
|
.P
|
|
When testing a distributed file system such as NFS, the following
|
|
test scenarios must be executed (with three different systems):
|
|
.IP 1)
|
|
run
|
|
.B lk_test_svc
|
|
and
|
|
.B lk_test
|
|
on one client;
|
|
.IP 2)
|
|
run
|
|
.B lk_test_svc
|
|
on the file system server and
|
|
.B lk_test
|
|
on a single client;
|
|
.IP 3)
|
|
run
|
|
.B lk_test_svc
|
|
on one client and
|
|
.B lk_test
|
|
on a second client, with neither client being the file system server.
|
|
.SH OPTIONS
|
|
lk_test accepts the following options.
|
|
.TP 8
|
|
.B \-v
|
|
turn on verbose mode
|
|
.TP 8
|
|
.B \-a
|
|
use alternate lock verification. Alternate lock verification uses F_SETLK
|
|
to verify lock acquisition as opposed to F_GETLK.
|
|
.P
|
|
.I lk_test_svc
|
|
accepts no options from the command line. The
|
|
.B -v
|
|
option and the working directory name are passed to the server by the client
|
|
via an RPC call.
|