Commit graph

3139 commits

Author SHA1 Message Date
John Baldwin c387a450ac Add an -s option that specifies a path to an alternate etcupdate.sh script
to test.  This allows a non-installed version of the script to be tested
more easily.
2013-11-12 19:15:06 +00:00
Glen Barber 0fa8a6f081 Silence more 'make {check,delete-old{,libs}}' output if $DESTDIR/usr/tests
does not exist.

Sponsored by:	The FreeBSD Foundation
2013-11-12 00:25:07 +00:00
Glen Barber 1067ef5355 Document WITH_TESTS src.conf(5) option.
Sponsored by:	The FreeBSD Foundation
2013-11-11 21:13:14 +00:00
Glen Barber d1c1e5f545 Remove WITH_LIBICONV_COMPAT file to chase after r257583. 2013-11-11 21:02:26 +00:00
Glen Barber 6785aaf203 Silence bmake(1) errors if TEST_DIRS evaluation is empty. 2013-11-11 03:12:43 +00:00
Jilles Tjoelker 5d4d10e3e5 sh: Properly quote alias output from command -v.
An alias should be printed by command -v as a command line; therefore, make
the alias definition suitable for re-input to the shell.
2013-11-10 23:00:39 +00:00
Jilles Tjoelker 309ad20076 sh: Add a test case for would-be assignments that are not due to quoting. 2013-11-10 18:46:59 +00:00
Hiren Panchasara fc6eb28bab Minor spelling correction. 2013-11-10 02:43:09 +00:00
Julio Merino 14de84e74a Handle the removal of the test suite when WITHOUT_TESTS=yes.
Add all files from /usr/tests to the obsoleted files list when the
build of the tests is disabled via the WITHOUT_TESTS knob.  Do this
automatically so that we do not have to suffer the pain of maintaining
such list by hand.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
2013-11-08 14:26:52 +00:00
Julio Merino e01d128a42 Subsume the functionality of MK_ATF into MK_TESTS.
There is no reason to keep the two knobs separate: if tests are
enabled, the ATF libraries are required; and if tests are disabled,
the ATF libraries are not necessary.  Keeping the two just serves
to complicate the build.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
2013-11-08 14:24:47 +00:00
Sergey Kandaurov bd2a9863d8 Clean up -Wtautological-compare -Wformat warnings. 2013-11-05 14:20:39 +00:00
Peter Wemm 912ce912e1 Remove the WITH_LIBICONV_COMPAT hack that seems to do more harm than
good.  This caused libc to spoof the ports libiconv namespace and
provide a colliding libiconv.so.3 to fool rtld.  This should have
been removed some time ago.
2013-11-03 19:04:57 +00:00
Ed Schouten 23c80c6928 Remove utxrm(8). This command has been superseded by 'utx rm'. 2013-11-03 16:43:52 +00:00
Adrian Chadd 87a1f43c79 Fix this build for clang. 2013-11-01 22:38:58 +00:00
Luigi Rizzo ce3ee1e7c4 update to the latest netmap snapshot.
This includes the following:
- use separate memory regions for VALE ports
- locking fixes
- some simplifications in the NIC-specific routines
- performance improvements for the VALE switch
- some new features in the pkt-gen test program
- documentation updates

There are small API changes that require programs to be recompiled
(NETMAP_API has been bumped so you will detect old binaries at runtime).

In particular:
- struct netmap_slot now is 16 bytes to support an extra pointer,
  which may save one data copy when using VALE ports or VMs;
- the struct netmap_if has two extra fields;

MFC after:	3 days
2013-11-01 21:21:14 +00:00
Baptiste Daroussin c92d635ad3 After around 20 years of duty it is time for pkg_install to retire 2013-10-31 13:00:35 +00:00
Baptiste Daroussin 8cf0e32801 Adjust the manpage category for the pkg bootstrap 2013-10-31 12:05:37 +00:00
Pawel Jakub Dawidek b19d096363 Make lpathconf(2) support optional to make it compile again on Linux.
Submitted by:	Hashem Nasarat @riseup.net
2013-10-31 11:38:25 +00:00
Bryan Drewery 0edda45377 Add forgotten pkg.7
Approved by:	bapt
MFC after:	2 days
X-MFC-with:	r257378
2013-10-30 22:03:51 +00:00
Jilles Tjoelker efd1946c35 sh: Allow trapping SIGINT/SIGQUIT after ignore because of '&'.
If job control is not enabled, background jobs started with  ... &  ignore
SIGINT and SIGQUIT so that they are not affected by such signals that are
intended for the foreground job. However, this should not prevent
reassigning a different action for these signals (as if the shell invocation
inherited these signal actions from its parent).

Austin group issue #751

Example:
  { trap - INT; exec sleep 10; } & wait
A Ctrl+C should terminate the sleep command.
2013-10-30 21:36:15 +00:00
Edward Tomasz Napierala d70f070a0b Revert r257385; was testing a shell script to automatically append the proper
"Sponsored by" and failed at error handling.

Sponsored by:	The FreeBSD Foundation
2013-10-30 14:48:46 +00:00
Edward Tomasz Napierala ea6dd88f17 Sponsored by: The FreeBSD Foundation 2013-10-30 14:45:02 +00:00
Brooks Davis b9cd6b0a3c Switch the default mtree to nmtree our new NetBSD derived mtree.
Exp-run by:     bdrewery
MFC after:      3 days
Sponsored by:	DARPA/AFRL
2013-10-25 22:45:18 +00:00
Rui Paulo 4ddf97d441 Add missing WITHOUT_TESTS file.
Submitted by:	Julio Merio jmmv google.com
Reviewed by:	sjg
MFC after:	2 weeks
2013-10-25 05:27:36 +00:00
Brooks Davis cb8dd274e0 MFP4: 1187103, 222076, 222057, 222051, 221799
Add atsectl, a simple utility to read and update MAC addresses stored in
the default flash location on Altera DE4 boards.  Typically used once
when setting up a board so leaving in tools rather than inflicting on
all users.

To build with world add LOCAL_DIRS=tools/tools/atsectl to the make
command line.

MFC after:	3 days
Sponsored by:	DARPA/AFRL
2013-10-22 22:17:48 +00:00
Andrey Zonov 2b142c0f12 Add lot of missed files and dirs 2013-10-17 22:00:35 +00:00
Andrey Zonov 7306b85329 Remove atf headers which never existed
Reviewed by:	marcel
2013-10-17 20:14:47 +00:00
Andrey Zonov 41b65e694b Cleanup clang section 2013-10-17 07:40:21 +00:00
Andrey Zonov 7855835b3b wlconfig exists only on i386 2013-10-17 05:20:40 +00:00
Andrey Zonov 5329f4d346 Remove files which are in ObsoleteFiles.inc 2013-10-17 04:51:28 +00:00
Andrey Zonov fca60728d3 Remove duplicates in ipfilter and kerberos sections 2013-10-17 02:02:29 +00:00
Bryan Drewery e3ededfa24 Rename libbsdyml to libyaml, make private, and bump
SHLIB_MAJOR to 1.0

Suggested by:	des
Approved by:	bapt
MFC after:	1 week
2013-10-14 18:31:15 +00:00
Rui Paulo ec0e2ac611 Remove most of the ATF tools and the _atf user.
This is necessary because ATF is deprecated and it will be replaced by Kyua.

Submitted by:	jmmv@netbsd.org
Reviewed by:	Garrett Cooper
Approved by:	re
2013-10-12 06:06:53 +00:00
Glen Barber c9fc60beee Revert r256095, r256120 (partial), r256121:
r256095:
 - Add gnu/usr.bin/rcs back to the base system.

r256120:
 - Add WITHOUT_RCS back to src.conf.5.

r256121:
 - Remove UPDATING entry regarding gnu/usr.bin/rcs removal.

Requested by:	many
Approved by:	re (marius)
Discussed with:	core
2013-10-09 17:07:20 +00:00
John-Mark Gurney 44f01c419d don't assert on bad args, instead return an error..
Since so many programs don't check return value, always NUL terminate
the buf...

fix rounding when using base 1024 (the bug that started it all)...

add a set of test cases so we can make sure that things don't break
in the future...

Thanks to Clifton Royston for testing and the test program...

Approved by:	re (hrs, glebius)
MFC after:	1 week
2013-10-07 22:22:57 +00:00
Eitan Adler 258c9eb906 Good bye RCS. You will be missed.
(devel/rcs and devel/rcs57 are available as alternatives)

Approved by:	core
Approved by:	re (hrs)
2013-10-07 02:23:00 +00:00
Ed Maste 2cc0389fdc Remove long-unused GNU ar and ranlib
The libarchive-based replacements have been used since 2009; the GNU
ones were kept to support source upgrades from FreeBSD 6.

Approved by:	re@ (delphij)
2013-10-01 17:40:56 +00:00
Dag-Erling Smørgrav 69c469c9d7 Have makeman always use the mk files from the source tree it's operating
on rather than those from the installed system.

Approved by:	re (delphij)
2013-10-01 07:22:04 +00:00
Dag-Erling Smørgrav 56b72efe82 Remove BIND.
Approved by:	re (gjb)
2013-09-30 17:23:45 +00:00
Dag-Erling Smørgrav 278bc67bbc Yet more BIND files that weren't listed in OptionalObsoleteFiles.
Approved by:	re (blanket)
2013-09-29 14:06:19 +00:00
Dag-Erling Smørgrav 4a09ed3079 Remove duplicate entry for the host(1) man page.
Approved by:	re (blanket)
2013-09-27 15:22:08 +00:00
Dag-Erling Smørgrav b4af3bcb1a Additional BIND files.
Submitted by:	bdrewery
Approved by:	re (blanket)
2013-09-25 20:06:01 +00:00
Dag-Erling Smørgrav 70aeafb4fc Flip the switch: disable BIND and enable LDNS_UTILS.
Approved by:	re (blanket)
2013-09-24 14:33:31 +00:00
Dag-Erling Smørgrav 49cede74ee Add a setup script for unbound(8) called local-unbound-setup. It
generates a configuration suitable for running unbound as a caching
forwarding resolver, and configures resolvconf(8) to update unbound's
list of forwarders in addition to /etc/resolv.conf.  The initial list
is taken from the existing resolv.conf, which is rewritten to point to
localhost.  Alternatively, a list of forwarders can be provided on the
command line.

To assist this script, add an rc.subr command called "enabled" which
does nothing except return 0 if the service is enabled and 1 if it is
not, without going through the usual checks.  We should consider doing
the same for "status", which is currently pointless.

Add an rc script for unbound, called local_unbound.  If there is no
configuration file, the rc script runs local-unbound-setup to generate
one.

Note that these scripts place the unbound configuration files in
/var/unbound rather than /etc/unbound.  This is necessary so that
unbound can reload its configuration while chrooted.  We should
probably provide symlinks in /etc.

Approved by:	re (blanket)
2013-09-23 04:36:51 +00:00
Dag-Erling Smørgrav 7b07722f6c Remove drill(1) if MK_LDNS_UTILS is false.
Remove host(1) if both MK_BIND and MK_LDNS_UTILS are false.

Approved by:	re (blanket)
2013-09-22 20:32:28 +00:00
Ed Maste e8f1392d95 Add LLDB bmake infrastructure
This connects LLDB to the build, but it is disabled by default.  Add
WITH_LLDB= to src.conf to build it.

Note that LLDB requires a C++11 compiler so is disabled on platforms
using GCC.

Approved by:	re (gjb)
Sponsored by:	DARPA, AFRL
2013-09-20 01:52:02 +00:00
Poul-Henning Kamp dcc756789c Don't attempt to build ports with missing dependencies.
Approved by:	re (gjb)
2013-09-17 15:19:26 +00:00
Dag-Erling Smørgrav 8f8790cdf4 Build and install the Unbound caching DNS resolver daemon.
Approved by:	re (blanket)
2013-09-15 14:51:23 +00:00
Dag-Erling Smørgrav 7b57a909be Tweak wording.
Approved by:	re (blanket)
2013-09-15 13:11:13 +00:00
Dag-Erling Smørgrav 9a0ec541e2 Complete the OPENSSH and LDNS sections.
Approved by:	re (blanket)
2013-09-15 13:07:30 +00:00
Ed Schouten 9f00530da6 Properly remove c++filt.
The c++filt binary is only installed if ${MK_GCC} == yes && ${MK_CXX} ==
yes. This means that it should be removed if ${MK_GCC} == no ||
${MK_CXX} == no. In its current form, it actually uses a conjunction
instead of a disjunction.

As there is already a separate block for ${MK_CXX} == no listing
c++filt, simply remove the conditional entirely.

Approved by:	re (gjb)
2013-09-14 22:09:10 +00:00
Edward Tomasz Napierala 009ea47eb2 Bring in the new iSCSI target and initiator.
Reviewed by:	ken (parts)
Approved by:	re (delphij)
Sponsored by:	FreeBSD Foundation
2013-09-14 15:29:06 +00:00
Hiren Panchasara 9a01d0a5b4 We are exceeding default limit (256) of bracket nesting and clang does not like
it. We should probably fix the code but appeasing clang with this fix for now.
gcc does not have such limit.

Reviewed by:	jmg
Approved by:	re (hrs), sbruno (mentor, implicit)
2013-09-12 02:31:32 +00:00
Dag-Erling Smørgrav 0d410def34 Clean up the Kerberos build by turning libheimipcc and libheimipcs into
private shared libraries, instead of hacked-together archives of PIC
objects.  This makes it possible to build a static libkrb5 that works.

Reviewed by:	stas
Approved by:	re (gjb)
2013-09-10 18:40:43 +00:00
Dag-Erling Smørgrav be460ad56d Make this more deterministic by sorting the libraries before processing
them and ensuring that we always use the samme collation rules.

Approved by:	re (gjb)
2013-09-10 18:34:38 +00:00
Ed Maste 50185946a4 Add a sendfile regression test for transmit length > file size.
This test identified the issue fixed in FreeBSD-SA-13:11.sendfile.

Sponsored by:	The FreeBSD Foundation
Approved by:	re (glebius)
2013-09-10 13:51:19 +00:00
Antoine Brodin 655f887f92 Adjust optional obsolete files with new MK_GNUCXX 2013-09-07 19:04:28 +00:00
Antoine Brodin 3d8a28c36d Do not try to remove directories that are part of BSD.include.dist 2013-09-07 11:02:38 +00:00
Gleb Smirnoff 8031489c7a Add more leftovers from gcc. 2013-09-07 09:45:43 +00:00
Niclas Zeising 1ff238b888 Add WITH_GCC alongside WITHOUT_GCC.
Remove the comment from WITHOUT_GCC about this not working without an
alternate toolchain, we have clang now.
2013-09-06 20:49:48 +00:00
David Chisnall a5bfe4486c Don't delete c++filt when doing a make delete-old if GCC is not built but
C++ is.
2013-09-06 20:46:07 +00:00
David Chisnall 52b42bace1 On platforms where clang is the default compiler, don't build gcc or libstdc++.
To enable them, set WITH_GCC and WITH_GNUCXX in src.conf.
Make clang default to using libc++ on FreeBSD 10.
Bumped __FreeBSD_version for the change.

GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build
(or, at least, hard-codes the use of gcc into its build).

Thanks to everyone who helped make the ports tree ready for this (and bapt
for coordinating them all).  Also to imp for reviewing this and working on the
forward-porting of the changes in our gcc so that we're getting to a much
better place with regard to external toolchains.

Sorry to all of the people who helped who I forgot to mention by name.

Reviewed by:	bapt, imp, dim, ...
2013-09-06 20:08:03 +00:00
Jilles Tjoelker ef70de180c libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).
Austin Group issue #411 requires 'e' to be accepted before and after 'x',
and encourages accepting the characters in any order, except the initial
'r', 'w' or 'a'.

Given that glibc accepts the characters after r/w/a in any order and that
diagnosing this problem may be hard, change our libc to behave that way as
well.
2013-09-06 13:47:16 +00:00
Jilles Tjoelker 366f0c9f45 libc/stdio: Run mkostemp test using prove. 2013-09-06 12:59:48 +00:00
Jilles Tjoelker e32a0090d8 libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.
A *.t file should provide Test Anything Protocol output so that it can be
run using the Perl "prove" tool.
2013-09-06 12:56:49 +00:00
Jilles Tjoelker 2935c4cc5e sh: Make return return from the closest function or dot script.
Formerly, return always returned from a function if it was called from a
function, even if there was a closer dot script. This was for compatibility
with the Bourne shell which only allowed returning from functions.

Other modern shells and POSIX return from the function or the dot script,
whichever is closest.

Git 1.8.4's rebase --continue depends on the POSIX behaviour.

Reported by:	Christoph Mallon, avg
2013-09-04 22:10:16 +00:00
Ian Lepore dbcdf3225a Fix a compiler warning about signed vs unsigned compare. 2013-09-01 14:06:57 +00:00
Jilles Tjoelker 65519ccb4d sh: Recognize "--" as end of options in type builtin.
This implementation makes minimal changes: command names starting with "-"
(other than "--") can still be queried normally.
2013-08-30 12:09:59 +00:00
Andreas Tobler e9fb2ea069 Remove GNU_PATCH leftover. 2013-08-29 11:40:45 +00:00
Pedro F. Giffuni 4b97b38825 Drop build option switch for the older GNU patch.
As promised, drop the option to make the older GNU patch
the default.

GNU patch is still being built but something drastic may
happen to it to it before Release.
2013-08-29 00:38:24 +00:00
Devin Teske a5aa00fbae Formally remove WITH_BSDCONFIG build option and re-generate src.conf.5
NOTE: Should have been inline with revisions 252862 and 254958.
2013-08-27 16:30:50 +00:00
Antoine Brodin e434cacb66 Add more obsolete files. 2013-08-26 17:21:40 +00:00
Antoine Brodin 8f4c73b41f Document WITHOUT_ICONV, WITH_LIBICONV_COMPAT and WITH_USB_GADGET_EXAMPLES 2013-08-26 17:15:56 +00:00
Jilles Tjoelker ffeed88842 Fix fcntl F_GETFL F_SETFL for files opened execute-only (O_EXEC).
The FFLAGS and OFLAGS now work correctly also for files opened with O_EXEC.
Except possibly fuse, the other users pass values without O_EXEC set. fuse
appears to assume O_EXEC is handled correctly.

Although F_SETFL may not be commonly used for execute-only file descriptors,
F_GETFL may be useful to find the access mode.
2013-08-25 21:52:04 +00:00
Jean-Sébastien Pédron 0adf4921fb drm/radeon: Import the Radeon KMS driver
This driver is based on Linux 3.8 and a previous effort by kan@.

More informations about this project can be found on the FreeBSD wiki:
    https://wiki.freebsd.org/AMD_GPU

The driver is split into:

  sys/dev/drm2:
    The driver sources.

  sys/modules/drm2/radeonkmw:
    The driver main kernel module's Makefile.

  sys/modules/drm2/radeonkmsfw:
    All firmware kernel module Makefiles. There's one directory and one
    Makefile for each firmware.

  sys/contrib/dev/drm2/radeonkmsfw:
    All firmware binary sources.

  tools/tools/drm/radeon
    Tools to update firmwares or regenerate some headers.

Merging the driver to FreeBSD 9.x may be possible but not a priority for
now.

Help from:	kib@, kan@
Tested by:	avg@, kwm@, ray@,
		Alexander Yerenkow <yerenkow@gmail.com>,
		Anders Bolt-Evensen <andersbo87@me.com>,
		Denis Djubajlo <stdedjub@googlemail.com>,
		J.R. Oldroyd <fbsd@opal.com>,
		Mikaël Urankar <mikael.urankar@gmail.com>,
		Pierre-Emmanuel Pédron <pepcitron@gmail.com>,
		Sam Fourman Jr. <sfourman@gmail.com>,
		Wade <wade-is-great@live.com>,
		(probably other I forgot...)
HW donations:	kyzh, Yakaz
2013-08-25 19:37:15 +00:00
Jean-Sébastien Pédron a435cf5cd5 drm: Update drm_pciids.h based on Linux 3.8
This header can be easily updated using the new "gen-drm_pciids" script,
available in tools/tools/drm. The script uses the Linux' drm_pciids.h
header for new IDs, the FreeBSD's one because we add the name of the
device to each IDs, and the PCI IDs database (misc/pciids port) to fill
this name automatically for new IDS.

To call the script:
  tools/tools/drm/gen-drm_pciids					\
    /path/to/linux/drm_pciids.h						\
    /path/to/freebsd/drm_pciids.h					\
    /path/to/pciids/pci.ids
2013-08-25 12:20:57 +00:00
Jilles Tjoelker 71828da5ff sh: Recognize "--" as end of options in alias builtin.
Aliases starting with "-" (which are non-POSIX) will need to be preceded by
an alias not starting with "-" or the newly added "--".
2013-08-25 11:42:53 +00:00
Jilles Tjoelker 3cfb11c41a sh: Disallow empty simple commands.
As per POSIX, a simple command must have at least one redirection,
assignment word or command word.

These occured in rare cases such as  eval "f()" .

The extension of allowing no commands inside { }, if, while, for, etc.
remains.
2013-08-25 10:57:48 +00:00
Jilles Tjoelker 7e6e930d1e sh: Reject ++ and -- in arithmetic.
POSIX does not require ++ and -- in arithmetic. It is probably more useful
to reject them than to treat ++x and --x as x silently.

Note that the behaviour of increment and decrement can be obtained via
(x+=1), ((x+=1)-1), (x-=1) and ((x-=1)+1).

PR:		bin/176444
2013-08-24 20:06:00 +00:00
Konstantin Belousov 7291e2a320 Add simple test for the read/write/lseek on posix shm filedescriptor.
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2013-08-21 17:47:11 +00:00
Bjoern A. Zeeb 89ee862616 Catch up with various changes to if_data and make this compile again
on HEAD.  Seems to be one of the the only tools giving us access to
ifi_baudrate and ifi_baudrate_pf values.

MFC after:	3 days
2013-08-20 14:37:06 +00:00
Jilles Tjoelker f0ef49bbf4 sh: Recognize "--" as end of options in bg/fg/jobid builtins. 2013-08-16 13:56:43 +00:00
Jilles Tjoelker 4fe1afd789 sh: Add test for the non-standard jobid builtin. 2013-08-16 13:48:11 +00:00
Jilles Tjoelker fcaac274c0 Add tests for dup3(). 2013-08-16 13:16:55 +00:00
Jilles Tjoelker 056fd329b9 sh: Recognize "--" as end of options in local builtin. 2013-08-14 21:59:48 +00:00
Jilles Tjoelker adc2e8dfb4 sh: Allow a lone redirection before '|', ';;' or ';&'.
Example: </dev/null | :

PR:		181240
MFC after:	1 week
2013-08-14 19:34:13 +00:00
Peter Wemm 0ff204bbd1 The iconv in libc did two things - implement the standard APIs, the GNU
extensions and also tried to be link time compatible with ports libiconv.
This splits that functionality and enables the parts that shouldn't
interfere with the port by default.

WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc.
WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker
symbols and even a stub libiconv.so.3 that are good enough to be able
to 'pkg delete -f libiconv' on a running system and reasonably expect it
to work.

I have tortured many machines over the last few days to try and reduce
the possibilities of foot-shooting as much as I can.  I've successfully
recompiled to enable and disable the libiconv_compat modes, ports that use
libiconv alongside system iconv etc.  If you don't enable the
WITH_LIBICONV_COMPAT switch, they don't share symbol space.

This is an extension of behavior on other system.  iconv(3) is a standard
libc interface and libiconv port expects to be able to run alongside it on
systems that have it.

Bumped osreldate.
2013-08-13 07:15:01 +00:00
Hans Petter Selasky f7b25aedae Fix some signed comparison compile warnings. 2013-08-12 09:15:33 +00:00
Jilles Tjoelker 88dae73d36 fnmatch(): Add test for r254091 (pattern with single backslash).
This test cannot be converted to an sh(1) test because the syntax would be
invalid.

PR:		181129
MFC after:	1 week
2013-08-11 21:54:20 +00:00
Hans Petter Selasky 8030839bd2 Initial commit of my USB test code which can exercise connected USB
devices and the FreeBSD USB stack itself. This program can be used to
test compliance against well established usb.org standards, also
called chapter-9 tests. The host platform can act as either USB device
or USB host depending on the available hardware. The basic USB
communication happens through FreeBSD's own libusb v2, and some
sysctls are also used to invoke specific error conditions. This test
program can be used to verify correct operation of external USB
harddisks under heavy load and various other conditions. The software
is driven via a simple command line interface. Main supported USB host
classes are "USB mass storage" and "USB modems".
2013-08-09 20:08:42 +00:00
Jilles Tjoelker 65ba8dff5f Add mkostemp() and mkostemps().
These are like mkstemp() and mkstemps() but allow passing open(2) flags like
O_CLOEXEC.
2013-08-09 17:24:23 +00:00
David E. O'Brien 5711939b63 * Add random_adaptors.[ch] which is basically a store of random_adaptor's.
random_adaptor is basically an adapter that plugs in to random(4).
  random_adaptor can only be plugged in to random(4) very early in bootup.
  Unplugging random_adaptor from random(4) is not supported, and is probably a
  bad idea anyway, due to potential loss of entropy pools.
  We currently have 3 random_adaptors:
  + yarrow
  + rdrand (ivy.c)
  + nehemeiah

* Remove platform dependent logic from probe.c, and move it into
  corresponding registration routines of each random_adaptor provider.
  probe.c doesn't do anything other than picking a specific random_adaptor
  from a list of registered ones.

* If the kernel doesn't have any random_adaptor adapters present then the
  creation of /dev/random is postponed until next random_adaptor is kldload'ed.

* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a
  system wide one.

Submitted by: arthurmesh@gmail.com, obrien
Obtained from: Juniper Networks
Reviewed by: so (des)
2013-08-09 15:31:50 +00:00
David E. O'Brien 26da3555ff Improve the sysctl symbol extraction from the kernel so that it find more
(all?) sysctl's.  Previously some where missed, depending on how they were
defined.
2013-08-07 20:35:26 +00:00
Sean Bruno 8471c7bd90 Adjust make knobs to know that WITH_ICONV installs a /usr/bin/iconv
Remove it if the knob isn't tweaked.  Certain ports seem to think that
if /usr/bin/iconv exists, then libc has built in libiconv things and will
blow up pretty nicely when built.

Reviewed by:	gjb@
MFC after:	2 weeks
2013-08-06 21:30:37 +00:00
Andrey V. Elsukov 0689b6d106 Fix formatting warning.
MFC after:	1 week
2013-08-06 10:35:05 +00:00
Navdeep Parhar 3ce4b127dc Teach cxgbetool to display T5 congestion manager context. 2013-08-01 22:48:17 +00:00
David E. O'Brien 0e6a0799a9 Back out r253779 & r253786. 2013-07-31 17:21:18 +00:00
David E. O'Brien 99ff83da74 Decouple yarrow from random(4) device.
* Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option.
  The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow.

* random(4) device doesn't really depend on rijndael-*.  Yarrow, however, does.

* Add random_adaptors.[ch] which is basically a store of random_adaptor's.
  random_adaptor is basically an adapter that plugs in to random(4).
  random_adaptor can only be plugged in to random(4) very early in bootup.
  Unplugging random_adaptor from random(4) is not supported, and is probably a
  bad idea anyway, due to potential loss of entropy pools.
  We currently have 3 random_adaptors:
  + yarrow
  + rdrand (ivy.c)
  + nehemeiah

* Remove platform dependent logic from probe.c, and move it into
  corresponding registration routines of each random_adaptor provider.
  probe.c doesn't do anything other than picking a specific random_adaptor
  from a list of registered ones.

* If the kernel doesn't have any random_adaptor adapters present then the
  creation of /dev/random is postponed until next random_adaptor is kldload'ed.

* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a
  system wide one.

Submitted by: arthurmesh@gmail.com, obrien
Obtained from: Juniper Networks
Reviewed by: obrien
2013-07-29 20:26:27 +00:00
Andrey V. Elsukov a87be193b3 Include stdint.h to fix build.
Pointed by:	Olivier Cochard-Labbé
2013-07-29 12:49:32 +00:00
Andriy Gapon a29cc9a34b Revert r253748,253749
This WIP should not have been committed yet.

Pointyhat to:	avg
2013-07-28 18:44:17 +00:00
Andriy Gapon c722ec3a51 remove needless inclusion of machine/cpu.h in userland
MFC after:	21 days
2013-07-28 18:35:43 +00:00
Navdeep Parhar caf20efcde Add support for packet-sniffing tracers to cxgbe(4). This works with
all T4 and T5 based cards and is useful for analyzing TSO, LRO, TOE, and
for general purpose monitoring without tapping any cxgbe or cxl ifnet
directly.

Tracers on the T4/T5 chips provide access to Ethernet frames exactly as
they were received from or transmitted on the wire.  On transmit, a
tracer will capture a frame after TSO segmentation, hw VLAN tag
insertion, hw L3 & L4 checksum insertion, etc.  It will also capture
frames generated by the TCP offload engine (TOE traffic is normally
invisible to the kernel).  On receive, a tracer will capture a frame
before hw VLAN extraction, runt filtering, other badness filtering,
before the steering/drop/L2-rewrite filters or the TOE have had a go at
it, and of course before sw LRO in the driver.

There are 4 tracers on a chip.  A tracer can trace only in one direction
(tx or rx).  For now cxgbetool will set up tracers to capture the first
128B of every transmitted or received frame on a given port.  This is a
small subset of what the hardware can do.  A pseudo ifnet with the same
name as the nexus driver (t4nex0 or t5nex0) will be created for tracing.
The data delivered to this ifnet is an additional copy made inside the
chip.  Normal delivery to cxgbe<n> or cxl<n> will be made as usual.

/* watch cxl0, which is the first port hanging off t5nex0. */
# cxgbetool t5nex0 tracer 0 tx0  (watch what cxl0 is transmitting)
# cxgbetool t5nex0 tracer 1 rx0  (watch what cxl0 is receiving)
# cxgbetool t5nex0 tracer list
# tcpdump -i t5nex0   <== all that cxl0 sees and puts on the wire

If you were doing TSO, a tcpdump on cxl0 may have shown you ~64K
"frames" with no L3/L4 checksum but this will show you the frames that
were actually transmitted.

/* all done */
# cxgbetool t5nex0 tracer 0 disable
# cxgbetool t5nex0 tracer 1 disable
# cxgbetool t5nex0 tracer list
# ifconfig t5nex0 destroy
2013-07-26 22:04:11 +00:00
Pedro F. Giffuni 21244d5227 Make the BSD-licensed patch the default.
The BSD-licensed patch(1) command has matured and it's behaviour
can be considered equivalent to the older version of GNU patch
in the tree.

The switch has been extensively tested [1] and only two ports
presented regressions, which have since been fixed.

For convenience a new WITH_GNU_PATCH option is available,
but it will likely be removed in the near future.

PR:		176313
Approved by:	portmgr
2013-07-26 21:25:18 +00:00
Andrey Zonov 20dd2f38dc Remove define and documentation for vm_pageout_algorithm missed in r253587 2013-07-26 02:00:06 +00:00
Andriy Gapon 3ab5cdbc13 zfsboottest: remove explicit -Werror
Unfortunately sys/boot is compliled without -Werror at the moment.

MFC after:	7 days
2013-07-24 09:50:44 +00:00
Jilles Tjoelker 8d0f6b5fc2 wordexp(): Fix syntax validation for backslashes in single-quotes. 2013-07-23 21:09:26 +00:00
Konstantin Belousov a81c9a9468 Fix several warnings.
Fix crash in aio_pty_cleanup() by initializing the pointer before
dereferencing.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-07-21 19:21:18 +00:00
Kevin Lo e32234295d Include stdint.h when use intmax_t.
Reported by:	bde
2013-07-18 06:32:19 +00:00
Kevin Lo 8ea4debe59 Replace PRId64 with "jd" in a printf call. Cast the corresponding value to
intmax_t, because the original type is off_t.

Reported by:	bde
2013-07-18 01:40:31 +00:00
Kevin Lo 2f31c8f52e Add missing headers. 2013-07-17 00:58:23 +00:00
Kevin Lo 1d35db811f Use PRId64 instead of %gd to print an int64_t. 2013-07-17 00:54:21 +00:00
Andrew Turner 46e95f646c 2 years, 10 months, 22 days after the projects/arm_eabi branch was created
make the ARM EABI the default ABI on arm, armeb, armv6 and armv6eb.

This is intended to be the default ABI from now on with the old ABI to be
retired. Because of this all users are strongly suggested to upgrade to the
ARM EABI.

As the two ABIs are incompatible it is unlikely upgrading in place will
work. Users should perform a full backup and either use an external machine
to upgrade, or install to an alternative location on their media. They
should also reinstall all ports or packages when these are available.

The only known issues are:
 - pkg incorrectly detects the ABI. This is fixed upstream, and will a
   patch will be made to the port.
 - GDB can have issues with executables built with clang.

__FreeBSD_version has been bumped.
2013-07-16 19:15:19 +00:00
Kevin Lo e437ef394f Need to define NO_MAN here. 2013-07-16 09:40:59 +00:00
Kevin Lo eaec55242c Use MAN= instead of NO_MAN=
For some reason it still tries to install a priv.1 when using NO_MAN,
even though there isn't one yet.
2013-07-16 09:38:51 +00:00
Kevin Lo 4b30cabddc Add missing header needed by sleep(3). 2013-07-16 09:22:50 +00:00
Baptiste Daroussin 9b953f2ce4 Disable building of pkg_install by default
If people still want to have pkg_install they can specify WITH_PKGTOOLS when building world
2013-07-12 23:11:17 +00:00
Baptiste Daroussin e9f950b59c Ensure the locale is LC_ALL=C when regenerating src.conf.5
MFC after:	3 days
2013-07-12 23:08:44 +00:00
Jilles Tjoelker fd7d6d8a29 sh: Do not read from stdin if an error occurs during -i -c cmd.
Although using -i with -c does not seem very useful, it seems inappropriate
to read commands from the terminal in this case.

Side effect: if the -s -c extension is used and the -s option is turned off
using 'set +s' during the interactive part, the shell now exits after an
error or interrupt. Note that POSIX only specifies -s as option to sh, not
to set.

See also Austin Group issue #718.
2013-07-12 15:29:41 +00:00
Dag-Erling Smørgrav 9beae6b545 Remove authpf-noip along with authpf.
Reminded by:	delphij@
2013-07-12 10:07:21 +00:00
Andrey V. Elsukov c80211e3cf Prepare network statistics structures for migration to PCPU counters.
Use uint64_t as type for all fields of structures.

Changed structures: ahstat, arpstat, espstat, icmp6_ifstat, icmp6stat,
in6_ifstat, ip6stat, ipcompstat, ipipstat, ipsecstat, mrt6stat, mrtstat,
pfkeystat, pim6stat, pimstat, rip6stat, udpstat.

Discussed with:	arch@
2013-07-09 09:32:06 +00:00
Andriy Gapon 7407491bef zfsboottest.sh: remove checks for things that are not strictly required
MFC after:	10 days
2013-07-09 08:30:31 +00:00
Andriy Gapon 9871c8ab5b zfsboottest: sync with changes in zfs boot code
- spa status can not be called before spa init
- libzfs.h inclusion is now required
- fix alternative code for explicit root dataset lookup

MFC after:	10 days
2013-07-09 08:29:14 +00:00
Niclas Zeising bc772b9013 Document WITHOUT_SVNLITE and WITH_SVN.
PR:		docs/180025
Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
2013-07-03 12:36:47 +00:00
Navdeep Parhar 7ee2959cb5 Count the number of hits for a filter by default.
MFC after:	3 days
2013-07-01 17:32:07 +00:00
Adrian Chadd 874c906c45 Add include path to the ar9300 HAL. 2013-06-25 17:50:48 +00:00
Eitan Adler deb5069725 Add missing Obsolete Files
Submitted by:	Kurt Lidl <lidl@pi-coral.com>
2013-06-24 20:36:12 +00:00
Peter Wemm 4f85870720 Teach delete-old how to clean up after WITH/WITHOUT_SVN{LITE} permutations. 2013-06-18 21:41:06 +00:00
Eitan Adler 8587d5deac Restore "all rights reserved" (spelled correctly). This was actually part of the standard text of the license which I did not realize prior.
Approved by:	bushman
2013-06-17 20:27:20 +00:00
Eitan Adler 353aa3e75b Remove lines declaring "All rights reserved" or similar comments: they
are not true as the files are actually under the BSD-2 license

Approved by:	bushman
2013-06-16 19:35:01 +00:00
Jilles Tjoelker 7a3000699c sh: Add tests for 'local -' (save shell options). 2013-06-15 22:22:03 +00:00
Eitan Adler 1cbff2a999 Remove CVS from the base system.
Discussed with:	many
Reviewed by:	peter, zi
Approved by:	core
2013-06-15 20:29:07 +00:00
Adrian Chadd 67a6ee573d Link the AR9300 EEPROM dump tool into the build. 2013-06-14 08:12:54 +00:00
Adrian Chadd 4c8f505c3f Begin fleshing out an AR9300 EEPROM dump helper utility. 2013-06-14 08:12:40 +00:00
Adrian Chadd 4cfeefe1c7 Add missing formatting strings.
Thanks to: clang
2013-06-14 08:11:45 +00:00
Ed Maste e60c420fa3 Use portable string comparison
We support == in /bin/sh now, but it ought to be avoided, and my use of
it was accidental.
2013-06-13 13:05:08 +00:00
Dimitry Andric 6a0372513e Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3
release):
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final@183502
2013-06-10 20:45:12 +00:00
Dimitry Andric 59d6cff90e Vendor import of llvm tags/RELEASE_33/final r183502 (effectively, 3.3
release):
http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_33/final@183502
2013-06-10 20:36:52 +00:00
Ed Maste f506e293ab Handle options that override other options
This is a workaround for WITH_LDNS_UTILS forcing BIND_UTILS off.  It can
be reverted when we no longer have these conflicting options, or made more
general if we grow more cases like this.
2013-06-10 13:55:03 +00:00
David Schultz 7a62fe0f3e Fix some bugs in the complex trig tests so that they test both double
and float precision properly.
2013-06-10 06:03:03 +00:00
Glen Barber 01bb862861 Add freebsd-update.conf(5) to OptionalObsoleteFiles.inc
PR:		179437
Approved by:	kib (mentor)
MFC after:	1 week
2013-06-09 06:13:51 +00:00
Ed Schouten 17b945433d Add testing utility for behavior of atomic ops.
This small utility performs a sequence of atomic operations with random
parameters on an atomic variable. For every type, we also create 16
variables, to ensure that we test the correctness at different
alignments.
2013-06-08 22:44:49 +00:00
Ed Maste 42f8c5b580 Add a new knob WITH_DEBUG_FILES to control the building of standalone
debug files for userland programs and libraries.  The "-g" debug flag
is automatically applied when WITH_DEBUG_FILES is set.

The debug files are now named ${prog}.debug and ${shlib}.debug for
consistency with other systems and documentation.  In addition they are
installed under /usr/lib/debug, to simplify the process of installing
them if needed after a crash.  Users of bsd.{prog,lib}.mk outside of the
base system place the standalone debug files in a .debug subdirectory.
GDB automatically searches both of these directories for standalone
debug files.

Thanks to everyone who contributed changes, review, and testing during
development.
2013-06-07 21:40:02 +00:00
Ed Maste 371df6c6ad Switch to 2-clause license and standard text
Approved by:	bms@
2013-06-06 21:09:27 +00:00
Jilles Tjoelker 79b1d31887 sh: Return status 127 for unknown jobs in wait builtin.
This is required by POSIX, at least for pids that are not known child
processes.

Other problems with job specifications still cause wait to abort with
exit status 2.

PR:		176916
2013-06-05 19:40:52 +00:00
Jilles Tjoelker a4099656c3 sh: Allow multiple operands in wait builtin.
This is only part of the PR; the behaviour for unknown/invalid pids/jobs
remains unchanged (aborts the builtin with status 2).

PR:		176916
Submitted by:	Vadim Goncharov
2013-06-05 19:08:22 +00:00
Luigi Rizzo b303f675df new features (mostly for testing netmap capabilities)
+ pkt-gen -f rx now remains active even when traffic stops
  Previous behaviour (exit after 1 second of silence) can be
  restored with the -W option

+ the -X option does a hexdump of the content of a packet (both tx and rx).
  This can be useful to check what goes in and out.

+ the -I option instructs the sender to use indirect buffers
  (not really useful other than to test the kernel module in the
  VALE switch)
2013-06-05 17:37:59 +00:00
Adrian Chadd 2cdc5a48f6 Add RX STBC statistics. 2013-06-04 23:52:57 +00:00
David E. O'Brien f9d4b3926a Match the options of the kernel. 2013-06-04 06:38:01 +00:00
Ed Schouten 49111f0092 Add libiconv based versions of *c16*() and *c32*().
I initially thought wchar_t was locale independent, but this seems to be
only the case on Linux. This means that we cannot depend on the *wc*()
routines to implement *c16*() and *c32*(). Instead, use the Citrus
libiconv that is part of libc.

I'll see if there is anything I can do to make the existing functions
somewhat useful in case the system is built without libiconv in the
nearby future. If not, I'll simply remove the broken implementations.

Reviewed by:	jilles, gabor
2013-06-03 17:17:56 +00:00
David Schultz 8ffb5b838e Add more tests for log functions. A few are commented out because the
long double versions don't pass yet.  (They are rather nit-picky cases,
so there's ongoing discussion with Bruce about whether it is worth the
performance cost.)
2013-06-03 09:15:15 +00:00
David Schultz 45de1d006d Factor out some common code from the libm tests. This is a bit messy
because different tests have different ideas about what it means to be
"close enough" to the right answer, depending on the properties of the
function being tested.  In the process, I fixed some warnings and
added a few more 'volatile' hacks, which are sufficient to make all
the tests pass at -O2 with clang.
2013-06-02 04:30:03 +00:00
Mark Johnston 1e86bf67f5 This test is working now, so remove it from NOTWORK. 2013-06-02 01:07:38 +00:00
Jilles Tjoelker f19825af72 test: Remove -ntXY and -otXY primaries.
This reverts commit r247274.

As maintainer of sh, I disapprove of this feature addition.

It is too specific and can be done without easily using find(1) or stat(1).
I will add some hints to the test(1) man page shortly.

In general, FreeBSD sh is not the place to invent new shell language
features. This is how it has been maintained and adding features randomly
does not work with that.

The new syntax (e.g. [ FILE1 -ntca FILE2 ]) looks cryptic to me.
2013-05-31 22:54:20 +00:00
Jilles Tjoelker 0fbff2deb9 sh: Add test cases for break outside a loop.
In most shells (including our sh), break outside a loop does nothing with
status 0, or at least does not abort. Therefore, scripts sometimes (buggily)
depend on this.
2013-05-31 14:45:25 +00:00
David E. O'Brien 85325f8942 Different approach to making all compilers happy. 2013-05-31 04:27:41 +00:00
David E. O'Brien 7b45e382d0 Allow building with clang (which is being really stupid here...). 2013-05-31 04:19:13 +00:00
Luigi Rizzo f18be5766f Bring in a number of new features, mostly implemented by Michio Honda:
- the VALE switch now support up to 254 destinations per switch,
  unicast or broadcast (multicast goes to all ports).

- we can attach hw interfaces and the host stack to a VALE switch,
  which means we will be able to use it more or less as a native bridge
  (minor tweaks still necessary).
  A 'vale-ctl' program is supplied in tools/tools/netmap
  to attach/detach ports the switch, and list current configuration.

- the lookup function in the VALE switch can be reassigned to
  something else, similar to the pf hooks. This will enable
  attaching the firewall, or other processing functions (e.g. in-kernel
  openvswitch) directly on the netmap port.

The internal API used by device drivers does not change.

Userspace applications should be recompiled because we
bump NETMAP_API as we now use some fields in the struct nmreq
that were previously ignored -- otherwise, data structures
are the same.

Manpages will be committed separately.
2013-05-30 14:07:14 +00:00
Luigi Rizzo 1cb4c501ae add support for rate-limiting in the sender (-R ...)
Obtained from:	Giuseppe Lettieri
2013-05-30 11:10:42 +00:00
Luigi Rizzo 0dea02f39e add a compile-time option to copy packets instead of doing
the buffer swapping.
2013-05-30 11:09:41 +00:00
Luigi Rizzo 00c2805055 remove use of deprecated ioctl() 2013-05-30 11:08:16 +00:00
David Schultz 6bba248bee Fix some harmless bugs in a test. 2013-05-30 04:47:03 +00:00
David Schultz 659a67c641 Basic tests for complex inverse trig and hyperbolic functions. 2013-05-30 04:46:36 +00:00
Joel Dahl 1d1f5c6b8e mdoc: silence a few mandoc lint warnings. 2013-05-28 09:33:46 +00:00
Tijl Coosemans 9bea689e8b Fix cexp regression tests that have an infinite real part. The signs of the
result depend on the cosine and sine of the imaginary part.
Small values are used in the new tests such that cosine and sine are well
defined.

Reviewed by:	das
2013-05-28 08:50:50 +00:00
David Schultz 7dbbb6dde3 Fix some regressions caused by the switch from gcc to clang. The fixes
are workarounds for various symptoms of the problem described in clang
bugs 3929, 8100, 8241, 10409, and 12958.

The regression tests did their job: they failed, someone brought it
up on the mailing lists, and then the issue got ignored for 6 months.
Oops. There may still be some regressions for functions we don't have
test coverage for yet.
2013-05-27 08:50:10 +00:00
Ed Schouten 5f4cd89cce Add missing #includes, to keep Clang silent. 2013-05-25 18:04:24 +00:00
Adrian Chadd d2e0ac3c78 Implement beacon event debugging in athalq. 2013-05-22 01:03:41 +00:00
Ed Schouten 50c77c6e8b Add <uchar.h>.
The <uchar.h> header, part of C11, adds a small number of utility
functions for 16/32-bit "universal" characters, which may or may not be
UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight
wrappers around wcrtomb() and mbrtowc().

While there, also add (non-yet-standard) _l functions, similar to the
ones we already have for the other locale-dependent functions.

Reviewed by:	theraven
2013-05-21 19:59:37 +00:00
Xin LI b8a8e6e450 BMAKE is now being built by default. 2013-05-21 00:41:49 +00:00
Brooks Davis 6893d87392 Cleanups and markup improvements suggested by trociny and joel. 2013-05-20 20:32:58 +00:00
Jilles Tjoelker e9dec7758d popen(): Add 'e' mode character to set close-on-exec on the new fd.
If 'e' is used, the kernel must support the recently added pipe2() system
call.

The use of pipe2() with O_CLOEXEC also fixes race conditions between
concurrent popen() calls from different threads, even if the close-on-exec
flag on the fd of the returned FILE is later cleared (because popen() closes
all file descriptors from earlier popen() calls in the child process).
Therefore, this approach should be used in all cases when pipe2() can be
assumed present.

The old version of popen() rejects "re" and "we" but treats "r+e" like "r+".
2013-05-20 17:31:18 +00:00
Jilles Tjoelker 86b75745ad Add a test program for popen(). 2013-05-20 13:05:51 +00:00
Joel Dahl 7a019d4487 Minor mdoc improvements. 2013-05-16 20:55:20 +00:00
Brooks Davis 561e967f2f Add a sample script to create filesystem images from an installed tree
created by installworld+distribution with the -DNO_ROOT option.
2013-05-16 14:38:12 +00:00
Brooks Davis a09aff8343 Add support for an external cross compiler. The cross compiler is
specified by passing the XCC, XCXX, and XCPP variables (corresponding to
CC, CXX, and CPP) to buildworld/buildkernel.  The compiler must be clang
or be configured to target the appropriate architecture.

To speed build times, if XCC is an absolute path or
WITHOUT_CROSS_COMPILER is defined then no cross compiler will be built
during the cross-tools stage.

Limited documentation of this feature can currently be found at:

https://wiki.freebsd.org/ExternalToolchain

This functionality should be considered experimental and is subject to
change without notice.

Sponsored by:	DARPA, AFRL
Discussed with:	imp, sjg
2013-05-15 14:30:03 +00:00
Brooks Davis a5b2b29fe1 Add a new option WITHOUT_FORMAT_EXTENSIONS to disable flags related to
checking our kernel printf extensions.  This is useful to allow
compilers without these extensions to build kernels.

Sponsored by:	DARPA, AFRL
2013-05-15 13:04:10 +00:00
Hiren Panchasara 05864d89d1 As python3 does not have raw_input(), convert it to input() when we
are using python3.

PR:	177214
Reviewed by:	gnn
Approved by:	sbruno (mentor)
2013-05-13 19:53:19 +00:00
Peter Wemm dda759d344 Tidy up some CVS workarounds. 2013-05-12 01:53:47 +00:00
Eitan Adler 2b3b363780 Unconditionally install 210.backup-aliases as many MTAs other than
sendmail support the use of /etc/aliases.

PR:		conf/176098
Submitted by:	ak
MFC after:	2 weeks
2013-05-11 23:55:43 +00:00
Jilles Tjoelker 60bf56fd82 Add simple testcases for fcntl(F_DUP2FD_CLOEXEC). 2013-05-11 22:13:24 +00:00
Jilles Tjoelker 7a1a8a4243 Add simple testcases for fcntl(F_DUPFD_CLOEXEC). 2013-05-11 16:31:41 +00:00
Jilles Tjoelker 316ed7ca36 Add missing argument to fcntl(F_DUPFD) in regression test. 2013-05-11 15:45:44 +00:00
Adrian Chadd 14a75019c2 Add the AR9300 descriptor decoding code. 2013-05-05 09:38:25 +00:00
Adrian Chadd 443db1d0c5 This is a simple script to output the delta between each TX and TXSTATUS.
Useful for debugging TDMA.
2013-05-05 09:38:02 +00:00
Stefan Farfeleder cd5810229d Add a few xargs tests related to -0, -n and quoting. 2013-05-04 16:41:14 +00:00
Jilles Tjoelker 14303aa889 sh: Remove racy test case for read builtin.
This test case sometimes fails because of an EINTR-related race condition.
Fixing this race condition likely requires an extra system call per byte,
which would make the read builtin even slower than it already is, or very
complicated trickery. Therefore, remove the test case for now.
2013-05-03 20:39:53 +00:00
Jilles Tjoelker c4539460e3 sh: Improve error handling in read builtin:
* If read -t times out, return status as if interrupted by SIGALRM
  (formerly 1).
* If a trapped signal interrupts read, return status 128+sig (formerly 1).
* If [EINTR] occurs but there is no trap, retry the read (for example
  because of a SIGWINCH in interactive mode).
* If a read error occurs, write an error message and return status 2.

As before, a variable assignment error returns 2 and discards the remaining
data read.
2013-05-03 15:28:31 +00:00
Luigi Rizzo eb41b16f81 sync with my local copy (this file may go away, eventually) 2013-04-30 13:13:32 +00:00
Nick Hibma fcb107b9a6 Replace a silly command sequence with a proper if-then-else.
Generate images sparsely. This saves space and time, especially when
generating images inside a VM (PR 173482).
Add a 'true' statement to last_orders to prevent some version of sh from
tripping over an empty function.
2013-04-28 22:12:40 +00:00
Nick Hibma 2b235be6d3 Doing a cpio from /var/empty if dir was not specified or non-existent
copies its mode to the destination. This is not desirable.
Rephrase this code to be more sensible.

PR:		173483
MFC after:	1 week
2013-04-28 21:44:44 +00:00
Eitan Adler b4634967f0 When the world is built WITHOUT_OPENSSH also don't
install ssh-copy-id.

PR:		misc/177590
Submitted by:	Oleg Ginzburg <olevole@olevole.ru>
Reviewed by:	imp
2013-04-28 17:58:11 +00:00
Eitan Adler ec8025b5e2 Add a comma to satisfy Igor. 2013-04-27 04:09:09 +00:00
Eitan Adler 850163e4ed Remove IDEA from OptionalObsoleteFiles.inc
Also add an UPDATING entry (requsted by gjb)
2013-04-27 00:03:07 +00:00
Eitan Adler 4e3b8d2037 Remove the WITH_IDEA option and build it unconditionally.
The European version of the patent expired in 2011.
The US version of the patent expired in 2012 or prior.

Reviewed by:	des
No objection from:	cperciva, ehaupt
2013-04-26 23:24:41 +00:00
Pawel Jakub Dawidek 849c495c94 Style cleanups. 2013-04-17 21:08:18 +00:00
Gabor Kovesdan 84a17a97ce - Correct mispellings of word and
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:48:46 +00:00
Gabor Kovesdan ab3f6b347e - Correct mispellings of the word occurrence
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:40:10 +00:00
Sergey Kandaurov 5911f5a7fa Fix build.
- pass a format string to printf
- catch up with constifying uz_name

MFC after:	3 days
2013-04-12 21:29:37 +00:00
Dimitry Andric 139f7f9bf5 Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
upcoming 3.3 release (branching and freezing expected in a few weeks).

Preliminary release notes can be found at the usual location:
<http://llvm.org/docs/ReleaseNotes.html>

An MFC is planned once the actual 3.3 release is finished.
2013-04-12 17:57:40 +00:00
Jilles Tjoelker 6e0f89a4b4 sh: Don't modify exit status when break/continue/return passes !.
This matches what would happen if  ! P  were to be replaced with
if P; then false; else true; fi.

Example:
  f() { ! return 0; }; f
2013-04-12 15:19:35 +00:00
Navdeep Parhar e22981b241 Set and display the IP fragment bit correctly when dealing with
the filter mode.

MFC after:	3 days.
2013-04-11 16:50:58 +00:00
Dimitry Andric 809500fc2c Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
2013-04-08 18:45:10 +00:00
Dimitry Andric 4a16efa3e4 Vendor import of llvm trunk r178860:
http://llvm.org/svn/llvm-project/llvm/trunk@178860
2013-04-08 18:41:23 +00:00
Jilles Tjoelker 87887877ec sh: Add a variation on builtins/eval4.0 where the cmdsubst returns 0. 2013-04-06 22:30:46 +00:00
Jilles Tjoelker 70d41b5846 wordexp(): Remove wrong IFS usage.
Words in shell script are separated by spaces or tabs independent of the
value of IFS. The value of IFS is only relevant for the result of
substitutions. Therefore, there should be a space between 'wordexp' and the
words to be expanded, not an IFS character.

Paranoia might dictate that the shell ignore IFS from the environment (even
though our sh currently uses it), so do not depend on it in the new test
case.
2013-04-01 20:50:07 +00:00
Navdeep Parhar d14b0ac129 cxgbe(4): Add support for Chelsio's Terminator 5 (aka T5) ASIC. This
includes support for the NIC and TOE features of the 40G, 10G, and
1G/100M cards based on the T5.

The ASIC is mostly backward compatible with the Terminator 4 so cxgbe(4)
has been updated instead of writing a brand new driver.  T5 cards will
show up as cxl (short for cxlgb) ports attached to the t5nex bus driver.

Sponsored by:	Chelsio
2013-03-30 02:26:20 +00:00
Rene Ladan a8a703a228 Properly spell "Class Based Queueing"
PR:		www/177412
Submitted by:	Oliver Loch <grimeton@gmx.net>
Approved by:	cognet
2013-03-27 15:10:40 +00:00
Gleb Kurtsou a1897c0cf6 Add shlib-compat under tools.
shlib-compat is ABI compatibility checker for shared libraries with
symbol versioning.
2013-03-25 00:31:14 +00:00
Adrian Chadd 8e787d67be More indentation fixes. 2013-03-23 23:27:16 +00:00
Adrian Chadd d90b001e03 Expose the beacon miss counter. 2013-03-23 23:20:38 +00:00
Adrian Chadd d18e646cbe Add AR9300 descriptor decoding. 2013-03-23 01:25:11 +00:00
Pawel Jakub Dawidek ff96467412 Update regression tests after adding chflagsat(2).
Sponsored by:	The FreeBSD Foundation
2013-03-21 23:07:04 +00:00
Pawel Jakub Dawidek b4b2596b97 - Make 'flags' argument to chflags(2), fchflags(2) and lchflags(2) of type
u_long. Before this change it was of type int for syscalls, but prototypes
  in sys/stat.h and documentation for chflags(2) and fchflags(2) (but not
  for lchflags(2)) stated that it was u_long. Now some related functions
  use u_long type for flags (strtofflags(3), fflagstostr(3)).
- Make path argument of type 'const char *' for consistency.

Discussed on:	arch
Sponsored by:	The FreeBSD Foundation
2013-03-21 22:44:33 +00:00
Neel Natu 7778bd576f Set WARNS=3 so this actually compiles. 2013-03-20 21:47:05 +00:00
Pawel Jakub Dawidek b48fdae147 Update the tests now that absence of the O_APPEND flag requires CAP_SEEK
capability. Add some more tests.

Sponsored by:	The FreeBSD Foundation
2013-03-16 23:13:49 +00:00
Pawel Jakub Dawidek ac978022d3 The mode argument for open(2)/openat(2) only makes sense if the O_CREAT flag
was given.

Sponsored by:	The FreeBSD Foundation
2013-03-16 23:10:40 +00:00
Jilles Tjoelker d70ad6f2d0 sh: Recognize "--" and explicitly reject options in wait builtin.
If syntactically invalid job identifiers are to be taken as jobs that exited
with status 127, this should not apply to options, so that we can add
options later if need be.
2013-03-15 20:29:31 +00:00
Pawel Jakub Dawidek 374b056ce8 Make file name generation to work with both new and old versions of OpenSSL.
Sponsored by:	The FreeBSD Foundation
2013-03-15 00:10:38 +00:00
Navdeep Parhar 144d9d11b8 Fix compile warning by including ctype.h for isdigit().
MFC after:	1 day
2013-03-05 19:37:29 +00:00
Baptiste Daroussin e51c53f366 Import libyaml as libbsdyml (private brand name)
LibYAML is a YAML 1.1 parser and emitter under MIT license which will
soon be used by the pkg boostrap (usr.bin/pkg) and bhyve

Reviewed by:	roberto, antoine
2013-03-04 11:27:41 +00:00
Jilles Tjoelker 3fe1119f98 sh: When executing a trap, keep exit status along with evalskip.
This ensures 'return' in a trap returns the correct status to the caller.

If evalskip is not set or if it is overridden by a previous evalskip, keep
the old behaviour of restoring the exit status from before the trap.
2013-03-03 17:33:59 +00:00
Pawel Jakub Dawidek 2328a74aa8 If all ioctls are allowed, cap_ioctls_get(2) will return CAP_IOCTLS_ALL.
Update regression tests.
2013-03-02 23:40:42 +00:00
Pawel Jakub Dawidek 7099ae5f3d Add support for bindat(2) and connectat(2).
Sponsored by:	The FreeBSD Foundation
2013-03-02 21:16:40 +00:00
Pawel Jakub Dawidek de50394176 Add regression tests for the new Capsicum system calls.
Sponsored by:	The FreeBSD Foundation
2013-03-02 01:00:26 +00:00
Pawel Jakub Dawidek f29088987a Update existing regression tests after Capsicum overhaul. 2013-03-02 00:56:53 +00:00
John-Mark Gurney 80ff58b89d fix this script so we don't expand the second $FreeBSD since svn thinks
the $ in $1 ends the keyword, and expands it...
2013-02-27 19:59:58 +00:00
John Baldwin 9240031ac6 Add an implementation of open_memstream() and open_wmemstream(). These
routines provide write-only stdio FILE objects that store their data in a
dynamically allocated buffer.  They are a string builder interface somewhat
akin to a completely dynamic sbuf.

Reviewed by:	bde, jilles (earlier versions)
MFC after:	1 month
2013-02-27 19:50:46 +00:00
Peter Jeremy 293beebc46 Enhance test(1) by adding provision to compare any combination of the
access, birth, change and modify times of two files, instead of only
being able to compare modify times.  The builtin test in sh(1) will
automagically acquire the same expansion.

Approved by:	grog
MFC after:	2 weeks
2013-02-25 19:05:40 +00:00
Jilles Tjoelker 25e0f0f577 sh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig. 2013-02-23 22:50:57 +00:00
Jilles Tjoelker 57f00aa510 sh: Test that the exit status is 1 if read encounters EOF. 2013-02-23 15:15:41 +00:00
Adrian Chadd b5a44455d6 Print out the RTS/CTS rate in the TX descriptor. 2013-02-19 06:42:12 +00:00
Adrian Chadd 6e1ff18743 * Add initial debugging of the interrupt status entry
* Add in the TDMA debugging entries that I added a while ago
2013-02-18 04:20:43 +00:00
Adrian Chadd fec3d03df0 Make this output more terse. 2013-02-18 04:19:21 +00:00
Luigi Rizzo f8e4e36a0a update the netmap example programs merging some common code in nm_util.c
pkt-gen now implements several functions (unlimited transmit, receive,
ping-pong) and can operate on a 'tap' device.
2013-02-17 04:43:22 +00:00
Dag-Erling Smørgrav 5ab2740777 Oops, I flipped LDNS_UTILS but forgot to update the description. 2013-02-15 13:57:51 +00:00
Dag-Erling Smørgrav 7b5038d71c Import LDNS and build it as an internal library. 2013-02-15 13:44:18 +00:00
Sergey Kandaurov b57181586c Major update for unix_cmsg from Andrey Simonenko.
Quoting the submitter:
- Added tests for SCM_BINTIME, LOCAL_PEERCRED, cmsghdr.cmsg_len
- Code that checks correctness of groups was corrected (getgroups(2) change)
- unix_cmsg.c was completely redesigned and simplified
- Use less timeout value in unix_cmsg.c for faster work
- Added support for not sending data in a message, not sending data and
  data array associated with a cmsghdr structure in a message
- Existent tests were improved
- unix_cmsg.t was redesigned and simplified

Correctness of unix_cmsg verified on 7.1-STABLE, 9.1-STABLE and 10-CURRENT.

PR:		bin/131567
Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
MFC after:	2 weeks
2013-02-11 12:56:23 +00:00
Adrian Chadd 0a83addd18 Teach athalq about the recent if_ath_alq timestamp format change. 2013-02-11 02:54:24 +00:00
Dimitry Andric b1dbb12c3a Add missing src.conf(5) fragments for WITHOUT_LIBCPLUSPLUS and WITH_GPL_DTC. 2013-02-02 22:42:46 +00:00
Dimitry Andric df5d2454a3 Pull in r170135 from upstream clang trunk:
Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user
  specifies not to. Dont build ASTMatchers with Rewriter disabled and
  StaticAnalyzer when it's disabled.

  Without all those three, the clang binary shrinks (x86_64) from ~36MB
  to ~32MB (unstripped).

To disable these clang components, and get a smaller clang binary built
and installed, set WITHOUT_CLANG_FULL in src.conf(5).  During the
initial stages of buildworld, those extra components are already
disabled automatically, to save some build time.

MFC after:	1 week
2013-02-02 22:28:29 +00:00
Pietro Cerutti 71796d333c - Fix more style(9)-related issues (copyright header, spaces after function
names, unnecessary casts)
- Change type of boolean variable from char to bool

Suggested by:	jhb, zont, jmallett
Reviewed by:	cognet
Approved by:	cognet
2013-02-01 13:04:06 +00:00
Pietro Cerutti 646b68f04d - Remove underscores from the internal structure name, as it doesn't collide
with the user's namespace.

- Correct size and position variables type from long to size_t.

- Do not set errno to ENOMEM on malloc failure, as malloc already does so.

- Implement the concept of "buffer data length", which mandates what SEEK_END
  refers to and the allowed extent for a read.

- Use NULL as read-callback if the buffer is opened in write-only mode.
  Conversely, use NULL as write-callback when opened in read-only mode.

- Implement the handling of the ``b'' character in the mode argument. A binary
  buffer differs from a text buffer (default mode if ``b'' is omitted) in that
  NULL bytes are never appended to writes and that the "buffer data length"
  equals to the size of the buffer.

- Remove shall from the man page. Use indicative instead. Also, specify that
  the ``b'' flag does not conform with POSIX but is supported by glibc.

- Update the regression test so that the ``b'' functionality and the "buffer
  data length" concepts are tested.

- Minor style(9) corrections.

Suggested by:	jilles
Reviewed by:	cognet
Approved by:	cognet
2013-01-31 16:39:50 +00:00
Pietro Cerutti 96c95412ca Add fmemopen(3), an interface to get a FILE * from a buffer in memory, along
with the respective regression test.
See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html

Reviewed by:	cognet
Approved by:	cognet
2013-01-30 14:59:26 +00:00
Konstantin Belousov 9005607c8f Rework the handling of the children for the pthread_vfork_test. The
trivial handler for SIGCHLD is installed, and SIGCHLD is blocked, to
not abandon our zombies to init(8). This way, the zombies are around
slightly longer, allowing to actually exercise the logic for p_pwait
use by the test.

MFC after:	1 week
2013-01-30 13:14:34 +00:00
Gabor Kovesdan 2dd076b84b - Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from
DragonflyBSD and install it as bsdpatch.  WITH_BSD_PATCH makes it
  default and installs GNU patch as gnupatch.

Submitted by:	pfg
Obtained from:	The DragonflyBSD Project
2013-01-29 17:03:18 +00:00
Brooks Davis 6d12634cba Use = not == in test arguments.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2013-01-24 20:47:37 +00:00
Ed Maste 4673bd3950 Restore Python 2.6+ compatibility
SVN r245536 ported this to Python 3.  The major change was the use of the
print function.  Unfortunately this is incompatible with Python 2, which
is still the default version in the ports tree.

Use a __future__ import to make this compatible with Python 2.6 and later.
2013-01-22 18:02:48 +00:00
Brooks Davis aaea79704b Implement the -l option using ln(1) to facilitate boostrapping.
Ignore the new options -D, -h, -T, and -U.  Adjust -M support to ignore
an argument.

Sponsored by:	DARPA, AFRL
Reviewed by:	ian, ray, rpaulo
2013-01-21 22:32:00 +00:00
Eitan Adler 38d90616e6 Add option to make pc-sysinstall optional
Approved by:	cperciva
2013-01-18 15:57:09 +00:00
Adrian Chadd 3301ff5648 Add extra debugging fields. 2013-01-17 17:12:44 +00:00