Commit Graph

474 Commits

Author SHA1 Message Date
Mike Makonnen
092fa28f4f Regression tests for recent changes to inet6_rth_* family of functions
regarding RFC3542 compliance.
2007-04-21 11:23:33 +00:00
Yaroslav Tykhiy
f6703c9c0a Change the semantics of -i (in-place editing) so that it treats
each file independently from other files.  The new semantics are
desired in the most of practical cases, e.g.: delete lines 5-9
from each file.

Keep the previous semantics of -i under a new option, -I, which
uses a single continuous address space covering all files to edit
in-place -- they are too cool to just drop them.

Add regression tests for -i and -I.

Approved by:	dds
Compared with:	GNU sed
Discussed on:	-hackers
MFC after:	2 weeks
2007-04-21 01:21:36 +00:00
Pawel Jakub Dawidek
d77f4f6a6f Test sending 0 bytes. 2007-04-20 19:01:42 +00:00
Pawel Jakub Dawidek
4b7e26d006 Fix length calculation. 2007-04-20 19:00:43 +00:00
Dag-Erling Smørgrav
f7754b09e2 Valid error codes for err() and errx() are 1..255.
The correct format specifier for ssize_t is %zd.
2007-04-19 07:59:30 +00:00
Pawel Jakub Dawidek
ed3d9b6e75 Add more tests to verify last sendfile(2) breakage: test sending more
than a page size and nbytes=0.
2007-04-19 06:01:08 +00:00
Michael Bushkov
a3859aa386 Committing regression tests for all implemented nsswitch databases.
Detailed description and instructions are in the README file.
This work had been basically done during GSoC 2006.

Approved by:	brooks (mentor)
2007-04-15 11:02:31 +00:00
Bruce M Simpson
201096bc46 Nuke ipblock. A more complete multicast regression test suite is on the way. 2007-04-12 11:46:30 +00:00
Bruce M Simpson
e52a7d1f39 Fix a bug whereby group addresses were incorrectly computed in the test.
[Since the change to strict refcounting for in_multi objects, this test
 began to fail; formerly the refcount was a count of the number of requests
 for a given address, NOT a count of pointers to the object.]
2007-04-09 19:44:08 +00:00
Bruce M Simpson
2509455360 Add a small test program for the additional socket options which
RFC 3678 (Source-specific Multicast API) brings to FreeBSD.
2007-04-06 23:39:17 +00:00
John Baldwin
1ce2bc9187 Fix a fd leak in socketpair():
- Close the new file objects created during socketpair() if the copyout of
  the new file descriptors fails.
- Add a test to the socketpair regression test for this edge case.
2007-04-02 19:15:47 +00:00
John Baldwin
c16551befc Add another fd leak test for accept() I used to test the fix in 1.234 of
sys/kern/uipc_syscall.c.
2007-04-02 16:02:50 +00:00
Yaroslav Tykhiy
78e7d37750 Logically separate the complex hanoi' and math' tests from basic tests. 2007-04-02 08:20:43 +00:00
Yaroslav Tykhiy
e9a0eed451 Don't forget to close the range if we branched over its end
and had no chance to match it by the 2nd address precisely.
Otherwise the unclosed range would bogusly extend to the end
of stream.

Add a basic regression test for the bug fixed.  (This change
also fixes the more complex case 5.3 from `multitest.t'.)

Compared with:	SUN and GNU seds
Tested by:	regression tests
MFC after:	1 week
2007-04-02 08:14:46 +00:00
Yaroslav Tykhiy
d7cfea0e1a Today SUN and GNU seds fully agree on test 5.3 and behave
in a more reasonable way than BSD sed does: they properly
close the range even if we branched over its end.  No doubt,
the range `1,5' should not match lines from 9 through 14.
2007-04-02 07:50:10 +00:00
Yaroslav Tykhiy
6b8ef68111 This trivial change should fix at least 3 similar bugs. All of
them are related to the `c' function's need to know if we are at
the actual end of the address range.  (It must print the text not
earlier than the whole pattern space was deleted.)  It appears the
only sed function with this requirement.

There is `lastaddr' set by applies(), which is to notify the `c'
function, but it can't always help because it's false when we are
hitting the end of file early.  There is also a bug in applies()
due to which `lastaddr' isn't set to true on degenerate ranges such
as `$,$' or `N,$' if N appears the last line number.

Handling early EOF condition in applies() could look more logical,
but it would effectively revert sed to the unreasonable behaviour
rev. 1.26 of main.c fought against, as it would require lastline()
be called for each line within each address range.  So it's better
to call lastline() only if needed by the `c' function.

Together with this change to sed go regression tests for the bugs
fixed (c1-c3).  A basic test of `c' (c0) is also added as it helped
me to spot my own error.

Discussed with:		dds
Tested by:		the regression tests
MFC after:		1 week
2007-04-01 13:25:03 +00:00
George V. Neville-Neil
43888ab17c Adding tests for Camellia which will be added to the tree soon.
Added tests for aes-ctr which were not present before.
2007-03-26 07:40:51 +00:00
George V. Neville-Neil
5a146d5125 Update the regression test so that there are actually two independent
networks involved, as opposed to two hosts on one network.

MFC after:	1 week
2007-03-24 13:47:16 +00:00
George V. Neville-Neil
a564577c94 Add a test for IPv6 and IPsec which is similar to the one for IPv4.
Add comments to the test for IPv4 with IPsec.
MFC after:	1 week
2007-03-21 09:39:51 +00:00
Diomidis Spinellis
6dabf85649 Rename sed.test to multitest.t to comply with the naming scheme of
the regression suite.
2007-03-14 18:58:59 +00:00
Diomidis Spinellis
0a6ffa2714 Reinstate error-testing regression tests. 2007-03-14 13:38:23 +00:00
Diomidis Spinellis
ab6386e42d Integrate the tests I wrote in 1992 with our current regression
testing framework and protocol.
2007-03-14 13:05:45 +00:00
Diomidis Spinellis
83f7d3636c Reference results for sed.test (to be renamed into multitest.t).
I have verified these with GNU sed 4.1.5 (and in some cases with Solaris
sed) and they are identical, with the following exceptions:
5.3: The result is unspecified and BSD sed behaves differently.
6.3: GNU sed gets it wrong
7.1: GNU sed gets it wrong
7.8: BSD sed gets it wrong
2007-03-14 12:46:22 +00:00
Diomidis Spinellis
ac451395ea - Uncomment tests that were commented out
- Update platform-conditional tests to reflect current reality
- Fix conditional for test 7.8: it is the fault of BSD sed
2007-03-14 11:03:00 +00:00
Diomidis Spinellis
4c1ccdfd94 - It looks like BSD and GNU sed can nowadays pass two more tests.
- Test 7.8 fails for GNU sed not BSD.
2007-03-14 10:10:10 +00:00
Diomidis Spinellis
0bc4fe6eaa Use another non-printing test; address 0 now has a special meaning in GNU sed. 2007-03-14 09:47:00 +00:00
Diomidis Spinellis
259dde6e74 Document a procedure for testing individual binaries under development. 2007-03-14 09:33:13 +00:00
Diomidis Spinellis
7fdac324d9 Update tests to reflect the state of the art of sed in HEAD and
GNU sed 4.1.5.
Almost all of the tests that were skipped for BSD or GNU sed
now appear to work.
2007-03-14 09:05:41 +00:00
Diomidis Spinellis
412e5edfa8 Add sed math regression test. 2007-03-14 07:55:05 +00:00
Diomidis Spinellis
32ad3fd6da Add Towers of Hanoi regression test. 2007-03-14 07:52:38 +00:00
Diomidis Spinellis
c29e1340e9 Add missing newline to correct failure of the regression test.
According to IEEE Std 1003.1, 2004 "Whenever the pattern space is
written to standard output or a named file, sed shall immediately
follow it with a <newline>."

An attempt at the same correction might have been made with r1.3,
which is however identical with r1.2.
2007-03-14 07:01:49 +00:00
Bruce M Simpson
f6c0136c7f Add raw IP support (protocol 114) to ipbroadcast regression test. 2007-03-13 23:36:48 +00:00
Bruce M Simpson
48451912c9 Add -A to specify local address for bind(). 2007-03-08 14:37:00 +00:00
Bruce M Simpson
f3bb407b7c Support IP_SENDIF in -CURRENT. 2007-03-08 14:27:24 +00:00
Bruce M Simpson
df7babd689 Add -t to set IP TTL. 2007-03-01 18:36:16 +00:00
Bruce M Simpson
2b743a9e9d Introduce a test program for IPv4 broadcast datagram send. 2007-03-01 13:26:13 +00:00
Bruce M Simpson
3763835bfe Add a regression test for ethernet link-layer multicast memberships. 2007-02-25 01:58:02 +00:00
Bruce M Simpson
3250f640aa For the IPv4 multicast membership socket regression test:
Add command line flags to increase the number of test iterations.
 Be deterministic by default, for automated operation.
 Better document assumptions.
2007-02-02 21:10:37 +00:00
Pawel Jakub Dawidek
65e2b8ca1f Simple README file which shows how to use fstest. 2007-01-28 00:10:28 +00:00
Pawel Jakub Dawidek
b20669bdef MFp4: - When new object is created, it's group ID can be set to process'
effective group ID or to group ID of its parent directory.
	- Add some comments from POSIX.
	- Verify that after successful O_TRUNC open, size is equal to 0.
2007-01-25 20:50:02 +00:00
Pawel Jakub Dawidek
33e0d352b2 MFp4: When user is not a member of the group which owns a file, even if
he is the file's owner, he can't set set-gid bit.
	POSIX requires to return 0 and clear the bit, but FreeBSD returns
	EPERM for UFS in such case. For now do the same in ZFS.
2007-01-25 20:48:14 +00:00
Pawel Jakub Dawidek
53feb1d422 Add 3436 file system regression tests in 184 files.
Almost all regression tests are based on very flexible fstest tool.
They verify correctness (POSIX conformance) of almost all file
system-related system calls.

The motivation behind this work is my ZFS port and POSIX, who doesn't
provide free test suites.

Runs on:	FreeBSD/UFS, FreeBSD/ZFS, Solaris/UFS, Solaris/ZFS

To try it out:

	# cd fstest
	# make
	# find tests/* -type d | xargs prove
2007-01-17 01:42:12 +00:00
Robert Watson
0b71cfd780 Ignore EINPROGRESS error on TCP connect(), and pick up the result of the
non-blocking connect later using select().  This case didn't trigger on
my UP test box, but did on Peter's SMP test box.

Spotted by:	peter
2007-01-12 22:17:31 +00:00
Robert Watson
581f1f9421 Add a regression test for sending and writing zero bytes to sockets of
various types, as well as pipes and fifos for good measure.  RELENG_6
currently passes all of these tests, but 7-CURRENT fails 0-byte writes
and sends on all stream socket types (and fifos, as they are based on
stream sockets).

Bumped into by:	peter
Diagnosed by:	jhb
Problem of:	andre
2007-01-12 21:49:36 +00:00
Stefan Farfeleder
9bb8020ab3 Add regression tests for exec.c rev 1.30. 2007-01-11 00:25:20 +00:00
David Schultz
2a5f50a641 Fix a few of the tests so that correct implementations actually pass them. 2007-01-07 09:25:22 +00:00
David Xu
1d6328e12b Fix compiling. 2007-01-06 11:32:15 +00:00
David Schultz
f56f1d7735 Remove the test that ensures that when the string "nan(...)" is converted
to floating-point, the result is a quiet NaN.  The current implementation
may return a signaling NaN, and the vendor has no plans for changing this,
for reasons explained in the comment I added.
2007-01-03 21:28:26 +00:00
David Schultz
3f29b2ef51 Fix cut-and-paste bugs in the regression tests. 2007-01-03 05:38:08 +00:00
Bruce M Simpson
a86ec33820 Drop all received data mbufs from a socket's queue if the MT_SONAME
mbuf is dropped, to preserve the invariant in the PR_ADDR case.

Add a regression test to detect this condition, but do not hook it
up to the build for now.

PR:             kern/38495
Submitted by:   James Juran
Reviewed by:    sam, rwatson
Obtained from:  NetBSD
MFC after:      2 weeks
2006-12-23 21:07:07 +00:00