Expect nice_err to fail on FreeBSD with unprivileged users

PR: 189821
Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273015 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Check error return from reading integer part of temperature.

There's a very remote, but possible, chance that the integer part read will
fail, but the fraction read succeeds, at which point the reported temperature is
invalid.

Reported by: Matthew Rezny
MFC after:	3 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273016 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add #include <stdio.h> for printf

Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273017 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove ALC_LOCK_ASSERT in alc_stop_queue().  This function is now
called in device attach without holding a driver lock so it
resulted in panic.

Reported by:	markj


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273018 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do initial port of contrib/netbsd-tests/lib/libc/locale

t_io:
- Expect failures potentially related to implementation-specific knowledge of
the zh_TW.Big5 locale [*]

t_mbrtowc:
- Handle unknown locales more gracefully (do not test if the locale doesn't
exist)
- Expect failure with mbrtowc_internal dealing with Japanese locales
(potentially related to implementation detail knowledge of the ja_* locales) [*].

t_mbstowcs, t_mbtowc, t_wctomb:
- Handle unknown locales more gracefully (do not test if the locale doesn't
exist)

t_wcstod:
- Treat FreeBSD like NetBSD and Linux in the XXX: FIXME section

[*] More investigation is required to determine the root cause of the failures

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273019 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
memmem with NUL length "needle" (aka small) strings on FreeBSD/OSX returns
NULL instead of the "haystack" value (aka big)

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273020 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use 1 as a random seed, as recommended in srandom(3). Adjust the random values
accordingly

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273021 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add #include <stdio.h> to get sys_nerr definition

Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273022 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
__isnanl is automatically picked according to data type in <math.h>. There
isn't a need for the explicit __isnanl test

Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273023 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Only test the return value in mktime_negyear

Testing for the errno is an optional requirement according to POSIX, and
FreeBSD doesn't document that errno would be set on failure with mktime

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273024 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Change ATF_REQUIRE_MSG calls to ATF_CHECK_MSG to get as many errors as possible

t_strptime:common..
- Expect the testcase body as a whole to fail. Multiple PRs will be filed to
track the issues (there are 18 check failures)

t_strptime:day..
- %EA and %OA seem to be case insensitive on FreeBSD


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273025 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a tunable for arc_shrink_shift (vfs.zfs.arc_shrink_shift) that
controls how much fraction, 1/2^arc_shrink_shift, should be reclaimed
when there is memory pressure.

Submitted by:	Richard Kojedzinszky <krichy at tvnetwork.hu>
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273026 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make sure correct object code is generated at -O0.

Submitted by:	grehan@
Approved by:	so@ (des)
MFC after:	1 month


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273027 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Eliminate unnecessary checking for M_EXT on mbufs returned by m_getjcl().

Reviewed by:	bz, glebius, yongari
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D938


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Report physical block size for file-backed LUNs, using vattr.va_blocksize.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273029 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
* Fix zeroing individual entries via ipfw(8).
* Report error and return non-zero exit code if zeroing non-matched entries

Found by:	Oleg Ginzburg


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273032 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Show error when deleting non-existing rule number.

Found by:	Oleg Ginzburg


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273033 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add one more AMD Kaveri APU device ID.

Submitted by:	Remy Nonnenmacher <remy.nonnenmacher@activnetworks.com>
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix matching default rule on clear/show commands.

Found by:	Oleg Ginzburg


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273035 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for READ DEFECT DATA (10/12) commands.

SPC-4 r2 allows to return empty defect list if the list is not supported.
We don't reallu support defect data lists, but this suppresses some errors.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273038 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f