summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* - Add missing interdependencies to kerberos libraries. Some of thestas2011-09-271-1/+1
| | | | | | | | | kerberos libraries were not linked properly (missing dependencies), which causes 3rd party applications linking to fail when --as-needed ld flag is used. I also added the --no-undefined ld(1) flag to make sure that there're no missing dependencies. MFC after: 3 days
* zfsboottest: some additional enhancementsavg2011-09-161-5/+10
| | | | | | | | | | - redirect diagnostics printfs in the boot code to stderr - do not read trailing garbage from a trailing block of a file Also add my copyright to the file after making so many changes. Approved by: re (kib) MFC after: 1 week
* zfstest: rename to zfsboottest and move to toolsavg2011-09-162-0/+167
| | | | | Approved by: re (kib) MFC after: 1 week
* Fix alignment assumptions.marius2011-09-022-6/+4
| | | | | | PR: 160289 Approved by: re (kib) MFC after: 3 days
* Add support for IPv6 to ipfw fwd:bz2011-08-201-0/+369
| | | | | | | | | | | | | | | | | | | Distinguish IPv4 and IPv6 addresses and optional port numbers in user space to set the option for the correct protocol family. Add support in the kernel for carrying the new IPv6 destination address and port. Add support to TCP and UDP for IPv6 and fix UDP IPv4 to not change the address in the IP header. Add support for IPv6 forwarding to a non-local destination. Add a regession test uitilizing VIMAGE to check all 20 possible combinations I could think of. Obtained from: David Dolson at Sandvine Incorporated (original version for ipfw fwd IPv6 support) Sponsored by: Sandvine Incorporated PR: bin/117214 MFC after: 4 weeks Approved by: re (kib)
* Test process descriptors.jonathan2011-08-185-0/+221
| | | | | | | | | | Ensure that process descriptors work as expected. We should be able to: - pdfork(), like regular fork(), but producing a process descriptor - pdgetpid() to convert a PD into a PID - pdkill() to send signals to a process identified by a PD Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* poll(2) implementation for capabilities.jonathan2011-08-161-2/+16
| | | | | | | | When calling poll(2) on a capability, unwrap first and then poll the underlying object. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Rename CAP_*_KEVENT to CAP_*_EVENT.jonathan2011-08-121-2/+2
| | | | | | | | Change the names of a couple of capability rights to be less FreeBSD-specific. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Test *at(2) calls with capability-mode lookup.jonathan2011-08-124-3/+157
| | | | | | | | | | | | | This commit adds regression testing for openat(), fstatat(), etc. with capability scoping ("strict relative" lookup), which applies: - in capability mode - when performing any *at() lookup relative to a capability These tests will fail until the *at() code is committed; on my local instance, with the *at() changes, they all pass. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Use the right printf() format string without a cast to maxint_t.jonathan2011-08-111-4/+4
| | | | | | | | As per kib's suggestion, we also change test_count from a size_t to an int; its value at the moment is 4, and we only expect it to go up to 7. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Second-to-last commit implementing Capsicum capabilities in the FreeBSDrwatson2011-08-112-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel for FreeBSD 9.0: Add a new capability mask argument to fget(9) and friends, allowing system call code to declare what capabilities are required when an integer file descriptor is converted into an in-kernel struct file *. With options CAPABILITIES compiled into the kernel, this enforces capability protection; without, this change is effectively a no-op. Some cases require special handling, such as mmap(2), which must preserve information about the maximum rights at the time of mapping in the memory map so that they can later be enforced in mprotect(2) -- this is done by narrowing the rights in the existing max_protection field used for similar purposes with file permissions. In namei(9), we assert that the code is not reached from within capability mode, as we're not yet ready to enforce namespace capabilities there. This will follow in a later commit. Update two capability names: CAP_EVENT and CAP_KEVENT become CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they represent. Approved by: re (bz) Submitted by: jonathan Sponsored by: Google Inc
* Move cxgbtool from usr.sbin to tools/tools.np2011-08-108-0/+11278
| | | | | Approved by: re (kib) MFC after: 1 month
* Properly initialise the "len" argument to getsockname(2) in the tcpdroprwatson2011-08-061-0/+1
| | | | | | | regression test so that it works (more) consistently. Approved by: re (bz) Sponsored by: Juniper Networks
* Expect fchflags(2) to fail with EOPNOTSUPP on NFS.jonathan2011-08-051-2/+11
| | | | | | | | | | | | Even if we have CAP_FCHFLAGS, fchflags(2) fails on NFS. This is normal and expected, so don't fail the test because of it. Note that, whether or not we are on NFS, fchflags(2) should always fail with ENOTCAPABLE if we are using a capability that does not have the CAP_FCHFLAGS right. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Flesh out the cap_test regression test.jonathan2011-08-043-0/+388
| | | | | | | | Add more regression testing, some of which is expected to fail until we commit more kernel implementation. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Flesh out the cap_test regression test.jonathan2011-08-045-344/+319
| | | | | | | | Add more regression testing, some of which is expected to fail until we commit more kernel implementation. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* update smp related documentation after recent changesavg2011-07-301-16/+4
| | | | | | | | | | | | Remove references to machdep.hlt_logical_cpus and machdep.hlt_cpus sysctls and tunables. Document machdep.hyperthreading_allowed and hint.lapic.X.disabled tunables. Prompted by: ru Proofreading: bf Reviewed by: jhb Approved by: re (kib)
* Add athradar, an implementation of the radar parameter diagnosticadrian2011-07-223-0/+304
| | | | | | | | API. This is a reimplementation from scratch. Approved by: re (kib)
* sh: Add a test for a fairly obscure case with aliases.jilles2011-07-161-0/+6
| | | | This also passes on stable/8.
* Garbage-collect the tools for maintaining the previous PCI vendors list. Thephilip2011-07-161-263/+0
| | | | | | sources this tool collates are no longer available and the format of the current database is directly usable by pciconf(8) without needing any special processing.
* posix_spawn: If an error is detected in the child process, reap the zombie.jilles2011-07-102-1/+91
| | | | | | | | | | Formerly, in this case an error was returned but the pid was also returned to the application, requiring the application to use unspecified behaviour (the returned pid in error situations) to avoid zombies. Now, reap the zombie and do not return the pid. MFC after: 2 weeks
* Clarify the meaning of a test.jonathan2011-07-082-4/+4
| | | | | | | | | | | | Rather than using err() if either of two failure conditions fires (which can produce spurious error messages), just use errx() if the one condition that really matters fires. In practice, this single test is enough to detect the failure mode we're looking for (kqueue being inherited across fork). Approved by: mentor (rwatson), re (Capsicum blanket) Sponsored by: Google Inc
* Ensure that kqueue is not inherited across fork().jonathan2011-07-073-6/+21
| | | | | | | | | | | | | | | Modify the existing unit test (from libkqueue) which already exercises process events via fork() and kill(). Now, the child process simply checks that the 'kqfd' descriptor is invalid. Some minor modifications were required to make err() work correctly. It seems that this test was imported using the output of a configure script, but config.h was not included in key places, nor was its syntax correct (need '#define HAVE_FOO 1' rather than '#define HAVE_FOO'). Finally, change main() to run the "proc" suite by default, but widened the '#if TODO' in proc.c to include the non-functioning test event_trigger(). Approved by: mentor (rwatson), re (Capsicum blanket) Sponsored by: Google Inc
* sh: Test that '!' is literal if quoted and first char of bracket expressionjilles2011-06-251-0/+16
| | | | This also works on stable/8.
* - Need to respect the module name and the USB mode when accumulating device ↵hselasky2011-06-253-10/+24
| | | | | | | | | ID's. - Be more verbose on file seek failures. Allow a file size of zero. - Improve the wrapper shell. MFC after: 14 days
* - Improve bus_autoconf tool.hselasky2011-06-2511-416/+1005
| | | | | | | | | | - Implement simple and generic language which can be used to describe any kind of device ID structures. - Fix endian issues. - Add an example format file. Suggested by: imp @ MFC after: 14 days
* - We need to sort all USB device ID's together. Else the matching order willhselasky2011-06-243-54/+163
| | | | | | be wrong. This is required because devd only executes one entry. MFC after: 14 days
* - Make sure we don't match the wrong device by addinghselasky2011-06-241-0/+1
| | | | | | | a match for the bus the device belongs to. PR: misc/157903 MFC after: 14 days
* - Add additional information to the PnP info of USB HUBs children whichhselasky2011-06-241-8/+1
| | | | | | | | | | is now required by bus_autoconf. - Allow interface class matching even if device class is vendor specific. - Update bus_autoconf tool to not generate system and subsystem match lines for the nomatch event. PR: misc/157903 MFC after: 14 days
* - Move all USB device ID arrays into so-called sections,hselasky2011-06-244-0/+511
| | | | | | | | | | | | sorted according to the mode which they support: host, device or dual mode - Add generic tool to extract these data: tools/bus_autoconf Discussed with: imp Suggested by: Robert Millan <rmh@debian.org> PR: misc/157903 MFC after: 14 days
* sh: Add test for r223282.jilles2011-06-191-0/+6
|
* Add WITHOUT_UTMPX switch to the build system.ed2011-06-172-0/+28
| | | | | | | | | This knob removes the tools that are exclusively used to view and maintain the databases maintained by utmpx, namely last, users, who, wtmpcvt, ac, lastlogin and utxrm. The tool w is not in this list, because it has some other functionality which is unrelated to utmpx; it is hardlinked to the uptime tool.
* Don't remove the periodic script for ac(8) when setting WITHOUT_ACCT.ed2011-06-171-1/+0
|
* Don't omit ac(8) as part of WITHOUT_ACCT.ed2011-06-172-4/+2
| | | | | | | The WITHOUT_ACCT switch is supposed to omit tools related to process accounting, namely accton and sa. ac(8) is just a simple tool that prints statistics based on data in the utx.log database. It has nothing to do with the former.
* sh: Add case statement fallthrough (with ';&' instead of ';;').jilles2011-06-171-0/+39
| | | | | | | | | | | | Replacing ;; with the new control operator ;& will cause the next list to be executed as well without checking its pattern, continuing until a list ends with ;; or until the end of the case statement. This is like omitting "break" in a C "switch" statement. The sequence ;& was formerly invalid. This feature is proposed for the next POSIX issue in Austin Group issue #449.
* sh: Skip variables with invalid names in "set", "export -p", "readonly -p".jilles2011-06-172-0/+6
| | | | This ensures the output of these commands is valid shell input.
* sh: Reduce unnecessary forks with eval.jilles2011-06-161-0/+5
| | | | | | | | | | The eval special builtin now runs the code with EV_EXIT if it was run with EV_EXIT itself. In particular, this eliminates one fork when a command substitution contains an eval command that ends with an external program or a subshell. This is similar to what r220978 did for functions.
* sh: Add support for named character classes in bracket expressions.jilles2011-06-151-0/+32
| | | | | Example: case x in [[:alpha:]]) echo yes ;; esac
* sh: Add test for LC_COLLATE-based character ranges in case.jilles2011-06-121-0/+24
|
* sh: Add test for case pattern matching with iso-8859-1 charset.jilles2011-06-121-0/+52
| | | | This also passes on stable/8.
* Add "context" subcommand to fetch and display SGE context.np2011-06-111-0/+235
|
* sh: Do parameter expansion on ENV before using it.jilles2011-06-101-0/+11
| | | | | | This is required by POSIX, and allows things like ENV=\$HOME/.shrc. Note that tilde expansion is explicitly not performed.
* sh: Do parameter expansion before printing PS4 (set -x).jilles2011-06-091-0/+9
| | | | | | | | | | | | | | | | The function name expandstr() and the general idea of doing this kind of expansion by treating the text as a here document without end marker is from dash. All variants of parameter expansion and arithmetic expansion also work (the latter is not required by POSIX but it does not take extra code and many other shells also allow it). Command substitution is prevented because I think it causes too much code to be re-entered (for example creating an unbounded recursion of trace lines). Unfortunately, our LINENO is somewhat crude, otherwise PS4='$LINENO+ ' would be quite useful.
* cxgbetool: a tool for the cxgbe(4) driver.np2011-06-095-0/+41744
|
* sh: Add simple tests for set -x and PS4.jilles2011-06-082-0/+17
|
* sh: Fix $? in heredocs on simple commands.jilles2011-06-051-0/+15
| | | | PR: bin/41410
* sh: Add already working testcases for $? in here-document.jilles2011-06-051-0/+25
| | | | | | | | | If the here-document is attached to a compound command or subshell, $? already works properly. This is both a workaround for bin/41410 and a requirement for a true fix for bin/41410. PR: bin/41410 MFC after: 1 week
* Add a very simple IPDIVERT test, which creates IP divert sockets andrwatson2011-06-042-0/+177
| | | | | | | | | | | | checks for collision/non-collision properties in binding them. This test would have identified a bug recently reported on current@ involding my disaggregation of the pcbinfo lock. It would be nice if this test also exercised packet diversion and injection, but that is for another day. MFC after: 3 days Sponsored by: Juniper Networks, Inc.
* sh: Reduce more needless differences between error messages.jilles2011-06-041-1/+1
|
* sh: Honour -n while processing -c string.jilles2011-06-041-0/+3
|
OpenPOWER on IntegriCloud