Commit Graph

228 Commits

Author SHA1 Message Date
Hartmut Brandt
89f087e8dd Fix builds with a read-only directory and a make upgrade. This is done
by forcing the creation of an object directory for the make regression
tests. Let make handle the tracking of the dependency and installation
of test_shell script.

Submitted by:	ru
2004-12-07 14:41:16 +00:00
Robert Watson
b1954f17a8 Print a warning if running as !root for aio_md_test rather than failing
the test.  Privilege is required in order to allocate an md device.
2004-12-06 13:15:23 +00:00
Robert Watson
5cb0b08e40 Add a basic aio functionality regression test, which simply writes and
then reads from a fairly broad range of object types: regular file,
fifo, UNIX socketpair, pty, UNIX pipe, and an md device.  Not a deep
test of functionality, just a basic test that aio_write followed by
aio_read returns the correct data in a relatively timely manner.

Requested by:	phk
2004-12-06 12:56:38 +00:00
Ruslan Ermilov
d29cf9e2f3 Make this work under debugging, e.g., "make -dl". 2004-12-06 08:51:30 +00:00
Hartmut Brandt
9c1f3ca3cf Make the tests runnable on a read-only src. To do this you must make sure
that you create one of the object directories make knows (see make(1)).
This uses the -C flag, so add a test that checks that make actually accepts
-C. Also fix the test that selects csh via the .SHELL target to work for
tcsh users too.

This commit renames shell_test to shell_test.sh. There is no history
to preserve so go without a repo-copy.

Reviewed by:	ru
2004-12-02 17:00:58 +00:00
Nik Clayton
2ba5c2107e The following code sets up two connected TCP sockets that send data to each
other until the window is closed. Then one of the sockets is closed, which
will generate a RST once the TCP at the other socket does a window probe.

All versions of FreeBSD prior to 11/26/2004 will ignore this RST into a 0
window, causing the connection (and application) to hang indefinitely.
On patched versions of FreeBSD (and other operating systems), the RST
will be accepted and the program will exit in a few seconds.

Submitted by:	Michiel Boland
Reviewed by:	silby
2004-12-01 12:12:12 +00:00
Hartmut Brandt
60f801ee87 Chmod the shell testscript to be executable if it isn't already. According
to the CVS-Meisters x-mode just happens to work, but is not guaranteed to
do so. Try to be on the safe side.
2004-11-30 15:33:18 +00:00
Hartmut Brandt
7b54cdda4e Add some regression tests for the .SHELL target. I'm not sure that the
output of shell_2j is actually correct - it just tests what make currently
does. Make should switch on echoing for the second line, shouldn't it?
2004-11-25 10:03:29 +00:00
Tim J. Robbins
c2089f05ef Remove regression tests for the obsolete rune interface. 2004-11-21 03:21:22 +00:00
Nik Clayton
00e13b1d67 Switch over to a different, more flexible test output protocol that's
understood by Perl's Test::Harness module and prove(1) commands.

Update README to describe the new protocol.  The work's broken down into
two main sets of changes.

First, update the existing test programs (shell scripts and C programs)
to produce output in the ok/not ok format, and to, where possible, also
produce a header describing the number of tests that are expected to be
run.

Second, provide the .t files that actually run the tests.  In some cases
these are copies of, or very similar too, scripts that already existed.
I've kept the old scripts around so that it's possible to verify that
behaviour under this new system (in terms of whether or not a test fails)
is identical to the behaviour under the old system.

Add a TODO file.
2004-11-11 19:47:55 +00:00
Robert Watson
c6eea89879 Add a small regression test that opens a TCP socket, listens on it,
performs a non-blocking connect from another socket, and then closes
the listen socket rather than accepting.  This is intended to
exercise the close path in which connections are aborted due to a
close on the listen socket while the connection is in the listen
queue.
2004-11-02 17:59:12 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Robert Watson
09745181fd Use errx() instead of fprintf()/exit() for conciseness.
Suggested by:	ru (some time ago)
2004-10-23 22:18:37 +00:00
Robert Watson
a09c60ffeb Use errx() instead of perror()/exit() for conciseness.
Suggested by:	ru (some time ago)
2004-10-23 22:11:35 +00:00
Ruslan Ermilov
9a5cf32635 Add a regression test for the alternate shell specification. 2004-10-23 21:38:58 +00:00
Ruslan Ermilov
30f4920b76 Fixed a typo.
Submitted by:	Pawel Worach
2004-10-17 11:07:03 +00:00
Giorgos Keramidas
5b9c5efc57 Add a regression test for floating-point output in the Greek locale.
See revision 1.3 of src/share/numericdef/el_GR.ISO8859-7.src

Reviewed by:	das (a while ago)
2004-10-13 22:32:12 +00:00
Robert Watson
a1626faabe Resort unprivileged uid with privileged socket after unprivileged uid
with privileged socket in test runs.

If running unprivileged and instructed to use unprivileged sockets,
don't try and use raw sockets.
2004-10-11 19:12:40 +00:00
Robert Watson
cdeeed7a38 A number of improvements to the IP socket option API regression test:
- Consistently use err/errx/warnx throughout, rather than using perror()
  and exit().

- Teach the tests how to better manage (and therefore test) privilege:
  in particular, how to create sockes with root credentials but exercise
  the privileges with non-root credentials, etc.

- Teach the test suite to apply each of the non-IP_HDRINCL options across
  each of SOCK_DGRAM, SOCK_STREAM, and SOCK_RAW.
2004-10-11 19:03:53 +00:00
Stefan Farfeleder
c904266eac Add regression tests for ilogb{,f,l}(). 2004-10-11 18:40:45 +00:00
Robert Watson
f1f6501da8 Add a simple exercise suite for IP-level socket options. The suite
atempts to read and write various IP-level socket options as root and
nobody, making sure the initial values are as expected, that they can
be changed to valid values and take effect, etc.  No attempt is made
to check for the correct implementation of side effects (such as
changes in packet headers) as yet.

The IP options section is currently broken but will be fixed shortly.

Not all multicast options are currently tested.
2004-10-11 16:09:45 +00:00
Robert Watson
6a671583a4 Add a simple C-based TCP connection generator, which generates and
closes the specified number of TCP connections sequentially and
synchronously.  Useful for trying to trigger races in the accept
code.
2004-10-09 20:58:28 +00:00
Robert Watson
54516c29e8 Modify accept_fd_leak regression test to generate "PASS" output, not
just "FAIL" output, in order to make it consistent with other tests in
the regression test tree.
2004-09-18 13:06:00 +00:00
Robert Watson
e8929330e7 Add a very basic README for tcpstream. 2004-09-13 16:53:40 +00:00
Robert Watson
cb5e18f34e Add tcpstream, a simple TCP stream generator that uses a pseudo-random
sequence to detect data corruption visible to an application.
2004-09-13 03:17:22 +00:00
Stefan Farfeleder
27fdb57eab Add a regression test for <tgmath.h>. 2004-09-04 11:34:53 +00:00
Ruslan Ermilov
751d4065e6 Join the effort in simplifying this makefile. ;) 2004-09-03 06:18:52 +00:00
Robert Watson
accbe49470 Pass O_NONBLOCK directly to fcntl() rather than the pointer to an int
holding the value O_NONBLOCK.  This worked previously because I was
lucky.
2004-09-02 21:41:57 +00:00
Robert Watson
27b37d5cf2 Don't override the rule used to build a binary by providing our own
compiler line.
2004-09-02 21:37:50 +00:00
Robert Watson
cf03a9be9c Make sure to properly initialize 'size' to sizeof(sin) before passing
it into accept().  Depending on the initial value in memory, it is
otherwise possible to get EINVAL.
2004-08-24 04:59:26 +00:00
Robert Watson
62967fb0bb Add a basic kqueue + UNIX domain socket pair regression test to do some
elementary exercising of kqueues on datagram and stream sockets.  Note
that the datagram write kqueue case is left untested due to potentially
confusing behavior for the developer (me) that might require attention.
2004-08-24 04:02:41 +00:00
Pawel Jakub Dawidek
1c11fbbb6e Regression tests for 'verify reading' algorithm. 2004-08-22 16:26:09 +00:00
Pawel Jakub Dawidek
3e90f289df Add regression test for the new "round-robin reading" feature. 2004-08-21 18:14:55 +00:00
Doug Rabson
c37420b0d5 Remove some debug cruft from the Makefiles and make them ${.OBJDIR}
friendly.
2004-08-16 09:35:49 +00:00
Pawel Jakub Dawidek
4d5580d64d Add regression tests for GEOM_RAID3. 2004-08-16 09:09:23 +00:00
Ruslan Ermilov
5f90425815 Replaced COPTS by equivalent CFLAGS. 2004-08-13 14:21:49 +00:00
Max Khon
69bcab915c Regen. 2004-08-13 09:56:22 +00:00
Max Khon
ee91bec14f Regression test for geom_uzip. 2004-08-13 09:53:52 +00:00
Hartmut Brandt
b5bb945eef Add a regression test for the ATM call control stuff. 2004-08-13 09:27:21 +00:00
Hartmut Brandt
215431deb0 Now that make more correctly handles variable assignments
in .MAKEFLAGS targets enable the regression test for this.
2004-08-12 19:14:10 +00:00
Diomidis Spinellis
30fd73fb81 Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived
software (original contributor).

Reviewed by:	imp
2004-08-09 15:29:41 +00:00
Hartmut Brandt
cfe632eaba Back out something I'm working on that crept in with the last commit.
Spotted by: ru
2004-08-05 09:11:44 +00:00
Hartmut Brandt
82eb7072de Remove extra spaces. Remove double quotes around error messages -
they are not needed and will actually be printed.

Submitted by:	ru
2004-08-05 08:44:00 +00:00
Doug Rabson
3b9474cc07 This file is not suppose be be all one big comment :-(
Pointed out by: ssouhlal
2004-08-05 08:07:40 +00:00
Hartmut Brandt
c997f47be0 Add another test that checks for a working '+' command flag. 2004-08-05 07:24:06 +00:00
Pawel Jakub Dawidek
f33015b90f Add regression test for "prefer" balance algorithm in MIRROR class. 2004-08-04 12:18:42 +00:00
Hartmut Brandt
48ec21e7e6 Add a regression test for the passing of command line
variable assignments via the MAKEFLAGS environment variable.
2004-08-04 07:40:58 +00:00
Robert Watson
07727c8333 Add minimal socketpair() regression test to confirm that we can create
(and close) PF_UNIX socket pairs, and that we can't create PF_INET
socket pairs.  More tests to follow.
2004-08-04 03:46:35 +00:00
Doug Rabson
2546665afc Add regression tests for TLS. 2004-08-03 09:04:01 +00:00
Pawel Jakub Dawidek
fa4a1febf7 Add GEOM_MIRROR class which provide RAID1 functionality and has many useful
features. The gmirror(8) utility should be used for control of this class.
There is no manual page yet, but I'm working on it with keramida@.

Many useful tests provided by:	simon (thank you!)
Some ideas from:		scottl, simon, phk
2004-07-30 23:13:45 +00:00