Commit Graph

1802 Commits

Author SHA1 Message Date
sam
11a3309327 allow NANO_CFGDIR to be overridden 2009-04-18 15:59:09 +00:00
sam
95a1b4c664 no more need for -p option to wlanwds; it knows how to find the parent now 2009-04-15 22:11:04 +00:00
sam
4816b62a4d o remove the -p option; use the %parent pointer sysctl to find the parent ifnet
o remove the -b option; users can just embed the bridge ifnet in the script
o add -j option to create wds vaps on join/rejoin ops
2009-04-15 22:10:33 +00:00
sam
a72478d02d switch usb setup to usb2; it still doesn't work right but the
old stuff is now removed and we want this to build
2009-04-13 21:04:53 +00:00
sam
f571196708 catch up with removal of ATH_SUPPORT_TDMA 2009-04-13 21:03:21 +00:00
stefanf
e2e8e48cde Add a test for r191009. 2009-04-13 19:12:28 +00:00
trasz
d9f1442b41 Add a few more regression tests for POSIX.1e ACLs. 2009-04-13 13:51:53 +00:00
das
fb819f095f Return -1 instead of 0 upon reaching EOF. This is somewhat ill-advised
because it means getdelim() returns -1 for both error and EOF, and
never returns 0. However, this is what the original GNU	implementation
does, and POSIX inherited the bug.

Reported by:	marcus@
2009-04-06 13:50:04 +00:00
ed
36d960175a Remove if_ppp(4) and if_sl(4).
Not only did these two drivers depend on IFF_NEEDSGIANT, they were
broken 7 months ago during the MPSAFE TTY import. if_ppp(4) has been
replaced by ppp(8). There is no replacement for if_sl(4).

If we see regressions in for example the ports tree, we should just use
__FreeBSD_version 800045 to check whether if_ppp(4) and if_sl(4) are
present. Version 800045 is used to denote the import of MPSAFE TTY.

Discussed with: rwatson, but also rwatson's IFF_NEEDSGIANT emails on the
                lists.
2009-04-05 22:08:18 +00:00
phk
2b792acee4 Remember to clear the ports list before generation for prefetch 2009-04-05 20:59:26 +00:00
stefanf
106f32b27d Test the r190298 change. 2009-03-22 23:00:52 +00:00
stefanf
79a3bf3a75 Add a few tests for the read built-in. 2009-03-22 22:14:46 +00:00
stefanf
39c3581548 Update test for r190284. 2009-03-22 21:12:00 +00:00
stefanf
62671f061c Update and extend the tests for alias. 2009-03-22 17:22:14 +00:00
phk
30b31b3e4e Wrap a long line.
Save a copy of the CONFIGFILES before we spam them.
2009-03-21 19:09:33 +00:00
thompsa
11f8f68779 Remove the uscanner(4) driver, this follows the removal of the kernel scanner
driver in Linux 2.6. uscanner was just a simple wrapper around a fifo and
contained no logic, the default interface is now libusb (supported by sane).

Reviewed by:	HPS
2009-03-19 20:33:26 +00:00
pjd
8e6c20cc53 Oops. Correct comment in the LICENSE file. 2009-03-14 21:59:12 +00:00
pjd
7b829d245e Regression tests for mac_portacl(4). 2009-03-14 21:54:19 +00:00
rdivacky
4cd01fc223 Switch over to gnu99 compilation on default for userland.
Tested by:	make universe
Tested by:	ports exp build (done by pav)
Reviewed by:	ru
Reviewed by:	silence on arch
Approved by:	ed (mentor)
2009-03-14 17:55:16 +00:00
sam
5b6ba969de add more register bit defs 2009-03-12 00:03:55 +00:00
sam
8f0aa78773 move shared register support code to common 2009-03-11 17:46:01 +00:00
sam
79e7717a17 add athpoke, a tool to peek/poke registers 2009-03-11 17:41:46 +00:00
sam
8578008810 add athdecode, an app to decode register logs 2009-03-11 17:15:33 +00:00
sam
3de66ba488 add %b format strings for use by athdecode 2009-03-11 17:14:17 +00:00
rwatson
3a33392c2f Add tcpp -- TCP parallelism microbenchmark.
This tool creates large numbers of TCP connections, each of which will
transmit a fixed amount of data, between client and server hosts.  tcpp can
use multiple workers (typically up to the number of hardware cores), and can
use multiple source IPs in order to use an expanded port/IP 4-tuple space to
avoid problems from reusing 4-tuples too quickly.  Aggregate bandwidth use
will be reported after a client run.

While by no means a perfect tool, it has proven quite useful in generating
and optimizing TCP stack lock contention by easily generating high-intensity
workloads.  It also proves surprisingly good at finding device driver bugs.
2009-03-10 14:52:17 +00:00
rwatson
c6d1d7c2f1 Rename files that collide on case-insensitive file systems by encoding
colliding upper case letters as the lower case letter with a '_' in
front.

MFC after:	3 days
Discussed with:	ed
Spotted by:	Michael David Crawford <mdc at prgmr.com>
2009-03-10 09:33:22 +00:00
rwatson
ea13322a87 In UNIX domain socket GC regression test, after setting a socket
non-blocking, EINPROGRESS is an acceptable result from connect().
2009-03-08 21:06:02 +00:00
yongari
9747210a94 Make ifinfo build. The struct if_data members ifi_recvquota and
ifi_xmitquota were renamed to ifi_spare_char1 and ifi_spare_char2
respectively.
2009-03-04 01:31:09 +00:00
sam
2719e794c0 add -b option to suppress the banner 2009-03-02 05:07:05 +00:00
das
b2ec174608 Tests for getdelim(). 2009-02-28 06:39:39 +00:00
das
d6c4fb135e Add a file containing tests for simple format specifiers.
Currently it only has tests for a few sign issues with integer
formats, including PR 131880.
2009-02-28 06:37:10 +00:00
das
efea0f4e75 Tests for wcscasecmp(), wcsnlen(), and stpncpy(). 2009-02-28 06:34:04 +00:00
sam
44622ab7e9 really enable usb1 2009-02-27 19:26:23 +00:00
sam
8499a8b51c o enable PREEMPTION
o turn off a bunch of stuff that's unlikely to be used
o add flash support
o use mii instead of miibus to save space
o enable tdma support
o configure legacy usb as usb2 works only on 2348 w/ 64M configs
2009-02-27 19:23:55 +00:00
sam
f6a89b7745 o add -HEAD to avoid build conflicts
o switch to a more common flash config
2009-02-27 19:21:35 +00:00
sam
1d7238f9d6 add -HEAD to avoid build conflicts 2009-02-27 19:20:57 +00:00
sam
56525f0f8e fix build 2009-02-27 05:22:11 +00:00
sam
7c633e78c6 fix build 2009-02-27 05:22:00 +00:00
ed
fa4082de19 Rename all symbols in libmp(3) to mp_*, just like Solaris.
The function pow() in libmp(3) clashes with pow(3) in libm. We could
rename this single function, but we can just take the same approach as
the Solaris folks did, which is to prefix all function names with mp_.

libmp(3) isn't really popular nowadays. I suspect not a single
application in ports depends on it. There's still a chance, so I've
increased the SHLIB_MAJOR and __FreeBSD_version.

Reviewed by:	deischen, rdivacky
2009-02-26 21:43:15 +00:00
sam
5c62a293bb use mii instead of miibus to not pull in useless phy code 2009-02-26 19:47:11 +00:00
sam
8fe376f424 add updatep[12] that grok the partitioning we use and use gpart
instead of boot0cfg to switch the active partition
2009-02-26 19:44:52 +00:00
sam
53dcaae80d add more gpio registers 2009-02-26 06:16:15 +00:00
pjd
06d3dd6736 Add explicit casting in few places.
It is only really necessary for open(2)'s third argument, which is optional and
obtained through stdarg(3). open(2)'s third argument is 32bit and we pass 64
bits. On little endian it works, because we take lower 32 bits, but on big
endian platforms we take upper 32 bits, so we end up with 0.

Reported by:	Milan Čermák <Milan.Cermak@Sun.COM>
2009-02-23 07:33:29 +00:00
mr
c271f8f194 Delete files which serve no purpose in this environment.
Inspired by: simon@
2009-02-20 14:53:49 +00:00
mtm
1de5dbac2f Doh! r188813 modified an auto-generated file. Fix it for real:
o grammar fix
  o remove mention of libkse

Submitted by:	Niclas Zeising <niclas.zeising@gmail.com>
2009-02-20 11:09:55 +00:00
sam
facbd7451d revamp after 1/2 and 1/4 rate changes 2009-02-19 05:36:07 +00:00
sam
f0b2ccddbf add -z option to zero driver statistics (but note we don't yet zero
stats obtained from the hal)
2009-02-13 05:45:23 +00:00
sam
6a08d93705 add stats no frags and missing stat for no dma buffers 2009-02-13 05:44:18 +00:00
sam
07d2dfe72c backout r188327, it broke summary printing 2009-02-13 05:42:25 +00:00
rwatson
67e0c1a750 Add a regresion test to determine whether or not a file descriptor is
allocated in a fork(2)-inheritable way at the beginning or end of an
accept(2) system call.  This test creates a test thread and blocks it
in accept(2), then forks a child process which tests to see if the
next available file descriptor is defined or not (EBADF vs EINVAL for
ftruncate(2)).

This detects a regression introduced during the network stack locking
work, in which a very narrow race during which fork(2) from one
thread during accept(2) in a second thread lead to an extra inherited
file descriptor turned into a very wide race ensuring that a
descriptor was leaked into the child even though it hadn't been
returned.

PR:		kern/130348
2009-02-11 13:44:27 +00:00
mr
e1484b460d Add files to build i386/amd64 bootable rescue ISO images using the
nanobsd framework.
2009-02-11 12:15:35 +00:00
sam
9e30deb858 o use humanize_number to print totals
o shrink some fields now that we don't have to worry about overflow
2009-02-08 20:02:58 +00:00
sam
49edf8abc4 for adhoc and ahdemo modes try to find the "bss node": use the bssid
unless it's not setup or zero's; this may not work as the bssid of
the ibss isn't certain to the "right mac address" but for many cases
it is
2009-02-05 23:15:39 +00:00
sam
d9be247f47 make -o handling like athstats 2009-02-05 22:17:10 +00:00
sam
27217791ed unbreak -o 2009-02-05 22:16:09 +00:00
sam
2187c7fab7 add new stats and missing tx_raw stat 2009-02-05 21:09:46 +00:00
sam
c1fbfec8ba o fix identification of ahdemo mode
o split out code to get the bssid for use in the future
o include more information in error diags when unable to collect sta info/stats
2009-02-05 20:39:53 +00:00
sam
75271fb340 add cfi test tool
Sponsored by:	Carlson Wireless
Reviewed by:	imp, Chris Andreson
2009-02-05 18:15:20 +00:00
phk
d867a6f1d4 Get the right system makefiles for make distribution. 2009-02-04 18:14:30 +00:00
das
ea7687b30b Test wprintf() in addition to printf(). 2009-01-31 18:32:39 +00:00
das
7003291a2c Add tests for conj{,f,l}() that I wrote some time ago. These test the
versions in libm, not the gcc builtins.
2009-01-31 18:31:57 +00:00
sam
87de705ad7 track hal changes 2009-01-29 23:29:07 +00:00
sam
6f18a2ad63 update for hal changes 2009-01-29 23:24:21 +00:00
jeff
a921977684 - Update my copyright.
- Print human readable time as a float with two digits of precision.  Use
   ns now as well since clock periods are well into the hundreds of
   picoseconds now.
 - Show the average duration in the stats frame.  This is often more useful
   than total duration.
2009-01-22 06:21:30 +00:00
jeff
802c315606 - Permit timestamps to be as far as 2048 ticks apart before we complain
about invalid timestamps.  Nehalem CPUs seem to be synchronized but only
   within a fraction of a microsecond.
 - Make the Counter code more flexible to poor timestamps.  In general we
   now complain a lot but render as much as we can.
 - Change the scaler behavior so it works better with very long and very
   short traces.  We now set the maximum scale such that it properly
   displays the entire file by default and doesn't permit zooming out
   beyond the file.  This improves other awkward navigation behavior.
   The interval is now set very small which can't be achieved by simply
   dragging the mouse.  Clicking to the left of or right of the scaler bar
   will produce increments of a single, very small, interval now.

Sponsored by:   Nokia
2009-01-20 12:33:04 +00:00
jeff
5d9daf6331 - Add summary information to the title once the file is parsed rather than
printing it to the terminal.  Now only parse errors go to the terminal.
 - Speedup drawing by raising and lowering tags only once everything has
   been drawn.  Surprisingly, it now takes a little longer to parse than
   it does to draw.
 - Parameterize the layout with X_ and Y_ defines that determine the sizes
   of various things.
 - Remove unnecessary tags.
2009-01-18 05:44:31 +00:00
jeff
1d6fbb62ea - Significantly speedup hiding and displaying multiple rows by writing an
optimized single pass function for each.  This reduces the number of
   tkinter calls required to the minimum.
 - Add a right-click context menu for sources.  Supported commands hide
   the source, hide the whole group the source is in, and bring up a stat
   window.
 - Add a source stat frame that gives an event frequency table as well as
   the total duration for each event type that has a duration.  This can
   be used to see, for example, the total time a thread spent running or
   blocked by a wchan or lock.
2009-01-18 04:49:01 +00:00
phk
7b43672a06 Fix typo
Spotted by:	juli
2009-01-17 21:31:47 +00:00
phk
e493c53029 Release the evil twin of nanobsd.sh: sysbuild.sh
quoth the README:

I have been running -current on my laptop since before FreeBSD 2.0 was
released and along the way developed this little trick to making the
task easier.

sysbuild.sh is a way to build a new FreeBSD system on a computer from
a specification, while leaving the current installation intact.

sysbuild.sh assume you have two partitions that can hold your rootfs
and can be booted, and roughly speaking, all it does is build a new
system into the one you don't use, from the one you do use.

A partition named /freebsd is assumed to be part of your layout, and
that is where the sources and ports will be found.

If you know how nanobsd works, you will find a lot of similarity.
2009-01-17 20:30:06 +00:00
jeff
469b3b8461 - Add a new source configuration menu option that allows hiding and
displaying sources.
 - Add functions to the main SchedGraph to facilitate source hiding.  The
   source is simply moved off screen and all other sources are moved to
   compensate.
2009-01-17 11:19:15 +00:00
jeff
da5ccad246 - Rewrite the parser to support the new generic schedgraph interface.
This no longer requires any custom classes or parsers to support new
   event types.
 - Add an optional command line argument for specifying the clock frequency
   in ghz.  This is useful for traces that do not include KTR_SCHED.

Sponsored by:	Nokia

 - Add support for sorting rows by clicking and dragging them to their new
   position.
 - Add support for configuring the cpu background colors.
 - Improve the scaling so a better center is maintained as you zoom.  This
   is not perfect due to precision loss with floats used in the window
   views.
 - Add new colors and a random assignment for unknown event types.  A table
   is used for known event types.  This is the only event specific
   information.
2009-01-17 07:24:25 +00:00
pjd
ac0e502797 Be more Solaris-friendly.
Submitted by:	Milan Cermak <Milan.Cermak@Sun.COM>
2009-01-16 18:09:49 +00:00
ed
a8d4dcbeed Allow jot(1) regression tests to be checked out on Windows filesystems.
The jot(1) regression tests directory contained two tests named `wx' and
`wX', which doesn't work on case insensitive filesystems. Rename `wX' to
`wX1'.

MFC after:	1 month
2009-01-16 15:47:35 +00:00
sam
5acbdb14cf add athrd tool that dumps ath hal regulatory info; note this is soon to
obsolete but commit now so it's available for anyone that's interested
2009-01-15 23:38:21 +00:00
sam
19af62e535 simple scripts to demonstrate tdma setup 2009-01-14 23:53:06 +00:00
jhb
43a484c528 Add support for two new event source types:
- Callwheels traced via KTR_CALLOUT.  Each CPU is assigned a callwheel
  source.  The events on this source are the execution of individual callout
  routines.  Each routine shows up as a green rectangle while it is executed
  and the event details include the function pointer and argument.
- Locks traced via KTR_LOCK.  Currently, each lock name is assigned an event
  source (since the existing KTR_LOCK traces only include lock names and
  not pointers).  This does mean that if multiple locks of the same name are
  manipulated, the source line for that name may be confusing.  However, for
  many cases this can be useful.  Locks are blue when they are held and
  purple when contested.  The contention support is a bit weak due to
  limitations in the rw_rlock() and mtx_lock_spin() logging messages
  currently.  I also have not added support for contention on lockmgr,
  sx, or rmlocks yet.  What is there now can be profitably used to examine
  activity on Giant however.
- Expand the width of the event source names column a bit to allow for some
  of the longer names of these new source types.
2009-01-13 16:44:18 +00:00
jhb
d89e3d19c0 - Add some rudimentary support for sorting the list of event sources
(threads, CPU load counters, etc.).  Each source is tagged with a group
  and an order similar to the SYSINIT SI_SUB_* and SI_ORDER_*.  After
  the file is parsed, all the sources are then sorted.  Currently, the only
  affects of this are that the CPU loads are now sorted by CPU ID (so
  CPU 0 is always first).  However, this makes it easier to add new types
  of event sources in the future and have them all clustered together
  instead of intertwined with threads.
- Python lists perform insertions at the tail much faster than insertions
  at the head.  For a trace that had a lot of events for a single event
  source, the constant insertions of new events to the head of the
  per-source event list caused a noticable slow down.  To compensate,
  append new events to the end of the list during parsing and then
  reverse the list prior to drawing.
- Somewhere in the tkinter internals the coordinates of a canvas are
  stored in a signed 32-bit integer.  As a result, if an the box for
  an event spans 2^31, it would actually end up having a negative
  X offset at one end.  The result was a single box that covered the
  entire event source.  Kris worked around this for some traces by
  bumping up the initial ticks/pixel ratio from 1 to 10.  However, a
  divisor of 10 can still be too small for large tracefiles (e.g.
  with 4 million entries).  Instead of hardcoding the initial scaling
  ratio, calculate it from the time span of the trace file.
- Add support for using the mouse wheel to scroll the graph window
  up and down.
2009-01-13 16:33:10 +00:00
sam
c6a41fafcb add tool to calculate air time for 802.11 packets 2009-01-12 22:50:55 +00:00
obrien
b1dd6fa37d Vi got me in trouble in r187102 - fix typo of duplicate output filename.
Submitted by:	several
2009-01-12 17:26:52 +00:00
obrien
b31c3b6b02 Update fech URL.
Submitted by:	Alexander Best <alexbestms@math.uni-muenster.de>
2009-01-12 16:31:27 +00:00
sam
cfaeba1821 example configurations for cross-building to Gateworks 2348 and 2358 boards;
probably needs cleanups to be less specific to my needs/uses

MFC after:	2 weeks
2009-01-09 21:39:44 +00:00
sam
98ad45c3d3 TDMA support for long distance point-to-point links using ath devices:
o add net80211 support for a tdma vap that is built on top of the
  existing adhoc-demo support
o add tdma scheduling of frame transmission to the ath driver; it's
  conceivable other devices might be capable of this too in which case
  they can make use of the 802.11 protocol additions etc.
o add minor bits to user tools that need to know: ifconfig to setup and
  configure, new statistics in athstats, and new debug mask bits

While the architecture can support >2 slots in a TDMA BSS the current
design is intended (and tested) for only 2 slots.

Sponsored by:	Intel
2009-01-08 17:12:47 +00:00
gnn
174adf4f1e Add a new program, ether_reflect, which is useful in testing ethernet
devices and switches.
2008-12-23 20:25:04 +00:00
gnn
399c759067 Fix a bug in the man page where we were not showing the correct flags
in the explanation. Several of the flags were -i, since it was a copy/paste
operation.
2008-12-23 20:07:51 +00:00
gnn
0a41f1543c Add the mctest program and description to the README. 2008-12-23 19:46:12 +00:00
bms
adbc89339e Add new tool tionxcl to bring ttys out of exclusive mode when
left by e.g. legacy uucp or tip.
2008-12-18 15:12:04 +00:00
phk
f77e2d29f5 Make it possible to cherry-pick packages out of a directory. 2008-12-16 15:05:52 +00:00
sam
4d749b8bfc bring in diagnostic tools that are useful now that we have hal source code 2008-12-07 19:17:33 +00:00
ganbold
19922f97db This is simple testing program for revision 185647.
It invokes multiple parallel threads and each thread calls vfork()
system call.

Approved by: kib
2008-12-06 13:23:53 +00:00
stefanf
278436b88e Update for 185401, errors now go to stderr. 2008-11-28 18:59:04 +00:00
trasz
f62dc78f46 Add tools-level test for POSIX.1e functionality.
Approved by:	rwatson (mentor)
2008-11-25 18:29:33 +00:00
pjd
cbaf56bf53 This actually works on Linux, I just had wrong directory permission.
Found by:	trasz
2008-11-24 16:33:23 +00:00
pjd
6f10d4552d Include TODO messages even if tests succeeds, so we can detect when something
suddenly started to work.
2008-11-24 16:32:39 +00:00
stefanf
465185b192 Add a test for r185231. 2008-11-23 20:27:03 +00:00
pjd
2d953c4a30 Mark all the places where Linux is not POSIX-compilant. Tested on ext3. 2008-11-23 20:17:17 +00:00
pjd
8c5f55739a fstest for Linux:
- Use -- when needed so Linux getopt(3) won't get confused.
- Follow POSIX more closely.

Submitted by:	Szabolcs Szakacsits <szaka@ntfs-3g.org>
2008-11-23 20:07:00 +00:00
pjd
9b9475924e fstest for Linux:
Automatically detect file system type.
2008-11-23 20:02:14 +00:00
pjd
6b89e95c0f FreeBSD's way of handling rmdir("..") is not POSIX-compilant. 2008-11-23 19:58:26 +00:00
pjd
e20a8f04f0 Shorter version. 2008-11-23 19:57:16 +00:00
pjd
ad301e0dc0 Add support for pathconf(2). 2008-11-23 19:56:40 +00:00
pjd
9367195ae8 Detect operating system automatically. 2008-11-23 19:56:09 +00:00
pjd
7bf77219f3 fstest for Linux:
- Use /dev/urandom, it is more portable.
- Implement todo() function which allows to mark known failures.
2008-11-23 19:50:20 +00:00
pjd
8ab042140f IFp4: Regression tests for FreeBSD/ZFS chflags(2)/lchflags(2). 2008-11-22 13:27:15 +00:00
pjd
bbe899b96e Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:

- Delegated Administration

	Allows regular users to perform ZFS operations, like file system
	creation, snapshot creation, etc.

- L2ARC

	Level 2 cache for ZFS - allows to use additional disks for cache.
	Huge performance improvements mostly for random read of mostly
	static content.

- slog

	Allow to use additional disks for ZFS Intent Log to speed up
	operations like fsync(2).

- vfs.zfs.super_owner

	Allows regular users to perform privileged operations on files stored
	on ZFS file systems owned by him. Very careful with this one.

- chflags(2)

	Not all the flags are supported. This still needs work.

- ZFSBoot

	Support to boot off of ZFS pool. Not finished, AFAIK.

	Submitted by:	dfr

- Snapshot properties

- New failure modes

	Before if write requested failed, system paniced. Now one
	can select from one of three failure modes:
	- panic - panic on write error
	- wait - wait for disk to reappear
	- continue - serve read requests if possible, block write requests

- Refquota, refreservation properties

	Just quota and reservation properties, but don't count space consumed
	by children file systems, clones and snapshots.

- Sparse volumes

	ZVOLs that don't reserve space in the pool.

- External attributes

	Compatible with extattr(2).

- NFSv4-ACLs

	Not sure about the status, might not be complete yet.

	Submitted by:	trasz

- Creation-time properties

- Regression tests for zpool(8) command.

Obtained from:	OpenSolaris
2008-11-17 20:49:29 +00:00
dds
84b8296ef7 Add a test for the "or more" part of the following POSIX specification.
"A function can be preceded by one or more '!' characters, in which
  case the function shall be applied if the addresses do not select
  the pattern space."
2008-11-11 17:10:24 +00:00
trasz
906b63fd78 Make test for write access to the directory being moved a little more
specific.

Approved by:	rwatson (mentor)
2008-11-07 14:46:46 +00:00
trasz
0b784b3317 Improve output when a test fails.
Approved by:	rwatson (mentor)
2008-11-07 14:45:42 +00:00
trasz
5ec338f603 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
dfr
2fb03513fc 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
dcbe57056a o unbreak ani stat display
o improve some labels
2008-10-29 20:19:54 +00:00
sam
09af0f0e33 sync w/ driver updates; this also brings in ani stats 2008-10-27 18:50:46 +00:00
sam
00a664330b add regdomain knob 2008-10-27 18:47:48 +00:00
des
87e3b3e46d #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
f0bd6304a2 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
n_hibma
9dcc9c2cd5 Avoid failing if the directory already exists (when restarting at customize).
MFC after:	2 days
2008-10-09 18:06:28 +00:00
rwatson
b2babfa539 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
rwatson
914c87276b Add IPv6 support to zero-size UDP transmit/receive test. 2008-10-07 14:13:59 +00:00
rwatson
a9a8df42d1 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
rwatson
870d67a11e 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
b416ba242b 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
cb0445a846 - 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
535b586e4a add missing options 2008-09-23 16:15:42 +00:00
sam
8d8eb7dc9c add missing options 2008-09-23 16:11:15 +00:00
bms
4b627377fc * 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
bms
849a6bf2d2 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
9c3d2ffcdf 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
0cc76d7678 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
d151c8281b eliminate hardwired lists; use the media type to autoconfig 2008-09-21 00:26:13 +00:00
antoine
a7c4611926 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
2473c0ee1e o Correct a comment: a test file size is a four pages not three. 2008-09-10 09:32:25 +00:00
simon
f8ec3c9c15 Change space -> tab in printed usage output to make it look consistent. 2008-09-07 14:32:03 +00:00
das
ca999bfaa6 Regression tests for bugs in gdtoa. 2008-09-03 07:35:14 +00:00
thomas
97e4608fa8 Fix typo in comment. 2008-09-02 21:27:19 +00:00
rik
affcc995ea Add simple cd to dvd conversion script. 2008-08-31 22:08:39 +00:00
rwatson
59f71b4d71 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
jkim
15b99cdb14 Connect a forgotten test case to Makefile. 2008-08-29 20:58:01 +00:00
jkim
7d24618f3d Do not pass validatation level since all issues are fixed now. 2008-08-29 20:20:30 +00:00
jkim
4b913d6bb8 Merge local copy of bpf_validate() with bpf_filter.c. 2008-08-29 20:07:02 +00:00
pjd
eb18064487 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
jkim
a85de0848e 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
jkim
1d9644cd19 Move comments to the right places. 2008-08-28 22:41:31 +00:00
jkim
4eb765aaef 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
jkim
b8209dfb17 Fix style consistencies and a comment. 2008-08-28 18:38:55 +00:00
jkim
4e5f663031 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
jkim
c22e2b30b2 Add a test case for uninitialized scratch memory (for JIT compiler). 2008-08-28 16:58:30 +00:00
stefanf
f8e575b9ca Add a test for r182300. 2008-08-27 20:26:34 +00:00
jkim
2efee2eeaa Add a test case for null filter. 2008-08-26 21:54:47 +00:00
jkim
72e5b4d251 Add more test cases for invalid instructions and add comments
about bpf_validate(9) issues.
2008-08-26 19:24:58 +00:00
jkim
12fb66e68a Remove some hacks from regression test since bpf_filter.c builds fine now. 2008-08-26 00:35:04 +00:00
jkim
a70ab99712 Add a trivial bpf filter benchmark. 2008-08-25 23:36:24 +00:00
jkim
7226acfb72 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
jkim
dddb7ff151 Reflect sys/net/bpf_jitter.h changes to regression test. 2008-08-25 21:33:12 +00:00
raj
5524587165 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
jkim
95cf51a304 Add test case for 'divide by 0' with BPF_ALU|BPF_DIV|BPF_X instruction. 2008-08-18 23:05:19 +00:00
jkim
62966b1d9f Fix two test cases on 32-bit architectures. 2008-08-18 21:40:03 +00:00
jkim
2e51cd9be9 Add simple bpf(9) regression tests and test cases. 2008-08-18 19:01:58 +00:00
phk
2c4b93bf04 Accept tty[ud]0 for console device 2008-08-15 08:28:15 +00:00
antoine
044437abb4 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
90dcaccf30 fix syntax 2008-08-09 21:51:57 +00:00
des
c2c1c946ae 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
phk
10a0b4e561 Add late customize hook
Submitted by: 	Patrick M. Hausen
Sat on for far too long:	phk
2008-08-09 09:37:44 +00:00
phk
945ee4f0e9 Add -i option to supress image building.
Submitted by:	keramida
2008-08-09 09:27:54 +00:00
phk
7e44a4aee7 Track /etc/ttys change to uart(4) 2008-08-09 09:27:06 +00:00
das
f97e361aa3 Test that the result is correctly rounded when |y/x| is huge. 2008-08-02 19:21:33 +00:00
sam
e93a37806c use new sysctl to generate a fake radar event 2008-08-02 18:01:58 +00:00
das
0abf439af5 Regression tests for fmtcheck(3).
Obtained from:	NetBSD
2008-08-02 06:03:04 +00:00
scf
e0b5c971c2 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
scf
8b381816e4 Fix whitespace. 2008-08-02 01:38:03 +00:00
sam
c7852b169b 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
das
ed77206d40 Add some tests for acos*(), asin*(), atan*(), and atan2*(). 2008-07-31 22:43:38 +00:00
stefanf
96e2d91df4 Add a regression test for r181017.
Submitted by:	simon
2008-07-30 21:18:52 +00:00
scf
a3f8092a7b style(9) specifies that case statements are not indented. 2008-07-30 03:34:23 +00:00
rwatson
2f0c3f6d28 Remove extra comment that snuck in in last commit. 2008-07-29 18:38:37 +00:00
rwatson
4293351cba 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
41ca50f84b Add files to remove when MK_GNU_CPIO = no 2008-07-28 18:00:45 +00:00
gnn
f158d7c96d 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
das
a47dd1888d 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
das
d36ce0f109 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
jhb
411d068395 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
jhb
ed08bd0d6d Fix compile on 64-bit platforms. 2008-06-26 21:26:34 +00:00
dfr
41cea6d5ca 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
ru
8735fdbd4c 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
rwatson
07ce1984c9 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
das
d8f7f9f2dd Regression test for a recently fixed strtod bug. 2008-06-21 19:28:26 +00:00
dougb
aab693d38c 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
gnn
fff7b55e87 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
rwatson
111bb205cd Remove two netatm-specific test parts.
MFC after:	3 weeks
Spotted by:	bz
2008-05-26 22:41:40 +00:00
bz
6bba9b4244 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
thompsa
a6f8300a4d Flush stdout after each line to make piping to another command easier. 2008-05-19 17:51:00 +00:00
rdivacky
e0d6700d1b Simple testing program for *at family of syscalls.
Approved by:	kib (mentor)
2008-05-18 08:34:04 +00:00
jb
5d0f190f8a Add the DTrace test makefile for the test suite distributed in OpenSolaris. 2008-05-17 02:09:48 +00:00
stefanf
1d02ed2942 Test the expansion of $LINENO. 2008-05-15 19:58:44 +00:00
adrian
f4cf88c408 Add the ability to do all read, all write, or random read/write. 2008-05-15 16:10:55 +00:00
adrian
6c68306921 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
scf
b502b7ceb0 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
fe66958831 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
0a2dc3df49 update for new events 2008-04-30 19:45:32 +00:00
rpaulo
8cd0556b5f Add new directories, scripts and wlanwds. Introduced with vap support. 2008-04-29 22:05:26 +00:00
rpaulo
336a8e615d Add missing 't'.
Approved by:	sam
2008-04-29 22:02:27 +00:00
jeff
33da69dc61 - 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