Commit Graph

1901 Commits

Author SHA1 Message Date
rwatson
78507bba4a Merge @176820, @176822, @177156 to tcpp from P4 to HEAD:
Improve accuracy of connection data transfer math.

  Disable Nagle's algorithm to avoid delaying transfers of data --
  will want to refine this to combine payload with header transfer,
  however.

  Now that we're running w/o Nagle, try to send the initial data
  burst with the header in a single TCP segment.

  Prefer %zu to %ju for size_t.

MFC after:	1 week
Sponsored by:	Juniper, Inc.
2010-04-21 00:52:55 +00:00
rpaulo
4a38b6e8a5 Dump the AR_PHY_TURBO register on the AR5416. This register holds 11n
configurations.

Sponsored by:	iXsystems, inc.
2010-04-19 17:16:23 +00:00
jilles
1027d9c280 sh: Add testcases for double-quotes within quoted ${var+-...} (non-POSIX).
POSIX leaves things like "${var+"word"}" undefined.
We follow traditional ash behaviour here.
Hence, these testcases also work on stable/8.
2010-04-18 22:13:45 +00:00
jilles
286029c478 sh: On startup of the shell, use PWD from the environment if it is valid.
Unset PWD if it is incorrect and no value for it can be determined.
This preserves the logical current directory across shell invocations.

Example (assuming /home is a symlink):
$ cd
$ pwd
/home/foo
$ sh
$ pwd
/home/foo

Formerly the second pwd would show the physical path (symlinks resolved).
2010-04-17 14:35:46 +00:00
jilles
bb1d9873c9 fnmatch: Fix bad FNM_PERIOD disabling if an asterisk has been seen.
Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD)

PR:		116074
MFC after:	1 week
2010-04-16 22:29:24 +00:00
jilles
dd4fae15ab Add some tests for fnmatch(3).
MFC after:	1 week
2010-04-16 22:15:26 +00:00
jilles
61df70a66f sh: Test that bogus values of PWD are not imported from the environment.
Current versions pass this test trivially by never importing PWD, but I plan
to change sh to import PWD if it is an absolute pathname for the current
directory, possibly containing symlinks.
2010-04-11 20:21:34 +00:00
imp
3cfea60eb1 Fix comment about NANO_ARCH. It can be set now. Also add a warning
about how it confuses TARGET and TARGET_ARCH and the need to separate
the two out into independent variables.
2010-04-06 16:23:12 +00:00
jilles
ca9540f0dc sh: Add test for nested arithmetic substitution.
Pre-r206145 sh changes nested arithmetic substitution to parentheses, which
is not always correct, as exercised by this test.
2010-04-04 16:48:33 +00:00
jilles
85f39c5eeb sh: Add test for some associativity in arithmetic. 2010-04-04 16:29:48 +00:00
jilles
d21d692410 sh: Do tilde expansion in substitutions.
This applies to word in ${v-word}, ${v+word}, ${v=word}, ${v?word} (which
inherits quoting from the outside) and in ${v%word}, ${v%%word}, ${v#word},
${v##word} (which does not inherit any quoting).

In all cases tilde expansion is only attempted at the start of word, even if
word contains spaces. This agrees with POSIX and other shells.

This is the last part of the patch tested in the exp-run.

Exp-run done by: erwin (with some other sh(1) changes)
2010-04-03 22:04:44 +00:00
jilles
2b94976ff7 sh: Fix duplicate variable name in test. 2010-04-03 21:56:24 +00:00
jilles
58f0facfbf sh: Add some testcases for the working parts of tilde expansion. 2010-04-03 21:32:22 +00:00
jilles
8b7edeca44 sh: Allow quoting pattern match characters in ${v%pat} and ${v#pat}.
Note that this depends on r206145 for allowing pattern match characters to
have their special meaning inside a double-quoted expansion like "${v%pat}".

PR:		bin/117748
Exp-run done by:	erwin (with some other sh(1) changes)
2010-04-03 21:07:50 +00:00
jilles
631cfa1748 sh: Fix various things about expansions:
* remove the backslash from \} inside double quotes inside +-=?
  substitutions, e.g. "${$+\}a}"
* maintain separate double-quote state for ${v#...} and ${v%...};
  single and double quotes are special inside, even in a double-quoted
  string or here document
* keep track of correct order of substitutions and arithmetic

This is different from dash's approach, which does not track individual
double quotes in the parser, trying to fix this up during expansion.
This treats single quotes inside "${v#...}" incorrectly, however.

This is similar to NetBSD's approach (as submitted in PR bin/57554), but
recognizes the difference between +-=? and #% substitutions hinted at in
POSIX and is more refined for arithmetic expansion and here documents.

PR:		bin/57554
Exp-run done by:	erwin (with some other sh(1) changes)
2010-04-03 20:55:56 +00:00
jilles
11ba493dd7 sh: Add some testcases for the working parts of ${v%...} and ${v#...}. 2010-04-03 20:14:10 +00:00
imp
e62c77fe41 Two fixes:
(1) We don't need a custom install_kernel.  We can install without
symbols by adding INSTALL_NODEBUG (which likely should be
WITHOUT_KERNEL_SYMBOLS_FILE, or something shorter) to CONF_INSTALL
(2) for make buildenv stage, use NANO_MAKE_CONF_BUILD rather than the
non-existant NANO_MAKE_CONF.

MFC after:	7 days
2010-03-31 18:18:37 +00:00
imp
968dcf13b5 Stop hard coding i386 as the arch for the build. Instead, default to the
processor we're running on.  Also, supply amd64 version of create_diskimage
that's the same as i386's.

# didn't fix the confusion between using the processor for this and using
# the machine (which would be more appropriate).  NANO_ARCH smashes the two
# together right now.

MFC after:	7 days
2010-03-31 14:42:07 +00:00
delphij
c77aa7eff5 Remove GNU cpio after fix of CVE-2010-0624.
Note that this is actually a no-op for most users, as this GNU
cpio was broken on -HEAD and 8-STABLE since last March until
the recent fix.

FreeBSD 8.0+ uses BSD cpio by default and the code is being
actively maintained.

Blessed by:	kientzle
With hat:	secteam
MFC after:	3 days
2010-03-26 17:02:32 +00:00
phk
dc22037ebf Use gpart(8) to set the active boot partition. 2010-03-24 11:21:33 +00:00
edwin
9792f6e953 Replace -b with -C and -B (as proposed by Alexander).
Add -3, -A and -B to the usage.
Update regression test for the new parameters.
2010-03-21 21:33:21 +00:00
kib
174557d034 Add missing headers. While there, arrange headers alphabetically.
MFC after:	3 days
2010-03-16 20:42:54 +00:00
kib
856f335750 Add missing headers.
MFC after:	3 days
2010-03-16 20:41:45 +00:00
jilles
d88c6b2784 sh: Do not abort on a redirection error on a compound command.
Redirection errors on subshells already did not abort the shell because
the redirection is executed in the subshell.

Other shells seem to agree that these redirection errors should not abort
the shell.

Also ensure that the redirections will be cleaned up properly in cases like
  command eval '{ shift x; } 2>/dev/null'

Example:
  { echo bad; } </var/empty/x; echo good
2010-03-14 14:24:35 +00:00
jilles
b9152e6b95 sh: Add test for redirection error on subshell (should not abort). 2010-03-14 13:51:12 +00:00
kib
a13f0a9942 Remove dot at the end of errx() message.
Noted by:	bde
MFC after:	3 days
2010-03-14 13:29:09 +00:00
kib
4ec03e4143 Adjust style, fix typo, do not print errno because it is meaningless there.
This test fails for now.

MFC after:	3 days
2010-03-14 13:05:48 +00:00
kib
e919ba6d14 Make it compile on LP64 arches.
MFC after:	3 days
2010-03-14 13:04:09 +00:00
edwin
6e7859d3d9 Create regression tests for ncal:
- A couple of tests to check if the layout of the generated calenders
  is correct.

- A couple of tests to see if impossible combinations for -3, -A,
  -m, -y etc properly abort.

- A couple of test to confirm that the order of -A, -B, -3 etc give
  the right number of months.
2010-03-14 10:24:03 +00:00
jilles
6be35ddc1a sh: Do not abort on a redirection error if there is no command word.
Although simple commands without a command word (only assignments and/or
redirections) are much like special builtins, POSIX and most shells seem to
agree that redirection errors should not abort the shell in this case. Of
course, the assignments persist and assignment errors are fatal.

To get the old behaviour portably, use the ':' special builtin.
To get the new behaviour portably, given that there are no assignments, use
the 'true' regular builtin.
2010-03-13 22:53:17 +00:00
jilles
3b24e7eb73 sh: Add test for assignment errors (e.g. trying to change a readonly var).
We currently ignore readonly status for assignments before regular builtins
and external programs (these assignments are not persistent anyway), so just
check that the readonly variable really is not changed.
The test depends on the command builtin changes for 'command :'.
2010-03-13 22:30:52 +00:00
jilles
13b8d02509 sh: Add tests for " and $ inside `. 2010-03-12 23:23:46 +00:00
jilles
d8e6dbd422 sh: Add some testcases for ${v=w}, ${v-w}, ${v+w}.
These expansions, which were already in the Bourne shell, work correctly for
the most part. The testcases are only about the parts that already work
correctly.
2010-03-07 18:43:29 +00:00
jilles
deb0e164a3 sh: Add various testcases for here documents.
They are mainly about expansions in here documents but because all the
testcases are in $() command substitution, we also test that $() command
substitution is recursively parsed (or very close to it).
2010-03-07 15:08:42 +00:00
jilles
3242a81cf4 sh: Make sure to popredir() even if a function caused an error. 2010-03-06 17:31:09 +00:00
jilles
c30671a949 sh: Make sure to popredir() even if a special builtin caused an error. 2010-03-06 17:09:22 +00:00
jilles
1bfbe947ab sh: Improve the command builtin:
* avoid unnecessary fork
* allow executing builtins via command
* executing a special builtin via command removes its special properties

Obtained from:	NetBSD (parts)
2010-03-06 16:57:53 +00:00
jh
ba646ecd6f - Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
snprintf(3) doesn't set errno in the tested cases.
- If the same argument reference (for example %1) was specified more than
  once, the command didn't necessarily fit to the final command buffer. Fix
  this using a dynamic sbuf buffer. Add a few regression tests for the case.

PR:		bin/95079
No objections:	freebsd-hackers
2010-03-05 15:23:01 +00:00
joel
21610ef2cd The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-03 07:38:12 +00:00
joel
e62ff53b73 The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-02 22:25:50 +00:00
joel
5d42157965 The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-02 17:05:19 +00:00
uqs
f8d1dd7a4e Always assign WARNS using ?=
- fix some nearby style bugs
- include Makefile.inc where it makes sense and reduces duplication

Approved by:	ed (co-mentor)
2010-03-02 16:58:04 +00:00
antoine
01a68ffd1a Add files to remove when MK_PPP=no. 2010-02-28 14:43:55 +00:00
antoine
78e9b96907 Add files to remove when MK_PORTSNAP=no. 2010-02-28 14:41:28 +00:00
antoine
443c579049 Add files to remove when MK_PKGTOOLS=no. 2010-02-28 14:39:39 +00:00
antoine
7575a14043 Add files to remove when MK_PF=no. 2010-02-28 14:37:39 +00:00
antoine
2b913d765e Add files to remove when MK_NTP=no. 2010-02-28 14:32:29 +00:00
antoine
ff068132e2 Update files to remove when MK_RCMDS=no. 2010-02-28 14:29:22 +00:00
antoine
6d09dcaa15 Add files to remove when MK_RCS=no. 2010-02-28 14:26:28 +00:00
antoine
b0faa7e726 Add files to remove when MK_ROUTED=no. 2010-02-28 14:24:38 +00:00