Commit Graph

531 Commits

Author SHA1 Message Date
Giorgos Keramidas
f338227f78 Attach the tr(1) regression tests to the build.
Approved by:	das, dds
2008-01-13 08:33:58 +00:00
Giorgos Keramidas
841cbf48eb Add a new set of regression tests, for the tr(1) utility.
Approved by:    das, dds
2008-01-13 08:33:20 +00:00
Robert Watson
c8c3fc568f Add regression tests for UNIX domain socket garbage collection. Should be
run from single-user mode, as they look at global open file and inflight
descriptor counts to check for leaks.
2007-12-31 16:45:27 +00:00
Diomidis Spinellis
990ccb021b Update the number of reported tests to keep prove(1) happy. 2007-12-19 11:52:33 +00:00
Diomidis Spinellis
8990390086 Correct the "move file from directory to existing directory" test for
cross-device moves.
2007-12-19 11:00:22 +00:00
Diomidis Spinellis
381e3dcbea Portability improvements to investigate behavior of other OSs.
Now works under Solaris and Linux.
2007-12-18 08:53:04 +00:00
Diomidis Spinellis
36571ab3b5 Add more tests. All rename(2)-based tests now succeed.
The performance of the cross-device equivalents is under investigation.
2007-12-18 08:49:47 +00:00
David Schultz
5a97a86c28 Fix an amusing typo that has prevented this from compiling since 2004. 2007-12-16 23:38:55 +00:00
David Schultz
3f7112a1f4 Don't try the long double tests on i386. Our reduced precision
can cause them to fail.
2007-12-16 23:36:37 +00:00
David Schultz
64577b835b Remove another Alpha remnant. 2007-12-16 23:00:18 +00:00
David Schultz
83f63fd648 Regression tests for nan{,f,l}(). 2007-12-16 21:19:51 +00:00
Diomidis Spinellis
e08ef41d11 Verify that the moved source is no longer there. 2007-12-16 08:25:34 +00:00
Diomidis Spinellis
67c3750f97 Regression tests for upcoming makeup of mv.
Case 20 corresponds to PR bin/118367.
2007-12-16 08:11:38 +00:00
Diomidis Spinellis
966909fce1 Make the reported number of tests match their actual number.
This fixes the reporting under prove(1)
2007-12-16 08:02:09 +00:00
Diomidis Spinellis
8d40101acd cd to the correct directory so that the tests can be run from prove(1) 2007-12-16 07:55:33 +00:00
David Schultz
2fd9221748 Regression tests for csqrt(3). 2007-12-15 09:16:26 +00:00
David Schultz
1b12fbb195 Remove some test instrumentation. (The Symbol.map changes broke it anyway.) 2007-12-09 21:00:12 +00:00
David Schultz
a468cce785 Fixes to avoid overzealous constant folding. 2007-12-09 20:56:08 +00:00
David Schultz
4e97f925b6 gcc 4 does some overzealous constant folding, and since it doesn't
support FENV_ACCESS, that was causing this test to fail. Use a volatile
to avoid the constant folding.
2007-12-09 20:16:48 +00:00
David Schultz
8b9f0f2a42 Make sure we set the locale to "C" when testing thousands' separator
support, rather than just "", which refers to the system default based
on the environment.
2007-12-03 17:48:55 +00:00
David Schultz
b40c4c7013 Tests for rounding, and for the leading 0's bug. 2007-12-03 07:18:47 +00:00
Bjoern A. Zeeb
4f744c0454 Convert errx(-1, ..., strerror(errno)) to err(-1, ...).
Discussed with: rwatson
2007-11-28 20:38:05 +00:00
Bjoern A. Zeeb
551944a21a Add support for tcpmd5 tests.
Add README.tcpmd5 to describe how to build a simple test setup
and run tests.

Convert compile time options to run time options [1].

Discussed with:	rwatson
Suggested by:	rwatson [1]
2007-11-28 20:33:58 +00:00
Bjoern A. Zeeb
f3d220fb9e Remove empty setup and cleanup functions for the pfkey test.
Add regression tests for privileged and supposedly unprivileged
IP_IPSEC_POLICY,IPV6_IPSEC_POLICY setsockopt cases.

We may need to review the current 'good' results to make
sure they reflect what we really want.

Discussed with:	rwatson
Reviewed by:	rwatson
2007-11-16 21:24:45 +00:00
Bjoern A. Zeeb
6007da5f92 In sys/netipsec/keysock.c rev. 1.19 a missing priv check was added.
Before that non-su users were able to open pfkey sockets as well.

Add a regression test so we can detect such problems in an automated way
in the future.
2007-11-13 08:59:29 +00:00
Pawel Jakub Dawidek
53c0785606 Hide geli warnings about sector size beeing bigger than the page size when
doing regression testing.
2007-10-26 08:31:11 +00:00
Stefan Farfeleder
aafd6a87a6 The exit status of a case statement where none of the patterns is matched
is supposed to be 0, not the status of the previous command.

Reported by:	Eygene Ryabinkin
PR:		116559
Approved by:	re (gnn)
2007-10-04 16:14:48 +00:00
Robert Watson
d903306a26 Enhance and expand kernel privilege regression tests in support of
work present in FreeBSD 7.0 to refine the kernel privilege model:

- Introduce support for jail as a testing variable, in order to
  confirm that privileges are properly restricted in the jail
  environment.

- Restructure overall testing approach so that privilege and jail
  conditions are set in the testing infrastructure before tests
  are invoked, and done so in a custom-created process to isolate
  the impact of tests from each other in a more consistent way.

- Tests now provide setup and cleanup hooks that occur before and
  after the test runs.

- New privilege tests are now present for several audit
  privileges, several credential management privileges, dmesg
  buffer reading privilege, and netinet raw socket creation.

- Other existing tests are restructured and generally improved as
  a result of better framework structure and jail as a variable.
  For exampe, we now test that certain sysctls are writable only
  outside jail, while others are writable within jail.  On a
  similar note, privileges relating to setting UFS file flags are
  now better exercised, as with the right to chmod and utimes
  files.

Approved by:	re (bmah)
Obtained from:	TrustedBSD Project
2007-09-09 23:08:39 +00:00
Pawel Jakub Dawidek
864cba9669 Add support for Camellia encryption algorithm.
PR:		kern/113790
Submitted by:	Yoshisato YANAGISAWA <yanagisawa@csg.is.titech.ac.jp>
Approved by:	re (bmah)
2007-09-01 06:33:02 +00:00
Xin LI
d73f7c1723 New regression test updates for rename, etc.
Obtained from:	NetBSD
Approved by:	re (tmpfs blanket)
2007-08-10 10:08:43 +00:00
Dag-Erling Smørgrav
2174a10b9e Add regression tests for flopen(3).
Approved by:	re (blanket)
2007-08-03 11:29:49 +00:00
Sean Farley
9bab236702 Added environ-replacement detection. For programs that "clean" (i.e., su)
or replace (i.e., zdump) the environment after a call to setenv(), putenv()
or unsetenv() has been made, a few changes were made.
  - getenv() will return the value from the new environ array.
  - setenv() was split into two functions:  __setenv() which is most of the
    previous setenv() without checks on the name and setenv() which
    contains the checks before calling __setenv().
  - setenv(), putenv() and unsetenv() will unset all previous values and
    call __setenv() on all entries in the new environ array which in turn
    adds them to the end of the envVars array.  Calling __setenv() instead
    of setenv() is done to avoid the temporary replacement of the '=' in a
    string with a NUL byte.  Some strings may be read-only data.

Added more regression checks for clearing the environment array.

Replaced gettimeofday() with getrusage() in timing regression check for
better accuracy.

Fixed an off-by-one bug in __remove_putenv() in the use of memmove().  This
went unnoticed due to the allocation of double the number of environ
entries when building envVars.

Fixed a few spelling mistakes in the comments.

Reviewed by:	ache
Approved by:	wes
Approved by:	re (kensmith)
2007-07-20 23:30:13 +00:00
Pawel Jakub Dawidek
2125ff0886 Make fstest work out-of-the-box on Solaris:
- Solaris' setgroups(2) doesn't change process' effective gid, so set it
  explicitly.
- POSIX doesn't define O_NOFOLLOW. FreeBSD returns EMLINK when target is
  a symbolic link, but Solaris returns ELOOP then.
- Solaris doesn't define O_SHLOCK and O_EXLOCK flags.

Approved by:	re (rwatson)
2007-07-18 18:07:15 +00:00
Xin LI
68b843a591 Add a test case for sed(1) regression - we should not ignore case
when not being asked to do so.

Approved by:	re (hrs)
2007-07-06 16:36:52 +00:00
Suleiman Souhlal
bdd72b703b Add case-insensitive matching to sed, using the 'I' flag, similarly to GNU sed.
For example,
	sed /foo/Id
	sed s/foo/bar/Ig

Reviewed by:	dds
Approved by:	re (hrs)
2007-07-04 16:42:41 +00:00
Sean Farley
2966d28c32 Significantly reduce the memory leak as noted in BUGS section for
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

Convert all calls to POSIX from historic BSD API:
 - unsetenv returns an int.
 - putenv takes a char * instead of const char *.
 - putenv no longer makes a copy of the input string.
 - errno is set appropriately for POSIX.  Exceptions involve bad environ
   variable and internal initialization code.  These both set errno to
   EFAULT.

Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit.  A few I re-wrote to use setenv()
instead of putenv().

New regression module for tools/regression/environ to test these
functions.  It also can be used to test the performance.

Bump __FreeBSD_version to 700050 due to API change.

PR:		kern/99826
Approved by:	wes
Approved by:	re (kensmith)
2007-07-04 00:00:41 +00:00
Xin LI
544970d64e Fix a obsecure coredump while testing with tmpfs on amd64.
Approved by:	re (kensmith)
2007-06-26 13:51:53 +00:00
Xin LI
6e347527f4 id generation is now handled by uma(9) subsystem,
so remove the (now) irrevelent test case.

Requested by:	Howard Su
Approved by:	re (tmpfs blanket)
2007-06-25 18:47:09 +00:00
Michael Bushkov
e088274144 - Bugs in gethostbyXXX/getipnodebyXXX regression tests fixed.
Tests for getipnodebyXXX functions now cover most number of flags
  combinations.

Approved by: re (kensmith), brooks (mentor)
2007-06-24 06:14:18 +00:00
Xin LI
f8c94cec4b MFp4: Add regression tests for tmpfs.
Obtained from:	NetBSD via p4
Submitted by:	Howard Su
2007-06-16 02:04:44 +00:00
Hartmut Brandt
3c9b26f049 Make the order of tests the same for user and kernel. Use the natural
layer order from bottom to top.
2007-06-14 20:11:48 +00:00
Bruce M Simpson
b13321fc4e Add regression test for SSM code. 2007-06-12 16:29:22 +00:00
Bruce M Simpson
71498f308b Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
 * IPv4 multicast socket processing is now moved out of ip_output.c
   into a new module, in_mcast.c.
 * The in_mcast.c module implements the IPv4 legacy any-source API in
   terms of the protocol-independent source-specific API.
 * Source filters are lazy allocated as the common case does not use them.
   They are part of per inpcb state and are covered by the inpcb lock.
 * struct ip_mreqn is now supported to allow applications to specify
   multicast joins by interface index in the legacy IPv4 any-source API.
 * In UDP, an incoming multicast datagram only requires that the source
   port matches the 4-tuple if the socket was already bound by source port.
   An unbound socket SHOULD be able to receive multicasts sent from an
   ephemeral source port.
 * The UDP socket multicast filter mode defaults to exclusive, that is,
   sources present in the per-socket list will be blocked from delivery.
 * The RFC 3678 userland functions have been added to libc: setsourcefilter,
   getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
 * Definitions for IGMPv3 are merged but not yet used.
 * struct sockaddr_storage is now referenced from <netinet/in.h>. It
   is therefore defined there if not already declared in the same way
   as for the C99 types.
 * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
   which are then interpreted as interface indexes) is now deprecated.
 * A patch for the Rhyolite.com routed in the FreeBSD base system
   is available in the -net archives. This only affects individuals
   running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
 * Make IPv6 detach path similar to IPv4's in code flow; functionally same.
 * Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from:  p4://bms_netdev
Submitted by:   Wilbert de Graaf (original work)
Reviewed by:    rwatson (locking), silence from fenner,
		net@ (but with encouragement)
2007-06-12 16:24:56 +00:00
Yaroslav Tykhiy
26a5710c40 Don't forget to clear out the hold space for each subsequent file
when in -i mode so that each file gets a clean context of its own.

Add a regression test for the bug.

Tested with:	regression tests
2007-06-12 12:05:24 +00:00
Greg Lehey
df16203833 Updated tests for changed features.
Submitted by: edwin@
2007-06-09 06:01:24 +00:00
Greg Lehey
2b04161236 Use correct comment syntax for $FreeBSD$. This file gets put through
cpp, not a shell script.

Pointy hat to: grog
2007-06-04 01:44:07 +00:00
Greg Lehey
88778e972f Add regression tests for calendar.
Submitted by:	edwin@
PR:		bin/113275
MFC after:	2 weeks
2007-06-03 03:29:32 +00:00
Diomidis Spinellis
a14e979ed4 Add sparc64 regression test files.
Submitted by:	Carl Johan Gustavsson
2007-05-24 07:00:53 +00:00
Diomidis Spinellis
2055b9dc4f Modify file generation instructions to remove the tty field:
the mapping from number to name differs between systems,
and will cause tests to fail.
2007-05-24 06:57:50 +00:00
Diomidis Spinellis
b2784a1010 Fix the procedure for generating the test summary files.
Document the procedure for obtaining an appropriately old version of sa.
2007-05-23 21:35:45 +00:00