Commit Graph

1724 Commits

Author SHA1 Message Date
Jilles Tjoelker
f76db14de9 MFC r196607,r198453,r204016,r204017,r204836,r204842,r205105,r205153
Various testcases that work correctly with stable/8 sh.

Note: this creates some gaps in the numbering due to lower-numbered tests
for new functionality which is not or not yet MFC'ed.
2010-03-28 19:34:57 +00:00
Konstantin Belousov
2219384ff7 MFC r205225:
Add missing headers. While there, arrange headers alphabetically.
2010-03-19 10:33:45 +00:00
Konstantin Belousov
b2eaa3b2c2 MFC r205224:
Add missing headers.
2010-03-19 10:28:49 +00:00
Konstantin Belousov
84d7d98fa1 MFC r205148:
Make it compile on LP64 arches.
2010-03-17 09:52:26 +00:00
Ruslan Ermilov
60d2ff2cd9 MFC: r202969: Actualize. 2010-02-15 11:29:27 +00:00
Gavin Atkinson
75cf52103d Merge r202161 from head:
Spell "Hz" correctly wherever it is user-visible.

PR:		bin/142566
Submitted by:	N.J. Mann   njm njm.me.uk
2010-02-05 08:52:51 +00:00
Edward Tomasz Napierala
ca9c0141f2 MFC r201048:
Make tests for ACL preservation by mv(1) and cp(1) more complete
and easier to follow.
2010-01-31 02:25:15 +00:00
Edward Tomasz Napierala
8dc3de711c MFC r197436:
Add cross-filesystem regression tests for ACLs.
2010-01-31 02:23:53 +00:00
Edward Tomasz Napierala
5f16df9407 MFC r197434:
Add ACL fuzzer.  It's not used by the regression tests right now,
but I'd prefert to have it here, so it won't get lost.
2010-01-31 02:22:31 +00:00
Edward Tomasz Napierala
d17e98a732 MFC r196938:
Add regression tests for NFSv4 ACLs and update POSIX.1e tests to the changed
error messages.
2010-01-31 02:20:01 +00:00
Edward Tomasz Napierala
83b5041c81 MFC r196736:
Adapt to the fact that ls(1) correctly prints '+' for symlinks with ACLs now.
2010-01-31 02:18:28 +00:00
Edward Tomasz Napierala
30718ea4eb MFC r196710:
Add regression test for ACLs on device files - mostly to make
sure we don't crash on attempt to set ACL on them.
2010-01-31 02:17:01 +00:00
Antoine Brodin
e2b36efde5 MFC r201145 to stable/8:
(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
  Fix some wrong usages.
  Note: this does not affect generated binaries as this argument is not used.

  PR:		137213
  Submitted by:	Eygene Ryabinkin (initial version)
2010-01-30 12:11:21 +00:00
Brooks Davis
52c240aaf4 MFC r201350:
The devices that supported EVFILT_NETDEV kqueue filters were removed in
  r195175.  Remove all definitions, documentation, and usage.

The change of function signature for vlan_link_state() was not merged to
maintain the ABI.
2010-01-22 19:51:34 +00:00
Jilles Tjoelker
86892d512c MFC r210428: sh: Add a regression test that tries out all arithmetic ops.
The gaps in the numbering sequence cannot really be avoided, as HEAD changes
are not necessarily merged in the same order as they are made (if they are
merged at all).
2010-01-10 16:58:12 +00:00
Jilles Tjoelker
2ffbb2cea1 MFC r198406: wordexp(3): fix some bugs with signals and long outputs
* retry various system calls on EINTR
* retry the rest after a short read (common if there is more than about 1K
  of output)
* block SIGCHLD like system(3) does (note that this does not and cannot
  work fully in threaded programs, they will need to be careful with wait
  functions)

PR:		90580
2009-12-06 22:14:58 +00:00
Alexander Leidinger
c199dd3eab MFC r196511:
- Update config to doxygen 1.5.2 (I use this with 1.5.9).
  - Add linprocfs and linsysfs to the linuxulator dox.
  - Take the generated includes from the .m files from a subdirectory
    instead of putting everything into $(.OBJDIR). This imporves the
    human readbility of the source directory contents a lot, if you do not
    create a separate OBJDIR.
  - Assume UTF-8 encoding for every input file.
  - Strip the source and dest path from the output, we are not interested
    in the absolute location on the machine where the docs are created,
    relative the the root of the FreeBSD source is what interests us.
  - Exclude .svn directories.
  - Switch to alphabetic index.
  - Use one line per INCLUDE_PATH member in the common dox-config.
  - Bump the __FreeBSD__ version to 9. [here in the MFC: to 8]
  - Switch from hardcoded .m files to an run-time generated one. Takes
    a little bit more time to get started with actual work, but at least
    is more future-proof. If you generate dox for all subsystems, the
    time to find all .m files in the source is magnitutes lower than
    producing the docs.
  - Make the *DEST_PATH overidable from the environment. This allows to
    produce the output directly in the docroot of a webserver.
  - Fix the path when telling the user where he can find the API docs.
2009-11-05 08:31:42 +00:00
Jilles Tjoelker
f6d21b6ed0 MFC r196483,r196634:
sh: Fix crash when undefining or redefining a currently executing function

Add a reference count to function definitions.
Memory may leak if a SIGINT arrives in interactive mode at exactly the wrong
time, this will be fixed later by changing SIGINT handling.

PR:		bin/137640
Approved by:	re (kib)
2009-10-11 16:35:12 +00:00
Jilles Tjoelker
33656b91cd MFC r196460
Fix the conformance of poll(2) for sockets after r195423 by
  returning POLLHUP instead of POLLIN for several cases. Now, the
  tools/regression/poll results for FreeBSD are closer to that of the
  Solaris and Linux.

  Also, improve the POSIX conformance by explicitely clearing POLLOUT
  when POLLHUP is reported in pollscan(), making the fix global.

  Submitted by:	bde
  Reviewed by:	rwatson

MFC r196556

  Fix poll() on half-closed sockets, while retaining POLLHUP for fifos.

  This reverts part of r196460, so that sockets only return POLLHUP if both
  directions are closed/error. Fifos get POLLHUP by closing the unused
  direction immediately after creating the sockets.

  The tools/regression/poll/*poll.c tests now pass except for two other
  things:
  - if POLLHUP is returned, POLLIN is always returned as well instead of
    only when there is data left in the buffer to be read
  - fifo old/new reader distinction does not work the way POSIX specs it

  Reviewed by:	kib, bde

MFC r196554

  Add some tests for poll(2)/shutdown(2) interaction.

Approved by:	re (kensmith)
2009-09-01 20:58:41 +00:00
Marko Zec
28444b1ffd MFC r196421:
Bugfix: all requests for creating vnets via vimage -c were always
  reported as failures, even if the actual library / system call
  would succeed, because error message would be reported if the return
  value from jail_setv() call was >= 0, and if not, then if that same
  value was < 0, i.e. always.  The correct behavior is to abort (only)
  if jail_setv() returns < 0.

  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-21 11:17:25 +00:00
Marko Zec
c9482dbb72 MFC r196409:
vimage(8) is a legacy CLI interface for managing jails associated with
  network stack instances, which is provided for compatibility with
  older applications.  This change brings it back to life in a followup
  to the initial conversion of vimage to use the new jail(4)
  userland-kernel API:

  - when creating vimages via "vimage -c", by default turn on a few
  options expected by legacy applications, such as allow operations on
  raw sockets, FS mounts etc, and allow jail-related parameters to be
  optionally configured.

  - introduce the "-m" modifier which allows for configuring jail
  parameters of existing vimages / vnet-jails.

  - make "vimage name command ..." actually work.

  - when reassigning ifnets to vnets using "vimage -i", attempt to rename
  the ifnet as "ethXXX" on arrival in the target vnet.  Several legacy
  applications are known to depend heavily on such behavior.

  - vimage -l lists only jails associated with vnets.  The output is
  sorted using vimage / jail names as keys.

  - vimage -l by default searches only the current level in the jail
  hierarchy.  Recursive listing can be requested via -r switch.

  - vimage -l by default prints only jail names on each line, making
  such output suitable for pipelining to other commands.  More verbose
  output can be obtained via -v switch, and even more jail specific
  information will be displayed if -j switch is turned on.

  - there's no need to build vimage as statically linked, so update the
  Makefile accordingly.

  - update the vimage.8 man page.

  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-20 22:56:29 +00:00
Bjoern A. Zeeb
9c4afd6dbc MFC r196172:
Start respecting WITHOUT_INET6.

  Make regression/priv compile again after the multi-IP jail
  changes.  Note that we are still using the legacy jail(2)
  rather than the jail_set(2)/jail(3) syscall.
  Add an IPv4,  and an IPv6 loopback address in case we compile
  with INET6 enabled.

  Make the priv_vfs_extattr_system compile on amd64 as well using the
  proper length modifier to printf(3) for ssize_t.

  Reviewed by:  rwatson

Approved by:	re (kib)
2009-08-13 09:17:07 +00:00
Konstantin Belousov
5abb7fe2e9 Fix syntax error, makefile comments start with #.
Submitted by:	bde
Approved by:	re (kensmith)
2009-07-25 21:07:56 +00:00
Sam Leffler
2c4e7faeae Update for vaps:
o do not force monitor mode; the wlanX ifnet must be an ahdemo mode vap
o move channel change work before marking ifnet up to avoid churning
  the state machine
o change default ifnet name to "wlan0"

Approved by:	re (kensmith)
2009-07-24 15:31:22 +00:00
Sam Leffler
05917235c0 update for recent mesh additions
Approved by:	re (kib)
2009-07-21 19:25:25 +00:00
Jamie Gritton
7afcbc18b3 Remove the interim vimage containers, struct vimage and struct procg,
and the ioctl-based interface that supported them.

Approved by:	re (kib), bz (mentor)
2009-07-17 14:48:21 +00:00
Konstantin Belousov
5861f96654 Test suite for the poll(2)/select(2) on fifos, pipes and sockets,
and recorded results for several operating systems.

Submitted by:	bde
Approved by:	re (kensmith)
2009-07-12 12:50:43 +00:00
Rui Paulo
59aa14a91d Implementation of the upcoming Wireless Mesh standard, 802.11s, on the
net80211 wireless stack. This work is based on the March 2009 D3.0 draft
standard. This standard is expected to become final next year.
This includes two main net80211 modules, ieee80211_mesh.c
which deals with peer link management, link metric calculation,
routing table control and mesh configuration and ieee80211_hwmp.c
which deals with the actually routing process on the mesh network.
HWMP is the mandatory routing protocol on by the mesh standard, but
others, such as RA-OLSR, can be implemented.

Authentication and encryption are not implemented.

There are several scripts under tools/tools/net80211/scripts that can be
used to test different mesh network topologies and they also teach you
how to setup a mesh vap (for the impatient: ifconfig wlan0 create
wlandev ... wlanmode mesh).

A new build option is available: IEEE80211_SUPPORT_MESH and it's enabled
by default on GENERIC kernels for i386, amd64, sparc64 and pc98.

Drivers that support mesh networks right now are: ath, ral and mwl.

More information at: http://wiki.freebsd.org/WifiMesh

Please note that this work is experimental. Also, please note that
bridging a mesh vap with another network interface is not yet supported.

Many thanks to the FreeBSD Foundation for sponsoring this project and to
Sam Leffler for his support.
Also, I would like to thank Gateworks Corporation for sending me a
Cambria board which was used during the development of this project.

Reviewed by:	sam
Approved by:	re (kensmith)
Obtained from:	projects/mesh11s
2009-07-11 15:02:45 +00:00
Brian Somers
58a654f664 Fix some uninitialise variables.
PR:		136383
Submitted by:	Ulrich Spoerlein - uqs at spoerlein dot net
Approved by:	re (kib)
MFC after:	3 weeks
2009-07-08 10:16:16 +00:00
Edward Tomasz Napierala
340263c992 Fix fpathconf(3) on fifos, in effect making ls(1) properly
display '+' on them.  Taken from kern/125613, with cosmetic
changes.

PR:		kern/125613
Submitted by:	Jaakko Heinonen <jh at saunalahti dot fi>
Approved by:	re (kib)
2009-07-02 20:05:21 +00:00
Jilles Tjoelker
886bb28357 Add some tests for r194975 and r194977.
Approved by:	ed (mentor) (implicit)
2009-06-25 17:36:08 +00:00
Nick Hibma
6c001dbfbf - Make pprint print through fd 3, so it can be used in customisation
functions to print something to the screen.
- Prefix each line with the running time (bikeshed).

Submitted by:	Rick van der Zwet (Wireless Leiden)
2009-06-25 13:15:20 +00:00
Jilles Tjoelker
30268dfa3f Designate special builtins as such in command -V and type.
Also document various properties of special builtins that we implement.

Approved by:	ed (mentor) (implicit)
2009-06-24 22:04:04 +00:00
Jilles Tjoelker
97ab37f704 Add test for r190698.
Submitted by:	Eygene Ryabinkin
Approved by:	ed (mentor) (implicit)
2009-06-24 20:22:54 +00:00
Sam Leffler
4a71a9f6bc add a link named athpeek since my fingers keep typing it 2009-06-24 18:24:37 +00:00
Sam Leffler
12a39a13db read back the written value and display 2009-06-24 18:24:20 +00:00
Jamie Gritton
29d08a6da6 Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by:	bz (mentor)
2009-06-24 18:19:55 +00:00
Jilles Tjoelker
e2451bddff Add tests for r194774.
Approved by:	ed (mentor) (implicit)
2009-06-23 22:03:56 +00:00
Remko Lodder
556de497fa Add architecture support for TinyBSD
PR:		135301
Submitted by:	Olivier Cochard-Labbe <olivier at cochard dot me>
Reviewed by:	Jean Milanez Melo <jmelo at freebsdbrasil dot com dot br> (maintainer)
Approved by:	imp (mentor, implicit)
MFC after:	1 week
2009-06-20 20:35:50 +00:00
Robert Watson
046a577d69 Up the scale of the SPX loopback check a bit: use much larger data sizes
so that we need to do segmentation.
2009-06-20 18:13:20 +00:00
Jilles Tjoelker
57c21ee73a Add tests for r194406 and r194516.
Approved by:	ed (mentor)
2009-06-19 22:15:59 +00:00
Nick Hibma
b94b189aa5 - Don't hard code _.disk.full. Use the variable.
- _.bk should be created in MAKEOBJDIRPREFIX as well
- Remove a misplaced and unnecessary message.
2009-06-18 13:56:10 +00:00
Nick Hibma
6a1364c774 Reverse some stuff I accidentally committed in the previous commit:
- creation of sparse files to speed up the build process. This was
  discussed with phk 2 years ago and he disagreed with this change.
- handling of negative data partition sizes.

Can I have the ... green pointy hat, please?
2009-06-18 11:35:29 +00:00
Nick Hibma
95d876623e Allow building world into a separate dir (for reuse in multiple images):
- buildworld and buildkernel are built into MAKEOBJDIRPREFIX
- installworld and installkernel are performed on NANO_OBJ.

No change of functionality if MAKEOBJDIRPREFIX is not set. If it is sea,t
clean_world deletes NANO_OBJ instead of NANO_WORLDDIR. By starting nanobsd.sh
with the -b option the existing world can be reused to build a new world
reducing time and disk space considerably.

While there:
- Fix two cases where (in comments) MAKEOBJDIRPREFIX should have been
  NANO_DISKIMGDIR.
- Simplify an 'if (not wrong); then true; else action; fi' into
  'if wrong; then action; fi'. 'if ! false; then echo hello; fi' produces hello.

Note: Make sure you use NANO_OBJ were you use MAKEOBJDIRPREFIX now in your
nanobsd.conf files if you want to split out.
2009-06-18 10:39:08 +00:00
Sam Leffler
d1a3f05d54 update usb config; the old stack is gone 2009-06-17 17:59:36 +00:00
Edwin Groothuis
8386483cd0 When copy+paste goes wrong... Remove duplicate "expr".
Submitted by:	danfe@
2009-06-17 06:25:45 +00:00
Edwin Groothuis
97cd33e9a2 iiin -> in
Submitted by:   "N.J. Mann" <njm@njm.me.uk>
2009-06-16 22:45:33 +00:00
Edwin Groothuis
dd7e4d21cc Fix NanoBSD when the data partition size is defined as a negative
number.

	It is possible to ask nanobsd.sh to create a 'data' partition,
	separate from the system or configuration partitions, and
	furthermore, by specifying a negative value for its size
	to request that it use all space unused by those partitions
	for its own size.

	Because the two lines of code that calculate how much space
	is available for this data partition are written in perl-like
	syntax, the awk code that does the processing performs the
	calculation incorrectly.
	[note - this was already fixed by r174936]

	Furthermore, a comparison later down fails to newfs the
	partition when the size is negative.

PR:		misc/127759
Submitted by:	Cyrus Rahman <crahman@gmail.com>
MFC after:	1 week
2009-06-16 12:33:38 +00:00
Edwin Groothuis
4ab0499570 Support for 64 Mb Kodak flash device.
PR:		misc/115025
Submitted by:	Michael W Lucas <mwlucas@freebsd.org>
MFC after:	1 week
2009-06-16 12:09:12 +00:00
Edwin Groothuis
a6f51121b8 Add support for 256MB Hitachi CF card and 256MB Silicon Systems CF card
This patch against RELENG_6 adds two more entries to
	src/tools/tools/nanobsd/FlashDevice.sub - one for a 256MB
	Hitachi CF card and one for a 256MB Silicon Systems CF card.

	Both entries have been verified to work with a Soekris net4801.

PR:		kern/101228
Submitted by:	Henrik Brix Andersen <henrik@brixandersen.dk>
MFC after:	1 week
2009-06-16 12:05:04 +00:00