Commit Graph

214 Commits

Author SHA1 Message Date
Simon Wilkinson
07372cf7e7 opr: Add opr_jhash_int2 function
Add a function to jhash that can be used to hash a pair of unsigned
integers (or other stuff that can cast to them) without having to build
up an array.

Provide a couple of tests for the new function

Change-Id: I594848f64316fb459eff565933691f560512ca79
Reviewed-on: http://gerrit.openafs.org/8354
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-11-01 11:30:20 -07:00
Simon Wilkinson
dce5e012fe tests: Fix fallout from cleanup change
The change to cleanup temporary files after tests
(0c3670914a) broke all attempts
to run the tests using libwrap, as it would cause libwrap to run
the binary named "MAKECHECK=1"

Move the variable defintion before the libwrap invocation to fix this.

Change-Id: I330267c9b53483abccf43d60a7dc8f8d973c3959
Reviewed-on: http://gerrit.openafs.org/8356
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2012-11-01 10:51:53 -07: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
Simon Wilkinson
a812d28bbf Revert "Add some basic tests to check out fuse"
This reverts commit 94bf003a72.

The fuse tests are fundamentally broken as they stand:

*) They rely on files that have not been committed to the tree. To
   function correctly the file fuse/conf/CellServDB must be present
*) They always run, regardless of whether the fuse helper binaries are
   installed on the developers system, or even on whether the tree was
   built with fuse support enabled.
*) They pass, even if fuse fails to start up
*) The file fuse.sh is committed, despite being unused. This is
   particularly confusing, as it looks like this is where the tests
   are performed from (its not, testing is done in dynroot-t)
*) fuse-log should be either cleaned up, or flagged as ignored in
   .gitignore

Revert the commit until such time as all these issues can be fixed

Change-Id: I5ff9a95f33c0a5d0614bb47c521a8770d92fe2eb
Reviewed-on: http://gerrit.openafs.org/8230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-12 18:33:07 -07:00
Simon Wilkinson
f0a57e9de6 tests: Reformat loopback tests
Reformat the loopback tests to match our house style - 4 spaces for
first indent, a tab for the second, and so on, opening brace of a
function on a newline, spaces around assignments, and so on.

Change-Id: I54f168ca143e7ff46c9d82289331b8314849f848
Reviewed-on: http://gerrit.openafs.org/8229
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-12 18:32:25 -07:00
Simon Wilkinson
072828a1f5 tests: Tidy up loopback adapter tests
Remove the unused h_errno extern, which in turn removes the need
for disabling strict prototype warnings in the Makefile

Use roken.h, instead of hardcoding system libraries

Change-Id: Ie654c77ff60ed14fc3b659fa3eb527535be71164
Reviewed-on: http://gerrit.openafs.org/8228
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-12 18:32:17 -07:00
Troy Benjegerdes
94bf003a72 Add some basic tests to check out fuse
Update makefiles to have 'make test' and 'make check' use the
_nolibafs build version, since there are no tests that (currently)
require the AFS kernel module to be built.

Clean up fuse test copyright notice, Alphabetize configure.ac

Change-Id: Icc95dd3393cd66f0d04fa5f6e8f806db60ca031e
Reviewed-on: http://gerrit.openafs.org/8135
Reviewed-by: Troy Benjegerdes <hozer-gerrit@hozed.org>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-03 05:41:51 -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
Jason Edgecombe
70c4369e89 TESTS: Add a library to check for the default loopback network
Change-Id: Id7bb92345e97309363fa5ddbff9147edf30ccd96
Reviewed-on: http://gerrit.openafs.org/8145
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-26 04:47:01 -07:00
Simon Wilkinson
dca06bd104 tests: Convert opr tests to use libtool
Avoid the problems with libopr's dependencies by just converting
the tests to use the libtool version of the opr library. While we're
at it, make the tests pthreaded too.

Change-Id: I4e570b288ea57c758c848be1d545e5ee59771ab9
Reviewed-on: http://gerrit.openafs.org/8127
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-16 13:35:16 -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
Michael Meffie
d72df5a18e cmd: exit status zero from -help
Return of an exit status of zero when running commands with -help,
instead of returning an error. By general convention, and in
previous versions, tools do not not treat -help as an error.

The AFS::Command perl modules, use -help as an introspection
technique, and fail when commands run with the -help option returns
non-zero.

Change-Id: I6ecd95f6ccd07218a2657dbb4dbf1c13599159f4
Reviewed-on: http://gerrit.openafs.org/8087
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-09-11 11:38:57 -07:00
Simon Wilkinson
564fe1e329 rx: Build libtool library
Build a pthreaded, libtool, version of librx.a called liboafs_rx.la.
librx.a remains for LWP applications to use. With this change, all RX
objects are built in both the LWP and pthread cases, so some #ifdef
guards are required to protect code that isn't relevant in a given
build.

Currently, all of our pthreaded objects use libafsrpc to get RX
functionality, so this change is fairly minimal outside of the RX
directory.

Change-Id: I8e629e2319fb1964058e70c3c0c3ed548b09b22d
Reviewed-on: http://gerrit.openafs.org/8058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-08 20:28:32 -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
d36be5b8be cmd: Convert to using libtool
Convert the libcmd and libcmd_pic libaries to being built using
libtool. Historically, these have been built as LWP code, but they
have no LWP dependencies, and no LWP-specific code within them. So,
make cmd a pthread-only library.

In addition to the libtool library liboafs_cmd.la, we build the
legacy libcmd.a and libcmd_pic.a as convenience libraries. libcmd64.a
(a 64bit variant, used solely by kdump), remains built through
"normal" means.

Update pthreaded users of libcmd to use the new liboafs_cmd.la. For
now, non-pthreaded users are left alone.

Change-Id: Id8445949754d1942f6e8752ae182b4e6f86fe94f
Reviewed-on: http://gerrit.openafs.org/8055
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-07 11:29:14 -07:00
Simon Wilkinson
d6d2f28450 comerr: Convert to using libtool
Convert the libafs_comerr library so that it uses libtool.

comerr uses a pthread lock to protect the error tables, so it needs
to be built as both an LWP, and a pthread library (previously, we've
just built it as LWP, which is probably broken on some platforms, as
it won't define -D_REENTRANT)

libafscom_err.a remains as the LWP variant, and all pthreaded code is
modified to use the libtool liboafs_comerr.la library.

Change-Id: Id421cc97ad8681b42af7a5eb3cb512e1e1ce9a90
Reviewed-on: http://gerrit.openafs.org/8054
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-07 05:27:10 -07:00
Derrick Brashear
fe2641e35b tests: deal with one more unsigned warning
C90 wants this unsigned hint before it will dtrt

Change-Id: Ic60b0336df7e8c4373582ffa352f4042ebc021c1
Reviewed-on: http://gerrit.openafs.org/8050
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-06 21:31:56 -07:00
Marc Dionne
d77a99106d tests/opr: fixes for the uuid-t.c tests
It's always good to have a plan.

Also, use correct mask when checking for DCE bit.

Change-Id: I4ab72aeb89efbd63d2d15fdc57aea8d2c1eb13d9
Reviewed-on: http://gerrit.openafs.org/8047
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-06 04:45:59 -07:00
Marc Dionne
1f55bc7f08 tests/auth: fixes for the opr libtool changes
Add a missing line continuation backslash, and use the correct
location for libafs_opr.la

Change-Id: I52e44d36d9e1a9a0b3cd81c463f952072d4cbb48
Reviewed-on: http://gerrit.openafs.org/8045
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-06 04:45:04 -07:00
Derrick Brashear
97dfe2b73c tests: modernize tests to compile in warning-as-errorland
the tests haven't been loved as we've been killing warnings. clean up.

Change-Id: I9c36114d3172c4a6347f5e890df6edb5caf796b4
Reviewed-on: http://gerrit.openafs.org/7232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-09-06 04:43:30 -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
3bb8e4c396 opr: Add opr_jhash_opaque
Add a function which can be used to obtain a hash of an arbitrary
opaque string of arbitrary length

Change-Id: I9e6aa29fa06a54976b81eda399c8838b73007962
Reviewed-on: http://gerrit.openafs.org/7978
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-08-14 13:48:44 -07:00
Simon Wilkinson
6f6bfb31ac opr: Add UUID handling functions
Add a set of functions to the opr library to handle creating and
manipulating UUIDs.

The opr_uuid_t type is held as a 16 octet character string, which
comprises the UUID encoded into network byte order. This is the
primary form for manipulating UUIDs with this library, as it avoids
any nbo/hbo problems.

For applications which require raw access to the UUID components,
the opr_uuid_unpacked structure is provided, and
opr_uuid_pack/opr_uuid_unpack can be used to convert to and from
this format.

Finally, functions to print the UUID as a string, and parse a UUID
from a string, are provided. When printing, we use the standard UUID
format of 000000-0000-0000-0000-00000000. However, the afsUUID library
used to print UUIDs as 000000-0000-0000-00-00-00000000, so we also
accept this format.

Change-Id: I78ef79b7ab8ae15fb955c6495118722875c94f8d
Reviewed-on: http://gerrit.openafs.org/7977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-08-14 12:53:08 -07:00
Simon Wilkinson
c7ff0d28bf tests: Abstract out code for a test RPC service
Lots of our tests want to start a test RPC server, and then run
commands against it. Start to abstract out the code to do this
by pulling the code to start a test RPC server into its own
function in the common test directory.

Change-Id: Ie7fa1fa1984113f3722def17a9fd4b98993bd6ff
Reviewed-on: http://gerrit.openafs.org/7584
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 07:27:42 -07:00
Simon Wilkinson
c8e52c1f45 tests: Fix cmd config file path
Fix the configuration file path for the cmd test so that it works
when invoked from runtests

Change-Id: Id7d717e163abf5cfab2d551aaf08fb9967a87153
Reviewed-on: http://gerrit.openafs.org/7576
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-20 14:01:54 -07:00
Simon Wilkinson
4660b53e69 opr: Add simple time type
Add a simple time type to the opr library, which provides helper
routines to implement the 100ns time format selected for on-the-wire
use for AFS-3 (this also provides a handy single integer internal
time format)

Change-Id: I1f2d81e61a3e4124e0dd49830a115b72d7a7b37f
Reviewed-on: http://gerrit.openafs.org/7559
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 15:23:02 -07:00
Simon Wilkinson
0f30c95a03 cmd: Add support for pulling options from files
With this change, we gain the ability to set our command line options
from krb5.conf configuration files. This is only available for tools
which are implemented using the new cmd_OptionAs accessor methods.

Callers should load their configuration file using
    cmd_OpenConfigFile("/path/to/config/file.conf");

(an addition to libauth to return a path to a system wide
 configuration file will be forthcoming)

and then set their command name (for example, "fileserver", "afsd",
"vos" and so on) using
    cmd_SetCommandName("mycommand");

The accessor functions will then populate their return values with
either:
  a) The command line options, if specified
  b) The contents of the tag matching the option name, in the
     [command_subcommand] section of the configuration file, if it
     exists
  c) The contents of the same tag, in the [command] section of the
     configuration file, if it that exists.
  d) The contents of the same tag in the [defaults] section of the
     configuration file.

Callers can also gain access to the entire configuration file by
calling cmd_RawFile, or to just the section corresponding to their
command line by calling cmd_RawSection. Note that when using the file
directly, it is up to callers to preserve consistency by implementing
similar inheritance rules as the above.

Change-Id: Ic501ab296af3638f961486869af79c9ce47b77b8
Reviewed-on: http://gerrit.openafs.org/7135
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-05-11 18:49:07 -07:00
Simon Wilkinson
ad347dea32 tests: Add additional cmd tests
Add additional tests to the libcmd test suite to verify the
behaviour of cmd_OptionPresent and cmd_OptionAsList

Change-Id: I81a235fb5ee87682c72ca942f1341f77be6fda39
Reviewed-on: http://gerrit.openafs.org/7392
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-05-11 18:49:00 -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
a9595ab047 tests: Use enum rather than #defines for tests
Change the command test so that it uses an enum, rather than #defines
for offsets into the parms array. This is mainly a cosmetic change, but
brings the test suite into line with the way that we're doing stuff in
the "real" code.

Change-Id: Ia9d72e13230edd4fe13af52ba6816cf775693c36
Reviewed-on: http://gerrit.openafs.org/7133
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-05-07 20:24:50 -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
5815a04cf1 tests: Move token faking code to its own file
Move the token faking code out of superuser-t.c into its own file in
tests/common, so it can be used by other tests.

Change-Id: I7b420250ef974b4b80a8dde692d2666657bb82ca
Reviewed-on: http://gerrit.openafs.org/7259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-22 06:18:19 -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
3a1e129b76 tests: Add a RX functionality test
Use the rxperf performance testing tools to add a couple of simple
RX tests. The first moves 1Mbyte of data backwards and forwards 30
times. The second starts 30 threads, which each move 1MByte of data
once.

This is by no means an exhaustive test of RX, but the single and
multi-threaded invocations should provide a useful smoke test if
things get very broken.

Change-Id: I11267be067cf6c05a20aeb90a18ed4031502a1b1
Reviewed-on: http://gerrit.openafs.org/7244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-19 05:07:19 -07:00
Simon Wilkinson
4188865670 Update .gitignore files
Update (and create) .gitignore files across the tree

Change-Id: I7534e4f1eac44e6024f86591a171b63a64c6f320
Reviewed-on: http://gerrit.openafs.org/7241
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-18 20:26:54 -07:00
Simon Wilkinson
18db7ede1c tests: Explicitly include DES in superuser test
When the hcrypto/des header was removed from our installed headers, it
wasn't added back in to the superuser test. Add it now, so that the test
can build.

Change-Id: I38023ee94abe801f6f2313b492e4f80855001c41
Reviewed-on: http://gerrit.openafs.org/7243
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-18 20:26:45 -07:00
Michael Meffie
f8b759b63f auth: local realms configuration
Add krb.conf and krb.excl support to the auth cell configuration
library.  Provide a function to determine if the user is local to the
cell.  Provide a function to set the local realms during application
initialization.  These changes are intended to replace the functions
afs_krb_get_lrealm and afs_is_foreign_ticket_name.

Change-Id: Iba57e9ffc2c958f3a4565a9352ce172189276ce9
Reviewed-on: http://gerrit.openafs.org/5744
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-16 10:31:04 -07:00
Jason Edgecombe
c242c5a4ae TESTS: Add the libwrap script to "make check" to handle library paths
LICENSE MIT

Change-Id: I5f77d8703a163b8b9224f64010b9e008bb386c59
Reviewed-on: http://gerrit.openafs.org/7202
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-16 06:02:53 -07:00
Marc Dionne
f971a36968 tests: remove unused variable in tests/util/ktime-t.c
errors is set but not used - remove it.

Change-Id: I00c99ac8b9c61ab2667aecbdf0fd04401d018bf8
Reviewed-on: http://gerrit.openafs.org/7142
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 16:18:24 -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
02f470e99d tests: rx needs roken
On Linux, the RX library has a dependency on libroken for the rk_socket
function. Add this dependency to the RX tests.

Change-Id: I306e846524232bc136cd969ab1b8664d1c570e2d
Reviewed-on: http://gerrit.openafs.org/7127
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:24:20 -07:00
Simon Wilkinson
eaea11ef0f tests: Add opr to the command test libraries
The cmd/command-t test needs libopr, so give it to it

Change-Id: I74ca08efffb0c0f6245498c9dc0dcf5287915bbd
Reviewed-on: http://gerrit.openafs.org/6949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-03-24 06:19:48 -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
aa76c8f670 rx: Make struct rx_connection private
Move the rx_connection structure into a private header file, so that
it is only visible from within the rx module. This allows us to use
types within the structure that are not visible to everywhere that
includes rx.h, as well as being a step towards a more stable ABI for
RX.

Add accessor functions for all of the connection members which are
currently used by external callers, and modify those accessors
which were implemented as macros to also be functions.

Change all external access to the connection structures to use these
new functions.

Change-Id: Ife67e63f37cb04273fbfc9079db3907bde78ab98
Reviewed-on: http://gerrit.openafs.org/6180
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-12-03 20:44:20 -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
20448059f0 opr: Add Bob Jenkins's hash functions
This imports a small subset of Bob Jenkins lookup3.c hash functions
into the opr library. At present we only import the subset of this
that deals with aligned arrays of integers, as this addresses our
immediate need.

It seems likely that if we're interested in a hash function for string
arrays (or other arbitrary data), that more recent functions such like
SpookyHash (from Bob Jenkins, again) or CityHash (from Google) may be
a better solution.

The immediate use case for this is removing the use of the '%' operator
when indexing speed critical hash tables, as well as ensuring fairer
distribution of entries across these tables.

A short set of test cases is also provided

Change-Id: I0ae26382e77da02204a30a95747f7d6de8c4f24a
Reviewed-on: http://gerrit.openafs.org/6095
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-21 07:45:14 -08:00
Simon Wilkinson
5574ff814f opr: Add a red/black tree implementation
Add an implementation of red/black trees to our runtime library.

This is originally derived from the FreeBSD macro-based rbtree
implementation, but is heavily reworked to not use macros, to improve
legibility, and to favour speed over structure compactness.

A test suite is provided in tests/opr/

Change-Id: I123209d3f89b5f8c1b85d1e5cd7d1d650ccc68ed
Reviewed-on: http://gerrit.openafs.org/5838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-12 06:48:17 -08:00
Michael Meffie
9c130285d8 opr: queue swap
Add inline function to pivot two queues.
Implementation by Simon Wilkinson.

Change-Id: I704a1ff3e0d6314e2bfe47c870226cb6ffd44b1b
Reviewed-on: http://gerrit.openafs.org/5742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-03 13:12:06 -07: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
fd5174d918 tests: Add opr library for ktime test
The ktime tests need libopr for the lcstring routines. Add the
dependency.

Change-Id: I6902537236fbf35a654a3a4d70fa8f2df89e2a92
Reviewed-on: http://gerrit.openafs.org/5664
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-10-24 03:42:30 -07:00
Simon Wilkinson
55efff93fe opr: Move queue header out of util
Move the header which is installed as opr/queues.h out of util/ and
into the new, top level, opr/ directory. Similarly move the tests out
of the util/ test suite, and into the opr/ tests

Change-Id: I81af487f09e1f0f4b25654a1f64c5ac75fd5a95b
Reviewed-on: http://gerrit.openafs.org/5656
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
2011-10-23 16:11:05 -07:00
Simon Wilkinson
9376f75bec tests: Fix error in man check specification
The kas manual test is kauth/kas-man, not kauth/kas

Change-Id: I714cbbf78af7f8e99ec52d9c0f173df3f6ae18c5
Reviewed-on: http://gerrit.openafs.org/5030
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-17 22:26:31 -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
Michael Meffie
4b9ad1b56e tests: fix cmd test case
Fix a build error in the cmd tap tests.

Change-Id: I757c5b508784fd938b70ca3829130275707dd39a
Reviewed-on: http://gerrit.openafs.org/4975
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 19:59:26 -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
Simon Wilkinson
91de2dd087 tests: Use a real IP address for the test cell
When creating the test CellServDB, use the IP address of the machine
that we are running on, rather than 127.0.0.1. This makes it possible
to actually start up ubik servers using this CellServDB.

Change-Id: Iec0be80921dd1f01825177562f8a3dcc59400b9a
Reviewed-on: http://gerrit.openafs.org/4808
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-07 07:51:15 -07:00
Simon Wilkinson
954aa2338c tests: Move code to add new DES keys to common
Make the code which adds a new (static) DES key to a cell's
configuration generally available, as this will also be useful in
constructing other tests

Change-Id: I5d284016628e9d25a198607ffd6f8f1a63ddf652
Reviewed-on: http://gerrit.openafs.org/4807
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-07 07:50:30 -07:00
Simon Wilkinson
799b3373ec tests: Move common code to its own directory
Move code for faking up an OpenAFS configuration directory into its
own "common" directory, as it's going to be of use to more tests than
just those in auth.

Change-Id: I9c80dd66763e222deca98bc7744ff317111c6ed8
Reviewed-on: http://gerrit.openafs.org/4806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-07 07:50:20 -07:00
Simon Wilkinson
78c0e3b0ef cmd: Add support for disabling specific abbrevs
Sometimes, when adding a new command parameter, it's necessary to
prevent it from colliding with an existing abbreviation. This patch
adds a new command flag CMD_NOABBRV which can be set on a parameter
to indicate that it should not be considered when checking for
ambiguous abbreviations.

For example, if a command has the existing '-cell' option which is
popularly abbreviated to '-c', adding a '-config' option would
cause the existing abbreviation to stop working. However, if '-config'
is added with the NOABBRV flag set, '-c' will continue to work.

Change-Id: I3b6d718f9dd81c44fb1d10c904db6a4a0fd763b8
Reviewed-on: http://gerrit.openafs.org/4810
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-07 07:44:14 -07:00
Simon Wilkinson
4c9134a995 Build system: Move install definitions to include
Move the definitions of the INSTALL_* variables out to
Makefile.config rather than replicating them in each file.

Change-Id: I5f74dcbf544a93716994418bee3be2c51a2a82d0
Reviewed-on: http://gerrit.openafs.org/4781
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 06:50:52 -07:00
Michael Meffie
64b255327d cmd: Reorder cmd_AddParmAtOffset arguments
Reorder the arguments of this recently introduced function to
make client code more readable.

Change-Id: I37f662f849bd96176230f75783e2a1c62d94b8c9
Reviewed-on: http://gerrit.openafs.org/4755
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-04 19:32:29 -07:00
Andrew Deason
cc0ba3c430 tests: Make -flag the first parm in command-t
Move the -flag parameter to be the first parameter, to test more of
the positional argument handling.

Change-Id: I637c58e8c76bfc23919f29a1c598084275426773
Reviewed-on: http://gerrit.openafs.org/4710
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-05-25 12:47:55 -07:00
Andrew Deason
9cbd9d71b3 tests: Use symbolic constants in command-t
Change-Id: I1d7e47edc97dcdb855ad5ca732a2f015741c9d18
Reviewed-on: http://gerrit.openafs.org/4709
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-05-25 12:47:44 -07:00
Andrew Deason
83322372fb tests: Correctly pass string args in superuser-t
We need to give a NULL pointer for string OUT arguments, so XDR knows
to allocate a new string. Also free the string each time so it gets
set back to NULL.

Change-Id: I1eb0c63dc4019b855a2cbecd9e35393f2fbb0fd7
Reviewed-on: http://gerrit.openafs.org/4708
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-05-25 12:47:37 -07:00
Simon Wilkinson
cf9ef0bed9 cmd tests: Initialise string retval
The cmd_OptionAsString function attempts to free the previous value
of the string passed to it. Make sure that we initialise the return
value to NULL before passing it in in the test suite.

Change-Id: I8500d5e6812f4d1655fc50618db472c745604e41
Reviewed-on: http://gerrit.openafs.org/4653
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-05-15 06:04:49 -07:00
Russ Allbery
92825d6d65 Resync test harness with C TAP Harness 1.7
Includes the following upstream changes:

Add a more complete usage message to runtests and add support for a -h
command-line flag to display the usage message.

is_double() now takes a third argument, an epsilon.  Two numbers are
considered equal if their absolute difference is less than epsilon.
is_double() also now treats wanted and seen values of NaN (not a
number) as equal.  Thanks to PICCA Frédéric-Emmanuel for the proposed
changes.

The ok_program function in the shell libtap.sh library no longer
strips text after a colon and a space from the program output if the
expected status is non-zero.  Instead, if program output may contain
system-specific error messages after a colon and a space, put the new
function strip_colon_error before the program to do this stripping.
Thanks to Carsten Hey for the idea.

strip_colon_error is now smarter about preserving an initial word
ending in a colon (which is generally the program name) while still
stripping error messages later in the line.

The test_file_path function in the shell libtap.sh library now always
returns the empty string, rather than possible absolute paths starting
at /, if $BUILD and $SOURCE are not set.

Flush standard error in the C TAP library before printing results for
more deterministic output.  Thanks to Carsten Hey for the idea.

All of C TAP Harness now compiles with gcc -ansi -pedantic and should
be fully C89-compatible.  Note that either C99 or SUSv3 is required to
build C TAP Harness.  (This should not be a problem on any modern
platform.)  Based on work by Carsten Hey.

Simplify and improve output formatting in the summary of failing tests
in some edge cases.

Add explicit license statements to the files meant to be copied into
other packages rather than referring to LICENSE.

Add a test_file_path() function to the basic C and shell TAP
libraries, which searches the build and source directories for a
particular file and returns the full path.  This is a utility function
that can be used to find test data files.

Change-Id: I3ef84218f0e3a8b75f550c8b629b058330659b31
Reviewed-on: http://gerrit.openafs.org/4589
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-28 20:24:34 -07:00
Russ Allbery
e88e369c92 Fix various build problems with the test suite
The cmd/command-t test requires libroken and was misspelled in the
TESTS file.  Multiple tests require LD_LIBRARY_PATH to be set to find
libafsroken if it hasn't been installed, so set it when running
runtests via make check.  (Note that this means runtests -o will not
work properly unless the user also sets LD_LIBRARY_PATH.)

Change-Id: Ib64f0505b3b75db33adb6c7b6452dcaac0b05dbc
Reviewed-on: http://gerrit.openafs.org/4594
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-28 20:24:18 -07:00
Simon Wilkinson
a2f1ca5fd5 cmd: Support splitting switches and values with '='
Some of our code uses arguments of the form -name=value. Add support
to libcmd for dealing with this type of argument, where name is
declared as CMD_SINGLE (or CMD_SINGLE_OR_FLAG)

Change-Id: Ifb7486abc4f6bf26594936ef11749c4fe29a2e9b
Reviewed-on: http://gerrit.openafs.org/4547
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-27 12:09:37 -07:00
Simon Wilkinson
931a5696cb cmd: Tidy up -help output
Tidy up the output that comes from cmd's -help option by wrapping
at 78 characters, and picking the breaks sensibly. This changes:

Usage: ./vos move -id <volume name or ID> -fromserver <machine name on source> -
frompartition <partition name on source> -toserver <machine name on destination>
 -topartition <partition name on destination> [-live] [-cell <cell name>] [-noau
th] [-localauth] [-verbose] [-encrypt] [-noresolve] [-help]

to...

Usage: ./vos move -id <volume name or ID>
         -fromserver <machine name on source>
         -frompartition <partition name on source>
         -toserver <machine name on destination>
         -topartition <partition name on destination> [-live]
         [-cell <cell name>] [-noauth] [-localauth] [-verbose]
         [-encrypt] [-noresolve] [-help]

Change-Id: I494c287a9370d052763b464df33e69a936edef71
Reviewed-on: http://gerrit.openafs.org/4546
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-27 12:08:53 -07:00
Simon Wilkinson
d0d8b391b0 cmd: Add support for params with optional values
Add the CMD_SINGLE_OR_FLAG option which permits a parameter to
either have a single value, or no value at all. If it has no value,
then it behaves in the same way as the current 'flag' implementation.

Change-Id: I49cf313f1d3b9c369f87b1ff66bfcc038b8aa08a
Reviewed-on: http://gerrit.openafs.org/4545
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-27 12:08:03 -07:00
Simon Wilkinson
f8570d2b64 cmd: Add parameter aliasing
Add support for adding aliases for parameters, in the same way as we
can for syntaxes. This allows multiple different names for a single
option, as well as providing a way around problems with abbreviations.

Aliases may not be abbreviated.

Change-Id: I5c440cf006cd5fd0065ecf1e54213745428063f7
Reviewed-on: http://gerrit.openafs.org/4544
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-27 12:07:45 -07:00
Simon Wilkinson
da68fb9d1c cmd: Add accessor functions for options
Add a load of accessor functions to help with pulling values out
from the the cmd_syndesc structure. The idea here is to make it
simpler to manipulate command line values, as well as starting to
hide the structure of the cmd_syndesc structure from callers, with
a view to eventually making it private to the cmd library.

Change-Id: I38757d776364ceacd43e98fda16e995da35da65c
Reviewed-on: http://gerrit.openafs.org/4543
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-27 12:06:26 -07:00
Simon Wilkinson
fae24dabd0 cmd: Add option to add a param at a specific pos
Rather than having to use cmd_Seek, followed by cmd_AddParam,
followed by another cmd_Seek, add a function which permits parameters
to be added at specific reference points. This allows programs to
declare a list (either as an enum or specific #defines) of parameter
code points, rather than using raw numbers.

Change-Id: I25c0d501e678aa2818d296c776d8c5d03b8cdabe
Reviewed-on: http://gerrit.openafs.org/4542
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-27 12:06:00 -07:00
Simon Wilkinson
e1414be76b cmd: Split up dispatch function
Split up the command line parsing behaviour out of the cmd_Dispatch
function, and into a function of its own - cmd_Parse. This lets servers
which only have a single "syntax" installed just parse, without needing
to go through a dispatch function, and all of the control flow
complexity that requires.

Change-Id: Ic4325bf933ee5b28cb80db36ef9b2b5fb6763f41
Reviewed-on: http://gerrit.openafs.org/4541
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:52:51 -07:00
Simon Wilkinson
898d84cefe cmd: Add an option to disable abbreviations
Add an option to completely disable the matching of abbreviations
when parsing command line options.

Change-Id: Ic3babf584c21f389503c9c69670d400d54a6f4a6
Reviewed-on: http://gerrit.openafs.org/4540
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:52:10 -07:00
Simon Wilkinson
616a835ad2 cmd: Add function to disable positional commands
Add a new cmd_DisablePositionalCommands function which can be used
to completely disable positional commands, for functions which have
no desire to make use of them.

Change-Id: I5646e9976e544f06902ea6f85043a6330b1ac2fe
Reviewed-on: http://gerrit.openafs.org/4539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:51:36 -07:00
Simon Wilkinson
376e24b2ee cmd: Add some tests to the test suite
Add some tests for the command library to the integrated test
suite in tests. These are far from complete, and are mainly there
to ensure that we don't break any of this functionality when modifying
the library.

Change-Id: Ib6fbdca114c005c32c5ba8c41f9e350ca67e1fb8
Reviewed-on: http://gerrit.openafs.org/4538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:51:09 -07:00
Simon Wilkinson
470e3f06d4 tests: Remove spurious rxgk reference
A reference to the rxgk library crept into auth Makefile ahead of
time. Remove it so that tests can continue to work in trees without
rxgk.

Change-Id: Ic1392aebf657d458a55f2dcf685d0616f0573622
Reviewed-on: http://gerrit.openafs.org/4446
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-09 06:51:04 -07:00
Simon Wilkinson
1eb5709964 auth: Rework afsconf_UpToDate to use CellServDB
Rework the afsconf_UpToDate check so that it uses the modifcation of
the CellServDB, and not the KeyFile to determine whether the
configuration information has been changed under us or not. afsconf
defines the CellServDB as being the single sentinel for a config
directory being changed, and our tools are careful to always touch
the CellServDB when updating anything else there.

Also, rework the _afsconf_Check() code so that it uses afsconf_UpToDate,
rather than including this logic twice.

Change-Id: I8ef5f67afbb5982bb25e12407ea5dc5dc1512840
Reviewed-on: http://gerrit.openafs.org/4203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-13 13:40:48 -07:00
Simon Wilkinson
926755bf22 tests: Fix KeyFile test so it works from harness
The auth/keys test tries to find a file that's distributed as part
of the test suite. However, it currently only looks in the CWD to
find it. Modify the test so that if it's run from the test harness,
it will use the harnesses SOURCE environment variable to locate the
KeyFile

Change-Id: I93e16a01eae79b38ab01c81a57d2a47c28479b27
Reviewed-on: http://gerrit.openafs.org/4213
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-13 13:40:20 -07:00
Simon Wilkinson
bc16fe0a43 tests: Fix the authcon test to avoid pthread errors
Fix the authcon test so that it avoids pthread errors by
initialising rx before calling into any of the rxkad routines.

Change-Id: I175203fd91660e27a8b468e6f1c6189f32b22259
Reviewed-on: http://gerrit.openafs.org/4212
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-13 13:39:38 -07:00
Simon Wilkinson
4953ce8070 pt_util: Initialise empty database correctly
Commit dc8f18d6f5 broke pt_util's
initialisation of empty databases. This is because Initdb was changed
to call Initdb_check through the ubik_CheckCache wrapper. However, that
wrapper was defined as a no-op in pt_util's ubik-shim.

Modify pt_util's ubik_CheckCache so that it always calls into the
wrapper routine - this mimics the old behaviour.

Add a trival test for pt_util - check that we can build the database,
using the example from the manpage, and then that the built database
matches what we expect.

Change-Id: I41aa9f6a531662230ed625cc3b1307016ef4107f
Reviewed-on: http://gerrit.openafs.org/4211
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-13 13:38:50 -07:00
Simon Wilkinson
7a0bbff4a6 afsconf: Rework security flags
BuildServerSecurityObjects takes a set of flags, which makes it
hard to use it as a callback function. Rework this so that the
security flags are part of the afsconf directory structure, and
so BuildServerSecurityObjects only takes a rock, and its return
parameters.

Update all of the callers for this new function, and add tests
for it to the test suite.

Change-Id: I48219ed199d128c6aec3765ca425bda9e464b937
Reviewed-on: http://gerrit.openafs.org/4201
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-13 07:34:28 -07:00
Simon Wilkinson
169bc2d5be tests: Remove errant rxgk build rule
A reference to tests/rxgk slipped in to an earlier commit. Remove it
as OpenAFS doesn't have rxgk in its tree yet

Change-Id: I4cc9c2fefa904a70efbce03e2ce4411b4554d90a
Reviewed-on: http://gerrit.openafs.org/4104
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-03 07:20:53 -08:00
Simon Wilkinson
d0d69ccb64 auth: Add GetAllKeys function
Add support for a GetAllKeys function that can be used to list all
of the keys in a configuration directory.

Change-Id: I0711fde6afc2941a5f03f2e26ea89ae73750c1a9
Reviewed-on: http://gerrit.openafs.org/4103
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-03 07:20:43 -08:00
Simon Wilkinson
fcbb656cf7 auth: Correctly write empty keyfiles
The new key handling code was creating empty keyfiles that were 0
bytes in length. The correct format for an empty keyfile is a file
containing a single 0 word (the number of keys in the file). Update
the code to write this form of empty KeyFile.

Change-Id: I93bf23f6044a70a74f52b94c4656cbd4bc4fc35b
Reviewed-on: http://gerrit.openafs.org/4051
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-26 04:00:25 -08:00
Simon Wilkinson
80f6e4fa8b auth: GetLatestKey should allow NULL return values
Existing callers in the code use
afsconf_GetLatestKey(dir, NULL, NULL) to check for the existence of
a key file. We need to permit NULL values for the return pointers
to this function.

Also update the tests to check for this behaviour.

Change-Id: I94e74138ddeed8d167c1e6f12e297411c638e1b9
Reviewed-on: http://gerrit.openafs.org/4050
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-26 03:57:05 -08:00
Simon Wilkinson
1bc528d008 tests/auth: Refactor common code
Pull the common code for creating a configuration directory out of
the keys and superuser tests into a single file. This both cleans up
the existing tests, and makes it easier to add new ones.

Change-Id: I08058117e08da3a3baf750b3b14ef6780f942206
Reviewed-on: http://gerrit.openafs.org/4049
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-26 03:56:37 -08:00
Simon Wilkinson
adca541d70 auth: Rewrite KeyFile handling code
Extend the KeyFile API so that we can support arbitrary numbers of
different key types, each with their own key version numbers and
sub types. Completely rewrite the KeyFile implementation with this
in mind, but implement all of the "old" API in terms of the new one.

Given that the existing KeyFile is modified by third party programs,
we retain that as the storage location for all afsconf_rxkad keys.
Only keys with a type of 1, or above are stored in the new extended
keyfile.

Change-Id: I903a1de938544541a1bfecedb2a039ba24bdfdbc
Reviewed-on: http://gerrit.openafs.org/3772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-13 10:39:53 -08:00
Simon Wilkinson
66bd7cf95e tests: Fix auth/superuser-t.c to work on Linux
Fix the superuser tests so that they can be run on Linux. This
requires explicitly including sys/wait.h so we can use waitpid,
and changing some initialisation ordering so that we initialise
the RX library before we try and fake an rxkad token.

Change-Id: I8439ff6211a50c749ea22819e2d836409a64d2ad
Reviewed-on: http://gerrit.openafs.org/3776
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-31 09:45:43 -08:00
Simon Wilkinson
e0efb936ff tests: Add more tests for auth KeyFile handling
Add tests to make sure that we serialise updated KeyFiles to and
from disk correctly, and that the restriction on 8 keys in a KeyFile
is enforced by AddKey

Change-Id: Iac5bf7157534879824da92ea58f1515672d59298
Reviewed-on: http://gerrit.openafs.org/3610
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-01 21:21:53 -08:00
Simon Wilkinson
9f17cef3d3 tests: Add tests for afsconf_'s key functions
Add tests for all of the public functions that afsconf exports
to manipulate KeyFiles. Include a sample Keyfile to start with, to
ensure that we can continue to read KeyFiles produced by current
versions of the code.

These tests are here to catch regressions with a forthcoming rewrite
of KeyFile handling.

Change-Id: I02aaff82aa7e1b7a73981c7cf26a81164e0dd932
Reviewed-on: http://gerrit.openafs.org/3598
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-27 14:39:37 -08:00
Simon Wilkinson
83ac1558b6 auth: Add more tests and resulting fixes to userok
Add tests for the functions afsconf_SuperUser() and
afsconf_SuperIdentity(). These had been missing tests because testing
them requires starting a client and a server, so amend the superuser-t
tests so that they can start up a simple server.

Fix a number of problems that the tests expose, with setting (and
freeing) identities in corner cases.

Change-Id: I29f5f9eda7f532c98183d588e488d704f8efad88
Reviewed-on: http://gerrit.openafs.org/3593
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-26 10:58:49 -08:00
Simon Wilkinson
acfc61eca8 opr: Add new queue implementation
Add a new queue implementation for OpenAFS. This has a similar calling
form as the current RX queue implementation, but is implementated using
type safe functions, and supports structures with multiple queue
headers. This permits threading a structure onto multiple queues at the
same time.

The eventual intention is that this queue implementation will replace
both rx_queue and the Unix cache manager afs_q.

Change-Id: I8f815872b017a85eb52a6e6451cdcee3eb869519
Reviewed-on: http://gerrit.openafs.org/3139
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 11:32:51 -08:00
Simon Wilkinson
0c92add0d7 .gitignore update
Update assorted .gitignore files with missing build products

Change-Id: Ibeb928b9c2f6abab6f35ed450c5110aee1fc4905
Reviewed-on: http://gerrit.openafs.org/3212
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-27 11:10:04 -08:00
Simon Wilkinson
0af17e7ecc auth: Allow identities in the UserList
Extend the userok interface provided by the auth library to permit the
addition, deletion and inspection of identities within the UserList.

A number of additional functions are added, as direct replacements for
their Kerberos v4 only counterparts - these are:
 *) afsconf_DeleteIdentity
 *) afsconf_GetNthIdentity
 *) afsconf_AddIdentity
 *) afsconf_SuperIdentity

In addition, a new function is added to allow the status of any given
identity to be queried
 *) afsconf_IsSuperIdentity

New form identities are stored within the same UserList file as
Kerberos v4 identities. We take advantage of the fact that the current
code skips any entry with a leading whitespace. Identities are stored as
a single line, with a leading space, followed by the integer
representation of their type (0 for Kerberos 4, 1 for GSSAPI), followed
by the base64 encoded representation of their exported name, followed by
the display name of the identity. Each field is whitespace separated.

For example:
 1 BAEACwYJKoZIhvcSAQICAAAAEHN4d0BJTkYuRUQuQUMuVUs= sxw@INF.ED.AC.UK
is the representation of the GSSAPI identity "sxw@INF.ED.AC.UK"

An addition to the test suite is also provided which will test all of
the existing, and new super user manipulation functions.

Change-Id: I50648bb1ecc3037a90d623c87a60193be4f122ff
Reviewed-on: http://gerrit.openafs.org/3355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-24 19:16:12 -08:00
Simon Wilkinson
e2b4fde0b5 libroken: Build on windows
A minimal change set to get libroken to build on Windows. Sadly,
libroken contains definitions for a number of platform compatibility
macros which were previously scattered throughout the windows code.
These scattered macros have to be removed in order to build libroken.

The impact of this removal is that a very large number of files
throughout the tree require the addition of "roken.h" to pick up the
new compatibility code. The bulk of this change is adding these
includes.

In addition, some of the added includes add roken dependencies to the
Unix build. So, also add libroken to the build rules in affected Unix
Makefiles.

Change-Id: Ifba431bd37e67b1e273fbc6f69b805a232193456
Reviewed-on: http://gerrit.openafs.org/3205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-17 08:12:29 -08:00
Andrew Deason
6d5c1873b5 Fix util test dependencies
The test programs in tests/util did not depend on libutil.a or
libtap.a. So, if libutil.a changed, they were not relinked. Add the
dependencies so correcting a part of libutil will cause the tests to
actually reflect the change.

Change-Id: Iad9d15ef6affd8178d7ef7cb919f66dcce8c61da
Reviewed-on: http://gerrit.openafs.org/2484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-11 12:42:17 -08:00
Jeffrey Altman
091b6e19d1 Windows: Cleanup build scripts; no include\afs or include\rx
As part of the build system cleanup, minimize the number of
directories in which include\afs and include\rx paths are included
by default.  To acheive this goal the windows openafs dirent.h is
moved from include\afs to include, references whenever possible to
openafs headers included in include\afs or include\rx are prefixed
with afs\ or rx\ as appropriate.

Some source files or directories have a broad range of interdependencies
that make separation quite challenging.  For those directories or files
the inclusion of the path is added at the smallest possible level.
At some point in the future the WINNT\afsd\ headers should be moved
from include\afs to include\WINNT and should be installed there first
and then referenced internally from that location instead of from the
WINNT\afsd directory.  That will permit further cleanup to be performed.

Change-Id: I5e3a9623071c71db2f4445dc43266fdb3dad2c91
Reviewed-on: http://gerrit.openafs.org/2961
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-12 08:07:00 -07:00
Simon Wilkinson
f22ae5f7d8 Unix: Rework build system
Rework the unix build system so that we support taking CFLAGS and
LDFLAGS from the command line, and don't replace them with our own
settings. Also, take the opportunity to bring some sanity and
consistency into our Makefiles.

The standard Makefile.config  now defines rules for LWP, pthreaded
and shared library builds. The CFLAGS settings for these are
called LWP_CFLAGS, PTH_CFLAGS and SHD_CFLAGS, respectively.
Similarly named variables are provided for LDFLAGS.

A module may select to use a particular build type for its suffix
rule by including either Makefile.lwp, Makefile.pthread or
Makefile.shared from src/config. This creates an appropriate .c.o
suffix rule, defines AFS_CFLAGS and AFS_LDFLAGS as appropriate, and
creates two rules AFS_CCRULE and AFS_LDRULE, which can be used to
build, and link objects. For example:

foo.o: foo.c
	$(AFS_CCRULE) foo.c

foo: foo.o
	$(AFS_LDRULE) foo.o

If a you wish to override the CFLAGS or LDFLAGS for an object build
using these rules (or through the .c.o suffix rule) you can do so,
by defining CFLAGS_<object> or LDFLAGS_<object>. For example:

CFLAGS_foo.o= -DDEBUG
LDFLAGS_foo = -ldebugging

A module may also alter the behaviour of the compile and link steps
module wide by defining MODULE_CFLAGS or MODULE_LDFLAGS.

This functionality is now used throughout the tree:
    *) Suffix rules are used wherever possible, removing a number of
       unecessary build rules.
    *) All link steps are replaced with AFS_LDRULE
    *) All standard compile steps are replaced with AFS_CCRULE
    *) Unusal compile steps are defined, as far as possible, int
       terms of the LWP_ PTH_ and SHD_ variables.
    *) The use of $? has been removed entirely, as it makes it
       impossible to provide build rules with dependency information

Change-Id: If76207e45da402a0ed9d7c1bdbe83c58c911a4f2
Reviewed-on: http://gerrit.openafs.org/2896
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-11 08:00:29 -07:00
Simon Wilkinson
259cca4050 tests: Fix objdir builds
Fix the tests so that they work when we have a separate build
directory.

Change-Id: I1329a4186b126c84f611c9751fd228b80c80c82c
Reviewed-on: http://gerrit.openafs.org/2828
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:32:01 -07:00
Andrew Deason
a5bcd61a16 util: add afs_exec_alt
Add the function afs_exec_alt to help programs easily execute an
"alternate" version of themselves. For example, for programs that are
built with/without DAFS support, or are built for 32-bit/64-bit
structures, etc.

Change-Id: Ibb2b7105d58476f84bd9f15987f8b7df37314b6b
Reviewed-on: http://gerrit.openafs.org/2483
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 05:24:04 -07:00
Russ Allbery
a1351d4841 Fix ktime test on 64-bit systems
0xffffffff is a bad representation for -1 when the size of the data
type may vary.  Rather than forcing everything to 32 bits and losing
later on platforms with 64-bit time_t, change the table to use time_t
and try to add a cast that will do the right thing.

Change-Id: Id532c9b7a1fc215dc9fd532592fecb2ea45597a0
Reviewed-on: http://gerrit.openafs.org/2420
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-14 10:32:41 -07:00
Matt Benjamin
262a678d9b An RPC test dispatch library for vice
A library framework for remote testing against file servers,
with the ability to establish multiple call/callback channel
pairs within a single test process and dispatch requests
arbitrarily on each.  Thanks to Derrick for design and debugging
help.  Additional callback processing intelligence will follow
in a future changeset.  This version builds on Windows NT (but
might need further adjustment).

Change-Id: Ibea39e912b2a23ebf58e9e0931114572eccf6e78
Reviewed-on: http://gerrit.openafs.org/2229
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-12 11:24:14 -07:00
Russ Allbery
9e2aba9912 Fix ktime test for errors
The variable passed into ktime_DateToLong must be initialized to 0
or, on error, we get the previous value and the tests fail.

Change-Id: I5528a830981a85fb6737bb8cb5931ab95faffb13
Reviewed-on: http://gerrit.openafs.org/2379
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-10 06:35:53 -07:00
Derrick Brashear
19869b100c test suite warning safety
make test suite compile without warning

Change-Id: I4e4b63d6ce2ae73e5458913aa81308b2691044a9
Reviewed-on: http://gerrit.openafs.org/2223
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-06-22 08:47:58 -07:00
Russ Allbery
a62de61855 Build util tests properly with make check
If one runs make check without previously running make at the top
level first, it didn't build the util test programs properly.
Recurse into subdirectories for make check as well, and add the
check, test, and tests targets to tests/util/Makefile.in

Change-Id: Idc2caf4cf83a48da350e724aba2ac1228795085d
Reviewed-on: http://gerrit.openafs.org/2162
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-06-14 18:06:42 -07:00
Russ Allbery
52ffc6a152 Add additional documentation for the new test suite
Add a copy of docs/writing-tests from C TAP Harness as HOWTO and add
a README with some additional explanations more specific to OpenAFS.

Change-Id: Ic5b04805db6b00bcb82862ad8d2ebe466f2c266b
Reviewed-on: http://gerrit.openafs.org/2109
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-06-09 23:18:09 -07:00
Russ Allbery
6ee6125f71 Fix the trailing #endif comment in tests/tap/basic.h
Change-Id: I3a7dbda8d2792229365df4266ca43cbb4bc815bf
Reviewed-on: http://gerrit.openafs.org/2099
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-06-09 10:40:29 -07:00
Russ Allbery
74a332e7ee Add okv function to the TAP test library
Add an okv() varient of the ok() function that takes the arguments as
a va_list instead of as a variable argument list.  This makes it easier
to reuse ok() when writing other tests.

Change-Id: Icaeaaf9d6bd9d54bfd886a75961d98367ee0fb9a
Reviewed-on: http://gerrit.openafs.org/2098
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-06-09 10:39:29 -07:00
Russ Allbery
2e2494d6db Add a sample test program to the new test suite
Add a modified version of src/util/test_ktime to the new test suite
as an example of how to write a test program with the new harness.

Change-Id: Ifbceff1905f9f0dd686c2a2d2edc2f8796e7918f
Reviewed-on: http://gerrit.openafs.org/2063
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-05-29 21:48:40 -07:00
Russ Allbery
194c3f10d4 Import C TAP Harness 1.2 as a testing harness
Creates a new top-level tests directory that will be used for all
future automated test code eventually.  Import runtests and the
basic TAP library from C TAP Harness 1.2.  Add top-level check and
test targets that build the full source tree and then the new tests
directory, and then runs runtests on the test list.

Change-Id: I896f8ae488cd1dfa8529a10b4b479e45e7c67afe
Reviewed-on: http://gerrit.openafs.org/2062
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-05-29 21:48:19 -07:00