Commit Graph

194893 Commits

Author SHA1 Message Date
jmmv
80efbcbbcd Sync sh(1) in stable/10 to head.
This is a MFC of all the commits listed below.

My original goal of this change was to only merge the move of the tests
from tools/regression/bin/ into the new layout (which include tests for
sh(1) and other tools as well).  However, doing so is tricky due to the
ongoing work in sh(1) and, especially, the many changes to its tests
since stable/10 was first branched.

Merging everything is the simplest way to achieve this goal and, as a
bonus point, we get various fixes and miscellaneous improvements into
the branch.

Per jilles' suggestion, I'm avoiding the merge of a couple of changes
(r256850 and r257506) that required depending kernel changes.  I'm also
avoiding very recent changes that have not had a long enough time to be
validated in current.

This is "make tinderbox" clean.

r256735	sh: Remove one syscall when waiting for a foreground job.
r257399	sh: Allow trapping SIGINT/SIGQUIT after ignore because of '&'.
r257504	sh: Reorder union node to reduce its size on 64-bit platforms.
r257920	sh: Add a test case for would-be assignments that are not due to quoting.
r257929	sh: Properly quote alias output from command -v.
r258489	sh: Add tests for the </dev/null implicit in a background command.
r258533	sh: Add more tests for the </dev/null implicit in a background command.
r258535	sh: Make <&0 disable the </dev/null implicit in a background command.
r258776	sh: Prefer memcpy() to strcpy() in most cases. Remove the scopy macro.
r259047	sh: Split set -x output into a separate function.
r259210	Migrate tools/regression/bin/ tests to the new layout.
r259844	sh: Remove an unused variable.
r259846	sh: Initialize OPTIND=1 even if it came from the environment.
r259874	sh: Simplify code related to PPID variable.
r259946	sh: Don't check input for non-whitespace if history is disabled.
r260246	sh(1): Discourage use of -e.
r260506	Run the sh(1) and test(1) tests as unprivileged.
r260586	Mark the bin/pax tests as requiring perl.
r260634	Use TAP_TESTS_PERL to register the legacy_test in bin/pax.
r260635	Replace hand-crafted Kyuafiles with automatic generation.
r260654	sh: Remove SIGWINCH handler and just check for resize before every read.
r261121	sh: Add test for nested alias.
r261125	sh: Solve the alias recursion problem in a less hackish way.
r261141	sh: Do not depend on parse/execute split in new alias test.
r261160	sh: Add tests for alias names after another alias.
r261192	sh: Allow aliases to force alias substitution on the following word.
r262533	sh: Make expari() static.
r262565	sh: Do not corrupt internal representation if LINENO inner expansion fails.
r262697	sh: Simplify expari().

Reviewed by:	jilles
2014-03-09 17:04:31 +00:00
rwatson
f3010cfb7d Merge r262690 from head to stable/10:
When querying a process's umask via sysctl in libprocstat(), don't
  print a warning if EPERM is returned as this is an expected failure
  mode rather than error -- similar to current handling of ESRCH.
  This makes the output of 'procstat -as' vastly more palatable.

  Sponsored by: DARPA, AFRL
2014-03-09 13:23:49 +00:00
pfg
d439a6998f MFC r262869:
ext2fs: Fix a bug when sorting htree entries.

This a typo introduced when bringing the original code from NetBSD.

Reported by:	Mike Ma
2014-03-09 04:16:00 +00:00
brueffer
b3a8c13b83 MFC: r262333
Simplify the way the end of a singly linked list is followed (for adding
items), so it is more obvious that we aren't going to indirect through
a NULL pointer.

PR:		144723
Submitted by:	Garrett Cooper <yaneurabeya at gmail.com>
Obtained from:	NetBSD r1.19
2014-03-08 12:24:47 +00:00
eadler
9ccdbaa535 MFC r262645,r262647:
ssh-copy-id: avoid sending private keys; add -v option

To help avoid confusion: when attempting to send a key file check to see if a
	file of the same name exists with a '.pub' suffix and send that instead.  This
	mimics the behavior of other ssh-copy-id scripts.

	Add -v passthrough.

ssh-copy-id: add restorecon call

	In certain situations when creating an authorized_key file on a Linux machine
	restorecon(1) may need to be called.  Therefore, attempt to run it if it exists.
2014-03-08 03:54:49 +00:00
jilles
a48226bb43 MFC r261859: fts: Fix double-free with conflicting concurrent modifications.
If rare conditions such as concurrent conflicting manipulation of the
filesystem occur, fts_read() frees the current FTSENT without adjusting
the pointers in the FTS accordingly. A later fts_close() then frees the
same FTSENT again.
2014-03-07 16:43:08 +00:00
jhb
a887dd1976 Bump __FreeBSD_version for the MFC of vt(4).
Submitted by:	Koop Mast
2014-03-07 14:44:13 +00:00
brueffer
9cff8027cb MFC: r262603
mdoc cleanup.
2014-03-07 12:20:01 +00:00
asomers
ca8eab6508 MFC r262133
test_eagain_*_* should've been using nonblocking sockets instead of blocking
sockets.  The error was not exposed as long as the kernel suffered from PR
kern/185812.  Now corrected, these tests pass on DragonFlyBSD 3.6.0.
2014-03-06 21:47:22 +00:00
jhb
59b6242e90 MFC 259016,259019,259049,259071,259102,259110,259129,259130,259178,259179,
259203,259221,259261,259532,259615,259650,259651,259667,259680,259727,
259761,259772,259776,259777,259830,259882,259915,260160,260449,260450,
260688,260888,260953,261269,261547,261551,261552,261553,261585:
Merge the vt(4) driver (newcons) to stable/10.

Approved by:	ray
2014-03-06 18:30:56 +00:00
jmmv
fe643776c1 Import atf-0.20.
This is a MFC of r261897 and r262000 and should allow all of the atf
tests to pass.
2014-03-06 14:11:44 +00:00
jmmv
6c6bd8779d Install a symlink from /usr/tests/local to /usr/local/tests.
This is a MFC of r261959 and r261978.
2014-03-06 13:38:23 +00:00
mav
dbd9b17275 MFC r262575:
Restore SIM freeze/release match, broken at r253549.

This fixes problem with SIM left in frozen state after reinit, for example,
after firmware update.
2014-03-06 13:37:34 +00:00
jmmv
74e392eb6c MFC a couple of improvements to the test suite mk files.
- r260632 Support defining test program metadata from the Makefiles.
- r260633 Support perl-based TAP-compliant test programs.
2014-03-06 13:30:36 +00:00
mav
ccebcfd33b MFC r262553:
Pass proper pointer to bus_dmamem_free() in mps_iocfacts_free().

Passing there pointer into the middle of allocated area caused kernel
panic during reinit, for example, after firmware upgrade.
2014-03-06 13:24:51 +00:00
jmmv
16411e2c80 MFC various fixes for the ATF tests.
- r260505 Allow tests to provide a Kyuafile when they relied on auto-generation.
- r260525 Respect the original layout of the atf-{c,c++} tests.
- r260526 Fix path to the process_helpers for the libatf-c++ tests.
- r260576 Generate and install pkg-config files for atf.
- r260577 Add atf pkg-config files from the vendor branch.
- r260584 Prevent misc_helpers from running as a test.
2014-03-06 13:20:38 +00:00
brueffer
1d275c07c2 MFC: r262571
Add missing includes and remove two unused ones.

Reviewed by:	loos
2014-03-06 13:15:53 +00:00
trasz
2e120a0184 MFC r261748:
So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).

This makes those short-lived iscsid(8) zombies disappear.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:15:54 +00:00
trasz
222c71033f MFC r261747:
Empty data segment during Login Phase is rather unlikely, but it's not
a protocol error.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:14:36 +00:00
trasz
80217e6e6e MFC r261715:
The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of __printf0like.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:13:26 +00:00
trasz
32f8fd7b16 MFC r262525:
There is no need to prevent iscsictl from adding iSER session when there
is no iSER support in ctld and/or kernel; should the user make that mistake,
the output from "iscsictl -L" is enough to determine what the problem is.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:10:57 +00:00
trasz
634638377a MFC r262247:
Make it clear that there are two ways to add a session using iscsictl(8),
and some options require configuration file.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:09:46 +00:00
trasz
9cc265a090 MFC r261714:
Make iscsictl(8) properly handle (optional) semicolons in iscsi.conf,
instead of ignoring them and echoing them to stdout.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:07:51 +00:00
trasz
b379e28a77 MFC r261713:
Simplify.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:05:35 +00:00
trasz
08122659f6 MFC r261712:
Remove unused variable.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:03:34 +00:00
trasz
c290a7d7a5 MFC r261711:
Yacc cleanup; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:02:32 +00:00
zeising
a43dfff75f MFC r261832-261834:
r261832:
    Add cross references between rc.conf(5) and jail.conf(5).

r261833:
    Add commas (,) to the list in the SEE ALSO section, to match most
    other manuals.

r261834:
    Bump .Dd forgotten in r261832.
2014-03-06 10:26:25 +00:00
dim
22ca1336dc MFC r261283:
Import libc++ 3.4 release.  This contains a lot of bugfixes, and some
preliminary support for C++1y.

MFC r261604:

HEAD is not buildable for the past day.  Commit a 'quick fix' in order to permit
buildworld to complete.

Reviewed by:	theraven

MFC r261608:

Apply a cleaner solution for the sign warnings that can occur when
compiling libc++'s <locale> header with -Wsystem-headers on.

This has also been submitted upstream.

Reported by:	asomers

MFC r261801:

An ABI incompatibility crept into the libc++ 3.4 import in r261283.  It
was caused by upstream libc++ commit r194536, which aimed to make the
headers more standards-compliant, by making std::pair's copy constructor
trivial.  Unfortunately, this could cause certain C++ applications using
shared libraries built against the previous version of libc++ to crash.

Fix the ABI incompatibility by making std::pair's copy constructor
non-trivial again.

Please note: Any C++ applications or shared libraries built with libc++
between r261283 and this revision should be recompiled.

Reported by:	stefanf
2014-03-05 19:30:36 +00:00
gjb
a5552de0b3 MFC r262513:
Update release/release.conf.sample to reflect changes in r262509.

Sponsored by:	The FreeBSD Foundation
2014-03-05 17:23:29 +00:00
brueffer
2a078eee0e MFC: r262494
Rough cleanup (new sentence -> new line, grammar, spelling, mdoc).
This could use more work.

PR:		187035 (in part)
Submitted by:	Bjorn Heidotting
2014-03-05 13:25:01 +00:00
pfg
b4d210b85c MFC r262678;
ufs: small formatting fixes.

Cleanup some extra space.
Use of tabs vs. spaces.
No functional change.

Reviewed by:	mckusick
2014-03-05 04:23:19 +00:00
glebius
7616e36e49 Merge r262770 from head: pacify gcc. 2014-03-05 03:16:23 +00:00
gjb
29fd702b03 MFC r262499, r262505, r262507, r262509:
r262499:
  release.sh:
  - Add a VCSCMD variable that defaults to 'svn checkout',
    and update places 'svn co' is used directly.
  - After sourcing a configuration file, prefix SRCBRANCH,
    PORTBRANCH, and DOCBRANCH with the SVNROOT.
  - Properly capitalize 'FreeBSD.org' in the default SVNROOT.
  - Update Copyright.

  release.conf.sample:
  - Add an example to use git instead of svn, by nullifying
    SVNROOT, and setting SRCBRANCH, DOCBRANCH, and PORTBRANCH
    to the URL fo a git repository.

  release.7:
  - Document VCSCMD.

r262505:
  In release/Makefile, remove exclusion of CVS directories in the
  src/ and ports/ distributions.

  While I am thinking about it, exclude .git directories for src/
  and ports/, as somewhat of a followup to r262499.

r262507:
  Chase r262505, and remove CVS exclusion from picobsd builds.

r262509:
  Rework how WORLD_FLAGS and KERNEL_FLAGS are set, to remove an
  unnecessary expr(1) call.

Sponsored by:	The FreeBSD Foundation
2014-03-05 00:45:28 +00:00
emaste
33dce93124 Disable amd64 TLB Context ID (pcid) by default for now
There are a number of reports of userspace application crashes that
are "solved" by setting vm.pmap.pcid_enabled=0, including Java and the
x11/mate-terminal port (PR ports/184362).

For now apply a band-aid of disabling pcid by default in stable/10.

Sponsored by:	The FreeBSD Foundation
2014-03-04 21:51:09 +00:00
glebius
ed41469327 Merge r261582, r261601, r261610, r261613, r261627, r261640, r261641, r261823,
r261825, r261859, r261875, r261883, r261911, r262027, r262028, r262029,
      r262030, r262162 from head.

  Large flowtable revamp. See commit messages for merged revisions for
  details.

Sponsored by:	Netflix
2014-03-04 15:14:47 +00:00
glebius
1b9278cc98 Merge r261796 from head:
While it isn't too late and kvm_read_zpcpu() function isn't yet used
  outside libkvm(3), change its order of arguments, so that it is the
  same as in kvm_read().
Merge r261805 from head:
  Add kvm_getncpus() to obtain mp_ncpus.
2014-03-04 14:49:05 +00:00
glebius
8a9528c4d0 Merge r261722, r261723, r261724, r261725 from head:
several minor improvements for UMA_ZPCPU_ZONE zones.
2014-03-04 14:46:30 +00:00
glebius
d06eb27738 Merge 261595: simplify the SYSCTL_COUNTER_U64() macro. 2014-03-04 14:23:58 +00:00
glebius
322a3c94d3 Merge 261593 from head:
Provide macros that allow easily export uma(9) zone limits and
  current usage via sysctl(9).
2014-03-04 14:21:07 +00:00
glebius
352d508b16 Merge r261590: Fixup for r261590 (vnet sysctl handlers cleanup) 2014-03-04 14:05:37 +00:00
glebius
4b9e17c3ef Merge r261590, r261592 from head:
Remove identical vnet sysctl handlers, and handle CTLFLAG_VNET
  in the sysctl_root().

  Note: SYSCTL_VNET_* macros can be removed as well. All is
    needed to virtualize a sysctl oid is set CTLFLAG_VNET on it.
    But for now keep macros in place to avoid large code churn.
2014-03-04 14:01:12 +00:00
tijl
64a908c935 MFC r262441-262442,262447,262461-262464,262655:
- Consistently pass around context information using a simple pointer.
  This fixes some dereferencing bugs in Chinese character set conversions.
- Fix Simplified Chinese character set conversions by switching around the
  fields of an internal struct so it corresponds with the way variables of
  this type are initialised.
- Fix an array index out of bounds bug in iconv VIQR (Vietnamese) module.
- Silence gcc warning about unsigned comparison with 0.

Also record r258316 and r258587 as merged so they no longer show up as
eligible.

PR:		185964
Submitted by:	Manuel Mausz <manuel-freebsd@mausz.at>
2014-03-04 11:43:01 +00:00
pfg
4dd6e22c18 MFC r262623, r262667:
ext2fs: use of tab vs spaces.

Consistently use a single tab after a #define as mentioned in style(9).
Use tabs instead of space for indenting.
Fix a typo: "hash_vesion".

No functional change.
2014-03-04 03:10:31 +00:00
delphij
0ac98a52fd (not quite, due to date difference) MFC r262719:
Document the fact that OpenSSH default configuration requires Capsicum
capability mode support in kernel, which have been worked around later
but it's still recommended to have it enabled.

Reported by:	many
2014-03-03 23:30:54 +00:00
delphij
9f46cb935f MFC r261499 (pjd):
Fix installations that use kernels without CAPABILITIES support.
2014-03-03 23:19:28 +00:00
brooks
6eebe77865 MFR r261294:
Remove an unneeded space in the BERI merge.

Sponsored by:	DARPA, AFRL
2014-03-03 20:28:27 +00:00
dteske
ccce67094a MFC r258270:
Add a try-include word (which acts the same as "include") and use it to
conditionally include (but ignore failures) /boot/loader.rc.local and
/boot/menu.rc.local -- to make customizing the menu easier.

Reviewed by:	alfred
Discussed on:	-hackers
2014-03-03 07:31:55 +00:00
dteske
ccfaf68adb MFC r258269: Refactor draw-beastie function.
Discussed on:	-hackers
2014-03-03 07:28:56 +00:00
dteske
514ba4551b MFC r257821:
Extend loader_delay as-documented in beastie.4th(8) and delay.4th(8),
making it available to architectures that do not use or load the beastie
menu. This is reported to save headaches on some PPC systems where unload
followed by load does not produce the desired results wherein if-given
the opportunity to abort the initial loading sequence, you can customize
the first load.

Reviewed by:	nwhitehorn, kan
Discussed on:	-current
2014-03-03 07:24:50 +00:00
dteske
c617921803 MFC r257650:
Defer loading of kernel and modules if the beastie menu is enabled. Add a
kernel selection menu to the beastie menu. List of kernels is taken from
`kernels' in loader.conf(5) as a space (or comma) separated list of names
to display (up to 9). If not set, default value is "kernel kernel.old".
Does not validate that kernels exist because the next enhancement will be
to allow selection of the root device.

Discussed on:	-current
2014-03-03 07:16:39 +00:00