Commit Graph

2456 Commits

Author SHA1 Message Date
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