Commit Graph

38 Commits

Author SHA1 Message Date
Mark Vitale
6218690883 tests: Specify unsigned char arrays in vos-t uuid tests
In order to eliminate the following warnings:

  warning: initializer does not fit or is out of range: ...

change the test uuids to unsigned chars.

Change-Id: Ic75d4d8d292b309a25713979935f8e82985590b6
Reviewed-on: https://gerrit.openafs.org/15355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
2024-06-24 17:56:34 -04:00
Mark Vitale
99ca5c0c22 tests: Add missing dependencies for the C-TAP tests
Each C-TAP test is statically linked with libafstest_common as well as
any libaries under test.  However, not all tests have these libraries
listed as dependencies in their respective make rules.  Thus when
development changes are made to the c-tap harness, the OpenAFS common
code (tests/common/*), or the libraries under test, these tests may not
be rebuilt.  This results in unexpected test output and confusion.

Add the libafstest_common library (and other OpenAFS libraries as
needed) as dependencies for all the test targets that require them.

[mmeffie: remove MODULE_LIBS from auth/Makefile.in]

Change-Id: If14d27237cc6d18a424c88b0594e8c6cde1888e4
Reviewed-on: https://gerrit.openafs.org/15725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
2024-06-24 15:12:11 -04:00
Andrew Deason
dcf8af0b22 tests: Add test keys in afstest_BuildTestConfig
Change afstest_BuildTestConfig to add the local keys into the
generated config dir, unless the info->skipkeys is set. This just
makes afstest_BuildTestConfig a little easier to use for the common
case of generating a fully-usable config dir with usable keys (only
some callers want to skip generating keys in order to test
key-populating functionality).

Change-Id: I1ce9d062ea30c391a93562fc90bc18997de75383
Reviewed-on: https://gerrit.openafs.org/14835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2021-12-27 22:46:12 -05:00
Andrew Deason
41dd504fe1 tests: Remove check/test/tests subdir targets
Since commit a62de618 (Build util tests properly with make check),
running 'make check' in tests/ also runs 'make check' in each of the
tests subdirectories, which builds the tests in that dir. (And the
same goes for 'make test' and 'make tests'.)

This does ensure that the tests are built before we run them, but it's
a bit strange to build the tests under 'make check', a target that
usually runs tests.

We do this in the top-level tests dir to make sure that the tests are
built, but this purpose is served by the existing 'make all' target.
So to reduce some duplication of logic, and reduce the number of
targets the subdirs need to implement, just have 'make check' depend
on 'make all', so we know the tests are built when we go to run them.

Change-Id: I2fcbe88daeeae94cd7ef7a4a8326c4b56fadee5a
Reviewed-on: https://gerrit.openafs.org/14636
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2021-08-26 10:29:57 -04:00
Andrew Deason
71acc392a3 tests: Generalize temp dir management
Currently, afstest_BuildTestConfig calls afstest_mkdtemp (our thin
wrapper around mkdtemp) to create its temporary config dir. We may
want to make new tests, though, that create a temp dir for other
purposes. To make that easier, move a little more code into
afstest_mkdtemp, so the caller doesn't need to construct the template.

To allow callers to clean up such temporary dirs, change
afstest_UnlinkTestConfig into a more general function,
afstest_rmdtemp. Allow this new function to remove all files in a dir,
not just files one-level-deep. To avoid needing to write our own
traversal and removal logic, just run 'rm -rf' via a new function,
afstest_systemlp().

Move these temp dir-related functions from config.c into files.c,
since they are no longer specific to config dirs.

Change-Id: I16750a2f30e98c9ca2e14dfb7d3fc9bc5d456e8d
Reviewed-on: https://gerrit.openafs.org/14632
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2021-08-13 17:50:23 -04:00
Andrew Deason
15d033d0df tests: Introduce is_command()
Add a new function (is_command), to help implementing tests that
involve running a command. This works like is_string(), except the
string value we compare against is the output of the provided command,
and we also check the exit code of the command.

Convert the existing execl() call in volser/vos-t to use this new
function.

Change-Id: I4a75b1a0333e608da6a6cd69838350116a2503a9
Reviewed-on: https://gerrit.openafs.org/14040
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2021-08-13 15:08:03 -04:00
Andrew Deason
40d6644264 tests: Introduce afstest_*_path()
Currently, several of our tests contain logic to locate files (via
srcdir or objdir), based on the C_TAP_SOURCE/BUILD environment
variables. This logic is duplicated in several places, so consolidate
the code into a couple of new functions: afstest_src_path and
afstest_obj_path. Update all callers to use these new functions.

Change-Id: I67a5e5d7f8fd7a1edb55a45e52d877ac41f9a2ea
Reviewed-on: https://gerrit.openafs.org/14319
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2021-08-12 10:34:03 -04:00
Andrew Deason
405001be72 tests: Introduce libafstest_common
Currently, a few tests use the code in tests/common/ by linking
individual object files in there in addition to the test code (e.g.
linking ../common/config.o along with superuser-t.o).

This convention makes it very obnoxious to move code around in
tests/common/, since any users need to update their link lines. It
also makes it difficult for code in tests/common/ to make use of
functions in other tests/common/ files.

To fix this, just build all of the objects in tests/common/ into a
convenience library, called libafstest_common, and link the relevant
tests against that. Link a few requisite libraries (roken, rfc3961) in
libafstest_common, so each individual test doesn't need to link
against them.

Also link the TAP library itself in libafstest_common, so tests don't
have to explicitly link against it separately. To do this, convert it
into a libtool library, libafstest_tap.la.

Change-Id: I9c031c164efee20201336edcbfaff429e1d231b7
Reviewed-on: https://gerrit.openafs.org/14318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2021-08-07 20:38:05 -04:00
Andrew Deason
004c797daa tests: Introduce 'make check TESTS=test/name'
Currently 'make check' always runs all tests. We can run individual
tests manually, but doing so is a bit cumbersome to do under the same
environment as 'make check', since doing so means running something
like this:

    $ MAKECHECK=1 $(abs_top_srcdir)/tests/libwrap @TOP_OBJDIR@/lib \
        ./runtests opr/fmt util/ktime

To make it easier to run single tests introduce a way of calling 'make
check' like this:

    $ make check TESTS='opr/fmt util/ktime'

Which will run the same commands as 'make check', but will run
runtests with only the specified tests, instead of running the default
list.

Some makefiles currently use a "TESTS" or "tests" variable to list
their test binaries; rename them all to "BINS" to avoid conflicting
with this new use for "TESTS" and to make our makefiles a little more
consistent.

Change-Id: I427f83be0d4571794644a97123bcd1f32427bd05
Reviewed-on: https://gerrit.openafs.org/14317
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2021-06-11 05:18:49 -04:00
Michael Meffie
624219a1b2 tests: Accommodate c-tap-harness 4.7
The SOURCE and BUILD environment variables have been changed to
C_TAP_SOURCE and C_TAP_BUILD in the new version of c-tap-harness.  The
runtests command syntax has changed as well.

Convert all of the old SOURCE and BUILD environment variables to the new
C_TAP_SOURCE and C_TAP_BUILD names.

Add the required -l command line option to specify the test list.

Add the new runtests -v option to run the tests in verbose mode to make
it easier to see which tests failed.

Change-Id: I209a6dc13d6cd1507519234fce1564fc4641e70b
Reviewed-on: https://gerrit.openafs.org/14295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2020-08-20 22:36:56 -04:00
Andrew Deason
1bd03c9c22 tests: Run perl via 'env'
The 'perl' binary may not be /usr/bin/perl, depending on the system.
For example, on modern FreeBSD it tends to be /usr/local/bin/perl
instead.

To avoid relying on perl to be in a specific location, just run via
/usr/bin/env instead, so we pick up perl from $PATH instead.

Change-Id: Ic8dc247c82342ff79dfa80426c489ccb8e3e1450
Reviewed-on: https://gerrit.openafs.org/14144
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2020-04-17 20:12:42 -04:00
Michael Meffie
bf1b3e2fc1 tests: skip vos tests when a vlserver is already running
The vos tests start a temporary vlserver process, which is problematic
when the local system already has an installed vlserver. Attempt to
temporarily bind a socket to the vlserver port, and if unable to bind
with an EADDRINUSE error, assume the vlserver is already running and
skip these tests.

Change-Id: I1dd3bc4c7ebcd2c7bffc8aca422222a50058090e
Reviewed-on: https://gerrit.openafs.org/14021
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2020-01-20 15:16:14 -05:00
Michael Meffie
dcf44ab5fc tests: do not resolve addresses in vos/vl test
The vos-t test adds a set of 10.* test addresses to a test vlserver and
runs vos to read them back.  When the test is run in an environment
where hosts have been assigned in the 10.* internal network, vos will resolve
the addresses to hostnames and the test fails.  Pass the -noresolve
option to vos for this test when checking for the expected list of
addresses.

Example test output before this commit:

    ./vos-t
    ...
    #   seen: 10.0.0.0
    10.0.0.1
    myhost.example.com
    10.0.0.3
    ...
    not ok 5 - vos output matches

Change-Id: Ief43fe180a0dfff211f28d5f47be6224270907a3
Reviewed-on: https://gerrit.openafs.org/14020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2020-01-11 00:46:42 -05:00
Andrew Deason
ce7a76a13e tests: Stop vlserver on errors
Currently, if we encounter an error and 'goto out' after starting the
test vlserver, we'll exit without stopping the test vlserver. This can
confuse the test harness, causing 'runtests' to hang forever.

To avoid this, move the afstest_StopServer() call to also run when
we're bailing out, but only if the server has actally started of
course.

Change-Id: Ice5a56c20bc8d2eac85b3e760850c4d85e4601a8
Reviewed-on: https://gerrit.openafs.org/13992
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
2020-01-10 11:31:31 -05:00
Andrew Deason
a21a2f8edb tests: Introduce afstest_GetProgname
Currently, in tests/volser/vos-t.c we call afs_com_err as
"authname-t", which is clearly a mistake during some code refactoring
(introduced in commit 2ce3fdc5, "tests: Abstract out code to produce a
Ubik client").

We could just change this to "vos-t", but instead of specifying
constant strings everywhere, change this to figure out what the
current command is called, and just use that. Put this code into a new
function, afstest_GetProgname, and convert existing tests to use that
instead of hard-coding the program name given to afs_com_err.

Change-Id: I3ed02c89f93798568783c7d717e8fb2e39dcce14
Reviewed-on: https://gerrit.openafs.org/13991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2020-01-09 23:56:27 -05:00
Andrew Deason
90726f837c tests: Check if vlserver died during startup
Currently, the volser/vos test starts a local vlserver to communicate
with. If the vlserver dies during startup, the spawned 'vos'
subprocesses take forever to run, since we need to wait for our Rx
calls to timeout for every operation.

To make it less annoying to detect and investigate errors that might
cause the vlserver to fail during startup, check if the vlserver dies
right away. We already sleep for 5 seconds when starting the vlserver,
so just check if the pid still exists after those 5 seconds.

Change-Id: I6c33059542fa975e4cb389b718f9da190cd13289
Reviewed-on: https://gerrit.openafs.org/13942
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2019-12-20 20:43:34 -05:00
Andrew Deason
0b8b6683fb tests: Fix manpage tests for objdir builds
The manpage tests have a couple of problems when running for objdir
builds:

- We try to specify './tests-lib/perl5' as a directory to find our
  helper library. However, the cwd when we're running the tests is in
  an objdir build, where the helper library is in the srcdir. Fix this
  by using the SOURCE env var specified by the tests wrapper.

- All of these tests specify the directory in which to find the man
  pages in a subdir of BUILD, but our manpages are located in the src
  dir (since they are built by regen.sh, not by configure/make). Fix
  this by specifying a SOURCE-based directory instead.

To avoid needing to make the same change for each of these tests, also
refactor the manpage tests so each test only needs to specify the
subdirectory and command name, and get rid of some of the common
boilerplate.

Change-Id: I96be199b1dec8db0545ae3cf19d2595c4afe4cdd
Reviewed-on: https://gerrit.openafs.org/13940
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2019-12-20 11:29:45 -05:00
Andrew Deason
f4ab3767b7 tests: Fix most tests for objdir builds
Fix a few miscellaneous issues with building and running our tests in
objdir builds:

- Our C tests use -I$(srcdir)/../.. in the CFLAGS, so we can #include
  <tests/tap/basic.h>. However, basic.h actually gets copied from
  src/external/c-tap-harness/tests/tap/ to tests/tap/ during the
  build, and so basic.h is available in the objdir, not srcdir. For
  objdir builds, this causes building the tests to fail with failing
  to find basic.h. Fix this to use TOP_OBJDIR as the include path
  instead.

- Our 'make check' in tests/ tries to run ./libwrap; but our cwd will
  be in the objdir for objdir builds, and libwrap is a script in our
  srcdir. Fix this to run libwrap from the srcdir path.

- In tests/opr/softsig-t, it tries to find the 'softsig-helper' binary
  in the same dir as 'softsig-t'. However, softsig-t is just a script
  in the srcdir, but softsig-helper is a binary built in the objdir.
  Fix this to use the BUILD env var provided by the tests wrapper, by
  default.

Change-Id: Iff642613bfc88d0d7e348660dc62f59e6fa8af75
Reviewed-on: https://gerrit.openafs.org/13939
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2019-12-13 00:03:21 -05:00
Anders Kaseorg
7254d831b7 tests/volser/vos-t.c: Don’t ignore return value of pipe
Resolves this warning:

vos-t.c: In function ‘TestListAddrs’:
vos-t.c:60:5: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
     pipe(outpipe);
     ^

Change-Id: I7eb58a91b5a7d9df18a4952400f74c79299e857d
Reviewed-on: http://gerrit.openafs.org/11958
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2015-08-02 22:03:44 -04:00
Jeffrey Hutzelman
d527a80825 Fix unchecked calls to asprintf
The return value of asprintf() is the number of bytes printed, or -1 if there
was an error allocating a large enough buffer.  In the latter case, the value
of the result string is undefined, and so it cannot be counted on to be NULL.

This change fixes numerous places where the result of asprintf is checked
incorrectly (by examining the output pointer and not the return value) or not
at all.

Change-Id: I9fef14d60c096795d59c42798f3906041fb18c86
Reviewed-on: http://gerrit.openafs.org/9978
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-12-01 11:27:15 -05:00
Michael Meffie
04605389d7 tests: make a plan for man page checks
Split the man page check routine into two routines; one to get the list
of sub-commands for a command, and another to verify a man page exists
for each sub-command.  Use the list of sub-commands to set up the
Test::More plan before running the tests.

Setting the plan before running the tests allows the the man page tests
to run on systems which ship older versions the Test::More module.

Change-Id: I1ed6fb87989e1deff4696562f3b917140592ed17
Reviewed-on: http://gerrit.openafs.org/9835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-01 07:19:01 -07:00
Marc Dionne
0a528a52f5 tests: Improve failure mode for unresolvable hostname
In the case of a host where gethostbyname is unable to resolve
the hostname, afstest_BuildTestConfig() may return NULL which
can cause several tests to crash.

Add a common function to look out for this condition and use it where
appropriate.  When it occurs, the current module is skipped and
the user gets an error message that indicates the configuration
problem.

Change-Id: I7216876eb2424368f415e5759e2b95009ad055b2
Reviewed-on: http://gerrit.openafs.org/9120
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-17 20:51:15 -08:00
Marc Dionne
0c3670914a tests: cleanup temporary files
Call the configuration directory cleanup function before exiting
so there are no files left behind, even in case of error.

Add KeyFileExt to the list of files that are removed.

Change-Id: Ie795bef0d44609b36950970244c02a6c6da1a843
Reviewed-on: http://gerrit.openafs.org/8142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-30 03:27:16 -07:00
Jason Edgecombe
100cec69fb TESTS: Skip the volser tests if current hostname maps to the loopback network
Change-Id: I35d16ba418d0ecd67ffbd54d564a515bf551fe8d
Reviewed-on: http://gerrit.openafs.org/8146
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-09-26 06:46:27 -07:00
Simon Wilkinson
519f2b96c7 tests: Fix volser Makefile
The volser Makefile had a bad path for liboafs_util, and was still
directly pulling in some objects from the fileserver build. Fix it
so that it uses proper libraries.

Change-Id: Ic36c6a0f93c299bd04d48fa4238c4da5cbc571d4
Reviewed-on: http://gerrit.openafs.org/8125
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-16 13:31:57 -07:00
Simon Wilkinson
012b878576 util: Convert to using libtool
Create a pthreaded version of libafsutil, named liboafs_util.la,
and use this library in all of the pthreaded binaries that we build,
replacing both inclusion of libafsutil.a, and direct compliation of
pthreaded versions of the util source files.

libafsutil.a is provided for legacy LWP applications, and the
convenience library libafsutil_pic.a remains until we address the way
in which the user space cache manager is built and linked.

Change-Id: Ibdc3d6e2fe56ca6f5b882cf03991d1a2e32c62b2
Reviewed-on: http://gerrit.openafs.org/8056
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-08 20:27:51 -07:00
Simon Wilkinson
8b84d9538c opr: Convert to using libtool
Convert opr so that it uses libtool. For backwards compatibility we
still build libopr.a, but we do so as a static convenience library.

As libopr.a may, in the future, be converted to an LWP library, change
all of the pthreaded binaries so that they link against the libtool
library liboafs_opr.la

Change-Id: Icee04ff4745334f06ffba16df5bb07fc9dcc0b54
Reviewed-on: http://gerrit.openafs.org/8034
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-09-04 13:23:14 -07:00
Simon Wilkinson
c877c0b419 tests: Start using the upstream C TAP harness
Instead of bundling our own copies of Russ's C TAP Harness, start using
source pulled from his git repository using the src/external import
mechanism. Note that we are not currently building the floating
point (is_double) portion of the harness.

In the process of doing so, we also upgrade our test harness to the latest
upstream version, 1.11. This is somewhat problematic, as there have been
some significant code changes since the version bundled with OpenAFS.
Work around these by
   *) Referencing the basic.h header as <tests/tap/basic.h>, rather than
      just <tap/basic.h>, to match the new upstream layout
   *) Changing the include path so that the tests/ directory can be
      found within it.

Change-Id: I63efbb30248165e5729005b0a791e7eb7afb051d
Reviewed-on: http://gerrit.openafs.org/7374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-05-11 16:36:44 -07:00
Simon Wilkinson
7e7a4ff328 tests: More fixes for the vos test
The vos test wasn't running correctly from runtests, as it contained
a relative path which assumed that the CWD was tests/volser, rather
than tests/

Modify this to use the BUILD environment variable when invoked from
runtests, and also add an exit after the exec(), so that if we do
fail to launch the binary we don't have two processes both running
the same code.

Change-Id: I7b2d7e6a517e9e9f74f15803da7507037671226a
Reviewed-on: http://gerrit.openafs.org/7265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-22 18:49:58 -07:00
Simon Wilkinson
5cfea96b23 tests: Make afstest_StopVLServer generic
The StopVLServer function can be used to stop any server for which
we know the pid. So, rename it as afstest_StopServer to make this
apparent.

Change-Id: Ia5973342e81dc15a698e84e69b314cd6157831f7
Reviewed-on: http://gerrit.openafs.org/7258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-22 06:17:42 -07:00
Simon Wilkinson
2ce3fdc5dc tests: Abstract out code to produce a Ubik client
Abstract out the code which the volser test uses to produce a
ubik client so that it can be used to test other ubik services

Change-Id: I800fda9e53ad45c91f3de8eceea387cc011dda3c
Reviewed-on: http://gerrit.openafs.org/7257
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-22 06:17:17 -07:00
Simon Wilkinson
ddcd9ede77 tests: Add missing vos test
Add the missing volser/vos test, and fix it so that the plan is correct

Change-Id: I017679176f5df8fb18002175a75ac0dcd108aded
Reviewed-on: http://gerrit.openafs.org/7255
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-22 06:16:07 -07:00
Simon Wilkinson
2c0ed7ace6 tests: waitpid requires sys/wait.h
Calling waitpid requires the sys/wait.h header to be included to
guarantee that the prototype is enabled.

Change-Id: I2d845236347d1be46cd750c2e766b305a64cde53
Reviewed-on: http://gerrit.openafs.org/7128
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:24:58 -07:00
Simon Wilkinson
ca0fdd84a4 viced: Remove the LWP fileserver
*) Remove all LWP specific code from the fileserver, and make pthread
   the default
*) Build the pthreaded fileserver in the 'viced' directory, rather than
   in tviced
*) Move the DAFS specific files from tviced to viced (arguably, these
   should move into dviced, but there are currently no source files in
   that directory)
*) Remove tviced from the build

Change-Id: I6e186c9fad6d9dccd04cf1317a80c087587ef25f
Reviewed-on: http://gerrit.openafs.org/5816
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-01-23 14:18:59 -08:00
Simon Wilkinson
043c31bf8d rx: Use a red black tree for the event stack
Instead of the current event stack, which uses a sorted linked
list, use a red/black tree to maintain the timer stack. This
dramatically improves event insertion times, at the expense of
some additional implementation complexity.

This change also adds reference counting to the rxevent
structure. We've always had a race between an event being
fired, and that event being simultaneously cancelled by
the user thread. Reference counting avoids that race resulting
in the structure appearing twice in the free list.

Change-Id: Icbef6e04e01f3eef5b888bc3cb77b7a3d1be26ae
Reviewed-on: http://gerrit.openafs.org/5841
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-29 12:29:41 -08:00
Simon Wilkinson
2aaa540276 tests: volser doesn't need rxgk yet
An rxgk dependency has crept in to the volser tests. Remove it for
now.

Change-Id: I0439ab5cf6deb335ebe76fb5a6736c9905312eec
Reviewed-on: http://gerrit.openafs.org/5665
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-10-24 03:42:38 -07:00
Simon Wilkinson
f02c3d40cb tests: Add tests for the vlserver
Add some very simple vlserver tests

Change-Id: I862d3a86857dc70f0421f4887d1fc4d047c57909
Reviewed-on: http://gerrit.openafs.org/5029
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-17 22:26:15 -07:00
Jeff Blaine
f0774acd73 Introduce TAP tests of man pages for command_subcommand
Introduces the first batch of man page testing as part of
the TAP tests.  We would like to fail, for example, when
someone has added a new command to vos but not AHEM documented
it.

For now, the tests consist of checking to ensure that for
every subcommand listed in the output of "command help"
(e.g. vos help), fail the test if there is not a man page
for those (e.g. vos_delentry.1 etc).

Copy any of the -man-t tests and edit to make a new one

All tests make use of a simple new Perl library stored
in tests-lib/perl5 (a new area, not just named 'lib'
because I didn't want it to be confused with a s test
for a 'lib' in the src).

Change-Id: I1e07adafe718c4549f1855c5e5b0d10dd9ab5f00
Reviewed-on: http://gerrit.openafs.org/4846
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-28 12:52:28 -07:00