Commit Graph

2735 Commits

Author SHA1 Message Date
Adrian Chadd
a30a935273 Break out the parsing code from main() and modularise things a little.
The eventual aim will be to support listing "one" and "all" stations for
the given ath device.
2012-07-30 01:42:22 +00:00
Dimitry Andric
c4554b9420 When WITHOUT_CLANG is being used, also clean out the clang 3.1 headers
in OptionalObsoleteFiles.inc.

PR:		misc/169902
Submitted by:	Thomas Eberhardt <sneakywumpus@googlemail.com>
MFC after:	3 days
2012-07-23 16:36:13 +00:00
Poul-Henning Kamp
d5a72cd639 Derive FREEBSD_PART from /etc/fstab, and make it full device name.
Give suggestion for next steps when done.

Inspired by patches from:	Flemming "F3" Jacobsen
2012-07-22 20:55:42 +00:00
Poul-Henning Kamp
1ec04b6d45 Replace hardcoded /mnt with ${SBMNT} which defaults to /mnt.sysbuild
Submitted by:	Flemming "F3" Jacobsen
2012-07-22 19:32:27 +00:00
Adrian Chadd
2ff991dc64 Add a needed #include due to my recent change. 2012-07-20 07:49:26 +00:00
Adrian Chadd
5aeca9144d Add missing SRCS. 2012-07-20 07:38:11 +00:00
Adrian Chadd
6c4225dbd0 Add the new athratestats tool. 2012-07-20 07:17:24 +00:00
Adrian Chadd
422866dfd6 Tidy things up substantially:
* remove some debugging;
* introduce command line arguments;
* introduce support for non-ath0 interfaces.
2012-07-20 06:11:26 +00:00
Adrian Chadd
ef80e034bb Use the rate control table to display the rate rather than the rix,
making the output of this program much more meaningful.
2012-07-20 02:18:47 +00:00
Adrian Chadd
78c166febf Implement a first cut of the 'sample' rate statistics userland utility.
This outputs almost exactly the same information as the kernel sysctl does,
however the rix -> rate mapping isn't yet available as a TLV.
2012-07-20 01:38:03 +00:00
Jilles Tjoelker
fe36e227e8 sh: Add a simple test for the "local" builtin. 2012-07-15 10:22:13 +00:00
Jilles Tjoelker
84fbdd8ca0 sh: Expand assignment-like words specially for export/readonly/local.
Examples:
  export x=~
now expands the tilde
  local y=$1
is now safe, even if $1 contains IFS characters or metacharacters.

For a word to "look like an assignment", it must start with a name followed
by an equals sign, none of which may be quoted.

The special treatment applies when the first word (potentially after
"command") is "export", "readonly" or "local". There may be quoting
characters but no expansions. If "local" is overridden with a function there
is no special treatment ("export" and "readonly" cannot be overridden with a
function).

If things like
  local arr=(1 2 3)
are ever allowed in the future, they cannot call a "local" function. This
would either be a run-time error or it would call the builtin.

This matches Austin Group bug #351, planned for the next issue of POSIX.1.

PR:		bin/166771
2012-07-15 10:19:43 +00:00
Niclas Zeising
48daa1540b Change language in WITH_BSDCONFIG to match other options, and regen
src.conf(5), which was missed in r238438.

Approved by:	joel (mentor)
2012-07-14 10:17:47 +00:00
Devin Teske
641a6cfb86 Import bsdconfig(8) as a replacement for the post-install abilities of
deprecated sysinstall(8). NOTE: WITH_BSDCONFIG is currently required.

Submitted by:	Devin Teske (dteske), Ron McDowell <rcm@fuzzwad.org>
Reviewed by:	Ron McDowell <rcm@fuzzwad.org>
Approved by:	Ed Maste (emaste)
2012-07-14 03:16:57 +00:00
Jilles Tjoelker
a017ea22e5 sh: Add tests where "export" does not parse differently.
It is planned to expand variable assignments as assignments (no word
splitting, different tilde expansion) when they follow a "declaration
utility" (export, readonly or local). However, a quoted character cannot be
part of a "name" so things like \v=~ are not assignments, and the existing
behaviour applies.
2012-07-13 22:29:02 +00:00
John Baldwin
6f9cd2a9dc The etcupdate utility is a tool for managing updates to files that are
not updated as part of `make installworld' such as files in /etc.  It
manages updates by doing a three-way merge of changes made to these files
against the local versions.  It is also designed to minimize the amount
of user intervention with the goal of simplifying upgrades for clusters
of machines.

The primary difference from mergemaster is that etcupdate requires less
manual work.  The primary difference from etcmerge is that etcupdate
updates files in-place similar to mergemaster rather than building a
separate /etc tree.

Requested by:	obrien, kib, theraven, joeld (among others)
2012-07-13 13:23:48 +00:00
Konstantin Belousov
f1a4133b81 Add a test program, written by Stephan Uphoff, which demonstrates the
deadlock due to i/o performed over the buffers backed by file mappings.

MFC after:	2 weeks
Approved by:	ups
2012-07-11 19:12:10 +00:00
Ed Maste
f95a30bd6a Allow continuous packet transmission (via -t 0)
Also add a missing check for the cancel flag while waiting for the first
packet in receive mode.
2012-07-06 17:03:43 +00:00
Ed Maste
66a698c9bc Also report tx bandwidth with Ethernet overhead 2012-07-06 15:36:39 +00:00
Ed Maste
3fe77e68ef Allow threads to finish up when terminated by user
Set a flag and allow worker threads to finish upon ^C, instead of
immediately cancelling them, so that final packet count and rate
stats can be displayed.
2012-07-06 13:21:23 +00:00
David E. O'Brien
6e50170633 Remove the "funny targets" make check. We no longer need embedded :: targets
to build FreeBSD (they are used in Perl man pages).  We never needed embedded
"!" in targets that I can find.

We got this from OpenBSD and I cannot find any other make that supports
such things -- contrary to their commit message claim: "This behaviour
is also consistent with other versions of make.".
2012-07-05 18:23:36 +00:00
Pawel Jakub Dawidek
64b0683e23 Recognize 'none' or '0' as no flags. 2012-07-04 17:31:53 +00:00
Ed Maste
8585b1b890 Update comment to reflect function's actual operation 2012-07-03 17:50:44 +00:00
Marcel Moolenaar
7b736a7a50 A cross-reference takes a man page section as well. Assume pkg(1),
based on pkg_add(1).
2012-07-02 20:26:11 +00:00
Marcel Moolenaar
3ac7d74c80 Add description for INSTALL_AS_USER 2012-07-02 20:24:01 +00:00
Marcel Moolenaar
7a0eaad3ab Fix typo in option description file (using svn move). 2012-07-02 20:01:48 +00:00
Baptiste Daroussin
2f3a9ba57f New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of usr.sbin/pkg
Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, so that users can
remove the old pkg_* tools without removing the pkgng boostrap

Approved by:	des (mentor)
MFC after:	1 month
2012-07-02 15:28:50 +00:00
Adrian Chadd
70e54a7450 Bump this up - that way the AR9300 and later MACs get covered (for now)
by the AR5416 register map.
2012-06-30 01:40:29 +00:00
David E. O'Brien
3de8393d5b Support also running a 32-bit test on 64-bit platforms. 2012-06-29 15:54:07 +00:00
Ed Maste
f067248f64 Fix ioctl type for compiling with clang 2012-06-28 20:10:43 +00:00
Konstantin Belousov
044eae4c80 Add a test for number of CPUs configured/online.
MFC after:	1 week
2012-06-27 20:34:29 +00:00
Gabor Kovesdan
7d26b3ee33 - Switch to BSD sort as default sort. GNU sort will still be installed as
"gnusort".  Most of the BSD sort development work was done by
  Oleg Moskalenko <oleg.moskalenko@citrix.com>.
- GNU grep can be set to default by setting WITH_GNU_GREP.  It will cause
  BSD sort to be installed as "bsdsort".

Portbuild tested by:    linimon
2012-06-27 05:59:01 +00:00
Kevin Lo
c61325d009 Correct sizeof usage
Obtained from:	DragonFly
2012-06-25 05:41:16 +00:00
David E. O'Brien
3fbd14b443 Provide a mechanism to not clear out the work and output dirs when
developing tests.
2012-06-20 21:38:16 +00:00
Adrian Chadd
fb148d836f Convert athdebug to use the 64 bit dev.ath.X.debug sysctl. 2012-06-15 20:08:13 +00:00
Adrian Chadd
7e7f083f94 Add the AMPDU BAR TX statistics to the "ampdu" tag. 2012-06-15 08:37:46 +00:00
David E. O'Brien
cca63ae56b Add a test for the :tl & :tu modifiers. 2012-06-12 23:16:00 +00:00
Adrian Chadd
82097519cd Add athaggrstats to the ath(4) tools build. 2012-06-10 06:44:19 +00:00
Adrian Chadd
343de1138d Flesh out 'athaggrstats', a utility which will display the aggregation
specific statistics for ath(4).
2012-06-10 06:44:04 +00:00
Jilles Tjoelker
b347830a7d sh: Do not assume that SIGPIPE will only kill a subshell in builtins/wait3.0
test.

POSIX says that SIGPIPE affects a process and therefore a SIGPIPE caused and
received by a subshell environment may or may not affect the parent shell
environment.

The change assumes that ${SH} is executed in a new process. This must be the
case if it contains a slash and everyone appears to do so anyway even though
POSIX might permit otherwise.

This change makes builtins/wait3.0 work in ksh93.
2012-06-08 22:54:25 +00:00
Bjoern A. Zeeb
2a4989cd1c TinyBSD now seems to be hosted elsewhere. 2012-06-07 09:14:28 +00:00
Konstantin Belousov
cec88f9c0d Do not execute a needed statement with side-effect in assert().
MFC after:	3 days
2012-06-06 17:26:52 +00:00
Konstantin Belousov
548194db7d Add gettimeofday() test.
MFC after:	3 days
2012-06-06 16:26:55 +00:00
Maksim Yevmenkin
11e3340235 Fix license
Pointed by:	brueffer
2012-06-05 22:02:27 +00:00
Maksim Yevmenkin
f8986f6838 Add a very simple debug tool that would dump list of interfaces,
addresses on each interface, and, associated refcounter. I found
it handy to check for address refcounter leaks.
2012-06-05 21:35:47 +00:00
David E. O'Brien
30a39288e4 Correct examples to the latest version I had. 2012-06-05 17:36:28 +00:00
David E. O'Brien
432a06aa01 Add a regression test for filemon(4) [r236592]. 2012-06-04 22:59:33 +00:00
David E. O'Brien
ede27e69cf Add regression test for '-V' command line option (requires r236346). 2012-05-31 01:07:52 +00:00
David E. O'Brien
6abbb4f561 make it easier to check newly-built make 2012-05-30 22:27:34 +00:00
David E. O'Brien
a35a9551c4 make it easier to test newly-built make. 2012-05-30 22:26:16 +00:00
Glen Barber
691b39b51e Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.
MFC after:	3 days
2012-05-30 02:37:20 +00:00
Dimitry Andric
0378662f5b Vendor import of llvm release_31 r156863 (the actual 3.1 release):
http://llvm.org/svn/llvm-project/llvm/branches/release_31@156863
2012-05-23 21:37:39 +00:00
Baptiste Daroussin
98e903e7a0 Import byacc from invisible island, it brings us lots of compatibilities with
bison, keeping full compatibility with our previous yacc implementation.

Also bring the ability to create reentrant parser

This fix bin/140309 [1]

PR:		bin/140309 [1]
Submitted by:	Philippe Pepiot <ksh@philpep.org> [1]
Approved by:	des (mentor)
MFC after:	1 month
2012-05-21 13:31:26 +00:00
Kevin Lo
8b0349c836 According to shared memory man pages, advice including <sys/types.h>
instead of <sys/param.h>
2012-05-21 07:52:46 +00:00
Marcel Moolenaar
6607596344 Document the ED_CRYPTO and LS_COLORS options.
Obtained from:	Juniper Networks, Inc.
2012-05-19 20:05:27 +00:00
Grzegorz Bernacki
7f725bcd5c Import work done under project/nand (@235533) into head.
The NAND Flash environment consists of several distinct components:
  - NAND framework (drivers harness for NAND controllers and NAND chips)
  - NAND simulator (NANDsim)
  - NAND file system (NAND FS)
  - Companion tools and utilities
  - Documentation (manual pages)

This work is still experimental. Please use with caution.

Obtained from: Semihalf
Supported by:  FreeBSD Foundation, Juniper Networks
2012-05-17 10:11:18 +00:00
Andriy Gapon
e795314880 zfsboottest: update for the recent zfs boot code changes
MFC after:	1 month
2012-05-13 09:27:08 +00:00
Glen Barber
a5e4c905ee Regenerate src.conf(5) for mdoc(7) and typo corrections.
PR:		167804
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-12 16:12:36 +00:00
Gabor Kovesdan
1aaed33edb - Add regression tests for BSD sort 2012-05-11 16:04:55 +00:00
Gabor Kovesdan
85d7de106c - Hook up BSD sort to the build. By default, it will be installed as
"bsdsort" and GNU sort will be the default "sort".  When WITH_BSD_SORT
  is set, BSD sort will be the default "sort" and GNU sort will be installed
  as "gnusort".
2012-05-11 12:47:21 +00:00
Eitan Adler
60533c20a2 Add some missing files to OLD_FILES
PR:		conf/166460
Submitted by:	Jeremy Chadwick <freebsd@jdc.parodius.com>
Reviewed by:	stable@
Approved by:	cperciva
MFC after:	2 weeks
2012-05-09 17:30:44 +00:00
Andriy Gapon
05795a78d2 zfsboottest.sh: correctly check and suggest value of vfs.root.mountfrom
... it was missing "zfs:" prefix.

Reported by:	theraven
MFC after:	10 days
2012-05-07 15:06:07 +00:00
Andriy Gapon
efeadeff78 zfsboottest.sh: gracefully handle default value of bootfs property
Reported by:	theraven
MFC after:	10 days
2012-05-07 15:03:42 +00:00
Luigi Rizzo
4a8b689486 indicate the time per packet in nanoseconds. 2012-05-03 21:03:21 +00:00
Luigi Rizzo
fb38ae2030 add support for pcap receive statistics (used by net-mgmt/darkstat) 2012-05-03 17:08:40 +00:00
Dimitry Andric
6b9a6e390f Vendor import of clang release_31 branch r155985:
http://llvm.org/svn/llvm-project/cfe/branches/release_31@155985
2012-05-03 16:53:59 +00:00
Dimitry Andric
b61ab53cb7 Vendor import of llvm release_31 branch r155985:
http://llvm.org/svn/llvm-project/llvm/branches/release_31@155985
2012-05-03 16:50:55 +00:00
Luigi Rizzo
b9cd48d64c add some performance data 2012-05-03 16:09:44 +00:00
Luigi Rizzo
99fb123f8d - add code to run pkt-gen on top of libpcap so we can see the
difference from a native API

- add some testing options, such as conditional prefetching and
  packet copy.
2012-05-03 15:37:05 +00:00
Luigi Rizzo
df76012c5b - correct a bug in pcap_dispatch(): a count of 0 means infinity.
- in pcap_dispatch(), issue a prefetch on the buffer before the
  callback, this may save a little bit of time if the client
  is very fast.

- in pcap_inject(), use a fast copy routine, which also helps
  saving a few nanoseconds with fast clients.
2012-05-03 15:34:44 +00:00
Baptiste Daroussin
2b42644bb2 Import m4 regression tests from OpenBSD
Obtained from:	OpenBSD
Approved by:	des (mentor)
2012-04-30 22:00:34 +00:00
Konstantin Belousov
4f20e4f263 Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the
toolchain binaries as dynamically linked.  Option is disabled by
default.

Reviewed by:	ru (previous version)
MFC after:	2 weeks
2012-04-29 09:32:44 +00:00
Adrian Chadd
ab07718555 Change cc -> bc : "bc" is "busy count", which is the % of time the channel
is considered "busy but not doing any active TX or frame RX."

Just keep in mind that "frame RX" is "decoding what looks like a wifi
signal", not necessarily "frame successfully decoded for this particular
device."
2012-04-28 23:13:09 +00:00
Adrian Chadd
dd025d9a62 Add a tool to print out min, average and max channel survey information
from the current channel.

There seem to be some occasional issues with the extension channel
counters reporting more than 100% of use.  I'll investigate that
soon.
2012-04-28 08:17:19 +00:00
Dimitry Andric
4d04782c41 Add files and directories to be cleaned up if WITHOUT_GCC is in effect
to OptionalObsoleteFiles.inc.

MFC after:	1 week
2012-04-14 16:42:17 +00:00
Dimitry Andric
dbe13110f5 Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
2012-04-14 14:01:31 +00:00
Dimitry Andric
63faed5b8e Vendor import of llvm trunk r154661:
http://llvm.org/svn/llvm-project/llvm/trunk@r154661
2012-04-14 13:54:10 +00:00
Luigi Rizzo
d76bf4ff7b A bit of cleanup in the names of fields of netmap-related structures.
Use the name 'ring' instead of 'queue' in all fields.
Bump NETMAP_API.
2012-04-13 16:03:07 +00:00
Luigi Rizzo
aaca8f41f5 use getopt to parse options, add one option to set
the wait time for link-up events
2012-04-12 08:38:56 +00:00
Adrian Chadd
87632709bc Teach wlanstats about the new BAR TX statistics. 2012-04-08 04:51:43 +00:00
Adrian Chadd
d61c74edc5 Add AR_ISR_S5 and AR_ISR_S5_S. 2012-04-08 04:42:53 +00:00
David Schultz
afbcb86218 Add some tests from PR 166463. Also make sure that all of the tests,
old and new, check the sign bits of both the remainder and the
quotient.
2012-04-07 04:00:30 +00:00
Luigi Rizzo
87a9e4379e we need to specify a NETMAP_API version or the ioctl() will fail. 2012-04-06 14:26:05 +00:00
Adrian Chadd
2fe1131c7b Add a threadid to the ah_decode API.
This adds the current thread ID to each logged register and mark entry,
allowing for easier debugging of concurrent/overlapping NIC operations.
2012-04-04 20:46:20 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Stanislav Sedov
a146c2a961 - Add new kerberos libraries to the list of optional obsolete files. 2012-03-23 03:43:04 +00:00
Stanislav Sedov
0e46933c08 - Do not build libcom_err and compile_et when kerberos is disabled. They
depends on several heimdal libraries and not used by anything but kerberos
  tools.
2012-03-23 03:16:35 +00:00
Stanislav Sedov
ae77177087 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
Hans Petter Selasky
628fb5f412 Use new -n option when executing kldload, to
not warn about already loaded module(s).

MFC after:	1 week
2012-03-18 09:47:27 +00:00
Adrian Chadd
de7eaa191e Add a BINDIR so "make install" works. 2012-03-13 20:30:23 +00:00
Jilles Tjoelker
6d2b152f70 sh: Add a test for variables with underscores in arithmetic.
Things like $((_x+1)) are broken in stable/8 sh but work in stable/9 and
head.
2012-03-11 22:12:05 +00:00
Adrian Chadd
7223938408 Stop some of the output from wrapping at 80 characters. 2012-03-11 02:00:59 +00:00
Bjoern A. Zeeb
2460e894e3 Use = rather than == for expressions to test(1) builtin(1) in sh(1) to
comply with standards.

On modern branches there is an undocumented alias (see r219084) but on
stable/7 this is still an error.

Sponsored by:	Cisco Systems, Inc.
MFC after:	3 days
2012-03-06 14:19:36 +00:00
Hans Petter Selasky
53accc0452 Add regression test for USB enumeration.
MFC after:	1 week
2012-03-01 20:45:17 +00:00
Dimitry Andric
dfbaea8347 Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

Note this does *not* disable building and installing gcc, which will
still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
you want to disable gcc completely, you must use WITHOUT_GCC.

MFC after:	2 weeks
2012-02-29 22:58:51 +00:00
Christian Brueffer
bb729f8549 Fix order of arguments to lseek().
PR:		160867
Submitted by:	Henning Petersen <henning.petersen@t-online.de>
MFC after:	1 week
2012-02-29 19:50:49 +00:00
Adrian Chadd
9fb41787f5 Add is_beacon_bad.
PR:		kern/165517
2012-02-28 04:06:42 +00:00
Luigi Rizzo
64ae02c365 A bunch of netmap fixes:
USERSPACE:
1. add support for devices with different number of rx and tx queues;

2. add better support for zero-copy operation, adding an extra field
   to the netmap ring to indicate how many buffers we have already processed
   but not yet released (with help from Eddie Kohler);

3. The two changes above unfortunately require an API change, so while
   at it add a version field and some spares to the ioctl() argument
   to help detect mismatches.

4. update the manual page for the two changes above;

5. update sample applications in tools/tools/netmap

KERNEL:

1. simplify the internal structures moving the global wait queues
   to the 'struct netmap_adapter';

2. simplify the functions that map kring<->nic ring indexes

3. normalize device-specific code, helps mainteinance;

4. start exploring the impact of micro-optimizations (prefetch etc.)
   in the ixgbe driver.
   Use 'legacy' descriptors on the tx ring and prefetch slots gives
   about 20% speedup at 900 MHz. Another 7-10% would come from removing
   the explict calls to bus_dmamap* in the core (they are effectively
   NOPs in this case, but it takes expensive load of the per-buffer
   dma maps to figure out that they are all NULL.

   Rx performance not investigated.

I am postponing the MFC so i can import a few more improvements
before merging.
2012-02-27 19:05:01 +00:00
Jilles Tjoelker
9901e05690 Check fchmod()/fchown() in fifo_misc test. 2012-02-26 15:32:02 +00:00
Bjoern A. Zeeb
0e7ed5d666 Update scripts to work around two sh(1) bugs found in stable/8:
1) _x=$((_x + 1)) does not work while x=$((x + 1)) does.
2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted.

Correct typos and improve some details forwarding.sh already
had in initiator, esp. related to ipfw accepting if the default
is deny.

Add an extra stat call to the "delay" function in addition to the
touch which together is still a lot faster than sleep 1 but seems
to help a lot more to mitigate the unrelated kernel race seen.

Sponsored by:   Cisco Systems, Inc.
2012-02-24 14:13:06 +00:00
Jilles Tjoelker
45ff61e969 libc: Add some tests for fmtmsg(). 2012-02-21 23:46:41 +00:00
Adrian Chadd
caee7d9ca4 Fix up this local copy of statfoo to support > 128 statistics.
This allows all of the athstats statistics to work again.

Specifics:

* The previous code used chars < 0x80 as printable, and chars >= 0x80
  as "statistics"
* .. which meant any statistic above 127 would wrap around to 0;
* .. so once I added the 802.11n TX/RX statistics to athstats, the tail
  end of the statistics list weren't accessible.

This patch:

* adds a define which represents the magic character, rather than a hard
  coded one
* the statistic in question is little endian encoded after the magic
  character.

Notes:

* statfoo is useful enough to possibly warrant turning into a library API.
2012-02-17 08:24:58 +00:00
Bjoern A. Zeeb
d3373029e2 Add regression tests scripts for multi-IP FIBs exercising the send,
receive and forward path tagging packets with both the ifconfig fib
option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and
testing both setfib(2) as well as the SO_SETFIB socket option.

At 16 FIBs a total of over 64k return codes/replies/stati are checked,
sometimes multiple times (in different ways, e.g. the reflected request
as well as ipfw counter values).

The scripts need two or three machines to run and are thus not added
to the tools/regression framework but only to tools/test.

Sponsored by:	Cisco Systems, Inc.
2012-02-17 04:26:24 +00:00
Bjoern A. Zeeb
e6f0fd5898 Add regression tests for the setsockopt(2) SO_SETFIB socket option.
Check that the expected domain(9) families all handle the socket option
correctly and do proper bounds checks.  This would catch bugs as fixed
in (r230938,)r230981.

Sponsored by:	Cisco Systems, Inc.
2012-02-17 03:25:26 +00:00
Adrian Chadd
3c7c299133 Add some missing radar config parameters. 2012-02-14 20:08:50 +00:00
George V. Neville-Neil
77b7d3b2e6 Remove UCP from the list of counters 2012-02-14 18:57:10 +00:00
George V. Neville-Neil
f9166e7c3d Add options for program (-p) and to turn off waiting (-w) which is now
on by default.

The default is to wait after each counter is tested.  Since the prompt
would go to stdout you won't see it if you're redirecting the output
of the executed sub-program to /dev/null, so just press return to
continue or Ctrl-D to stop.
2012-02-14 18:51:21 +00:00
George V. Neville-Neil
2542e55879 Add a rudimentary test to run through all the available counters on a
system and then execute a program with pmcstat in counting mode.

The program will verify that all counters fire and that the code neither
panics the system nor locks it up.  This should be considered a first pass
conformance test for new sets of counters being added to hwpmc(4).
2012-02-14 04:18:59 +00:00
Max Khon
42e4b4f7df Include target names in diagnostic output.
Submitted by:	Garrett Cooper
2012-02-12 05:34:01 +00:00
Jilles Tjoelker
c0b3cf0676 sh: Make 'hash' return 1 if at least one utility is not found.
Reported by:	lme
2012-02-11 21:06:45 +00:00
Ed Schouten
71d8432f98 Replace utxrm(8) by utx(8).
At first, I added a utility called utxrm(8) to remove stale entries from
the user accounting database. It seems there are cases in which we need
to perform different operations on the database as well. Simply rename
utxrm(8) to utx(8) and place the old code under the "rm" command.

In addition to "rm", this tool supports "boot" and "shutdown", which are
going to be used by an rc-script which I am going to commit separately.
2012-02-11 20:28:42 +00:00
Konstantin Belousov
e1976efd69 Add a test program for recently added ptrace(2) interfaces.
MFC after:	1 week
2012-02-10 21:33:12 +00:00
Luigi Rizzo
5819da83ce - change the buffer size from a constant to a
TUNABLE variable (hw.netmap.buf_size) so we can experiment
  with values different from 2048 which may give better cache performance.

- rearrange the memory allocation code so it will be easier
  to replace it with a different implementation. The current code
  relies on a single large contiguous chunk of memory obtained through
  contigmalloc.
  The new implementation (not committed yet) uses multiple
  smaller chunks which are easier to fit in a fragmented address
  space.
2012-02-08 11:43:29 +00:00
Ed Schouten
e048cf369a Add a `fix' for another whitespace bug.
If the sentence starts with a multiple of eight spaces, the sentence
should in almost all practical cases have started with tabs instead.
Replace these spaces by tabs.
2012-02-06 18:52:40 +00:00
Ed Schouten
509b0c2039 Add fixwhite(1).
This small utility can be used to `sanitize' the whitespace in source
code. It does the following things:

Global:
- Remove empty lines at the beginning and the end of a file.
- Merge successive empty lines into a single empty line.

Per-line:
- Remove trailing whitespace.
- Merge spaces preceeding tabs into the tabs.

It operated on stdin/stdout. This means that if you use vi(1), you can
just run :%!fixwhite to reorganize the file.
2012-02-06 10:23:11 +00:00
Dimitry Andric
6bb1cadd56 Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

MFC after:	2 weeks
2012-02-05 23:56:22 +00:00
Robert Millan
4a47892c81 Add MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
kernel modules that include binary-only code.

More fine-grained control is provided via MK_SOURCELESS_HOST (for native code
that runs on host CPU) and MK_SOURCELESS_UCODE (for microcode).

Reviewed by:	julian, delphij, freebsd-arch
Approved by:	kib (mentor)
MFC after:	2 weeks
2012-02-04 00:54:43 +00:00
Adrian Chadd
10677921cd Add some missing radar config parameters to athradar. 2012-02-02 21:04:24 +00:00
Alexander Leidinger
9b3e7585a8 - remove non-existent input directories from the configs
- add the target-arch to the project name where applicable (arch dependend code)
- fix comment for __FreeBSD__ [1]

Noticed by:	bz	[1]
2012-02-01 10:59:19 +00:00
Edward Tomasz Napierala
276fa791b6 More mdconfig(8) tests. 2012-01-26 18:16:16 +00:00
Edward Tomasz Napierala
7cb6292d52 Move mdconfig(8) tests under regression/sbin/, where they belong.
Submitted by:	jh@
2012-01-25 10:11:54 +00:00
Alexander Leidinger
b5a02379fa Just define __FreeBSD__ to 1 instead of doing what the compiler does.
The kernel is supposed to DTRT based upon the __FreeBSD_version value,
not the value of __FreeBSD__.

Discussed with:	bz
2012-01-24 15:13:55 +00:00
Edward Tomasz Napierala
1aeaf00340 Add some basic regression tests for mdconfig(8). 2012-01-24 13:23:52 +00:00
Alexander Leidinger
02068a2420 We are in FreeBSD 10 now: define __FreeBSD__ to 10. 2012-01-24 11:06:22 +00:00
Alexander Leidinger
07c1584e76 Mechanically add a config for all missing drivers.
No cross-referencing was added to the configs, so no
automatic linking to the documentation of other subsystems.

Drivers which already contain doxygen markup:
agp ath bktr bxe cxgb cxgbe dpt drm e1000 iir
ixgbe mwl nxge ofw pccard siba wpi xen
2012-01-23 11:37:40 +00:00
Jilles Tjoelker
6eff4a75d5 sh: Fix $? in the first command of a 'for'.
In the first command of a 'for', $? should be the exit status of the last
pipeline (command substitution in the word list or command before 'for'),
not always 0.
2012-01-22 14:00:33 +00:00
Adrian Chadd
11e66657d7 Bring over the visibility control tool for Monthadar's wtap project.
This allows basic control over which wtap nodes can see which other
wtap nodes.
2012-01-22 04:51:00 +00:00
David Schultz
b831cdf6b1 These tests check whether the compiler evaluates floating-point
expressions properly.  Some of the tests depend on the compiler
implementing C99's FENV_ACCESS pragma, and only commercial compilers
do; those tests are currently skipped.  If any of the enabled tests
fail, then odds are the libm regression tests will fail also.
This should make it easier to diagnose reported problems on platforms
I don't have.

Currently, gcc passes all the tests that don't depend on FENV_ACCESS
on amd64 and sparc64.  Clang fails a few on amd64 (see clang bug
11406).  Both gcc and clang fare poorly on i386, which has well-known
issues.
2012-01-20 06:57:21 +00:00
Jean-Sébastien Pédron
01a43bcf7b sh: Fix execution of multiple statements in a trap when evalskip is set
Before this fix, only the first statement of the trap was executed if
evalskip was set. This is for example the case when:
    o  "-e" is set for this shell
    o  a trap is set on EXIT
    o  a function returns 1 and causes the script to abort

Reviewed by:	jilles
MFC after:	2 weeks
2012-01-16 11:07:46 +00:00
Jean-Sébastien Pédron
cb1c8e8ced sh: Test EXIT trap with multiple statements in it
Reviewed by:	jilles
MFC after:	2 weeks
2012-01-16 10:59:44 +00:00
Jilles Tjoelker
93fcb2511b sh: Fix some bugs with exit status from case containing ;&.
Also, rework evalcase() to not evaluate any tree. Instead, return the
NCLISTFALLTHRU node and handle it in evaltree().

Fixed bugs:

* If a ;& list with non-zero exit status is followed by an empty ;; or final
  list, the exit status of the case command should be equal to the exit
  status of the ;& list, not 0.

* An empty ;& case should not reset $?.
2012-01-15 21:39:38 +00:00
Jilles Tjoelker
92371efca2 sh: Fix two bugs with case and exit status:
* If no pattern is matched, POSIX says the exit status shall be 0 (even if
  there are command substitutions).
* If a pattern is matched and there are no command substitutions, the first
  command should see the $? from before the case command, not always 0.
2012-01-15 20:04:05 +00:00
Jilles Tjoelker
d0766f8d45 sh: Add testcases that should not be broken by future optimizations. 2012-01-14 23:10:18 +00:00
David Schultz
d302778ed3 Add .t files for tests, missed in prior checkins, so that prove(1) works
in this directory.
2012-01-14 21:38:31 +00:00
David Schultz
5d9e02dba4 Update the tests for arm and other ports where long double is the same
as double, similar to r178141.
2012-01-14 21:09:54 +00:00
David Schultz
3e7ed66b1e Fix a test that doesn't work on architectures where long double is no
wider than double.  Thanks to Ian Lepore for catching the bug.
2012-01-14 08:11:40 +00:00
Jilles Tjoelker
e94e3511bd sh: Properly show "Not a directory" error in cd builtin.
The errno message display added in r222292 did not take attempting to
cd to a non-directory or something that cannot be stat()ed into account.

PR:		bin/164070
MFC after:	10 days
2012-01-13 23:32:27 +00:00
Ed Schouten
f9d9bcd45e Remove wtmpcvt(1).
The wtmpcvt(1) utility converts wtmp files to the new format used by
utmpx(3). Now that HEAD has been branched to stable/9 and 9.0 is
released, there is no need for it in HEAD.

MFC after:	never
2012-01-13 15:40:49 +00:00
Adrian Chadd
418b9e0c1b Bring over a tool to create and destroy wtap instances.
Submitted by:	Monthadar Al Jaberi <monthadar@gmail.com>
2012-01-11 17:51:56 +00:00
Eitan Adler
2394cc2228 X11BASE has been deprecated for a long time and will die soon
Approved by:	x11 (eadler)
Approved by:	brucec
MFC after:	1 week
2012-01-09 00:48:19 +00:00
Jilles Tjoelker
c6791c926e sh: Avoid possible echo options in a testcase. 2012-01-06 23:20:33 +00:00
Adrian Chadd
6b1dcfcd83 Import the first cut of "bsdbox".
This uses the existing crunchgen infrastructure to build
a series of tools designed to replace the base and networking
tools on an embedded system.

It reuses 'bsd.crunchgen.mk' to drive the actual file
creation. The rescue build system also uses this.

Unlike busybox, it doesn't include its own source - instead,
it just builds from the sources in /usr/src/ and leverages
the existing BSD framework.

Thie is still quite messy and could do with a whole lot of
cleaning up.   However it is proving to be very useful with
my current build framework, allowing me to build binary root
images that are about 30% less than simply cherrypicking files
and libraries from an installworld.
2012-01-06 00:56:31 +00:00
Ulrich Spörlein
381edcda1e Convert files over to UTF-8.
These files contained various combinations of Big5, eucJP and KOI8-U
encoded strings. The byte representations of their respective encodings
have been translated to $'...' escape sequences as understood by our sh(1).

With help from:	jilles
2012-01-05 21:36:53 +00:00
Pawel Jakub Dawidek
ba804f54f9 Fix an obvious typo. We do want to specify file permission when we pass O_CREAT. 2012-01-03 22:52:29 +00:00
Robert Watson
6508f34eb6 Add WITHOUT_CAPSICUM src.conf(5) define, which can be used to compile out
use of Capsicum by userspace applications.

MFC after:	3 weeks
Sponsored by:	Google, Inc.
2012-01-02 21:57:58 +00:00
Jean-Sébastien Pédron
840fac731b Adapt testsuite following change in Domain Search error handling
In this testsuite, warning() and error() have the same behaviour.

PR:		bin/163431
Sponsored by:	Yakaz (http://www.yakaz.com)
2011-12-30 14:41:47 +00:00
Ulrich Spörlein
8ce070c1b2 Spelling fixes for tools/
Add some $FreeBSD$ tags so svn will allow the commit.
2011-12-30 00:04:11 +00:00
Robert Watson
b77dd854a8 Fix typo in comment.
MFC after:	3 days
2011-12-29 15:34:59 +00:00
Ulrich Spörlein
47e236b178 Reencode files from latin1 to UTF-8. 2011-12-29 12:33:27 +00:00
Jilles Tjoelker
3a1b9c9e82 sh: Allow quoting ^ and ] in bracket expressions. 2011-12-28 23:51:17 +00:00
Olivier Houchard
0044d1b553 Oops, if we want to check from 0 to nsock, the test condition should be
< nsock, not >.

Pointy hat to:	cognet
Submitted by:	Olivier Cochard-Labbe <olivier AT cochard doT me>
2011-12-28 13:01:12 +00:00
Adrian Chadd
d015e7e4d2 Oops, my bad. Fix a broken thing I introduced earlier. 2011-12-26 19:41:46 +00:00
Jilles Tjoelker
80cdf644e6 sh: Add some testcases for pasting $*/$@ directly to a literal.
This also passes on stable/8.
2011-12-25 13:24:48 +00:00
Adrian Chadd
61c0c6fe76 Add in ath_ee_9287_print. 2011-12-23 02:57:18 +00:00
Navdeep Parhar
7be5be337a Catch up with new driver ioctls in cxgbe.
MFC after:	1 month
2011-12-16 20:38:22 +00:00
Navdeep Parhar
733b92779e Many updates to cxgbe(4)
- Device configuration via plain text config file.  Also able to operate
  when not attached to the chip as the master driver.

- Generic "work request" queue that serves as the base for both ctrl and
  ofld tx queues.

- Generic interrupt handler routine that can process any event on any
  kind of ingress queue (via a dispatch table).

- A couple of new driver ioctls.  cxgbetool can now install a firmware
  to the card ("loadfw" command) and can read the card's memory
  ("memdump" and "tcb" commands).

- Lots of assorted information within dev.t4nex.X.misc.*  This is
  primarily for debugging and won't show up in sysctl -a.

- Code to manage the L2 tables on the chip.

- Updates to cxgbe(4) man page to go with the tunables that have changed.

- Updates to the shared code in common/

- Updates to the driver-firmware interface (now at fw 1.4.16.0)

MFC after:	1 month
2011-12-16 02:09:51 +00:00
Max Khon
548f8e2d41 Fix last-minute typo. 2011-12-15 06:12:43 +00:00
Max Khon
174da58b23 Add job error output test.
make(1) with openpty() currently fails this test: there's a race condition
and error output is sometimes lost.
2011-12-15 06:01:06 +00:00
Jilles Tjoelker
1fc7f6471e Add a test for r228510. 2011-12-14 23:26:48 +00:00
Dimitry Andric
8f506e9e08 Add more files to cleanup with 'make delete-old' when WITHOUT_CLANG is
in effect.

MFC after:	1 week
2011-12-11 14:01:11 +00:00
John Baldwin
f627c55e7e - Add a test for PR 151758.
- While here, make this compile and work on non-i386:
  - Use CMSG_SPACE(), CMSG_LEN(), and CMSG_FIRSTHDR() instead of ignoring
    padding between 'struct cmsghdr' and control message payloads.
  - Don't initialize the control message before calling recvmsg().
    Instead, check that we get a valid control message on return from
    recvmsg().
- Use errx() instead of err() for some errors that don't report failures
  that set errno.

Requested by:	kib (1)
2011-12-09 19:24:17 +00:00
Dimitry Andric
d4c8b5d2e8 Vendor import of llvm 3.0 final release:
http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_30/final@145349
2011-12-09 18:27:22 +00:00
Luigi Rizzo
506cc70cce 1. Fix the handling of link reset while in netmap more.
A link reset now is completely transparent for the netmap client:
   even if the NIC resets its own ring (e.g. restarting from 0),
   the client will not see any change in the current rx/tx positions,
   because the driver will keep track of the offset between the two.

2. make the device-specific code more uniform across different drivers
   There were some inconsistencies in the implementation of the netmap
   support routines, now drivers have been aligned to a common
   code structure.

3. import netmap support for ixgbe . This is implemented as a very
   small patch for ixgbe.c (233 lines, 11 chunks, mostly comments:
   in total the patch has only 54 lines of new code) , as most of
   the code is in an external file sys/dev/netmap/ixgbe_netmap.h ,
   following some initial comments from Jack Vogel about making
   changes less intrusive.
   (Note, i have emailed Jack multiple times asking if he had
   comments on this structure of the code; i got no reply so
   i assume he is fine with it).

Support for other drivers (em, lem, re, igb) will come later.

"ixgbe" is now the reference driver for netmap support. Both the
external file (sys/dev/netmap/ixgbe_netmap.h) and the device-specific
patches (in sys/dev/ixgbe/ixgbe.c) are heavily commented and should
serve as a reference for other device drivers.

Tested on i386 and amd64 with the pkt-gen program in tools/tools/netmap,
the sender does 14.88 Mpps at 1050 Mhz and 14.2 Mpps at 900 MHz
on an i7-860 with 4 cores and 82599 card. Haven't tried yet more
aggressive optimizations such as adding 'prefetch' instructions
in the time-critical parts of the code.
2011-12-05 12:06:53 +00:00
Eitan Adler
0a79dbc6b5 Fix some uninitialized variables in pipe regression tests that result in
failure.

PR:		misc/161175
Submitted by:	gianni@
Approved by:	nwhitehorn@
MFC after:	1 week
2011-12-05 04:20:13 +00:00
Jean-Sébastien Pédron
409139f051 Support domain-search in dhclient(8)
The "domain-search" option (option 119) allows a DHCP server to publish
a list of implicit domain suffixes used during name lookup. This option
is described in RFC 3397.

For instance, if the domain-search option says:
    ".example.org .example.com"
and one wants to resolve "foobar", the resolver will try:
    1. "foobar.example.org"
    2. "foobar.example.com"

The file /etc/resolv.conf is updated with a "search" directive if the
DHCP server provides "domain-search".

A regression test suite is included in this patch under
tools/regression/sbin/dhclient.

PR:		bin/151940
Sponsored by	Yakaz (http://www.yakaz.com)
2011-12-04 14:44:31 +00:00
Max Khon
5f73185f0f Revert to conservative defaults. WITH_PROFILE is a default now.
NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact
so that the reversal to the WITHOUT_PROFILE will be easier in future.
2011-12-02 09:09:54 +00:00
Konstantin Belousov
8df934eb55 Add a simple test for pipe inode numbers reported by fstat(2).
Submitted by:	gianni
MFC after:	1 week
2011-12-01 11:20:25 +00:00
Max Khon
e90e78598e Add WITH_CTF description. 2011-11-30 18:22:44 +00:00
Max Khon
df62aec1a0 Add three execution tests for make(1):
- plus: execute "+command" when run with -jX -n
- ellipsis: ellipsis ("...") from variable
- empty: empty command (from variable)

Currently make(1) fails all three tests:
- plus: segmentation fault due to incorrect command list handling
- ellipsis: works in compat mode but fails in job (-jX) mode
- empty:
        - compat mode: prints error message
	- job mode: works but prints empty string
2011-11-30 05:49:17 +00:00
Max Khon
d0ed1ea4b7 Turn off profiled libs build by default.
Can be enabled back using WITH_PROFILE=yes in /etc/src.conf
2011-11-29 19:46:17 +00:00
Jilles Tjoelker
f4f4b264b5 test: Add more testcases.
The new testcases pass even on old stable/7, but some other implementations
manage to get them wrong.

Also remove a few duplicate testcases.
2011-11-28 23:10:53 +00:00
Dimitry Andric
34b874d804 Add WITH_LIBCPLUSPLUS under tools/build/options; the knob itself was
already added in a previous revision.
2011-11-28 17:56:46 +00:00
Max Khon
c33e09b444 Add a comment that shows how to limit the build to the specific list of arches. 2011-11-28 14:03:36 +00:00
Jilles Tjoelker
0d4c3087c0 sh: Add tests for some corner cases of 'case' exit status.
These already work properly.
2011-11-26 22:28:25 +00:00
Max Khon
b8a1e4a8c3 Add missing ;; 2011-11-24 14:22:05 +00:00
Max Khon
bc14d7f4c4 Utility script to build specific parts of the source tree on all arches 2011-11-24 14:16:01 +00:00
Adrian Chadd
317d14cf46 Tidy up the statistic documentation.
Sponsored by:	Hobnob, Inc.
2011-11-23 05:03:27 +00:00
Adrian Chadd
1df8da4c64 Add the new statistics introduced in r227868.
Sponsored by:	Hobnob, Inc.
2011-11-23 05:01:23 +00:00
Jilles Tjoelker
bf3db314f7 sh: Allow unsetting OPTIND.
Note that only assigning the decimal value 1 resets getopts, as before.
2011-11-20 21:48:50 +00:00
Dimitry Andric
fd75cb79ce Revert r227538, since it doesn't compile with clang at all (it doesn't
allow the built-in operations to be redefined, at least not without
excessive force).

Instead, just disable LLVM's support for atomic operations for now.
Nothing in either clang or the tablegen tools currently depends on it.

This still allows users of head built before r198344 to upgrade to
top-of-head seamlessly.
2011-11-17 21:06:53 +00:00
Luigi Rizzo
68b8534bdf Bring in support for netmap, a framework for very efficient packet
I/O from userspace, capable of line rate at 10G, see

	http://info.iet.unipi.it/~luigi/netmap/

At this time I am bringing in only the generic code (sys/dev/netmap/
plus two headers under sys/net/), and some sample applications in
tools/tools/netmap. There is also a manpage in share/man/man4 [1]

In order to make use of the framework you need to build a kernel
with "device netmap", and patch individual drivers with the code
that you can find in

	sys/dev/netmap/head.diff

The file will go away as the relevant pieces are committed to
the various device drivers, which should happen in a few days
after talking to the driver maintainers.

Netmap support is available at the moment for Intel 10G and 1G
cards (ixgbe, em/lem/igb), and for the Realtek 1G card ("re").
I have partial patches for "bge" and am starting to work on "cxgbe".
Hopefully changes are trivial enough so interested third parties
can submit their patches. Interested people can contact me
for advice on how to add netmap support to specific devices.

CREDITS:
    Netmap has been developed by Luigi Rizzo and other collaborators
    at the Universita` di Pisa, and supported by EU project CHANGE
    (http://www.change-project.eu/)
    The code is distributed under a BSD Copyright.

[1] In my opinion is a bad idea to have all manpage in one directory.
  We should place kernel documentation in the same dir that contains
  the code, which would make it much simpler to keep doc and code
  in sync, reduce the clutter in share/man/ and incidentally is
  the policy used for all of userspace code.
  Makefiles and doc tools can be trivially adjusted to find the
  manpages in the relevant subdirs.
2011-11-17 12:17:39 +00:00
Dimitry Andric
5a880d34e1 LLVM uses atomic operations, which are not supported on i386 and GCC
emits calls for them, rather than expanding them inline.  Older FreeBSD
versions compile for i386 by default and as such we end up with
unresolved symbols when we build LLVM's TableGen utility as a build
tool on them.  Add the functions that GCC emits here, but don't bother
to make them atomic. Such is not needed.

Submitted by:	marcel
MFC after:	1 week
2011-11-15 20:15:58 +00:00
David Schultz
35ee51e291 A regression test to ensure that arc4random returns different sequences
in parent and child processes after a fork.
2011-11-15 05:55:15 +00:00
Olivier Houchard
c2a24727c8 Add IPv6 support to netblast/netsend/netreceive
PR:		bin/161368
Submitted by:	Olivier Cochard-Labbe <olivier AT cochard doT me>
2011-11-08 17:23:43 +00:00
Jilles Tjoelker
ddc13b6f44 fifo_misc test: Fix swapped lseek arguments.
It worked regardless because SEEK_CUR happens to be 1.
2011-11-05 22:33:19 +00:00
Jilles Tjoelker
06842f4c3e sh: Add test for exit status of for loop without items.
POSIX says the exit status of a for loop without any items shall be 0. There
are no exceptions if the exit status of the previous command was not 0 or if
the item list contains a command substitution with non-zero exit status.
2011-10-28 23:02:21 +00:00
Adrian Chadd
b1b75b3b75 Bring over the new aggregate statistics from the 11n branch.
Some of these values are currently updated by the driver (the 11n
RX related statistics) so they are immediately useful.
2011-10-26 16:11:49 +00:00
Pawel Jakub Dawidek
13e6fd986b Fix resize regressions tests - we need to destroy BSDlabel before we can
create GPT.

MFC after:	3 days
2011-10-25 13:41:12 +00:00
Poul-Henning Kamp
b2d1ddebf1 Add a "-P olddistfiles" facility to prefetch ports distfiles, using an
old distfile directory as primary source:

      mkdir /freebsd/ports/distfiles.old
      mv /freebsd/ports/distfiles/* /freebsd/ports/distfiles.old
      sh sysbuild.sh -c $yourconfig -P /freebsd/ports/distfiles.old
      rm -rf /freebsd/ports/distfiles.old

Unfortunately bsd.ports.mk does not attempt to use a hard-link so
while this runs you need diskspace for both your old and your "new"
distfiles.
2011-10-23 19:46:01 +00:00
Pawel Jakub Dawidek
1ae7ff8ba6 Because ZFS boot code was very fragile in the past and real PITA to debug,
introduce zfsboottest.sh script that will verify if it will be possible to boot
from the given pool.

	# zfsboottest.sh system

Where "system" is pool name of the pool we want to boot from.

What is being verified by the script:
- Does the pool exist?
- Does it have bootfs property configured?
- Is mountpoint property of the boot dataset set to 'legacy'?

Dataset configured in bootfs property has to be mounted to perform more
checks:
- Does the /boot directory in boot dataset exist?
- Is this dataset configured as root file system in /etc/fstab or set
  in vfs.root.mountfrom variable in /boot/loader.conf?

By using zfsboottest tool the script will read all the files in /boot
directory using ZFS boot code and calculate their checksums.
Then, it will walk /boot directory using find(1) though regular file sytem
and also read all the files in /boot directory and calculate their checksums.
If any of the files cannot be looked up, read or checksum is invalid it will
be reported and booting off of this pool is probably not possible.

Some additional checks may be interesting as well. For example if the disks
contain proper pmbr and gptzfsboot code or if all expected files in /boot/
are present.

When upgrading FreeBSD, one should snapshot datasets that contain operating
system, upgrade (install new world and kernel) and use zfsboottest.sh to verify
if it will be possible to boot from new configuration. If all is good one
should upgrade boot blocks, by eg.:

	# gpart -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1

If something is wrong, one should rollback datasets and report the problems.

MFC after:	3 days
2011-10-21 13:44:26 +00:00
Pawel Jakub Dawidek
cf43b453ec - Allow to specify multiple files to check, eg.
zfsboottest gpt/system0 gpt/system1 - /boot/kernel/kernel /boot/zfsloader

- Instead of printing file's content calculate MD5 hash of the file,
  so it can be easly compared to the hash calculated via file system.
- Some other minor improvements.

MFC after:	3 days
2011-10-21 13:13:18 +00:00
David Schultz
417c551014 Add regression tests for modf{,f,l}(). 2011-10-21 06:36:40 +00:00
David Schultz
6fcec4dd2b Tests for complex trig and hyperbolic functions. 2011-10-21 06:34:38 +00:00
David Schultz
417f648842 Tests for cancellation in fma(). Also include more tests for 128-bit
long doubles. Thanks for clusteradm (simon) for making the needed
hardware available.
2011-10-21 06:32:54 +00:00
Dimitry Andric
36981b17ed Vendor import of clang release_30 branch r142614:
http://llvm.org/svn/llvm-project/cfe/branches/release_30@142614
2011-10-20 21:14:49 +00:00
Dimitry Andric
30815c536b Vendor import of llvm release_30 branch r142614:
http://llvm.org/svn/llvm-project/llvm/branches/release_30@142614
2011-10-20 21:10:27 +00:00
Jilles Tjoelker
b0e4234a5a Fix some memory errors in *at() regression tests. 2011-10-18 22:51:40 +00:00
David Schultz
31b4d3aef3 Add some tests for corner cases of log() in unusual rounding modes.
I wrote these ages ago, but they've been failing until now.
2011-10-15 05:28:13 +00:00
David Schultz
9c7781b7a3 Add some tests for double-rounding bugs in fma(). 2011-10-15 05:26:16 +00:00
Andrew Thompson
b1657d09e6 Fix build after TARGET_BIG_ENDIAN was nuked from orbit. 2011-10-11 01:11:57 +00:00