summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Add regression tests for fmin{,f,l} and fmax{,f,l}.das2008-07-033-1/+161
| | | | | | | | 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.
* Add some regression tests for printf() with positional arguments.das2008-06-292-1/+133
| | | | | | | | | 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.
* Rework the lifetime management of the kernel implementation of POSIXjhb2008-06-275-0/+1640
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix compile on 64-bit platforms.jhb2008-06-261-1/+1
|
* Re-implement the client side of rpc.lockd in the kernel. This implementationdfr2008-06-261-50/+182
| | | | | | | | | | | | 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
* Enable GCC stack protection (aka Propolice) for userland:ru2008-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | - 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>
* Teach fifo_create regression test to also try to use mknod(2) to createrwatson2008-06-221-36/+84
| | | | | | | | 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.
* Regression test for a recently fixed strtod bug.das2008-06-211-1/+11
|
* 1. Make the BSD version of cpio the default [1]dougb2008-06-163-0/+11
| | | | | | | | | | | | | | | | | 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]
* Update mctest and its associated script to have a base port to listengnn2008-06-033-12/+28
| | | | | | on so that multiple copies can be run easily. Update documentation with group and port arguments which are optional.
* Remove two netatm-specific test parts.rwatson2008-05-262-168/+0
| | | | | MFC after: 3 weeks Spotted by: bz
* Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE andbz2008-05-264-82/+0
| | | | | | | | | | | | | | | | | | 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
* Flush stdout after each line to make piping to another command easier.thompsa2008-05-191-1/+3
|
* Simple testing program for *at family of syscalls.rdivacky2008-05-183-0/+678
| | | | Approved by: kib (mentor)
* Add the DTrace test makefile for the test suite distributed in OpenSolaris.jb2008-05-172-0/+456
|
* Test the expansion of $LINENO.stefanf2008-05-152-0/+25
|
* Add the ability to do all read, all write, or random read/write.adrian2008-05-151-9/+44
|
* Include a very basic (and beta) tool for stressing disks using the POSIXadrian2008-05-072-0/+197
| | | | | | | | | | 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.
* Enable autoflush of output to always show prompts. If piping the outputscf2008-04-301-0/+5
| | | | | | prior to this patch, the prompt would not appear due to buffering. Approved by: flz
* o add indirect array for field indices as the # stats is > 127 and doesn'tsam2008-04-304-18/+28
| | | | | | 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
* update for new eventssam2008-04-301-0/+65
|
* Add new directories, scripts and wlanwds. Introduced with vap support.rpaulo2008-04-291-0/+2
|
* Add missing 't'.rpaulo2008-04-291-1/+1
| | | | Approved by: sam
* - Remove cumbersome and inaccurate attempt at synchronizing the timestampsjeff2008-04-261-70/+5
| | | | | | | | 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
* Updated the test to handle multiple sinks. The sinks cut theirgnn2008-04-243-40/+148
| | | | | | | | | | | 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.
* Add four utility functions related to struct grp processing modeled in-partscf2008-04-233-1/+130
| | | | | | | | | | | | | | | | | | | 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
* Differentiate in the tests against getenv() between an empty string and ascf2008-04-232-12/+15
| | | | | NULL by having the test program return *NULL* for NULL's (no existing variable) instead of an empty string (variable with empty value).
* Add a small script that will examine all files which exist on /cfg andphk2008-04-211-0/+42
| | | | | | if they are different in /etc, copy them to /cfg. Submitted by: mat
* test scripts for vaps and other 802.11 featuressam2008-04-2020-0/+755
| | | | Supported by: Hobnob and Marvell
* add dwds test appsam2008-04-203-1/+359
| | | | | Supported by: Hobnob Obtained from: Atheros (earlier version)
* update for vapssam2008-04-202-11/+121
| | | | Supported by: Hobnob
* Updates for changes in the way printf() handles hex floating pointdas2008-04-121-5/+5
| | | | numbers.
* Correct typo.ceri2008-04-051-1/+1
|
* Add some tests for fma(), fmaf(), and fmal().das2008-04-033-1/+424
|
* Add a manual page and a Makefile.gnn2008-04-034-5/+220
| | | | | Add code to reflect packets back from the sink so that we can measure round trip at the source.
* Test remainderl() and remquol() as well.das2008-03-301-4/+34
|
* Add some minimal tests for csqrtl().das2008-03-301-59/+88
|
* Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longerru2008-03-292-9/+0
| | | | build libkse. This should fix WITHOUT_LIBTHR builds as a side effect.
* Fix the __FreeBSD_version check.dfr2008-03-261-1/+1
|
* Add some regression tests for posix record locks.dfr2008-03-262-0/+1356
|
* Don't remove usr/include/fs/nwfs and usr/include/netncp, as they are alwaysantoine2008-03-241-2/+2
| | | | | | | | recreated during installworld (they are in BSD.include.dist). Reported by: Pawel Worach Approved by: rwatson (mentor) X-MFC: with revision 1.13
* sync w/ p4: minor cleanups to improve msgssam2008-03-221-15/+9
|
* Add a test case for options.c revision 1.26.stefanf2008-03-222-0/+15
|
* Alert properly when we have stale mounts left after interuptingremko2008-03-201-6/+14
| | | | | | | | | 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
* "track" is a script I've used for ages to track the progress of a build.des2008-03-203-0/+57
| | | | | Unlike whereintheworld, it continuously monitors the log file; it also produses less verbose output.
* Add the correct license.gnn2008-03-191-1/+22
|
* A multicast test. The mctest program acts as both a source and a sinkgnn2008-03-192-0/+373
| | | | | | | 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.
* Vim function to style(9).obrien2008-03-131-0/+68
| | | | | | Issue ':call FreeBSD_Style()' while editing a file. Submitted by: scf
* Introduce a new F_DUP2FD command to fcntl(2), for compatibility withantoine2008-03-081-2/+71
| | | | | | | | | | | | 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
* Add some checks for amd64 target around usr/lib32 libraries, missed inantoine2008-03-081-0/+4
| | | | | | | previous commit. Approved by: rwatson (mentor) X-MFC: with revision 1.13
OpenPOWER on IntegriCloud