Commit Graph

1742 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
74019bf2bc Improve output when a test fails.
Approved by:	rwatson (mentor)
2008-11-07 14:45:42 +00:00
Edward Tomasz Napierala
b92eda309d Change ZFS behaviour to match UFS: when moving (rename(2)) a subdirectory
from one parent directory to another, in addition to the usual access checks
one also needs write access to the subdirectory being moved.

Approved by:    rwatson (mentor), pjd
2008-11-06 19:17:58 +00:00
Doug Rabson
a9148abd9d Implement support for RPCSEC_GSS authentication to both the NFS client
and server. This replaces the RPC implementation of the NFS client and
server with the newer RPC implementation originally developed
(actually ported from the userland sunrpc code) to support the NFS
Lock Manager.  I have tested this code extensively and I believe it is
stable and that performance is at least equal to the legacy RPC
implementation.

The NFS code currently contains support for both the new RPC
implementation and the older legacy implementation inherited from the
original NFS codebase. The default is to use the new implementation -
add the NFS_LEGACYRPC option to fall back to the old code. When I
merge this support back to RELENG_7, I will probably change this so
that users have to 'opt in' to get the new code.

To use RPCSEC_GSS on either client or server, you must build a kernel
which includes the KGSSAPI option and the crypto device. On the
userland side, you must build at least a new libc, mountd, mount_nfs
and gssd. You must install new versions of /etc/rc.d/gssd and
/etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf.

As long as gssd is running, you should be able to mount an NFS
filesystem from a server that requires RPCSEC_GSS authentication. The
mount itself can happen without any kerberos credentials but all
access to the filesystem will be denied unless the accessing user has
a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There
is currently no support for situations where the ticket file is in a
different place, such as when the user logged in via SSH and has
delegated credentials from that login. This restriction is also
present in Solaris and Linux. In theory, we could improve this in
future, possibly using Brooks Davis' implementation of variant
symlinks.

Supporting RPCSEC_GSS on a server is nearly as simple. You must create
service creds for the server in the form 'nfs/<fqdn>@<REALM>' and
install them in /etc/krb5.keytab. The standard heimdal utility ktutil
makes this fairly easy. After the service creds have been created, you
can add a '-sec=krb5' option to /etc/exports and restart both mountd
and nfsd.

The only other difference an administrator should notice is that nfsd
doesn't fork to create service threads any more. In normal operation,
there will be two nfsd processes, one in userland waiting for TCP
connections and one in the kernel handling requests. The latter
process will create as many kthreads as required - these should be
visible via 'top -H'. The code has some support for varying the number
of service threads according to load but initially at least, nfsd uses
a fixed number of threads according to the value supplied to its '-n'
option.

Sponsored by:	Isilon Systems
MFC after:	1 month
2008-11-03 10:38:00 +00:00
Sam Leffler
04fc88d50a o unbreak ani stat display
o improve some labels
2008-10-29 20:19:54 +00:00
Sam Leffler
4d49064704 sync w/ driver updates; this also brings in ani stats 2008-10-27 18:50:46 +00:00
Sam Leffler
62ac984385 add regdomain knob 2008-10-27 18:47:48 +00:00
Dag-Erling Smørgrav
75bd5e763f #ifdef out the lock-against-self test. I'm not sure it makes sense, and
it relies on non-portable flock(2) semantics.  Not only is flock(2) not
portable, but on some OSes that do have it, it is implemented in terms
of fcntl(2) locks, which are per-process rather than per-descriptor.
2008-10-20 17:26:30 +00:00
Sam Leffler
8d1f54dbaa add -n option to suppress clearing the build tree and add -DNO_CLEAN
to buildworld and/or buildkernel
2008-10-19 06:58:31 +00:00
Nick Hibma
4fd37ca6b6 Avoid failing if the directory already exists (when restarting at customize).
MFC after:	2 days
2008-10-09 18:06:28 +00:00
Robert Watson
a848550a77 Update udpzerobyte to understand that passing 0 as a length to recv(2)
will cause it to return 0, not EAGAIN.

Add UNIX domain socket support to udpzerobyte, which suggests this
regression test should be moved to the general sockets test area rather
than netinet.
2008-10-07 21:01:23 +00:00
Robert Watson
dba96bd99f Add IPv6 support to zero-size UDP transmit/receive test. 2008-10-07 14:13:59 +00:00
Robert Watson
8c3bc1af40 Regression test for the loopback handling of zero-length UDP packets, which
should be delivered but without payload.
2008-10-07 10:31:55 +00:00
Robert Watson
cb824561e6 Add very simple regression test for fstat(2) on sockets: make sure it
returns success for various socket types.  It's easy to imagine this
being enhanced to validate the returned data, but...
2008-10-06 19:42:03 +00:00
Simon L. B. Nielsen
28b53d8cbd In cust_install_files() we ignore CVS directories. In a similar way now
also ignore .svn directories.
2008-09-23 18:54:56 +00:00
Simon L. B. Nielsen
e80b4d45c0 - Change all "echo #..." into using a progress print function to make it
possible to make NanoBSD output more quite or verbose.  The default
  output should remain mostly unchanged. [1]
- Add missing shift for -i.
- Clean up usage() so it's now (mostly) sorted alphabetically.
- Make command line argument handling more consistent in the code and
  remove redundant semicolons.

Reviwed by:	phk [1]
2008-09-23 18:42:35 +00:00
Sam Leffler
0f14671ac3 add missing options 2008-09-23 16:15:42 +00:00
Sam Leffler
0042e3b1da add missing options 2008-09-23 16:11:15 +00:00
Bruce M Simpson
91c0921944 * Add USB boot support.
* Allow the image name to be renamed via NANO_IMGNAME.
* Propagate TARGET_ARCH into src top level make targets
  explicitly to support cross-building.
* Increase the default size of NanoBSD media from 488MB to
  584MB to accomodate a -CURRENT world.

Reviewed by:	phk
2008-09-22 23:56:36 +00:00
Bruce M Simpson
293de964db Mark the first slice of a NanoBSD image 'active' by default.
This fixes USB boot (not yet merged to HEAD) with 3 flavours
of BIOS I've seen.

Approved by:	phk
2008-09-22 20:21:39 +00:00
Sam Leffler
690f477d75 add new build knobs and jigger some existing controls to improve
control over the result of buildworld and installworld; this especially
helps packaging systems such as nanobsd

Reviewed by:	various (posted to arch)
MFC after:	1 month
2008-09-21 22:02:26 +00:00
Simon L. B. Nielsen
a93dc3751b Include $NANO_NAME in the completed message. This is nice if you are
building multiple NanoBSD images at once to keep track of what is
running and what isn't.
2008-09-21 18:02:00 +00:00
Sam Leffler
ca5ccaea7c eliminate hardwired lists; use the media type to autoconfig 2008-09-21 00:26:13 +00:00
Antoine Brodin
c6642c52eb Add files to remove when WITHOUT_HESIOD is set.
This fixes "make check-old" when WITH_HESIOD is set.

PR:		122406
MFC after:	1 month
2008-09-13 17:29:49 +00:00
Maxim Konovalov
4225b7d6fa o Correct a comment: a test file size is a four pages not three. 2008-09-10 09:32:25 +00:00
Simon L. B. Nielsen
068ba60199 Change space -> tab in printed usage output to make it look consistent. 2008-09-07 14:32:03 +00:00
David Schultz
73a3a6581e Regression tests for bugs in gdtoa. 2008-09-03 07:35:14 +00:00
Thomas Quinot
804cbdd577 Fix typo in comment. 2008-09-02 21:27:19 +00:00
Roman Kurakin
f4769d1087 Add simple cd to dvd conversion script. 2008-08-31 22:08:39 +00:00
Robert Watson
72cf344f9c Update README to reflect removal of netatm/harp test parts some time ago.
MFC after:	3 days
2008-08-31 11:41:31 +00:00
Jung-uk Kim
4c84e72151 Connect a forgotten test case to Makefile. 2008-08-29 20:58:01 +00:00
Jung-uk Kim
51fc382e51 Do not pass validatation level since all issues are fixed now. 2008-08-29 20:20:30 +00:00
Jung-uk Kim
ec07961360 Merge local copy of bpf_validate() with bpf_filter.c. 2008-08-29 20:07:02 +00:00
Pawel Jakub Dawidek
ba196edbd2 By default backup geli metadata to a file. It is quite critical 512 bytes,
once it is lost, all data is gone.

Option '-B none' can by used to prevent backup. Option '-B path' can be
used to backup metadata to a different file than the default, which is
/var/backups/<prov>.eli.

The 'geli init' command also prints backup file location and gives short
procedure how to restore metadata.

The 'geli setkey' command now warns that even after passphrase change or keys
update there could be version of the master key encrypted with old
keys/passphrase in the backup file.

Add regression tests to verify that new functionality works as expected.

Update other regression tests so they don't create backup files.

Reviewed by:	keramida, rink
Dedicated to:	a friend who lost 400GB of his live by accidentally overwritting geli metadata
MFC after:	2 weeks
2008-08-29 18:10:18 +00:00
Jung-uk Kim
f6cd36de6f Merge bpf_filter.c r182425 and add test cases for jump range checks.
While I am here, fix stupid typos in test0080.h and make it JIT compiler only.
2008-08-29 02:12:45 +00:00
Jung-uk Kim
eaa830ed41 Move comments to the right places. 2008-08-28 22:41:31 +00:00
Jung-uk Kim
291e9e2772 Merge bpf_filter.c r182412 and remove additional local checks.
While I am here, use more realistic value for illegal code test case.
2008-08-28 22:19:57 +00:00
Jung-uk Kim
dfedc4d796 Fix style consistencies and a comment. 2008-08-28 18:38:55 +00:00
Jung-uk Kim
855aaac7ac Merge bpf_filter.c r182380 and remove additional local checks
for BPF_STX and BPF_LDX|BPF_MEM instructions.
2008-08-28 17:59:16 +00:00
Jung-uk Kim
c0e134d668 Add a test case for uninitialized scratch memory (for JIT compiler). 2008-08-28 16:58:30 +00:00
Stefan Farfeleder
8d372294f9 Add a test for r182300. 2008-08-27 20:26:34 +00:00
Jung-uk Kim
218223bb17 Add a test case for null filter. 2008-08-26 21:54:47 +00:00
Jung-uk Kim
bf2a220894 Add more test cases for invalid instructions and add comments
about bpf_validate(9) issues.
2008-08-26 19:24:58 +00:00
Jung-uk Kim
e3a315fed1 Remove some hacks from regression test since bpf_filter.c builds fine now. 2008-08-26 00:35:04 +00:00
Jung-uk Kim
143a24dad7 Add a trivial bpf filter benchmark. 2008-08-25 23:36:24 +00:00
Jung-uk Kim
71d7a7dd88 Use sys/net/bpf_jitter.c instead of rolling our own version
since it is compilable on user land now.
2008-08-25 22:45:18 +00:00
Jung-uk Kim
f7402f1a67 Reflect sys/net/bpf_jitter.h changes to regression test. 2008-08-25 21:33:12 +00:00
Rafal Jaworowski
fec1081e54 Increase cryptotest tool initialization vector (IV) size.
This fixes potential out-of-bound accesses when testing ciphers with block size
greater than 8 bytes (e.g. AES).

Submitted by:	Bartlomiej Sieka tur ! semihalf dot com
Discussed with:	pjd, sam
2008-08-21 16:49:57 +00:00
Jung-uk Kim
ed97cc0f0c Add test case for 'divide by 0' with BPF_ALU|BPF_DIV|BPF_X instruction. 2008-08-18 23:05:19 +00:00
Jung-uk Kim
b82a8cd81c Fix two test cases on 32-bit architectures. 2008-08-18 21:40:03 +00:00
Jung-uk Kim
b0729b181a Add simple bpf(9) regression tests and test cases. 2008-08-18 19:01:58 +00:00
Poul-Henning Kamp
5bfcb0b9b4 Accept tty[ud]0 for console device 2008-08-15 08:28:15 +00:00
Antoine Brodin
353d3b1715 Use expr -e instead of expr to compute NANO_MEDIASIZE for Flash devices
larger than 2GB to prevent an overflow [1].
Make case-insensitive comparison work for siliconsystems, soekris and
transcend devices.

PR:		conf/126386 [1]
Submitted by:	Mark A [1]
MFC after:	1 month
2008-08-12 16:59:23 +00:00
Sam Leffler
9265278667 fix syntax 2008-08-09 21:51:57 +00:00
Dag-Erling Smørgrav
2616144e43 Add sbuf_new_auto as a shortcut for the very common case of creating a
completely dynamic sbuf.

Obtained from:	Varnish
MFC after:	2 weeks
2008-08-09 11:14:05 +00:00
Poul-Henning Kamp
1d09f2b98a Add late customize hook
Submitted by: 	Patrick M. Hausen
Sat on for far too long:	phk
2008-08-09 09:37:44 +00:00
Poul-Henning Kamp
36a6be7fc9 Add -i option to supress image building.
Submitted by:	keramida
2008-08-09 09:27:54 +00:00
Poul-Henning Kamp
fc0708f69f Track /etc/ttys change to uart(4) 2008-08-09 09:27:06 +00:00
David Schultz
b1e24d8714 Test that the result is correctly rounded when |y/x| is huge. 2008-08-02 19:21:33 +00:00
Sam Leffler
9821c14541 use new sysctl to generate a fake radar event 2008-08-02 18:01:58 +00:00
David Schultz
4c7c6686c3 Regression tests for fmtcheck(3).
Obtained from:	NetBSD
2008-08-02 06:03:04 +00:00
Sean Farley
3522c38bbe Detect if the application has cleared the environ variable by setting
the first value (environ[0]) to NULL.  This is in addition to the
current detection of environ being replaced, which includes being set to
NULL.  Without this fix, the environment is not truly wiped, but appears
to be by getenv() until an *env() call is made to alter the enviroment.

This change is necessary to support those applications that use this
method for clearing environ such as Dovecot and Postfix.  Applications
such as Sendmail and the base system's env replace environ (already
detected).  While neither of these methods are defined by SUSv3, it is
best to support them due to historic reasons and in lieu of a clean,
defined method.

Add extra units tests for clearing environ using four different methods:
1. Set environ to NULL pointer.
2. Set environ[0] to NULL pointer.
3. Set environ to calloc()'d NULL-terminated array.
4. Set environ to static NULL-terminated array.

Noticed by:	Timo Sirainen

MFC after:	3 days
2008-08-02 02:34:35 +00:00
Sean Farley
86168e1567 Fix whitespace. 2008-08-02 01:38:03 +00:00
Sam Leffler
243727cca1 unset TARGET_CPUTYPE and TARGET_BIG_ENDIAN when building the kernel
to silence compiler complaints when cross-building

Reviewed by:	phk
MFC after:	2 weeks
2008-07-31 23:04:00 +00:00
David Schultz
eb516506c9 Add some tests for acos*(), asin*(), atan*(), and atan2*(). 2008-07-31 22:43:38 +00:00
Stefan Farfeleder
58bbcf95ef Add a regression test for r181017.
Submitted by:	simon
2008-07-30 21:18:52 +00:00
Sean Farley
76c683bef7 style(9) specifies that case statements are not indented. 2008-07-30 03:34:23 +00:00
Robert Watson
fc384eb954 Remove extra comment that snuck in in last commit. 2008-07-29 18:38:37 +00:00
Robert Watson
8969dfea49 Add a simple ICMPv6 filter test for IPv6 raw sockets: determine that
the default ICMPv6 filter is pass all, test that we can set it to block
all and restore to pass all.  No attempt is made to test that the
filtering works, just that we can get and set it.
2008-07-29 18:33:56 +00:00
Antoine Brodin
a1d73f7b59 Add files to remove when MK_GNU_CPIO = no 2008-07-28 18:00:45 +00:00
George V. Neville-Neil
ebcc69dad3 Add a new program to the multicast test suite. The mcgrab program
is used to grab and hold some number of multicast addresses in order
to test what happens when an interface goes over the number of multicast
addresses it can filter in hardware.
2008-07-09 22:33:46 +00:00
David Schultz
8bb8d6397d Add regression tests for fmin{,f,l} and fmax{,f,l}.
I wrote these to test amd64 asm functions that used
maxss, maxsd, minss, and minsd, but it turns out that
those instructions don't handle NaNs and signed zero
in the same way as fmin() and fmax() are required to,
so we're stuck with the C versions for now.
2008-07-03 23:06:06 +00:00
David Schultz
b03825c532 Add some regression tests for printf() with positional arguments.
The first test comes from OpenBSD, and the others are additions or
adaptations.

This is based on OpenBSD's
src/regress/lib/libc/sprintf/sprintf_test.c, v1.3.
I deliberately did not use v1.4 because it's bogus.
2008-06-29 21:03:14 +00:00
John Baldwin
6bc1e9cd84 Rework the lifetime management of the kernel implementation of POSIX
semaphores.  Specifically, semaphores are now represented as new file
descriptor type that is set to close on exec.  This removes the need for
all of the manual process reference counting (and fork, exec, and exit
event handlers) as the normal file descriptor operations handle all of
that for us nicely.  It is also suggested as one possible implementation
in the spec and at least one other OS (OS X) uses this approach.

Some bugs that were fixed as a result include:
- References to a named semaphore whose name is removed still work after
  the sem_unlink() operation.  Prior to this patch, if a semaphore's name
  was removed, valid handles from sem_open() would get EINVAL errors from
  sem_getvalue(), sem_post(), etc.  This fixes that.
- Unnamed semaphores created with sem_init() were not cleaned up when a
  process exited or exec'd.  They were only cleaned up if the process
  did an explicit sem_destroy().  This could result in a leak of semaphore
  objects that could never be cleaned up.
- On the other hand, if another process guessed the id (kernel pointer to
  'struct ksem' of an unnamed semaphore (created via sem_init)) and had
  write access to the semaphore based on UID/GID checks, then that other
  process could manipulate the semaphore via sem_destroy(), sem_post(),
  sem_wait(), etc.
- As part of the permission check (UID/GID), the umask of the proces
  creating the semaphore was not honored.  Thus if your umask denied group
  read/write access but the explicit mode in the sem_init() call allowed
  it, the semaphore would be readable/writable by other users in the
  same group, for example.  This includes access via the previous bug.
- If the module refused to unload because there were active semaphores,
  then it might have deregistered one or more of the semaphore system
  calls before it noticed that there was a problem.  I'm not sure if
  this actually happened as the order that modules are discovered by the
  kernel linker depends on how the actual .ko file is linked.  One can
  make the order deterministic by using a single module with a mod_event
  handler that explicitly registers syscalls (and deregisters during
  unload after any checks).  This also fixes a race where even if the
  sem_module unloaded first it would have destroyed locks that the
  syscalls might be trying to access if they are still executing when
  they are unloaded.

  XXX: By the way, deregistering system calls doesn't do any blocking
  to drain any threads from the calls.
- Some minor fixes to errno values on error.  For example, sem_init()
  isn't documented to return ENFILE or EMFILE if we run out of semaphores
  the way that sem_open() can.  Instead, it should return ENOSPC in that
  case.

Other changes:
- Kernel semaphores now use a hash table to manage the namespace of
  named semaphores nearly in a similar fashion to the POSIX shared memory
  object file descriptors.  Kernel semaphores can now also have names
  longer than 14 chars (up to MAXPATHLEN) and can include subdirectories
  in their pathname.
- The UID/GID permission checks for access to a named semaphore are now
  done via vaccess() rather than a home-rolled set of checks.
- Now that kernel semaphores have an associated file object, the various
  MAC checks for POSIX semaphores accept both a file credential and an
  active credential.  There is also a new posixsem_check_stat() since it
  is possible to fstat() a semaphore file descriptor.
- A small set of regression tests (using the ksem API directly) is present
  in src/tools/regression/posixsem.

Reported by:	kris (1)
Tested by:	kris
Reviewed by:	rwatson (lightly)
MFC after:	1 month
2008-06-27 05:39:04 +00:00
John Baldwin
62344da1e6 Fix compile on 64-bit platforms. 2008-06-26 21:26:34 +00:00
Doug Rabson
c675522fc4 Re-implement the client side of rpc.lockd in the kernel. This implementation
provides the correct semantics for flock(2) style locks which are used by the
lockf(1) command line tool and the pidfile(3) library. It also implements
recovery from server restarts and ensures that dirty cache blocks are written
to the server before obtaining locks (allowing multiple clients to use file
locking to safely share data).

Sponsored by:	Isilon Systems
PR:		94256
MFC after:	2 weeks
2008-06-26 10:21:54 +00:00
Ruslan Ermilov
042df2e2da Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
  turned opt-in for stable branches depending on the consensus.  You
  can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
  It is harmless to steal the knob as SSP symbols have been provided
  by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
  (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
  libc will be automatically downgraded to -fstack-protector because it
  breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by:	Jeremie Le Hen <jeremie@le-hen.org>
2008-06-25 21:33:28 +00:00
Robert Watson
1a0046f73b Teach fifo_create regression test to also try to use mknod(2) to create
fifos, as this is required by the Single UNIX Specification, although
not currently implemented on FreeBSD.

While here, fix a bug in the directory timestamp checking test by
sleeping after querying the starting timestamp, rather than before.
2008-06-22 21:03:26 +00:00
David Schultz
c0ff67d57f Regression test for a recently fixed strtod bug. 2008-06-21 19:28:26 +00:00
Doug Barton
6973701a00 1. Make the BSD version of cpio the default [1]
a. The BSD version will be built and installed unless
WITHOUT_BSD_CPIO is defined.
b. The GNU version will not be built or installed unless
WITH_GNU_CPIO is defined. If this is defined, the symlink
in /usr/bin will be to the GNU version whether the BSD
version is present or not.

When these changes are MFCed the defaults should be flipped.

2. Add a knob to disable the building of GNU grep. This will
make it easier for those that want to test the BSD version in
the ports.

Approved by:	kientzle [1]
2008-06-16 05:48:15 +00:00
George V. Neville-Neil
f734a0edc5 Update mctest and its associated script to have a base port to listen
on so that multiple copies can be run easily.

Update documentation with group and port arguments which are optional.
2008-06-03 20:54:46 +00:00
Robert Watson
dfc98f3895 Remove two netatm-specific test parts.
MFC after:	3 weeks
Spotted by:	bz
2008-05-26 22:41:40 +00:00
Bjoern A. Zeeb
2e598474fa Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE and
parts relied on the now removed NET_NEEDS_GIANT.
Most of I4B has been disconnected from the build
since July 2007 in HEAD/RELENG_7.

This is what was removed:
- configuration in /etc/isdn
- examples
- man pages
- kernel configuration
- sys/i4b (drivers, layers, include files)
- user space tools
- i4b support from ppp
- further documentation

Discussed with: rwatson, re
2008-05-26 10:40:09 +00:00
Andrew Thompson
913dc8c153 Flush stdout after each line to make piping to another command easier. 2008-05-19 17:51:00 +00:00
Roman Divacky
e5de992c3f Simple testing program for *at family of syscalls.
Approved by:	kib (mentor)
2008-05-18 08:34:04 +00:00
John Birrell
a12be0b9eb Add the DTrace test makefile for the test suite distributed in OpenSolaris. 2008-05-17 02:09:48 +00:00
Stefan Farfeleder
bf7c82844c Test the expansion of $LINENO. 2008-05-15 19:58:44 +00:00
Adrian Chadd
a47f853e1c Add the ability to do all read, all write, or random read/write. 2008-05-15 16:10:55 +00:00
Adrian Chadd
86067c7714 Include a very basic (and beta) tool for stressing disks using the POSIX
AIO calls.

This small program queues up a controllable number of concurrent AIO
read operations w/ controllable io size against a disk or regular file.
There are a few other things to add (notably optional write support!)
but it works well enough at the present time to stress the AIO code out
relatively harshly in the disk IO case.
2008-05-07 07:23:47 +00:00
Sean Farley
9b9f225119 Enable autoflush of output to always show prompts. If piping the output
prior to this patch, the prompt would not appear due to buffering.

Approved by:	flz
2008-04-30 23:27:02 +00:00
Sam Leffler
51a5da15a7 o add indirect array for field indices as the # stats is > 127 and doesn't
fit in a signed char
o change default output to something more useful for sta mode
o futz w/ various field names and widths; need to do full pass over this stuff
2008-04-30 19:47:31 +00:00
Sam Leffler
f25bd2b89a update for new events 2008-04-30 19:45:32 +00:00
Rui Paulo
a8f7b90ca0 Add new directories, scripts and wlanwds. Introduced with vap support. 2008-04-29 22:05:26 +00:00
Rui Paulo
ecc2f9c567 Add missing 't'.
Approved by:	sam
2008-04-29 22:02:27 +00:00
Jeff Roberson
dbad07bf4d - Remove cumbersome and inaccurate attempt at synchronizing the timestamps
post collection.  This is too error prone and introduces uncertainty into
   the timing.  We'll simply have to require synchronized TSCs to run
   schedgraph on MP.

Sponsored by:	Nokia
2008-04-26 05:02:48 +00:00
George V. Neville-Neil
22dd049f7b Updated the test to handle multiple sinks. The sinks cut their
transmissions by the number of them running so that they do not
overwhelm the source.

Added a simple shell script to kick off sinks on multiple hosts as
well as a source on the host where the shell script is run.  The script
also collects the output of all the sinks and the source into files named
for the host on which the tests are run.  A date is appended to each output
file to make it unique per run.
2008-04-24 06:56:45 +00:00
Sean Farley
0b5e889911 Add four utility functions related to struct grp processing modeled in-part
after similar calls related to struct pwd in libutil/pw_util.c:
  - gr_equal()
    Perform a deep comparison of two struct grp's.  It does a thorough, yet
    unoptimized comparison of all the members regardless of order.

  - gr_make()
    Create a string (see group(5)) from a struct grp.

  - gr_dup()
    Duplicate a struct grp.  Returns a value that is a single contiguous
    block of memory.

  - gr_scan()
    Create a struct grp from a string (as produced by gr_make()).

MFC after:	3 weeks
2008-04-23 00:49:13 +00:00
Sean Farley
8cfaf5a9e1 Differentiate in the tests against getenv() between an empty string and a
NULL by having the test program return *NULL* for NULL's (no existing
variable) instead of an empty string (variable with empty value).
2008-04-23 00:45:48 +00:00
Poul-Henning Kamp
d789d8859f Add a small script that will examine all files which exist on /cfg and
if they are different in /etc, copy them to /cfg.

Submitted by:	mat
2008-04-21 06:22:27 +00:00
Sam Leffler
c8887008c2 test scripts for vaps and other 802.11 features
Supported by:	Hobnob and Marvell
2008-04-20 20:43:42 +00:00
Sam Leffler
6c2ea87d2d add dwds test app
Supported by:	Hobnob
Obtained from:	Atheros (earlier version)
2008-04-20 20:43:13 +00:00
Sam Leffler
525de97e17 update for vaps
Supported by:	Hobnob
2008-04-20 20:41:47 +00:00
David Schultz
e058c00c40 Updates for changes in the way printf() handles hex floating point
numbers.
2008-04-12 03:11:56 +00:00
Ceri Davies
366ad76cd7 Correct typo. 2008-04-05 15:51:14 +00:00
David Schultz
c79a26333b Add some tests for fma(), fmaf(), and fmal(). 2008-04-03 06:15:58 +00:00
George V. Neville-Neil
6d5a24c513 Add a manual page and a Makefile.
Add code to reflect packets back from the sink so that we can measure
round trip at the source.
2008-04-03 05:26:54 +00:00
David Schultz
d6722d7484 Test remainderl() and remquol() as well. 2008-03-30 20:48:33 +00:00
David Schultz
958be17bad Add some minimal tests for csqrtl(). 2008-03-30 20:09:51 +00:00
Ruslan Ermilov
dbdb679c6f Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longer
build libkse.  This should fix WITHOUT_LIBTHR builds as a side effect.
2008-03-29 17:44:40 +00:00
Doug Rabson
f794f567e9 Fix the __FreeBSD_version check. 2008-03-26 15:42:22 +00:00
Doug Rabson
a94c70d79c Add some regression tests for posix record locks. 2008-03-26 15:39:44 +00:00
Antoine Brodin
94dd320367 Don't remove usr/include/fs/nwfs and usr/include/netncp, as they are always
recreated during installworld (they are in BSD.include.dist).

Reported by:	Pawel Worach
Approved by:	rwatson (mentor)
X-MFC:		with revision 1.13
2008-03-24 14:46:40 +00:00
Sam Leffler
0e3ec582c6 sync w/ p4: minor cleanups to improve msgs 2008-03-22 16:39:30 +00:00
Stefan Farfeleder
c20ee5ab6d Add a test case for options.c revision 1.26. 2008-03-22 14:07:49 +00:00
Remko Lodder
17928d1153 Alert properly when we have stale mounts left after interupting
a tinybsd build.  If we do not do this, we can accidentally remove
critical files from directories like /lib (if mounted).

PR:		misc/121763
Submitted by:	Richard Arends < richard at unixguru dot nl >
MFC after:	3 days
2008-03-20 12:56:49 +00:00
Dag-Erling Smørgrav
91ad87edd9 "track" is a script I've used for ages to track the progress of a build.
Unlike whereintheworld, it continuously monitors the log file; it also
produses less verbose output.
2008-03-20 10:15:45 +00:00
George V. Neville-Neil
1b28f4f359 Add the correct license. 2008-03-19 13:57:21 +00:00
George V. Neville-Neil
48ff5f8424 A multicast test. The mctest program acts as both a source and a sink
for multicast packets.  Parameters for the interface, packet size,
number of packets, and interpacket gap may be given on the command line.
The sink records how many packets were missed, and at what time each
packet arrived.
2008-03-19 12:44:23 +00:00
David E. O'Brien
858a959376 Vim function to style(9).
Issue ':call FreeBSD_Style()' while editing a file.

Submitted by:	scf
2008-03-13 18:52:46 +00:00
Antoine Brodin
e3ad7f6626 Introduce a new F_DUP2FD command to fcntl(2), for compatibility with
Solaris and AIX.
fcntl(fd, F_DUP2FD, arg) and dup2(fd, arg) are functionnaly equivalent.
Document it.
Add some regression tests (identical to the dup2(2) regression tests).

PR:		120233
Submitted by:	Jukka Ukkonen
Approved by:	rwaston (mentor)
MFC after:	1 month
2008-03-08 22:02:21 +00:00
Antoine Brodin
6fa1978ab6 Add some checks for amd64 target around usr/lib32 libraries, missed in
previous commit.

Approved by:	rwatson (mentor)
X-MFC:		with revision 1.13
2008-03-08 21:57:35 +00:00
Remko Lodder
d940a8934c Improve handling of the tinybsd application wrt ports. Ports that
have dependencies or need to install a new user/group, are not
problematic anymore.

PR:		121367
Submitted by:	Richard Arends < richard at unixguru dot nl >
MFC after:	3 days
2008-03-08 15:41:06 +00:00
David Schultz
fb3b9b52bc Don't run tests that assume <= 64-bit precision on machines with quad
precision.
2008-03-02 20:49:24 +00:00
Sean Farley
143d18cafc Remove a dereference. It was unintended and a no-op.
Use the correct value of errno.  Although the errno value passed into
printf() follows the *env() call, it is not guaranteed to be the errno
from that call.  When I wrote the regression tester, the environment I
used did pass the errno from the call.  Consolidate the print for the
return code and errno into a function in the process of fixing this.

Approved by:	wes (mentor)
2008-03-01 00:02:12 +00:00
Antoine Brodin
b246502fc7 Add files to remove when MK_GCOV, MK_IPX or MK_NCP are defined.
Note: it may be a good idea to deduce obsolete usr/lib32/ files from
obsolete lib/ and usr/lib/ files.

PR:		120492
PR:		121118
PR:		121121
Submitted by:	KAMIYA Satosi, Richard Tector
Approved by:	rwatson (mentor)
MFC after:	1 month
2008-02-29 18:59:28 +00:00
Stefan Farfeleder
7cdc70f201 Add a regression test for cd.c's revision 1.35. 2008-02-24 16:52:02 +00:00
Ruslan Ermilov
b7498df286 getopt(3) returns -1, not EOF. 2008-02-19 07:09:19 +00:00
David Schultz
a84bcdcea5 Some basic regression tests for {sin,cos,tan}{,f,l}(). 2008-02-18 02:00:16 +00:00
David Schultz
69aa771036 There are 3 tests here, not 2. 2008-02-17 22:45:53 +00:00
Robert Watson
b0cfa3c432 Add open_to_operation, a security regression test that opens files with
various open flags and then tests various operations to make sure that
they are properly constrained by open flags.  Various I/O mechansms
are tried, including aio if compiled into the kernel or loaded as a
module.  There's more to be done here but it's a useful start, running
about 220 individual tests.

This is in support of FreeBSD-SA-08:03.sendfile.
2008-02-14 20:57:38 +00:00
Dag-Erling Smørgrav
ecd14de7d7 mutex_islocked_np -> mutex_isowned_np 2008-02-06 19:41:05 +00:00
Mike Silbersack
fd2e4074d2 This is a regression test to verify the proper behavior of IP ID generation
code.  It will push 200000 packets, then report back what the min and max
periods it saw for different IDs were.
2008-02-06 15:48:43 +00:00
Matteo Riondato
f21e8a6793 Add missing includes and correct argument to sysctlbyname
PR:		misc/120274
MFC after:	1 week
2008-02-05 08:07:19 +00:00
Dag-Erling Smørgrav
fcd61d9141 After careful consideration (and a brief discussion with attilio@), change
the semantics of pthread_mutex_islocked_np() to return true if and only if
the mutex is held by the current thread.

Obviously, change the regression test to match.

MFC after:	2 weeks
2008-02-04 12:35:23 +00:00
Dag-Erling Smørgrav
8dbd3d1b6b Add a regression test for pthread_mutex_islocked_np().
MFC after:	2 weeks
2008-02-03 22:35:45 +00:00
Robert Watson
9cf15e9671 Add unix_sorflush, a regression test for the following scenario:
- Process (a) is blocked in read on a socket waiting on data.
 - Process (b) is blocked in shutdown() on a socket waiting on (a).
 - Process (c) delivers a signal to (b) interrupting its wait.

When the signal is delivered, the kernel panics as sblock() fails in
sorflush().  Even if it didn't panic, shutdown() would block potentially
indefinitely waiting for recv() to succeeded.  Fixes to follow.

Reported by:	Jos Backus <jos at catnook dot com>
2008-01-30 13:23:34 +00:00
John Baldwin
f455512fdd Update the timestamp regexps in syncstamp() and monostamp() for > 99999
traces where there isn't any leading whitespace before the record number
in the ktrdump output.
2008-01-25 19:24:12 +00:00
David E. O'Brien
57087c935c Remove 5.x and 6.x cruft - source upgrades to RELENG_8 from versions prior
to RELENG_7 are not supported.
2008-01-21 18:44:55 +00:00
Christian Brueffer
4114acea11 Remove files conditional on the obsolete MK_FORTRAN knob. They are already
listed in ObsoleteFiles.inc anyway.

Reported by:	David Wolfskill
Approved by:	rwatson (mentor)
MFC after:	3 days
2008-01-18 23:24:10 +00:00
David Schultz
007d5445df expm1(-big) generates an inexact exception but not underflow. 2008-01-18 22:10:57 +00:00
David Schultz
e5af135aad Add some regression tests for libm's exponential functions. These
mostly just test corner cases rather than accuracy. Some of the
tests don't pass right now if you compile libm at -O2 due to gcc
constant-folding some things that it shouldn't. I'll fix that
shortly.
2008-01-18 21:46:54 +00:00
Ed Maste
552266167e Eliminate warnings by adding headers. 2008-01-17 18:59:59 +00:00
John Baldwin
8ffbe1559e Add a set of regression tests for the POSIX shm API (shm_open(2) and
shm_unlink(2)).
2008-01-16 15:51:24 +00:00
Christian Brueffer
707dd47849 WITHOUT_FORTRAN was removed some time ago. Regen src.conf.5.
PR:		119562
Submitted by:	Daniel Rucci <dan@rucci.org>
MFC after:	3 days
2008-01-15 19:54:17 +00:00
David Schultz
dd00a42722 Tests for lrintl() and llrintl(). I didn't add anything specially
tailored for the long double format; instead, I just modified the existing
tests to test lrintl() and llrintl() as well.
2008-01-14 02:18:00 +00:00
Kris Kennaway
e73e773084 * Remove KTR_CPUMASK, it is not correct to set this
* Explain why 32768 entries is usually not enough

* Increase the scaling ratio to 10 to deal with 32-bit overflows that
  can occur in calculating the canvas offsets
2008-01-13 22:46:24 +00:00
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
Simon L. B. Nielsen
c6eabb5ec1 - Add support for using swap backed md(4) devices for building the
disk image.  In some cases this can be a significant speed-up, if
  most of the image can be kept in RAM while being populated.

  On the 2GB image I'm currently working with, the build time,
  excluding buildworld/buildkernel, goes from ~17 minutes to ~6
  minutes.

  This is not enabled by default, as it might have the opposite effect
  on low-memory systems.

- During the generation of the image file be a bit more verbose in the
  log file so it is possible to see what's being done.

- Add a NANO_DISKIMGDIR variable which makes it possibly to place the
  final images somewhere other than ${MAKEOBJDIRPREFIX}.  The default
  value for NANO_DISKIMGDIR is $MAKEOBJDIRPREFIX.

Go for it:	phk
2008-01-12 22:58:06 +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
Simon L. B. Nielsen
2c50272da5 - Fix calculation of data slice size when NANO_DATASIZE=-1.
Due to a typo, setting NANO_DATASIZE=-1 resulted in the data slice
  being the same size as entire image instead of the size of the
  remaining space on the image.

- Fix detection of overcommit of the slices.

  This fix mainly result in a nicer error than when newfs etc. tries to
  write beyond the end of the disk image.

MFC after:	2 weeks
X-MFC after:	RELENG_7 is open again
2007-12-27 12:17:45 +00:00
Poul-Henning Kamp
b9deb53671 Ministat was repocopied to src/usr.bin/ministat 2007-12-20 10:18:15 +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
Sam Leffler
675b6f373b use ATH environment variable (when set) as the default interface name 2007-12-13 02:01:01 +00:00
Sam Leffler
207ae0020e Some overdue tlc:
o push include paths to the Makefile
o use the AFTER trick to simplify adding new items
o prepare stat blocks for additional data
o align values for verbose output
o fillin some missing stats

MFC after:	1 week
2007-12-13 01:39:30 +00:00
Ruslan Ermilov
74b553e882 Fix markup nits. 2007-12-12 16:43:17 +00:00
Ruslan Ermilov
fada8aefb8 Option depencies are (again) tracked automatically. 2007-12-12 16:42:03 +00:00
Ruslan Ermilov
6dc51eca81 - Fix setting of MK_GSSAPI option by bsd.own.mk; its value should
default to the value of MK_KERBEROS unless set explicitly by
  WITH_GSSAPI/WITHOUT_GSSAPI.  (This introduces another type of
  MK_* variables which itself is questionable.)

- Teach tools/build/options/makeman script that generates the
  src.conf(5) manpage about the new type of MK_* variables.

- Fix broken logic in lib/Makefile.
2007-12-12 16:39:32 +00:00
Doug Barton
3fe21f77bc Hide the building and installation of libgssapi behind the
WITHOUT_KERBEROS knob. While GSS can be used for other things
some third party software (most notably ports/x11/kdelibs3)
takes the presence of libgssapi as an indication that kerberos
is available, and attempts to link with the kerberos libs. If
they are not available, the build will fail.

Because you might want to use GSS but not kerberos, add a knob
to re-enable it if WITHOUT_KERBEROS is present.

Document the new knob, and the new behavior of WITHOUT_KERBEROS.

Not objected and/or generally agreed to by:	freebsd-arch

Problem discussed/analyzed in:
PR:	ports/116484
2007-12-10 19:09:24 +00:00
Doug Barton
b1459afbfd Add a reasonable-sounding description of the WITHOUT_INSTALLLIB knob. 2007-12-09 21:56:21 +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
Sam Leffler
7a314dff55 update copyrights 2007-12-04 05:52:58 +00:00
Sam Leffler
53d4724b5c update copyright's 2007-12-04 05:52:01 +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
Sam Leffler
66835de48d o expand usage comments; add cut&paste items for bozo's like me
o add things i want to TODO list
o add Record entry to each event which back-maps to the line # in the ktr file;
  useful for finding local context when the ktr file has lots of items that
  schedgraph doesn't grok
o add missing KTR_SCHED event handlers
o expose Counter max value through a ymax method for widget building
o show timestamps in records rejected 'cuz time goes backwards
2007-11-19 04:46:37 +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
Jeff Roberson
2e2e6cc953 - Fix the ktr header regexp so we match lines with very large indexes.
- Add support for messages where cpu load is added to a remote cpu.
 - print unmatched lines to stdout
2007-11-12 17:33:07 +00:00
Daniel Gerzo
f61b0b51ed s/maybe/may be/
MFC after: 3 days
2007-11-06 23:12:53 +00:00
Sam Leffler
587b8242e3 o sync w/ net80211 changes
o redo numbering scheme to simplify changing the table
2007-11-03 18:14:12 +00:00
Sam Leffler
163652da31 align stats printed out w/o any args
MFC after:	1 week
2007-11-03 18:13:05 +00:00
Sam Leffler
cf9b84e3df o add -o ampdu shorthand for viewing most useful ampdu stats
o remove noise from default stat list

MFC after:	1 week
2007-11-03 18:12:25 +00:00
Robert Watson
3be4cb0b4a Merge Neterion if_nxge driver version 2.0.9.11230 with the following
changes:

  01 -  Enhanced LRO:
  LRO feature is extended to support multi-buffer mode. Previously,
  Ethernet frames received in contiguous buffers were offloaded.
  Now, frames received in multiple non-contiguous buffers can be
  offloaded, as well. The driver now supports LRO for jumbo frames.

  02 - Locks Optimization:
  The driver code was re-organized to limit the use of locks.
  Moreover, lock contention was reduced by replacing wait locks
  with try locks.

  03 - Code Optimization:
  The driver code was re-factored  to eliminate some memcpy
  operations.  Fast path loops were optimized.

  04 - Tag Creations:
  Physical Buffer Tags are now optimized based upon frame size.
  For better performance, Physical Memory Maps are now re-used.

  05 - Configuration:
  Features such as TSO, LRO, and Interrupt Mode can be configured
  either at load or at run time. Rx buffer mode (mode 1 or mode 2)
  can be configured at load time through kenv.

  06 - Driver Statistics:
  Run time statistics are enhanced to provide better visibility
  into the driver performance.

  07 - Bug Fixes:
  The driver contains fixes for the problems discovered and
  reported since last submission.

  08 - MSI support:
  Added Message Signaled Interrupt feature which currently uses 1
  message.

  09  Removed feature:
  Rx 3 buffer mode feature has been removed. Driver now supports 1,
  2 and 5 buffer modes of which 2 and 5 buffer modes can be used
  for header separation.

  10  Compiler warning:
  Fixed compiler warning when compiled for 32 bit system.

  11 Copyright notice:
  Source files are updated with the proper copyright notice.

MFC after:	3 days
Submitted by:	Alicia Pena <Alicia dot Pena at neterion dot com>,
		Muhammad Shafiq <Muhammad dot Shafiq at neterion dot com>
2007-10-29 14:19:32 +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
Ruslan Ermilov
eaf9eb8d7a cached -> nscd 2007-10-19 14:01:25 +00:00
David E. O'Brien
631be5e2bd Mdoc fix.
Submitted by:	ru
Approved by:	re(implicit)
2007-10-09 17:53:33 +00:00
David E. O'Brien
1e9f27406f Correct lib name.
Submitted by:	ru
Approved by:	re(kensmith)
2007-10-09 17:22:00 +00:00
David E. O'Brien
65c045e964 Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by:	re(kensmith)
2007-10-09 13:42:34 +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
Ruslan Ermilov
63ebea533e - Add cddl/lib to the list of library directories.
- Add /bin to PATH to suppress a harmless warning from a
  makefile that sets a variable using cat(1).

Approved by:	re (kensmith)
2007-10-01 18:11:43 +00:00
Ruslan Ermilov
1b647f44bc The shell_1_sh test was failing with "make -jX".
Approved by:	re (kensmith)
2007-10-01 18:09:42 +00:00
Ruslan Ermilov
dddbb443d5 MK_LIBTHR was misspelled.
Approved by:	re (kensmith)
2007-10-01 18:08:11 +00:00
Marius Strobl
55aaf894e8 Make the PCI code aware of PCI domains (aka PCI segments) so we can
support machines having multiple independently numbered PCI domains
and don't support reenumeration without ambiguity amongst the
devices as seen by the OS and represented by PCI location strings.
This includes introducing a function pci_find_dbsf(9) which works
like pci_find_bsf(9) but additionally takes a domain number argument
and limiting pci_find_bsf(9) to only search devices in domain 0 (the
only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are
changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order
to no longer report false positives when searching for siblings and
dupe devices in the same domain respectively.
Along with this change the sole host-PCI bridge driver converted to
actually make use of PCI domain support is uninorth(4), the others
continue to use domain 0 only for now and need to be converted as
appropriate later on.
Note that this means that the format of the location strings as used
by pciconf(8) has been changed and that consumers of <sys/pciio.h>
potentially need to be recompiled.

Suggested by:	jhb
Reviewed by:	grehan, jhb, marcel
Approved by:	re (kensmith), jhb (PCI maintainer hat)
2007-09-30 11:05:18 +00:00
George V. Neville-Neil
5f136916ee Update structure name to follow the new IPsec code.
Reported by: phk
Approved by: re
2007-09-19 08:50:55 +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
Remko Lodder
52d09c681b Add WITHOUT_ZONEINFO to the build options and regenerate src.conf.5
Reminded by:	ceri
Approved by:	re (bmah)
Approved by:	imp (mentor)
2007-08-27 20:01:08 +00:00
Poul-Henning Kamp
8f82ec1165 Add option to not fill second code image, this makes the full disk
image compress much better.

Respect pkg_add's internal 200 package limitation.

Approved by:	re (bmah)
Spelling fixes by:	bmah
2007-08-26 14:57:08 +00:00
Remko Lodder
58dfa07ade Bring in two fixes for TinyBSD:
- Add the bind mtree to the TinyBSD build so that files
  can be installed there (else the build fails)
- Change GEOM_GPT to GEOM_PART_GPT since that had been
  renamed in current. The kernel configuration provided
  by TinyBSD will not build without these changes.

PR:		misc/115484
PR:		misc/115405
Submitted by:	Richard Arends <richard at unixguru dot nl>
Approved by:	re (bmah)
Approved by:	imp (mentor)
2007-08-22 18:45:00 +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
Andrew Thompson
511957167b wlandebug has been moved to the base system.
Approved by:	re (rwatson)
2007-07-28 00:18:24 +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
Bjoern A. Zeeb
74cfef5c88 Make clear that WITHOUT_TOOLCHAIN cannot be applied to build targets.
PR:		114220
Reviewed by:	simon
Approved by:	re (hrs)
2007-07-19 08:14:28 +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
43d488c6d2 - Chase for crypto_if.m -> crytpodev_if.m rename in order to
fix doxygen generation.
 - Add some missing *_if.m files.

Approved by:	re (hrs)
2007-07-11 05:01:14 +00:00
Florent Thoumie
74a2924f4d Fix commit mail retrieval when using message-id.
Submitted by:	novel
Approved by:	re (hrs)
2007-07-10 15:30: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
Andrew Thompson
069441f718 Remove wicontrol(8) from the base system. Using wicontrol to configure an
interface has been deprecated since 5.1, wi(4) wireless interfaces are managed
via the net80211 stack and ifconfig.

Approved by:	re (rwatson)
2007-07-01 10:25:07 +00:00
Sam Leffler
fd3ddbd038 Neterion Xframe 10GbE Server/Storage adapter driver.
The nxge driver provides support for Neterion Xframe-I and Xframe-II
adapters. The driver supports TCP Segmentation Offload (TSO/LSO),
Jumbo frames (5 buffer mode), Header separation (2 and 3 Receive
buffer modes), VLAN, and Promiscuous mode.

Submitted by:	Neterion
Reviewed by:	rwatson
Approved by:	re (kensmith)
2007-06-29 22:47:18 +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
Rong-En Fan
534046e301 - Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on:   freebsd-arch@
Approved by:	re (mux)
2007-06-25 05:06:57 +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
Stephane E. Potvin
04031e9ae2 Options spring cleanup:
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed

Approved by: kan (mentor)
Reviewed by: ru
2007-06-13 02:08:04 +00:00
Poul-Henning Kamp
2a9e92ebf6 Recoverdisk is now part of the base system. 2007-06-12 21:33:11 +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
Poul-Henning Kamp
7cd3f6159b Add cust_pkg() which iteratively tries to install packages.
Move /usr/local/etc to /etc/local so that installed packages can be frobbed.

Use a more compatible 512MB card geometry.
2007-06-12 11:35:29 +00:00
Sam Leffler
13244cbbe6 add 11n stats 2007-06-11 04:05:49 +00:00
Sam Leffler
b57206897c o add 11n knob
o gcc42 stuff
2007-06-11 04:05:15 +00:00
Greg Lehey
df16203833 Updated tests for changed features.
Submitted by: edwin@
2007-06-09 06:01:24 +00:00
Poul-Henning Kamp
d5d45e062f Default to R/O root filesystem 2007-06-05 11:17:45 +00:00
Poul-Henning Kamp
0dee40cc68 Fix the fstab on the second image, just like updatep2.sh does. 2007-06-05 10:21:15 +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
Diomidis Spinellis
550bfecc8f Regression tests for sparc64 record formats.
Submitted by:	Carl Johan Gustavsson
2007-05-22 06:34:20 +00:00
Diomidis Spinellis
6f1544c7f1 Regression tests for amd64 file and record formats.
Submitted by:	Larry Rosenman (who also provided access to a testing host)
2007-05-22 06:30:48 +00:00
Diomidis Spinellis
eeec998a23 Regression tests for the new and legacy process accounting formats. 2007-05-22 06:21:20 +00:00
Diomidis Spinellis
ffc44a27da Document the .in .out file naming conventions adopted in commit_prep.pl's
exclusions list for header checking.
2007-05-22 06:11:44 +00:00
Diomidis Spinellis
a1ab7f88b1 Test the integer-arithmetic float conversions encode_timeval and encode_long
in kern_acct.c.
2007-05-22 05:52:04 +00:00
Alexander Kabaev
36aa6a9be5 Introduce WITHOUT_SSP option that allows users to exclude LGPLed
libssp from the build.
2007-05-19 04:42:59 +00:00
Daniel Eischen
ca2cb5bd5b Add a description for the WITHOUT_SYMVER option. 2007-05-17 05:03:24 +00:00
Robert Watson
9af491e24b Add regression tests for ethers(3) functions, including new _r variants.
Four tests currently fail:

  test_ether_line_bad_1() and test_ether_line_bad_2() due to bugs in
  ether_line(3).

  test_ether_ntohost() and test_ether_hostton() due to not being fully
  implemented tests.
2007-05-13 14:03:21 +00:00
Robert Watson
9d3f3e9711 Add a regression test to detect if waiting on the I/O serialization lock
on socket buffers is interruptible or not, which detacts the regression I
introduced recently in 7-CURRENT (spotted by alfred).  This test passes
in older -CURRENT, and with the as-yet uncommitted sx_xlock_sig and
sblock fix patches.
2007-05-06 14:28:49 +00:00
Poul-Henning Kamp
601c3cc018 Improve reporting in recoverdisk a good deal.
Submitted by:	Ulrich Spoerlein <uspoerlein@gmail.com>
PR:	111630
2007-04-23 12:17:27 +00:00