]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r295643:
ngie [Thu, 16 Feb 2017 05:17:40 +0000 (05:17 +0000)]
MFC r295643:

r295643 (by bdrewery):

Test directories can build in parallel fine.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313791 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r285119,r292502,r295380:
ngie [Thu, 16 Feb 2017 05:14:07 +0000 (05:14 +0000)]
MFC r285119,r292502,r295380:

r285119 (by jmmv):

Add support for TEST_METADATA

Allow Makefiles to define generic metadata settings that apply to all test
programs defined by a Makefile.  The generic TEST_METADATA variable extends
the per-test program settings already supported via TEST_METADATA.<program>.

This feature will be useful to easily apply some settings to all programs
in a directory.  In particular, Kyua 0.12 will support parallel execution
of test programs and a bunch of them will need to be tagged as is_exclusive
to indicate that they cannot be run in parallel with anything else due to
their side-effects.  It will be reasonable to set this setting on whole
directories.

r292502:

Always expose LOCALBASE, not just when CROSS_TOOLCHAIN is defined

Instead of using which(1) to look for doxygen, look for it in <LOCALBASE>/bin .
$PATH gets mangled by make buildenv, etc so it's better to just be explicit
about the path if someone uses that for instance.

r295380:

Simplify running the FreeBSD test suite

Replace `make regress` (legacy test make target) and `make test` (incomplete
test make target added with the FreeBSD test suite) with make check as it's
consistent with other open source projects.

`make check` defaults to running tests from `.OBJDIR`, but can be overridden
with the `CHECKDIR` variable.

Add `make checkworld` target to simplify running the FreeBSD test suite from
`TESTSBASE` (i.e. the top-level tests directory), similar to buildworld.

Document `make check` and `make checkworld` in build(7).

Other minor changes:

- Rename intermediate file (`Kyuafile.auto`) to `Kyuafile` to simplify
  `make check`.
- Remove terse warnings attached to `beforetest`/`aftertest`.
- Add kyua binary check to check target in suite.test.mk; error out if it's
  not found

The MFC is [partly] contingent on other build related changes being MFCed.

X-MFC to: stable/10
Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@313790 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r288241:
ngie [Thu, 16 Feb 2017 04:23:45 +0000 (04:23 +0000)]
MFC r288241:

r288241 (by bdrewery):

Remove 'set -e' that are no longer needed as it is already default.

When bmake was initially imported at r241298 shell commands were no longer
ran with 'set -e' as they were before.  This was fixed in r254980 so they
again always use 'set -e'.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313789 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313457:
garga [Wed, 15 Feb 2017 09:18:08 +0000 (09:18 +0000)]
MFC r313457:

Fix style(9)

Reviewed by: vangyzen, allanjude, cem
Approved by: allanjude
MFC after: 1 week
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D9494

git-svn-id: svn://svn.freebsd.org/base/stable/10@313765 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313448:
garga [Wed, 15 Feb 2017 09:15:51 +0000 (09:15 +0000)]
MFC r313448:

bsdinstall: Make sure chroot filesystems are umounted after use

* DISTDIR_IS_UNIONFS is set every time BSDINSTALL_DISTDIR is mounted inside
  BSDINSTALL_CHROOT. Use this flag to decide if it needs to be umounted
* BSDINSTALL_CHROOT/dev is mounted when 'bsdinstall mount' is called, there is
  no need to mount it again when user goes to shell after installation

Reviewed by: allanjude
Obtained from: pfSense
MFC after: 1 week
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D8573

git-svn-id: svn://svn.freebsd.org/base/stable/10@313764 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r311893, r313008, r313081
asomers [Wed, 15 Feb 2017 00:16:52 +0000 (00:16 +0000)]
MFC r311893, r313008, r313081

I had to modify the tests slightly for the MFC to stable/10, because
stable/10 lacks r294037, which enabled /sbin/md5 to work on md(4)
devices.

r311893:
ATFify the geom gate tests.

This ensures their cleanup routines will be run even if they should timeout.

tests/sys/geom/class/gate/ggate_test.sh
tests/sys/geom/class/gate/Makefile
Add an ATF test with three testcases, one for each TAP test. Use
ATF-style cleanup functions, and convert sleeps to polling loops.

ObsoleteFiles.inc
tests/sys/geom/class/gate/conf.sh
tests/sys/geom/class/gate/1_test.sh
tests/sys/geom/class/gate/2_test.sh
tests/sys/geom/class/gate/3_test.sh
Delete TAP test files

Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8891

r313008:
Wait for /dev/ggate* to appear after calling `ggatel create` in :ggatel_{file,md}

The test assumed that `ggatel create` created a device on completion, but that's
incorrect. This squashes the race by waiting for the device to appear, as
`ggatel create` daemonizes before issuing an ioctl to geom_gate(4) if not called
with `-v`.

Discussed with: asomers
MFC after: 1 week
PR: 204616
Sponsored by: Dell EMC Isilon

r313081:
Replace for/retry loops with "wait_for_ggate_device" calls and check
results of commands

As noted in r313008, the underlying issue was that geom_gate device
creation wasn't created at ggatel command completion, but some short
time after. ggatec(8) employs similar logic when creating geom_gate(4)
devices.

Switch from retry loops (after the ggatec/dd write calls) to
wait_for_ggate_device function calls after calling ggatec(8) instead
to detect the presence of the /dev/ggate* device, as this function is
sufficient for determining whether or not the character device is ready
for testing

While here, use atf_check consistently with all dd calls to ensure that
data output is as expected.

MFC after: 1 week
Reviewed by: asomers
Differential Revision: D9409
Sponsored by: Dell EMC Isilon

git-svn-id: svn://svn.freebsd.org/base/stable/10@313754 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r311349, r311445
asomers [Tue, 14 Feb 2017 21:02:27 +0000 (21:02 +0000)]
MFC r311349, r311445

r311349:
tabs -> spaces in etc/mtree

MFC after: 4 weeks

r311445:
Fix typo from r311349

Reported by: lwhsu
Pointy-hat-to: asomers
MFC after: 4 weeks
X-MFC-with: 311349

git-svn-id: svn://svn.freebsd.org/base/stable/10@313743 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312991: put very expensive sanity checks of advisory locks under DIAGNOSTIC
avg [Tue, 14 Feb 2017 13:45:38 +0000 (13:45 +0000)]
MFC r312991: put very expensive sanity checks of advisory locks under DIAGNOSTIC

Sponsored by: Panzura

git-svn-id: svn://svn.freebsd.org/base/stable/10@313729 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313356:
ngie [Tue, 14 Feb 2017 04:52:24 +0000 (04:52 +0000)]
MFC r313356:

Fix typos in comments (returing -> returning)

git-svn-id: svn://svn.freebsd.org/base/stable/10@313726 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313378,r313379:
ngie [Tue, 14 Feb 2017 04:49:24 +0000 (04:49 +0000)]
MFC r313378,r313379:

r313378:

Wrap strcmp/wcscmp calls with ATF_CHECK_MSG and drop atf_tc_fail use

The reasoning here was the same as what was done in r313376:
- Gather as many results as possible instead of failing early and
  not testing the rest of the cases.
- Simplify logic when checking test inputs vs outputs and printing
  test result.

r313379:

Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in base type

The %t{d,u} (ptrdiff_t) tests fail for the following reasons:
- ptrdiff_t is by definition int32_t on !LP64 architectures and int64_t on
  LP64 architectures.
- intmax_t is by definition fixed to int64_t on all architectures.
- Some of the code in lib/libc/stdio/... is promoting ptrdiff_t to *intmax_t
  when parsing/representing the value.

PR: 191674

git-svn-id: svn://svn.freebsd.org/base/stable/10@313723 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313376:
ngie [Tue, 14 Feb 2017 04:46:19 +0000 (04:46 +0000)]
MFC r313376:

Fix :hexadecimal_floating_point on i386

Don't exclude i386 from LDBL_MANT_DIG == 64; it works properly in
that case.

While here, replace strcmp + atf_tc_fail with ATF_CHECK_MSG for 2
reasons:
- Gather as many results as possible instead of failing early and
  not testing the rest of the cases.
- Simplify logic when checking test inputs vs outputs and printing
  test result.

Tested on: amd64, i386

git-svn-id: svn://svn.freebsd.org/base/stable/10@313720 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313377:
ngie [Tue, 14 Feb 2017 04:42:47 +0000 (04:42 +0000)]
MFC r313377:

Expect :floatunditf to fail on FreeBSD/i386

The precision error on FreeBSD/i386 doesn't match the expected output in
long double form.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313718 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313358,r313360:
ngie [Tue, 14 Feb 2017 04:38:37 +0000 (04:38 +0000)]
MFC r313358,r313360:

r313358:

Sort sys/ #includes and zap an unnecessary trailing space nearby

r313360:

Sort sys/ #includes some more

git-svn-id: svn://svn.freebsd.org/base/stable/10@313716 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313568:
ken [Mon, 13 Feb 2017 16:11:37 +0000 (16:11 +0000)]
MFC r313568:

  ------------------------------------------------------------------------
  r313568 | ken | 2017-02-10 15:02:45 -0700 (Fri, 10 Feb 2017) | 68 lines

  Change the isp(4) driver to not adjust the tag type for REQUEST SENSE.

  The isp(4) driver was changing the tag type for REQUEST SENSE
  commands to Head of Queue, when the CAM CCB flag
  CAM_TAG_ACTION_VALID was NOT set.  CAM_TAG_ACTION_VALID is set
  when the tag action in the XPT_SCSI_IO is not CAM_TAG_ACTION_NONE
  and when the target has tagged queueing turned on.

  In most cases when CAM_TAG_ACTION_VALID is not set, it is because
  the target is not doing tagged queueing.  In those cases, trying to
  send a Head of Queue tag may cause problems.  Instead, default to
  sending a simple tag.

  IBM tape drives claim to support tagged queueing in their standard
  Inquiry data, but have the DQue bit set in the control mode page
  (mode page 10).  CAM correctly detects that these drives do not
  support tagged queueing, and clears the CAM_TAG_ACTION_VALID flag
  on CCBs sent down to the drives.

  This caused the isp(4) driver to go down the path of setting the
  tag action to a default value, and for Request Sense commands only,
  set the tag action to Head of Queue.

  If an IBM tape drive does get a Head of Queue tag, it rejects it with
  Invalid Message Error (0x49,0x00).  (The Qlogic firmware translates that
  to a Transport Error, which the driver translates to an Unrecoverable
  HBA Error, or CAM_UNREC_HBA_ERROR.) So, by default, it wasn't possible
  to get a good response from a REQUEST SENSE to an FC-attached IBM
  tape drive with the isp(4) driver.

  IBM tape drives (tested on an LTO-5 with G9N1 firmware and a TS1150
  with 4470 firmware) also have a bug in that sending a command with a
  non-simple tag attribute breaks the tape drive's Command Reference
  Number (CRN) accounting and causes it to ignore all subsequent
  commands because it and the initiator disagree about the next
  expected CRN.  The drives do reject the initial command with a head
  of queue tag with an Invalid Message Error (0x49,0x00), but after that
  they ignore any subsequent commands.  IBM confirmed that it is a bug,
  and sent me test firmware that fixes the bug.  However tape drives in
  the field will still exhibit the bug until they are upgraded.

  Request Sense is not often sent to targets because most errors are
  reported automatically through autosense in Fibre Channel and other
  modern transports.  ("Modern" meaning post SCSI-2.)  So this is not
  an error that would crop up frequently.  But Request Sense is useful on
  tape devices to report status information, aside from error reporting.

  This problem is less serious without FC-Tape features turned on,
  specifically precise delivery of commands (which enables Command
  Reference Numbers), enabled on the target and initiator.  Without
  FC-Tape features turned on, the target would return an error and
  things would continue on.

  And it also does not cause problems for targets that do tagged
  queueing, because in those cases the isp(4) driver just uses the
  tag type that is specified in the CCB, assuming the
  CAM_TAG_ACTION_VALID flag is set, and defaults to sending a Simple
  tag action if it isn't an ordered or head of queue tag.

  sys/dev/isp/isp.c:
   In isp_start(), don't try to send Request Sense commands
   with the Head of Queue tag attribute if the CCB doesn't
   have a valid tag action.  The tag action likely isn't valid
   because the target doesn't support tagged queueing.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------

git-svn-id: svn://svn.freebsd.org/base/stable/10@313700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313174: Clean up documentation of AF_UNIX control messages.
jilles [Sun, 12 Feb 2017 18:52:01 +0000 (18:52 +0000)]
MFC r313174: Clean up documentation of AF_UNIX control messages.

Document AF_UNIX control messages in unix(4) only, not split between unix(4)
and recv(2).

Also, warn about LOCAL_CREDS effective uid/gid fields, since the write could
be from a setuid or setgid program (with the explicit SCM_CREDS and
LOCAL_PEERCRED, the credentials are read at such a time that it can be
assumed that the process intends for them to be used in this context).

git-svn-id: svn://svn.freebsd.org/base/stable/10@313685 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313273:
ngie [Sun, 12 Feb 2017 09:27:34 +0000 (09:27 +0000)]
MFC r313273:

style(9) cleanup

- Delete trailing whitespace
- Fix alignment/variable sorting
- Delete single-line enclosing braces

git-svn-id: svn://svn.freebsd.org/base/stable/10@313682 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoUnbreak lib/csu for i386 and amd64 (MK_LIB32 == yes) after r313582
ngie [Sat, 11 Feb 2017 20:46:49 +0000 (20:46 +0000)]
Unbreak lib/csu for i386 and amd64 (MK_LIB32 == yes) after r313582

I accidentally goofed up the directory for lib/libc in the CFLAGS

This is a direct commit to this branch

Pointyhat to: ngie

git-svn-id: svn://svn.freebsd.org/base/stable/10@313658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r311950 (by bz):
cy [Sat, 11 Feb 2017 18:10:55 +0000 (18:10 +0000)]
MFC r311950 (by bz):

Get rid of a compiler warning which I saw too often.
Include netinet/in.h before ip_compat.t which will then check if
IPPROTO_IPIP is defined or not.  Doing it the other way round,
ip_compat.h would not find it defined and netinet/in.h then
redefine it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312102,r312108:
ngie [Sat, 11 Feb 2017 07:35:27 +0000 (07:35 +0000)]
MFC r312102,r312108:

r312102:

Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD

r312108:

Delete trailing whitespace and use __arraycount instead of nitems in contrib code

git-svn-id: svn://svn.freebsd.org/base/stable/10@313632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312513:
ngie [Sat, 11 Feb 2017 07:14:45 +0000 (07:14 +0000)]
MFC r312513:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313631 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312514:
ngie [Sat, 11 Feb 2017 07:13:12 +0000 (07:13 +0000)]
MFC r312514:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312523:
ngie [Sat, 11 Feb 2017 07:11:43 +0000 (07:11 +0000)]
MFC r312523:

Add some basic -s flag testcases for cut(1)

The remaining functionality seems to be covered in one form or
another via the NetBSD ATF testcase.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313629 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312508:
ngie [Sat, 11 Feb 2017 07:03:54 +0000 (07:03 +0000)]
MFC r312508:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312507:
ngie [Sat, 11 Feb 2017 07:03:10 +0000 (07:03 +0000)]
MFC r312507:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313627 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312506:
ngie [Sat, 11 Feb 2017 07:02:04 +0000 (07:02 +0000)]
MFC r312506:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313626 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312505:
ngie [Sat, 11 Feb 2017 07:01:17 +0000 (07:01 +0000)]
MFC r312505:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313625 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312504:
ngie [Sat, 11 Feb 2017 07:00:31 +0000 (07:00 +0000)]
MFC r312504:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313624 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312502:
ngie [Sat, 11 Feb 2017 06:59:03 +0000 (06:59 +0000)]
MFC r312502:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312501:
ngie [Sat, 11 Feb 2017 06:58:24 +0000 (06:58 +0000)]
MFC r312501:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312500:
ngie [Sat, 11 Feb 2017 06:57:22 +0000 (06:57 +0000)]
MFC r312500:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313621 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312499:
ngie [Sat, 11 Feb 2017 06:56:38 +0000 (06:56 +0000)]
MFC r312499:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313620 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312498:
ngie [Sat, 11 Feb 2017 06:55:35 +0000 (06:55 +0000)]
MFC r312498:

Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313619 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312497:
ngie [Sat, 11 Feb 2017 06:54:42 +0000 (06:54 +0000)]
MFC r312497:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313618 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312495:
ngie [Sat, 11 Feb 2017 06:51:53 +0000 (06:51 +0000)]
MFC r312495:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313617 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312494:
ngie [Sat, 11 Feb 2017 06:51:09 +0000 (06:51 +0000)]
MFC r312494:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313616 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312493:
ngie [Sat, 11 Feb 2017 06:50:25 +0000 (06:50 +0000)]
MFC r312493:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312491:
ngie [Sat, 11 Feb 2017 06:47:56 +0000 (06:47 +0000)]
MFC r312491:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313614 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312490:
ngie [Sat, 11 Feb 2017 06:47:07 +0000 (06:47 +0000)]
MFC r312490:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312489:
ngie [Sat, 11 Feb 2017 06:46:16 +0000 (06:46 +0000)]
MFC r312489:

Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312486:
ngie [Sat, 11 Feb 2017 06:44:16 +0000 (06:44 +0000)]
MFC r312486:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313611 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312485:
ngie [Sat, 11 Feb 2017 06:42:56 +0000 (06:42 +0000)]
MFC r312485:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312483:
ngie [Sat, 11 Feb 2017 06:41:07 +0000 (06:41 +0000)]
MFC r312483:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313609 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312482:
ngie [Sat, 11 Feb 2017 06:40:27 +0000 (06:40 +0000)]
MFC r312482:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312481:
ngie [Sat, 11 Feb 2017 06:39:47 +0000 (06:39 +0000)]
MFC r312481:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313607 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312480:
ngie [Sat, 11 Feb 2017 06:39:04 +0000 (06:39 +0000)]
MFC r312480:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313606 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312479:
ngie [Sat, 11 Feb 2017 06:38:22 +0000 (06:38 +0000)]
MFC r312479:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312477:
ngie [Sat, 11 Feb 2017 06:37:24 +0000 (06:37 +0000)]
MFC r312477:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312475:
ngie [Sat, 11 Feb 2017 06:36:12 +0000 (06:36 +0000)]
MFC r312475:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313603 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312474:
ngie [Sat, 11 Feb 2017 06:35:29 +0000 (06:35 +0000)]
MFC r312474:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313602 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312473:
ngie [Sat, 11 Feb 2017 06:33:46 +0000 (06:33 +0000)]
MFC r312473:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313601 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312472:
ngie [Sat, 11 Feb 2017 06:32:48 +0000 (06:32 +0000)]
MFC r312472:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313600 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312471:
ngie [Sat, 11 Feb 2017 06:32:05 +0000 (06:32 +0000)]
MFC r312471:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313599 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312470:
ngie [Sat, 11 Feb 2017 06:31:26 +0000 (06:31 +0000)]
MFC r312470:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313598 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312469:
ngie [Sat, 11 Feb 2017 06:30:25 +0000 (06:30 +0000)]
MFC r312469:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313597 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312468:
ngie [Sat, 11 Feb 2017 06:27:42 +0000 (06:27 +0000)]
MFC r312468:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313596 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312467:
ngie [Sat, 11 Feb 2017 06:25:47 +0000 (06:25 +0000)]
MFC r312467:

Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313595 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312466:
ngie [Sat, 11 Feb 2017 06:23:07 +0000 (06:23 +0000)]
MFC r312466:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313594 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312465:
ngie [Sat, 11 Feb 2017 06:22:29 +0000 (06:22 +0000)]
MFC r312465:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312464:
ngie [Sat, 11 Feb 2017 06:21:38 +0000 (06:21 +0000)]
MFC r312464:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313592 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312463:
ngie [Sat, 11 Feb 2017 06:19:25 +0000 (06:19 +0000)]
MFC r312463:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313591 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoUnbreak the build after ^/stable/10@r313571
ngie [Sat, 11 Feb 2017 06:17:10 +0000 (06:17 +0000)]
Unbreak the build after ^/stable/10@r313571

Update FILES per tests removed in beforementioned commit, which were
accidentally overlooked, no doubt due to conflicts after base packaging
work.

This is a direct commit to ^/stable/10

Reported by: Jenkins (FreeBSD-stable-10-amd64-build job)

git-svn-id: svn://svn.freebsd.org/base/stable/10@313590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312462:
ngie [Sat, 11 Feb 2017 05:59:39 +0000 (05:59 +0000)]
MFC r312462:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313589 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312461:
ngie [Sat, 11 Feb 2017 05:58:20 +0000 (05:58 +0000)]
MFC r312461:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312460:
ngie [Sat, 11 Feb 2017 05:57:35 +0000 (05:57 +0000)]
MFC r312460:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313587 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312459:
ngie [Sat, 11 Feb 2017 05:56:48 +0000 (05:56 +0000)]
MFC r312459:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313586 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312458:
ngie [Sat, 11 Feb 2017 05:55:25 +0000 (05:55 +0000)]
MFC r312458:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313585 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312457:
ngie [Sat, 11 Feb 2017 05:53:13 +0000 (05:53 +0000)]
MFC r312457:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313584 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312456:
ngie [Sat, 11 Feb 2017 05:52:13 +0000 (05:52 +0000)]
MFC r312456:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313583 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312455:
ngie [Sat, 11 Feb 2017 05:47:56 +0000 (05:47 +0000)]
MFC r312455:

Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312454:
ngie [Sat, 11 Feb 2017 05:45:00 +0000 (05:45 +0000)]
MFC r312454:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313581 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312453:
ngie [Sat, 11 Feb 2017 05:43:34 +0000 (05:43 +0000)]
MFC r312453:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313580 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312452:
ngie [Sat, 11 Feb 2017 05:41:53 +0000 (05:41 +0000)]
MFC r312452:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

git-svn-id: svn://svn.freebsd.org/base/stable/10@313579 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r310866,310868,310870,311903,313074:
mm [Sat, 11 Feb 2017 00:56:18 +0000 (00:56 +0000)]
MFC r310866,310868,310870,311903,313074:
Sync libarchive with vendor.

MFC r310866:
  PR #771: Add NFSv4 ACL support to pax and restricted pax

  NFSv4 ACL information may now be stored to and restored from tar archives.
  ACL must be non-trivial and supported by the underlying filesystem, e.g.
  natively by ZFS or by UFS with the NFSv4 ACL enable flag set.

MFC r310868:
  PR #843: Fix memory leak of struct archive_entry in cpio/cpio.c
  PR #851: Spelling fixes
  Fix two protoypes in manual page archive_read_disk.3

MFC r310870:
  Use __LA_DEPRECATED macro with functions deprecated in 379867e

MFC r311903:
  #691: Support for SCHILY.xattr extended attributes
  #854: Spelling fixes

  Multiple fixes in ACL code:
  - prefer acl_set_fd_np() to acl_set_fd()
  - if acl_set_fd_np() fails, do no fallback to acl_set_file()
  - do not warn if trying to write ACLs to a filesystem without ACL support
  - fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs

MFC r313074:
  - support extracting NFSv4 ACLs from Solaris tar archives
  - bugfixes and optimizations in the ACL code
  - multiple fixes in the test suite
  - typo and other small bugfixes

  Security fixes:
  - cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335)
  - LHA reader: heap-buffer-overflow in lha_read_file_header_1()
    (CVE-2017-5601)
  - LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream()
    (OSS-Fuzz 453)
  - mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443)
  - WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458)

  Memory leak fixes:
  - ACL support: free memory allocated by acl_get_qualifier()
  - disk writer: missing free in create_filesystem_object()
  - file reader: fd leak (Coverity 1016755)
  - gnutar writer: fix free in archive_write_gnutar_header()
    (Coverity 101675)
  - iso 9660 reader: missing free in parse_file_info()
    (partial Coverity 1016754)
  - program reader: missing free in __archive_read_program()
  - program writer: missing free in __archive_write_program_free()
  - xar reader: missing free in xar_cleanup()
  - xar reader: missing frees in expat_xmlattr_setup()
    (Coverity 1229979-1229981)
  - xar writer: missing free in file_free()
  - zip reader: missing free in zip_read_local_file_header()

List of all libarchive issues at OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=libarchive

Security: CVE-2017-5601

git-svn-id: svn://svn.freebsd.org/base/stable/10@313571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r313401
vangyzen [Fri, 10 Feb 2017 16:11:11 +0000 (16:11 +0000)]
MFC r313401

Fix garbage IP addresses in UDP log_in_vain messages

If multiple threads emit a UDP log_in_vain message concurrently,
or indeed call inet_ntoa() for any other reason,
the IP addresses could be garbage due to concurrent usage of a
single string buffer inside inet_ntoa().  Use inet_ntoa_r() with
two stack buffers instead.

Relnotes: yes
Sponsored by: Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@313558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308312: vidcontrol: improve error handling in vt(4) font loading
emaste [Fri, 10 Feb 2017 15:02:56 +0000 (15:02 +0000)]
MFC r308312: vidcontrol: improve error handling in vt(4) font loading

PR: 209078

git-svn-id: svn://svn.freebsd.org/base/stable/10@313552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r290101 (by hselasky):
kib [Fri, 10 Feb 2017 14:38:28 +0000 (14:38 +0000)]
MFC r290101 (by hselasky):
Build fix for i386/XBOX and pc98/GENERIC.

Reported by: ngie

git-svn-id: svn://svn.freebsd.org/base/stable/10@313548 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r311925,r311968,r311969,r312008:
ngie [Fri, 10 Feb 2017 07:13:16 +0000 (07:13 +0000)]
MFC r311925,r311968,r311969,r312008:

r311925:

Import testcase updates with code contributed back to NetBSD

This also (inadvertently) contains an update to
contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases).

In collaboration with: christos@NetBSD.org

r311968:

Fix lib/libc/sys/access_test after r311925

sys/param.h needs to be #included in order for __FreeBSD_version to be checked

r311969:

Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile

This is to enable support in other testcases

Inspired by lib/msun/tests/Makefile .

r312008:

Upgrade NetBSD tests to 01.11.2017_23.20 snapshot

This contains some new testcases in /usr/tests/...:

- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern

Tested on: amd64, i386

git-svn-id: svn://svn.freebsd.org/base/stable/10@313535 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r274583: Default to use 10 seconds as nap interval instead of 1.
delphij [Fri, 10 Feb 2017 06:58:18 +0000 (06:58 +0000)]
MFC r274583: Default to use 10 seconds as nap interval instead of 1.
(the mergeinfo portion; actual code changes were committed from wrong
directory).

git-svn-id: svn://svn.freebsd.org/base/stable/10@313534 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r274583: Default to use 10 seconds as nap interval instead of 1.
delphij [Fri, 10 Feb 2017 06:53:48 +0000 (06:53 +0000)]
MFC r274583: Default to use 10 seconds as nap interval instead of 1.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313533 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r306349:
ngie [Fri, 10 Feb 2017 06:34:52 +0000 (06:34 +0000)]
MFC r306349:
r306349 (by pfg):

hash(3): protect in-memory page when using cross-endianness.

When writing out pages in the "other endian" format, make a copy
instead of trashing the in-memory one.

Obtained from: NetBSD (CVS rev. 1.29)

git-svn-id: svn://svn.freebsd.org/base/stable/10@313532 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r296944:
ngie [Fri, 10 Feb 2017 05:42:06 +0000 (05:42 +0000)]
MFC r296944:

This unbreaks ia64.LINT

r296944 (by imp):

Fix debug printf

git-svn-id: svn://svn.freebsd.org/base/stable/10@313526 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r311993:
ngie [Fri, 10 Feb 2017 05:35:30 +0000 (05:35 +0000)]
MFC r311993:
r311993 (by kan):

Fix typo in r311971.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313525 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r286536:
ngie [Fri, 10 Feb 2017 04:28:44 +0000 (04:28 +0000)]
MFC r286536:

This unbreaks "make installworld" for me on ^/stable/10

r286536 (by imp):

cmp and cp are used by the kerberos install, so need to be imclided in
ITOOLS. They are tiny enough that I'm not making conditional: the
minuscule savings in disk space isn't worth the obfuscation of
Makefile.inc1.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313522 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r311229,r311244:
ngie [Fri, 10 Feb 2017 03:28:03 +0000 (03:28 +0000)]
MFC r311229,r311244:

r311229:

humanize_number_basic: don't leak buf

CID: 1251407

r311244:

mmap_prot_3, mmap_truncate, mmap_truncate_signal: don't leak fd and map

CID: 978306, 125140612881961300541

git-svn-id: svn://svn.freebsd.org/base/stable/10@313521 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r311233,r311377:
ngie [Fri, 10 Feb 2017 03:22:00 +0000 (03:22 +0000)]
MFC r311233,r311377:

r311233:

Fix Coverity issues

- Initialize .sun_len before passing it to strlcpy and bind.
- Close fd on error

CID: 978283, 979581

r311377:

Redo fix for CID 979581

The previous change was flawed in terms of how it calculated the
buffer length for the sockaddr_un object. Use SUN_LEN where
appropriate and mute the Coverity complaint by using memset(.., 0, ..)
to zero out the entire structure instead of setting .sun_len to a bogus
value and strlcpy'ing in the contents of argv[1].

SUN_LEN is now being passed to bind(2) as well. For some odd reason
this wasn't flagged as a bug with Coverity.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313520 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r307702:
ngie [Fri, 10 Feb 2017 03:17:11 +0000 (03:17 +0000)]
MFC r307702:

Integrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite
as tests/sys/fs

These testcases exercise tmpfs support

git-svn-id: svn://svn.freebsd.org/base/stable/10@313519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309774,r309778,r309779,r309780:
ngie [Fri, 10 Feb 2017 03:04:42 +0000 (03:04 +0000)]
MFC r309774,r309778,r309779,r309780:

r309774:

Only run mdconfig -d -u 3 if /dev/md3 exists on the system

This will prevent "cleanup failures" (exit code != 0 returned) when
tmpfs is not loaded

r309778:

Make test_unmount usable in cleanup subroutines

- Duplicate test_unmount to _test_unmount
- Remove atf_check calls
- Call _test_unmount from test_unmount, checking the exit code
  at the end, and returning it to maintain the test_unmount
  "contract"

r309779:

- Ignore errors from umount
- Use _test_unmount instead of test_unmount in cleanup

r309780:

Use _test_unmount instead of test_unmount in cleanup to avoid
false positives with atf_check when tmpfs is not loaded, etc

git-svn-id: svn://svn.freebsd.org/base/stable/10@313518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309373:
ngie [Fri, 10 Feb 2017 02:57:37 +0000 (02:57 +0000)]
MFC r309373:
r309373 (by bdrewery):

Fix setrlimit_test:setrlimit_memlock when the system has exceeded vm.max_wired.

This uses the same fix as r294894 did for the mlock test.  The code from
that commit is moved into a common object file which PROGS supports
building first.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r307701:
ngie [Fri, 10 Feb 2017 02:55:33 +0000 (02:55 +0000)]
MFC r307701:

Expect tests/sys/fs/tmpfs/link_test:kqueue to fail

It fails with: "dir/b did not receive NOTE_LINK"

Also, add needed cleanup logic to cleanup the mountpoint after the fact

PR: 213662

git-svn-id: svn://svn.freebsd.org/base/stable/10@313516 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r307553,r307583:
ngie [Fri, 10 Feb 2017 02:53:16 +0000 (02:53 +0000)]
MFC r307553,r307583:

r307553 (by br):

Skip test on MIPS as it modifies TLS pointer in set_mcontext().

Discussed with: kib

r307583 (by br):

Skip test on FreeBSD only. So test can be upstreamed to NetBSD.

Requested by: ngie

git-svn-id: svn://svn.freebsd.org/base/stable/10@313515 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r307190,r307196,r307204,r307205:
ngie [Fri, 10 Feb 2017 02:51:53 +0000 (02:51 +0000)]
MFC r307190,r307196,r307204,r307205:

r307190:

Skip :uchg on FreeBSD

Unfortunately removing files with uchg set always succeeds with root on
FreeBSD. Unfortunately running the test as an unprivileged user isn't doable
because mounting tmpfs requires root

PR: 212861

r307196:

Port contrib/netbsd-tests/fs/tmpfs/h_tools.c to FreeBSD

- Add inttypes.h #include for PRId64 macro
- Use FreeBSD's copy of getfh(2), which doesn't include a `fh_size` parameter.
  Use sizeof(fhandle_t) instead as the size of fhp is always fixed as
  fhandle_t, unlike NetBSD's copy of fhp, which is void*.

r307204:

Expect :large to fail on FreeBSD

FreeBSD doesn't appear to validate large -o size values like
NetBSD does

PR: 212862

r307205:

Change atf_skip call to atf_expect_fail to make it clear that a failure is
expected

PR: 212861
Suggested by: jmmv

git-svn-id: svn://svn.freebsd.org/base/stable/10@313514 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r306784:
ngie [Fri, 10 Feb 2017 02:48:24 +0000 (02:48 +0000)]
MFC r306784:
r306784 (by emaste):

Add test for a musl libc memmem bug

With a short needle (aka little) musl's memmem could read past the end
of the haystack (aka big). This was fixed in musl commit c718f9f.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313513 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r306038:
ngie [Fri, 10 Feb 2017 02:47:32 +0000 (02:47 +0000)]
MFC r306038:

Port vnd_test to FreeBSD

Use mdmfs/mdconfig instead of vndconfig/newfs. vndconfig doesn't exist on FreeBSD.

TODO: need to parameterize out the md(4) device as it's currently hardcoded to "3"
(in both the FreeBSD and NetBSD cases).

git-svn-id: svn://svn.freebsd.org/base/stable/10@313512 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r303840:
ngie [Fri, 10 Feb 2017 02:44:09 +0000 (02:44 +0000)]
MFC r303840:
r303840 (by jhb):

Add timer_settime tests using SIGEV_THREAD.

Note that these tests should work fine on NetBSD and other systems as
SIGEV_THREAD is POSIX.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301753:
ngie [Fri, 10 Feb 2017 02:41:33 +0000 (02:41 +0000)]
MFC r301753:

Fix up r274061

Detect /usr/share/dict/words the "right way" by using require.files instead of
the hacked up attempt in the dict(..) function, which didn't work properly on
systems where MK_DICT == no.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313510 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r288444:
ngie [Fri, 10 Feb 2017 02:37:42 +0000 (02:37 +0000)]
MFC r288444:

This change has no functional impact on ^/stable/10 because arm64 isn't
supported on 10.x, but it is being done to ease additional backports in
this test

r288444 (by andrew):

Pass 8 arguments to makecontext on arm64 as this is all we support.

Obtained from: EuroBSDCon Devsummit

git-svn-id: svn://svn.freebsd.org/base/stable/10@313509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r305468:
ngie [Fri, 10 Feb 2017 02:29:39 +0000 (02:29 +0000)]
MFC r305468:

Port contrib/netbsd-tests/kernel/kqueue/... as tests/sys/kqueue/...

proc2_test must be skipped because the invariant tested
(`ke.fflags & NOTE_TRACKERR`) doesn't pass.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313508 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoRemove EVFILT_PROCDESC block
ngie [Fri, 10 Feb 2017 02:29:09 +0000 (02:29 +0000)]
Remove EVFILT_PROCDESC block

This reapplies the patch that was done in ^/stable/10@r297977

This is a direct commit to ^/stable/10

Sponsored by: Dell EMC Isilon

git-svn-id: svn://svn.freebsd.org/base/stable/10@313507 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r304797,r305467:
ngie [Fri, 10 Feb 2017 02:21:57 +0000 (02:21 +0000)]
MFC r304797,r305467:

r304797 (by jmmv):

Make use of Kyua's work directories.

Change the vnode tests to use the current directory when creating temporary
files, which we can assume is a volatile work directory, and then make the
kqueue_test.sh driver _not_ abandon the directory created by Kyua.

This makes the various kqueue tests independent of each other, and ensures
the temporary file is cleaned up on failure.

Problem spotted by asomers@ when reviewing D4254.

r305467:

Move tests/sys/kqueue/... to tests/sys/kqueue/libkqueue/...

This is being done to clearly distinguish the libkqueue tests
from the (soon to be imported) NetBSD tests.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoRecord mergeinfo for r288682 and r288683 (items that should never be MFCed)
ngie [Fri, 10 Feb 2017 01:59:35 +0000 (01:59 +0000)]
Record mergeinfo for r288682 and r288683 (items that should never be MFCed)

No net change

git-svn-id: svn://svn.freebsd.org/base/stable/10@313503 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f