Commit Graph

2813 Commits

Author SHA1 Message Date
eadler
bdb87244af 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
b624da1ad8 sh: Add tests for 'local -' (save shell options). 2013-06-15 22:22:03 +00:00
eadler
bf7c0f2705 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
db4727f2b1 Link the AR9300 EEPROM dump tool into the build. 2013-06-14 08:12:54 +00:00
adrian
dfc566b677 Begin fleshing out an AR9300 EEPROM dump helper utility. 2013-06-14 08:12:40 +00:00
adrian
d6a6434a1e Add missing formatting strings.
Thanks to: clang
2013-06-14 08:11:45 +00:00
emaste
b69dcae913 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
emaste
793c8410e6 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
das
dc9bd08e99 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
gjb
ab14cb8a0d 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
f8eb20d5ba 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
emaste
390d8402e0 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
emaste
c454baff9f Switch to 2-clause license and standard text
Approved by:	bms@
2013-06-06 21:09:27 +00:00
jilles
34ac6a12ea 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
dbbdb077d8 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
018a784d3f 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
453c81c753 Add RX STBC statistics. 2013-06-04 23:52:57 +00:00
obrien
e5e0ffd044 Match the options of the kernel. 2013-06-04 06:38:01 +00:00
ed
d6e16cad4c 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
das
f7fa9bbf28 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
das
c13ee16ab4 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
markj
c1cfd940d5 This test is working now, so remove it from NOTWORK. 2013-06-02 01:07:38 +00:00
jilles
47380cf857 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
39d8d22f10 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
obrien
ffb696a198 Different approach to making all compilers happy. 2013-05-31 04:27:41 +00:00
obrien
13bdca09d7 Allow building with clang (which is being really stupid here...). 2013-05-31 04:19:13 +00:00
luigi
f8c8cdb1f0 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
3136540cb4 add support for rate-limiting in the sender (-R ...)
Obtained from:	Giuseppe Lettieri
2013-05-30 11:10:42 +00:00
luigi
4b534acddc add a compile-time option to copy packets instead of doing
the buffer swapping.
2013-05-30 11:09:41 +00:00
luigi
b50ac594c0 remove use of deprecated ioctl() 2013-05-30 11:08:16 +00:00
das
249103dcf2 Fix some harmless bugs in a test. 2013-05-30 04:47:03 +00:00
das
93c23d7050 Basic tests for complex inverse trig and hyperbolic functions. 2013-05-30 04:46:36 +00:00
joel
27b728120a mdoc: silence a few mandoc lint warnings. 2013-05-28 09:33:46 +00:00
tijl
ce4d1e960e 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
das
e7b0a63c19 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
634ea6b615 Add missing #includes, to keep Clang silent. 2013-05-25 18:04:24 +00:00
adrian
00639a30cf Implement beacon event debugging in athalq. 2013-05-22 01:03:41 +00:00
ed
05bd8275f3 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
delphij
1d4da2d904 BMAKE is now being built by default. 2013-05-21 00:41:49 +00:00
brooks
6184eb732b Cleanups and markup improvements suggested by trociny and joel. 2013-05-20 20:32:58 +00:00
jilles
ea9572e1d0 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
ad087808c5 Add a test program for popen(). 2013-05-20 13:05:51 +00:00
joel
78727b1b3d Minor mdoc improvements. 2013-05-16 20:55:20 +00:00
brooks
6a6c551958 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
6b71588fb9 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
4d008876be 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
147f9d7365 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
cec511ab65 Tidy up some CVS workarounds. 2013-05-12 01:53:47 +00:00
eadler
e48cd1a04f 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
a9655d0ad7 Add simple testcases for fcntl(F_DUP2FD_CLOEXEC). 2013-05-11 22:13:24 +00:00