Commit Graph

6245 Commits

Author SHA1 Message Date
Dimitry Andric
840b8445a5 Merge ^/head r274961 through r275366. 2014-12-01 15:11:29 +00:00
Dimitry Andric
15ad7a7c39 Pull in r209785 from upstream libc++ trunk (by Marshall Clow):
Fix a problem exposed by r208825, which caused bind (and other bits of
  libc++) to stop working. And tests

This fix is needed to support clang 3.5.0 and higher, which are more
strict about forming pointer-to-function types with cv-qualifiers or
ref-qualifiers.  See also the upstream PR <http://llvm.org/PR19742> and
<http://llvm.org/viewvc/llvm-project?rev=208825&view=rev>

Reported by:	amdmi3
MFC after:	3 days
2014-12-01 15:02:49 +00:00
Dimitry Andric
60c317af72 Merge ^/head r275262 through r275363. 2014-12-01 13:14:39 +00:00
Dimitry Andric
d814fbe9d2 Add patch file for r275362. 2014-12-01 13:07:49 +00:00
Dimitry Andric
258fa8bc6c For now, enable the clrex instruction for armv6, until upstream
implements this properly.

Submitted by:	andrew
2014-12-01 12:59:21 +00:00
Andrew Turner
b4ce9f7856 There is no need to use FUNC_END with aeabi_ldiv0 or aeabi_idiv0 as they
are aliases.

Sponsored by:	ABT Systems Ltd
2014-11-30 17:29:49 +00:00
Andrew Turner
da063e9d8c Use llabs when getting the absolute value of a long long.
Sponsored by:	ABT Ststems Ltd
2014-11-30 17:27:24 +00:00
Hans Petter Selasky
78328f86e2 Fix building of some infiniband utilities by updating some header file
locations and compiler include directives.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2014-11-30 13:27:58 +00:00
Hans Petter Selasky
dcf58f92e2 Add missing libraries when linking.
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2014-11-30 13:13:46 +00:00
Dimitry Andric
5901d9eeec Add patch file for r275280. 2014-11-30 00:09:26 +00:00
Dimitry Andric
ee2ab7175c Pull in r215811 from upstream llvm trunk (by Nico Weber):
arm asm: Let .fpu enable instructions, PR20447.

  I'm not very happy with duplicating the fpu->feature mapping in ARMAsmParser.cpp
  and in clang's driver. See the bug for a patch that doesn't do that, and the
  review thread [1] for why this duplication exists.

  1: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140811/231052.html

This makes the .fpu directive work properly, so we can successfully
assemble several .S files using the directive, under lib/libc/arm.
2014-11-30 00:08:14 +00:00
Dimitry Andric
51cbfda29f Add patch file for r275265. 2014-11-29 20:24:18 +00:00
Dimitry Andric
50e3cdf0d7 Remove bogus revision numbers from diff header lines in the existing
llvm/clang patches.
2014-11-29 20:23:18 +00:00
Dimitry Andric
e1715afea7 Pull in r214802 from upstream llvm trunk (by Renato Golin):
Allow CP10/CP11 operations on ARMv5/v6

  Those registers are VFP/NEON and vector instructions should be used instead,
  but old cores rely on those co-processors to enable VFP unwinding. This change
  was prompted by the libc++abi's unwinding routine and is also present in many
  legacy low-level bare-metal code that we ought to compile/assemble.

  Fixing bug PR20025 and allowing PR20529 to proceed with a fix in libc++abi.

This enables assembling certain ARM instructions used in libgcc.
2014-11-29 20:18:08 +00:00
Dimitry Andric
980e47cff3 Merge ^/head r274961 through r275261. 2014-11-29 18:44:52 +00:00
Baptiste Daroussin
c04c768107 Implement --no-fatal-warning for compatibility with newer ld
what ever order the options are passed to ld(1) the --no-fatal-warning always
disable --fatal-warning
2014-11-29 11:50:19 +00:00
Baptiste Daroussin
4bf5485791 Update libucl to latest version
While here correctly link libucl to libm and register the dependency on libm
for static building
2014-11-29 00:45:09 +00:00
Dimitry Andric
344e0332fb Merge ^/head r275118 through r275209. 2014-11-28 13:25:57 +00:00
Ed Maste
a85fe12e36 Copy elftoolchain binutils replacements from vendor branch
Sponsored by:	The FreeBSD Foundation
2014-11-27 20:12:13 +00:00
Dimitry Andric
e19eaefe3a Add patch file for r275160. 2014-11-27 00:39:01 +00:00
Dimitry Andric
6a37c166fb Pull in r222856 from upstream llvm trunk (by David Majnemer):
Revert "Added inst combine transforms for single bit tests from Chris's note"

  This reverts commit r210006, it miscompiled libapr which is used in who
  knows how many projects.

  A test has been added to ensure that we don't regress again.

This fixes a miscompilation in libapr, which caused problems in svnlite.
2014-11-27 00:33:31 +00:00
Dimitry Andric
4e734b2430 Add patch files for r275152, r275153 and r275154. 2014-11-26 23:57:12 +00:00
Dimitry Andric
cdf306c8b1 Pull in r221900 from upstream clang trunk (by Ed Maste):
Hook up FreeBSD AArch64 support

  Patch from Andrew Turner.
2014-11-26 23:54:23 +00:00
Dimitry Andric
b57715cff8 Pull in r216571 from upstream llvm trunk (by Zachary Turner):
Fix some semantic usability issues with DynamicLibrary.

  This patch allows invalid DynamicLibrary instances to be
  constructed, and fixes the const-correctness of the isValid()
  method.

  No functional change.

This is needed for supporting the upgrade to a newer LLDB snapshot.
2014-11-26 23:53:35 +00:00
Dimitry Andric
b5479adaec Pull in r215352 from upstream llvm trunk (by Tim Northover):
AArch64: add support for dynamic-loader relocations

  LLD needs them, and it's good to be able to print them properly when
  our object dumpers encounter them.

  Patch by Daniel Stewart.

This is needed for supporting the upgrade to a newer LLDB snapshot.
2014-11-26 23:52:59 +00:00
Ed Maste
10b16cca63 Remove additional platform-specific LLDB code 2014-11-26 18:03:25 +00:00
Ed Maste
dcb99b2156 Revert LLDB changes for Clang/LLVM 3.5 API compatibility
This reverts the following upstream revisions:

      SVN      git
    214335  59a1f270
    214340  42f16b1e
2014-11-26 18:02:22 +00:00
Ed Maste
2691e63cfa Remove LLDB platform support not currently of interest to us 2014-11-26 17:32:20 +00:00
Ed Maste
5dd0c6d9b9 Update paths for FreeBSD build infrastructure
This same change was applied upstream in a later verison.
2014-11-26 17:29:01 +00:00
Ed Maste
7f04dba99f There is no Python in the FreeBSD base system 2014-11-26 17:24:12 +00:00
Ed Maste
a01d545e93 Avoid need for AppleObjCRuntime on FreeBSD
Since it is unlikely to provide much value to us, just #if 0 it away

Sponsored by:	DARPA, AFRL
2014-11-26 17:22:37 +00:00
Ed Maste
85dd3ec148 Revert LLDB changes for Clang/LLVM 3.5 API compatibility
This reverts the following upstream revisions:

     SVN       git
    214501  26d6f063
    215969  a083c0db
    216603  ee9cd340
    216810  f534f503

Sponsored by:	DARPA, AFRL
2014-11-26 17:09:58 +00:00
Ed Maste
0127ef0f2c Update LLDB snapshot to upstream r216948 (git 50f7fe44)
This is approximately "LLDB 3.5" although with a little bit of skew,
and will go along with the Clang 3.5 import.

Sponsored by:	DARPA, AFRL
2014-11-26 16:48:12 +00:00
Ed Maste
fc8fb3476a Revert Clang 3.4 API compatibility changes
Re-apply previously reverted changes to restore LLDB to parity with
the last update as of upstream revision 202189. This is the first step
an LLDB update to correspond with the Clang 3.5 import and re-applies
the following upstream revisions:

      SVN      git
    199408  3ad0a1a1
    199689  05be72c3
    200085  9ad47a93

Sponsored by:	DARPA, AFRL
2014-11-26 16:23:32 +00:00
Dimitry Andric
1181e9f8a2 After some horrible wrestling with Subversion's worthless merge
implementation, merge ^/head r275078 through r275117.

Note that all the extraneous mergeinfo is there because Subversion
created it.  I'll hopefully be able to remove it again when merging back
to head.
2014-11-26 14:36:04 +00:00
Hans Petter Selasky
ba783d0a20 Add support for 64-byte CQE size.
Sponsored by:	Mellanox Technologies
MFC after:	3 days
2014-11-26 09:51:38 +00:00
Dimitry Andric
2c97f721e7 r274961 through r275075 2014-11-25 21:43:01 +00:00
John Baldwin
521b1af4ea Only pass 6 arguments to the 'run' function on amd64. amd64's
makecontext on FreeBSD only supports a maximum of 6 arguments.  This
fixes the setcontext_link test on amd64.

PR:		194828
2014-11-25 12:44:18 +00:00
Rui Paulo
f12128e4df Import libgpio.
This is a thin wrapper around the kernel interface which should make
it easier to write GPIO applications.  gpioctl(8) will be converted to
use this library in a separate commit.

Differential Revision:	https://reviews.freebsd.org/D1183
Reviewed by:	adrian, loos
Discussed on:	arm@, embedded@
Relnotes:	yes
2014-11-24 21:49:40 +00:00
Dimitry Andric
db41cedf01 Cleanup upstream build infrastructure files that we don't use. 2014-11-24 20:57:20 +00:00
Dimitry Andric
2778984cca Cleanup patch set, and update README.TXT. Add three new patches. 2014-11-24 18:43:37 +00:00
Dimitry Andric
59d1ed5b20 Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
2014-11-24 18:11:16 +00:00
Dimitry Andric
91bc56ed82 Merge llvm 3.5.0 release from ^/vendor/llvm/dist, resolve conflicts, and
preserve our customizations, where necessary.
2014-11-24 17:02:24 +00:00
Baptiste Daroussin
b8f344397c Fix an error (case on a .Nm) preventing mandoc from rendering the manpage
Fix mandoc warnings: extrat space at end of lines
2014-11-23 22:01:43 +00:00
Baptiste Daroussin
9baa4ecddb Add missing bits svn merge did not catch 2014-11-22 20:18:38 +00:00
Baptiste Daroussin
912bdb4db7 Update sqlite3 to 3.8.7.2 2014-11-22 19:18:08 +00:00
Baptiste Daroussin
6653664b44 Update mandoc to 1.13.1 2014-11-22 18:57:23 +00:00
Dimitry Andric
5008830b51 Avoid undefined behaviour in gas's rotate_left() macro for n == 0.
Otherwise, clang can effectively remove the first iteration of the for
loops where this macro is invoked, and as a result, "cmp r0, #99" fails
to assemble.

Obtained from:	joerg at netbsd
MFC after:	3 days
2014-11-22 16:30:31 +00:00
Dimitry Andric
fdaadf20c4 Fix the following -Werror warning from clang 3.5.0, while building
usr.bin/cpio on amd64 (or any arch with 64-bit time_t):

contrib/libarchive/cpio/cpio.c:1143:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        if (abs(mtime - now) > (365/2)*86400)
            ^
contrib/libarchive/cpio/cpio.c:1143:6: note: use function 'labs' instead
        if (abs(mtime - now) > (365/2)*86400)
            ^~~
            labs
1 error generated.

This is because time_t is a long on amd64. To avoid the warning, just
copy the equivalent test from a few lines before, which is used in the
Windows case, and which is type safe.

Reviewed by:	emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1198
2014-11-22 12:10:09 +00:00
John Baldwin
180e57e5c7 Improve support for XSAVE with debuggers.
- Dump an NT_X86_XSTATE note if XSAVE is in use. This note is designed
  to match what Linux does in that 1) it dumps the entire XSAVE area
  including the fxsave state, and 2) it stashes a copy of the current
  xsave mask in the unused padding between the fxsave state and the
  xstate header at the same location used by Linux.
- Teach readelf() to recognize NT_X86_XSTATE notes.
- Change PT_GET/SETXSTATE to take the entire XSAVE state instead of
  only the extra portion. This avoids having to always make two
  ptrace() calls to get or set the full XSAVE state.
- Add a PT_GET_XSTATE_INFO which returns the length of the current
  XSTATE save area (so the size of the buffer needed for PT_GETXSTATE)
  and the current XSAVE mask (%xcr0).

Differential Revision:	https://reviews.freebsd.org/D1193
Reviewed by:	kib
MFC after:	2 weeks
2014-11-21 20:53:17 +00:00
Marcel Moolenaar
c600d3070d Upgrade libxo to 0.1.6.
Summary of changes:
1.  Coverity defect fixes

Obtained from:  https://github.com/Juniper/libxo/releases/tag/0.1.6
2014-11-18 18:03:40 +00:00
Enji Cooper
ff0ba87247 Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) with
their #ifdef equivalents for everything changed in contrib/netbsd-tests. There
are some items from the vendor tree that use #if defined(__FreeBSD__) or
#if defined(__NetBSD__) which are being left alone

Requested by: bde, rpaulo
Sponsored by: EMC / Isilon Storage Division
2014-11-17 13:39:00 +00:00
Enji Cooper
1268301a8d - Skip over the testcases that call cbrtl on platforms where LDBL_PREC == 53
(arm, mips, powerpc). This fixes the build on these platforms, based on some
ad hoc tinderbox runs I did a while ago
- Skip cast the arguments to powl as long double so powl properly interprets
those arugments at compile-time when picking the type

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:42:30 +00:00
Enji Cooper
84e369d8fc - Expect exp2_powers to fail on FreeBSD/i386
- Expect exp2_values to fail on FreeBSD due to the small epsilon

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:39:11 +00:00
Enji Cooper
12c91ea883 Alias isinff to isinf on FreeBSD
isinf on FreeBSD automatically picks the appropriate type per math.h

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:37:46 +00:00
Enji Cooper
790973021f Reset errno to 0 before running scalbn to be sure that the tested errno is
valid

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:35:32 +00:00
Enji Cooper
66152388f6 Skip the long-double epsilon checks on FreeBSD/i386
Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:34:46 +00:00
Enji Cooper
e2b4fa14f9 Call sem_unlink on semaphores before attempting to create them
Due to the lack of uniqueness in the semaphore name, and the fact that the
tests don't have cleanup routines, an interrupted test can leave a semaphore
"laying around", causing all subsequent attempts to run the test to fail

I will file a NetBSD PR for this issue soon
2014-11-16 06:59:58 +00:00
Enji Cooper
a20294deef Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h 2014-11-16 05:13:39 +00:00
Enji Cooper
f1c54c1af6 Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c
Submitted by: pho
In collaboration with: kib
2014-11-16 05:13:10 +00:00
Enji Cooper
1741e5991e #ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
the output from the helper program

Submitted by: pho
2014-11-16 05:11:07 +00:00
Enji Cooper
ea74a0a240 Add pthread_np.h #include and initialize the pthread attribute on FreeBSD
Submitted by: pho
2014-11-16 05:09:23 +00:00
Enji Cooper
ff9d081d78 Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD
PR: 191906
In collaboration with: pho
2014-11-16 05:08:19 +00:00
Enji Cooper
190e1b1c9b Only expect timeouts on powerpc with NetBSD
Submitted by: pho
2014-11-16 05:06:35 +00:00
Enji Cooper
a81c27fd8c Use _exit instead of exit so the file descriptors aren't flushed twice in the
child processes

Submitted by: pho
2014-11-16 05:05:18 +00:00
Edwin Groothuis
d61d836c6b MFV of 274557,tzdata{2014j}
Release 2014j - 2014-11-10 17:37:11 -0800

  Changes affecting current and future time stamps

    Turks & Caicos' switch from US eastern time to UTC-4 year-round
    did not occur on 2014-11-02 at 02:00.  It's currently scheduled
    for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)

  Changes affecting past time stamps

    Many pre-1989 time stamps have been corrected for Asia/Seoul and
    Asia/Pyongyang, based on sources for the Korean-language Wikipedia
    entry for time in Korea.  (Thanks to Sanghyuk Jung.)  Also, no
    longer guess that Pyongyang mimicked Seoul time after World War II,
    as this is politically implausible.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Africa/Addis_Ababa, Africa/Asmara,
    Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala,
    Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and
    Indian/Mayotte.

  Changes affecting commentary

    The commentary is less enthusiastic about Shanks as a source,
    and is more careful to distinguish UT from UTC.
2014-11-16 01:00:39 +00:00
Dimitry Andric
daf03b8dad The fix imported into llvm in r274442 contains some C++11 constructs,
which gcc in base cannot handle.  Replace these with C++98 equivalents.

While here, add the patch for the adapted fix.

Reported by:	bz, kib
Pointy hat to:	dim
MFC after:	1 week
X-MFC-With:	r274442
2014-11-13 21:16:01 +00:00
Jung-uk Kim
ea2af5c8bd Regen test cases for yacc(1) after r274460. YYINT is int now.
PR:		194982
2014-11-13 17:54:17 +00:00
Navdeep Parhar
4b63a7c678 Fix previous change to this file (r273811).
This has been submitted upstream and should show up there soon.

Submitted by:	Hariprasad at Chelsio dot com
2014-11-12 20:57:29 +00:00
Dimitry Andric
6a3e479401 Pull in r221709 from upstream llvm trunk (by Frédéric Riss):
Totally forget deallocated SDNodes in SDDbgInfo.

  What would happen before that commit is that the SDDbgValues associated with
  a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep
  a map entry keyed by the SDNode pointer pointing to this list of invalidated
  SDDbgNodes. As the memory gets reused, the list might get wrongly associated
  with another new SDNode. As the SDDbgValues are cloned when they are transfered,
  this can lead to an exponential number of SDDbgValues being produced during
  DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893

  Note that the previous behavior wasn't really buggy as the invalidation made
  sure that the SDDbgValues won't be used. This commit can be considered a
  memory optimization and as such is really hard to validate in a unit-test.

This should fix abnormally large memory usage and resulting OOM crashes
when compiling certain ports with debug information.

Reported by:	Dmitry Marakasov <amdmi3@amdmi3.ru>
Upstream PRs:	http://llvm.org/PR19031 http://llvm.org/PR20893
MFC after:	1 week
2014-11-12 20:01:10 +00:00
Marcel Moolenaar
a0f704ffc1 Upgrade libxo to 0.1.5
Obtained from:  https://github.com/Juniper/libxo
2014-11-11 21:37:17 +00:00
Xin LI
2582ba5ec3 Test errno against EEXIST as well.
MFC after:	3 days
2014-11-11 16:49:33 +00:00
Xin LI
a31070e90d Rename variable name from 'index' to 'idx' to avoid shadowing index(3).
Noticed by:	dim
MFC after:	2 weeks
2014-11-11 05:49:57 +00:00
Enji Cooper
0b837c87ce Revert WiP to contrib/tzcode accidentally committed with r274364 2014-11-11 04:07:41 +00:00
Enji Cooper
ad11def521 Add baud rate support to telnet(1)
This implements part of RFC-2217

It's based off a patch originally written by Sujal Patel at Isilon, and
contributions from other Isilon employees.

PR: 173728
Phabric: D995
Reviewed by: markj, markm
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2014-11-11 04:06:05 +00:00
Dimitry Andric
9e9c431823 Add llvm patch corresponding to r274286. 2014-11-08 16:37:59 +00:00
Dimitry Andric
13235011d5 Pull in r201784 from upstream llvm trunk (by Benjamin Kramer):
AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.

  There is code in the wild that relies on $0 not being expanded.

This fixes some cases of using $ signs in literals being incorrectly
assembled.

Reported by:	Richard Henderson
Upstream PR:	http://llvm.org/PR21500
MFC after:	3 days
2014-11-08 13:19:48 +00:00
Dag-Erling Smørgrav
8a71aca501 Staticize the test plans. 2014-11-05 20:13:18 +00:00
Enji Cooper
0369b14474 Expect lib.libc.sys.getcontext_test.setcontext_link to fail on amd64; add
additional debugging to make the underlying problem more visible

Calling setcontext(2) on amd64 as shown in the test program is failing on
amd64, not i386, with a return code of -1 and an errno of EINVAL

Further investigation is being done in the PR to determine the root cause for
the failure

PR: 194828
Tested with the following configuration:
- amd64/i386
- 11.0-CURRENT @ r273153
- 100 times in a tight loop as root with the following commands...
-- kyua test lib/libc
-- kyua test lib/libc/sys
-- kyua test lib/libc/sys/getcontext_test
2014-11-05 16:38:57 +00:00
Enji Cooper
5ff32a6885 Remove expected failure from lib.libc.sys.t_mincore:mincore_resid
The failure was added based on observation seen on 11.0-CURRENT @ r273153, not
based on internal testing at EMC/Isilon

PR: 194829
Tested with the following configuration:
- amd64/i386
- 11.0-CURRENT @ r273153
- 100 times in a tight loop as root with the following commands...
-- kyua test lib/libc
-- kyua test lib/libc/sys
-- kyua test lib/libc/sys/mincore_test
2014-11-05 16:30:02 +00:00
Dag-Erling Smørgrav
bccb6d5aa1 [SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2).
[SA-14:26] Fix remote command execution in ftp(1).

Approved by:	so (des)
2014-11-04 23:29:29 +00:00
Enji Cooper
aec1a09487 Fix the Jenkins test run by skipping the negative testcases earlier
The problem is that lib.libc.locale.t_io:bad_big5_wprintf was printing out
illegal Unicode characters, which causes XML parsers to bail immediately, e.g.

% kyua report-junit > ~/report.junit
% python2 -c 'import xml.dom.minidom as md; md.parse("/home/ngie/report.junit")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 27137, column 13
2014-11-04 16:02:46 +00:00
Enji Cooper
068ebf3274 Import proper fix for misc/49356 (/usr/include/atf-c/config.h) after atf-c/config.h
was removed from the build

Pointyhat to: me (again, for not running make delete-old after running test builds)
2014-11-04 05:02:22 +00:00
Enji Cooper
4c8085db66 Finish off lib/libc/stdlib/t_strtod.c port by checking for "y" twice on
FreeBSD, and always assume long long double exists on FreeBSD

Submitted by: pho
2014-11-04 00:04:36 +00:00
Enji Cooper
3fe8969a74 rpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
like NetBSD

Submitted by: pho
2014-11-03 23:37:51 +00:00
Enji Cooper
f001698bc1 Port lib/libc/ssp to FreeBSD
In most cases, the buffers and data were resized, but when dealing with the
helpers, some of the code was adjusted to fail more reliably

Submitted by: pho
2014-11-03 23:36:41 +00:00
Enji Cooper
5896aab328 inet_network on FreeBSD returns NULL when provided "0x" to inet_network
Submitted by: pho
2014-11-03 21:26:11 +00:00
Enji Cooper
43d5532540 Port t_db.sh to FreeBSD
- The blocksize on FreeBSD is 32kB, not 64kB
- Add some detection for MK_DICT == no; /nonexistent is echoed along with
  atf_skip to ensure that the test will fail if dict(..) is called in the
  non-final stage of the pipeline

Submitted by: pho
2014-11-03 21:21:08 +00:00
Enji Cooper
4c8d4de868 Port h_hash and t_sha2 to FreeBSD
t_sha2 contains dirty copy-paste hacks that need to be fixed with the openssh
OpenBSD compat layer

Submitted by: pho
2014-11-01 22:00:46 +00:00
Enji Cooper
6a4bfd1397 Expect :sscanf_whitespace to fail on !NetBSD OSes
Submitted by: pho
2014-11-01 21:30:18 +00:00
Enji Cooper
c069d69178 Skip :fopen_regular on !NetBSD because it's a NetBSD specific test
Submitted by: pho
2014-11-01 21:25:22 +00:00
Enji Cooper
708c5b014e Add new atf_tc_expect_fail to fflush_err; this is a new (within the past couple months) bug 2014-11-01 21:23:27 +00:00
Enji Cooper
c621fcdc50 Disable testcases 12 and 15-22 on FreeBSD
Submitted by: pho
2014-11-01 21:21:06 +00:00
Enji Cooper
952234df16 Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes 2014-11-01 21:00:40 +00:00
Enji Cooper
d57c6b5e4f Port h_atexit to FreeBSD
__cxa_atexit varies between FreeBSD and NetBSD, and thus we must use pointers
instead of static fields in the BSS. More extensive discussion is included in
the source code

In collaboration with: kib
Submitted by: pho
2014-11-01 20:50:39 +00:00
Enji Cooper
4925f4feec Port t_mincore to FreeBSD
Mark :mincore_resid as atf_tc_expect_fail on FreeBSD because of new bug
discovered in running the tests (it succeeded from earlier on in the year to
September/October on FreeBSD, at least)

Submitted by: pho
2014-11-01 20:45:45 +00:00
Enji Cooper
1cb870ee31 Port t_kevent to FreeBSD
Submitted by: pho
2014-11-01 20:41:40 +00:00
Enji Cooper
8bd02ea557 Skip :sethostname_basic because it messes up the test host's hostname
Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__
2014-11-01 20:33:42 +00:00
Enji Cooper
a8b9bac8b5 getitimer on FreeBSD returns the last set time instead of the remaining time;
test for that instead

Submitted by: pho
2014-11-01 17:22:53 +00:00
Enji Cooper
4dc3ed6a7b Port lib/libc/sys/t_dup to FreeBSD/Linux
- The requirements differ between FreeBSD/Linux when dealing with oldd/newd
  being equal (both fail with EINVAL, not EBADF)
- Add an EBADF testcase
- Fix compilation issues on clang

In collaboration with: pho
2014-11-01 17:19:43 +00:00
Enji Cooper
b0b9a540ca Port lib/libc/net/h_dns_server to FreeBSD
Submitted by: pho
2014-11-01 17:14:29 +00:00
Enji Cooper
0d913b6592 Port tests to FreeBSD/Linux
Some of the testcases don't work outside of NetBSD, and the behavior of
ether_aton_r differs between FreeBSD, Linux, and NetBSD, and the calls to the
API need to be massaged for FreeBSD and Linux.

Submitted by: pho
2014-11-01 17:13:13 +00:00
Enji Cooper
b6fbc510be Don't prune duplicate services in the expected output from /etc/services on
FreeBSD

Submitted by: pho
2014-11-01 17:09:39 +00:00
Julio Merino
0677dfd1c4 MFV: Import atf-0.21. 2014-11-01 11:17:54 +00:00
Julio Merino
80d53cbe7f Put mtree test files into a subdirectory.
Kyua 0.11 points TMPDIR to the test's work directory, and atf_check creates
auxiliary files in TMPDIR.  This confuses a couple of mtree tests that were
using the work directory's root to validate the contents of the directory.

Fix the two affected tests by creating an auxiliary directory to use for
the mtree tests.  (Kyua should probably do this on its own; filed bug #133
upstream to take a look at this.)
2014-11-01 11:07:59 +00:00
Navdeep Parhar
1db6552d17 rping: make sure that the CQ event thread can never poll a CQ after it
has been destroyed.

Submitted by:	Hariprasad at Chelsio dot com
Sponsored by:	Chelsio Communications
2014-10-29 06:24:12 +00:00
Navdeep Parhar
bd4d7b4fcb Userspace library for Chelsio's Terminator 5 based iWARP RNICs (pretty
much every T5 card that does _not_ have "-SO" in its name is RDMA
capable).

This plugs into the OFED verbs framework and allows userspace RDMA
applications to work over T5 RNICs.  Tested with rping.

Obtained from:	Chelsio Communications
Relnotes:	Yes
Sponsored by:	Chelsio Communications
2014-10-29 01:15:48 +00:00
Brooks Davis
25f3fb54b6 Import in latest mtree from NetBSD to fix a bug in parsing group files
that jmg fixed upstream.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2014-10-28 17:52:26 +00:00
Hans Petter Selasky
3823d5e198 Make some infiniband example utilities easily buildable:
- Add new Makefiles.
- Add more include directories when building.
- Fixed a printf() formatting string.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2014-10-28 13:38:10 +00:00
Xin LI
1545452c54 Remove an extra copy of hv_kvp_daemon(8) [1].
While I'm there also correct typos in OptionalObsoleteFiles and add
information of the command line options for hv_kvp_daemon(8).

Reported by:	jmg [1]
Reviewed by:	jmg
MFC after:	2 weeks
2014-10-27 21:29:42 +00:00
Edwin Groothuis
7ce0f06485 Merge of 273518, tzdata2014i
Upgrade to 2014i

Lots of historical data

Pacific/Fiji will go into DST from 2014-11-02 to 2015-01-18
Pacific/Bougainville will go from UTC+10 to UTC+11.
Europe/Minsk will go from FET to MSK.
2014-10-27 05:50:02 +00:00
Xin LI
cd0b4959e6 MFV r273688:
Update filesystems magic.  This fixes a regression introduced by
libmagic 5.19 which prevents file(1) to show more verbose information
about a MBR.

Submitted by:	madpilot
MFC after:	2 weeks
2014-10-26 09:29:12 +00:00
Xin LI
a5570ae0d7 MFV r273617: netcat from OpenBSD 5.6.
MFC after:	2 weeks
2014-10-25 00:37:35 +00:00
Enji Cooper
55fd0faa7e - Add sys/types.h for the APIs in sys/sysctl.h
- Poke at VM_MIN_ADDRESS in machine/vmparam.h because FreeBSD doesn't have a
  vm.minaddress sysctl analog
- Expect ENOMEM instead of EAGAIN in mlock_limits
- Provide mlock an mmap'ed page twice to simulate MAP_WIRED on NetBSD

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-24 16:18:16 +00:00
Enji Cooper
c9aefabe2c Correct my previous commit:
- getrusage_utime_back succeeds reliably on FreeBSD
- getrusage_utime_zero passes/fails in a seemingly non-deterministic manner.
  Skip it for now (and fix it later)

In the initial port of this testcase to FreeBSD, the results failed reliably
in the same manner as it does on NetBSD

Sponsored by: EMC / Isilon Storage Division
2014-10-24 16:07:31 +00:00
Enji Cooper
cd033efc14 - Mark signo __unused in the signal handler function
- Effectively #if 0 out some code that does not fail on FreeBSD

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-24 06:57:16 +00:00
Enji Cooper
bc3c590b4d - Add inttypes.h and stdint.h in lieu of int_limits.h from NetBSD
- Use #include "h_macros.h" instead of relative path analog

Sponsored by: EMC / Isilon Storage Division
2014-10-24 06:53:06 +00:00
Enji Cooper
dfbf472ad8 - Test for EINVAL requirement when passing an invalid flag in to msync(2)
- Expect ENOMEM instead of EFAULT when msync'ing a previously munmap'ed region
  on FreeBSD

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-24 03:53:49 +00:00
Enji Cooper
3638ce9c38 - Ignore EINVAL check with mknod(path, S_IFCHR, -1) as the testcase is always
executed on a non-devfs filesystem
- Expect mknod(path, S_IFREG, 0) to fail on FreeBSD

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-24 03:42:37 +00:00
Marcel Moolenaar
c412a56aca Add generated headers xoversion.h and xoconfig.h. These are the result
of configuring the source tree:
	% automake --add-missing
	% autoconf
	% ./configure
2014-10-23 22:33:27 +00:00
Marcel Moolenaar
3133765886 Import libxo 0.1.4
Obtained from:	https://github.com/Juniper/libxo
Sponsored by:	Juniper Networks, Inc.
2014-10-23 22:30:14 +00:00
Enji Cooper
078fc315f1 Omit the mprotect_exec testcase on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:29:09 +00:00
Enji Cooper
eef4a6990d Mark signum __unused
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:13:07 +00:00
Enji Cooper
70d69ef1d0 Fix a typo (__FreeBSD__ -> __NetBSD__ when omitting setrlimit_nthr) 2014-10-23 08:12:31 +00:00
Enji Cooper
fcb748b9b3 Add limits.h #include for SSIZE_MAX
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:06:34 +00:00
Enji Cooper
7128b2846a Add limits.h #include for SSIZE_MAX
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:05:47 +00:00
Enji Cooper
928eb3af13 - Omit setrlimit_nthr testcase on FreeBSD (requires lwp.h, et al)
- Expect overflow with rlim_max at INT64_MAX, not UINT64_MAX (rlim_t is int64_t
on FreeBSD)

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:05:03 +00:00
Enji Cooper
3524bdaf9c - Mark sig/signo __unused
- Do not provide a relative path via #include "h_macros.h"

Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:59:59 +00:00
Enji Cooper
922231762c Use <atf_srcdir>/truncate_test.root_owned instead of /usr/bin/fpr as fpr does
not exist on FreeBSD

truncate_test.root_owned will be generated at build time and owned by root

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:54:46 +00:00
Enji Cooper
b0c0b671f8 Add limits.h #include for INT_MAX
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:22:18 +00:00
Enji Cooper
6ffeed4575 - Omit the poll testcases on FreeBSD (they require pollts)
- Add necessary headers for the testcases

Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:20:35 +00:00
Enji Cooper
eb780be7bb Mark signo __unused in handler(..)
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:11:58 +00:00
Enji Cooper
e996bb8945 Omit all of the testcases as revoke(2) is only implemented on devfs(5)
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:07:35 +00:00
Enji Cooper
1837d228fc Omit the pollts testcases on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:05:14 +00:00
Enji Cooper
41acfd752f Port t_mmap.c to FreeBSD
- Add needed headers for the testcases
- Omit mmap_block on non-NetBSD OSes
- Use "security.bsd.map_at_zero" instead of "vm.user_va0_disable"

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:42:53 +00:00
Enji Cooper
16f04beb8c Add sys/socket.h #include for struct sockaddr_in
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:35:19 +00:00
Enji Cooper
3816d068c8 Add limits.h #include for LINE_MAX
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:25:52 +00:00
Enji Cooper
deafa70780 - Mark unused parameters __unused in handler
- Call sigqueue with getpid() instead of 0 -- the latter idiom appears to only
be valid on NetBSD

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:24:36 +00:00
Enji Cooper
e90f6cb573 Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)"
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:21:10 +00:00
Enji Cooper
10ee748942 Port t_pipe2.c to FreeBSD
- Omit the pipe2_nosigpipe testcase on FreeBSD (FreeBSD doesn't have
  O_NOSIGPIPE).
- Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)".
- Save and restore the resource limit on the number of files (RLIMIT_NOFILE).

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:18:28 +00:00
Enji Cooper
edeea1460a Expect getgroups_err to fail on FreeBSD
PR: 189941
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 05:58:02 +00:00
Enji Cooper
a39196afea Add netinet/in.h for struct sockaddr_in
Sponsored by: EMC / Isilon Storage Division
2014-10-23 05:46:10 +00:00
Xin LI
e08aa0528f MFV r273494: xz 5.0.7.
MFC after:	2 weeks
2014-10-23 00:40:56 +00:00
Xin LI
58ee264e3a MFV r273492: remove gettext files. 2014-10-23 00:31:26 +00:00
Marcel Moolenaar
c10185837c Fix the conversion macro for .note sections, broken in the case
the ELF file's byte order is not the native byte order.  The
bug is that the variables holding the name and description size
are used (natively) after having been byte-swapped.  The fix is
to calculate sz from them just prior to byte-swapping.

Approved by:	jkoshy@
Obtained from:	Juniper Networks, Inc.
2014-10-22 01:04:16 +00:00
Marcel Moolenaar
5da7d44acb GCC for PowerPC does not align .note sections to 4 bytes. When
running ctfmerge on its objects, libelf asserts as it expects
.note sections to be 4-byte aligned.  Change that expectation.

Approved by:	jkoshy@
Obtained from:	Juniper Networks, Inc.
2014-10-22 00:58:50 +00:00
Baptiste Daroussin
e1f7d54595 Do not define bad_array_new_length::bad_array_new_length in libc++ anymore
when used in combinaison with libcxxrt since it is now defined there already.
This fixes building world
2014-10-21 21:49:06 +00:00
Enji Cooper
f8974fefdb Add sys/socket.h #include for bind(2), et al
Sponsored by: EMC / Isilon Storage Division
2014-10-21 20:17:05 +00:00
Enji Cooper
203a8409a0 Port t_chroot to FreeBSD
- Add missing #include sys/stat.h for mkdir(2)
- Omit the fchroot(2) tests because the support is not present on FreeBSD

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:10:05 +00:00
Enji Cooper
67654a1af5 unlink("/") fails with EISDIR instead of EBUSY on FreeBSD; test for that
instead

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:06:04 +00:00
Enji Cooper
30f7722958 Mark osi __unused so this compiles cleanly on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:01:37 +00:00
Enji Cooper
84763702c5 Port t_write to FreeBSD
- Mark the signo variable for the signal handle __unused
- Use limits.h instead of sys/syslimits.h (the latter does not
exist on FreeBSD)

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:00:55 +00:00
Enji Cooper
6da1ceb210 Add missing #include for sys/stat.h for fchmod
Sponsored by: EMC / Isilon Storage Division
2014-10-21 17:58:53 +00:00
Enji Cooper
2a0388e163 libutil.h is required for fparseln on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-21 17:57:12 +00:00
Enji Cooper
192a7b5f9e Port lib/libc/gen/t_siginfo to FreeBSD
- mcontext_t on FreeBSD doesn't have a __gregs field (it's split out on FreeBSD
into separate fields). In order to avoid muddying the test code with MD code,
the debugging trace info has not been implemented
- FreeBSD does not implement the si_stime and si_utime fields in siginfo_t, so
omit the debugging code that dumps the values
- sys/inttypes.h doesn't exist on FreeBSD

Sponsored by: EMC / Isilon Storage Division
2014-10-21 17:56:06 +00:00
Baptiste Daroussin
1418fbd6c7 Fix build by marking the new functions as weak
This is a temporary fix
2014-10-21 12:52:01 +00:00
Baptiste Daroussin
726f4cd580 Add support for __cxa_throw_bad_array_new_length in libcxxrt
It is required for use with newer g++49

Differential Revision:	https://reviews.freebsd.org/D982
Reviewed by:	theraven
Approved by:	theraven
MFC after:	3 weeks
2014-10-21 10:19:45 +00:00
Dag-Erling Smørgrav
49e2762fba Merge upstream r825: fix line continuation in whitespace 2014-10-19 11:06:54 +00:00
Baptiste Daroussin
78433c77c6 Import patch from libc++ r197313 which allows using libc++ headers with gcc
Differential Revision:	https://reviews.freebsd.org/D942
Reviewed by:	imp
2014-10-13 22:30:08 +00:00
Enji Cooper
e58fb51fc7 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
2014-10-13 03:55:47 +00:00
Enji Cooper
13727fa5e8 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
2014-10-13 02:44:35 +00:00
Enji Cooper
8a05dd8595 __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
2014-10-13 02:32:37 +00:00
Enji Cooper
267693b269 Add #include <stdio.h> to get sys_nerr definition
Sponsored by: EMC / Isilon Storage Division
2014-10-13 02:29:58 +00:00
Enji Cooper
ea441bc061 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
2014-10-13 02:27:59 +00:00
Enji Cooper
21a9353bfd 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
2014-10-13 02:23:24 +00:00
Enji Cooper
effc369887 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
2014-10-13 01:14:01 +00:00
Enji Cooper
b081e68c53 Add #include <stdio.h> for printf
Sponsored by: EMC / Isilon Storage Division
2014-10-13 00:33:59 +00:00
Enji Cooper
62141a34e7 Expect nice_err to fail on FreeBSD with unprivileged users
PR: 189821
Sponsored by: EMC / Isilon Storage Division
2014-10-12 23:46:24 +00:00
Enji Cooper
27d2e83dc4 - Add libutil #include for fparseln
- Change ATF_REQUIRE_EQ_MSG to ATF_CHECK_EQ_MSG to gather all failing results
  possible (currently 12 with leftassoc)
- Mark leftassoc "atf_tc_expect_fail" on FreeBSD (PR coming soon after further
  analysis is done on the code)

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-12 21:59:23 +00:00
Enji Cooper
40187119b6 Fix compilation errors with missing wide-type headers and fix compilation
warnings with -Wformat

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-12 21:54:55 +00:00
Enji Cooper
f12a8d0b05 Implement 64MB memory limit for test to ensure that it fails reliably in
600 seconds; it would previously fail inconsistently when run in some virtual
machine configurations

This patch might need to be reverted or revisited later (see the attached PR
for more details)

PR: 169302

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-12 21:53:13 +00:00
Enji Cooper
387dcafe06 #include libutil.h for fparseln on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-12 10:07:26 +00:00
Enji Cooper
5bd73b5107 Only #include <sys/tls.h> on NetBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-12 10:04:59 +00:00
Pedro F. Giffuni
eb4e1f8059 tcpd.h: add prototype for hosts_ctl
According the hosts_access(3) man page the hosts_ctl() prototype
should be in tcpd.h. For now, follow other declarations and don't
add the arguments in the prototype.

Reference:
https://www.illumos.org/issues/4385

PR:		32808
MFC after:	2 weeks
2014-10-11 18:54:37 +00:00
Pedro F. Giffuni
b1f8be4004 tcpd: complete function prototypes.
This clears up at least a build issues on mysql-server
ports. While here also replace some spaces with tabs
in our headers.

PR:		42336
MFC after:	2 weeks
2014-10-11 18:34:10 +00:00
Enji Cooper
8b8647bf30 Port the testcase to FreeBSD
- Make #include path to h_macros.h a non-relative path
- __gl_stat_t is synonymous with struct stat on FreeBSD
- FreeBSD doesn't have _DIRENT_RECLEN
- Skip over glob_star on FreeBSD (testcase doesn't pass)

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-10 21:22:25 +00:00
Enji Cooper
1068aa4201 Skip over t_spawn_open_nonexistent_diag because it requires NetBSD specific
additions to posix_spawn

Sponsored by: EMC / Isilon Storage Division
2014-10-10 21:19:17 +00:00
Enji Cooper
e33dfddd03 SIGPWR does not exist on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-10 19:34:19 +00:00
Enji Cooper
6fc3b00f80 Handle getting/setting niceness/priority correctly on FreeBSD vs NetBSD
This might be fallout from PR: 189821

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-10 19:32:53 +00:00
Enji Cooper
9ae31714cf Disable the invalid pointer test on FreeBSD
FreeBSD segfaults on invalid pointers passed to getcwd because it throbs the
address passed in in libc, whereas NetBSD just passes the information off to
the syscall, which allows the kernel to return EFAULT on bad pointers.

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-10 19:28:57 +00:00
Enji Cooper
4cf97cc9d2 FreeBSD doesn't support strings greater than MAXHOSTNAMELEN-1 in
{get,set}{domain,host}name. Adjust the tests to not exceed that
value when testing out the code

Add a positive and negative test for MAXHOSTNAMELEN-1 and
MAXHOSTNAMELEN, respectively

PR: 181127
In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-10 19:18:52 +00:00
Enji Cooper
bd735ec199 FreeBSD returns ENOTTY instead of EBADF in ttyname_r; mark it as an expected
failure

PR: 191936

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-10 19:02:02 +00:00
Enji Cooper
e6a6a5c5d3 Add missing #include <sys/time.h> for gettimeofday
Sponsored by: EMC / Isilon Storage Division
2014-10-10 18:59:18 +00:00
Enji Cooper
6cf117d780 Disable tests that don't pass on FreeBSD due to missing support in
humanize_number(3). Bringing in additional revisions from NetBSD's
humanize_number(3) will fix the tests

Account for the fact that util.h on NetBSD is libutil.h on FreeBSD

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-10 18:57:39 +00:00
Enji Cooper
ac2a1d3d71 Expect SIGSEGV in lib/libc/stdlib/t_getenv:setenv_basic
See bin/189805 for more details

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-10 08:57:55 +00:00
Enji Cooper
b3a6b001d0 Only build/run hsearch_basic and hsearch_r_basic on NetBSD
hdestroy1 is not present on FreeBSD

Sponsored by: EMC / Isilon Storage Division
2014-10-10 08:35:16 +00:00
Baptiste Daroussin
66c8095956 Rename elf*-powerpc into elf*-powerpc-freebsd in binutils
The powerpc support was the only supported architecture not prepending the elf format name
with "-freebsd" in base this change makes it consistent with other architectures.
On newer version of binutils the powerpc format is also prepended with "-freebsd".

Also modify the kernel ldscripts in that regards.

As a result it is now possible cross build the kernel on powerpc using newer binutils

Differential Revision:	https://reviews.freebsd.org/D926
Differential Revision:	https://reviews.freebsd.org/D928
2014-10-10 06:24:09 +00:00
Shteryana Shopova
ac89bc4f84 Fix a bug in decoding string indexes in snmp_target(3), thus causing
bsnmpd(1) to not send v3 notifications properly; while here add two
missing return statements which could lead to abort() in case of a
rollback
2014-10-10 00:26:28 +00:00
Baptiste Daroussin
315e69cb63 Import byacc 20141006 2014-10-08 20:46:38 +00:00
Luigi Rizzo
86f82ef946 Add netmap support to libpcap. Tcpdump and other native pcap application can now
run directly on netmap ports using netmap:foo or valeXX:YY device names.
Modifications to existing code are small and trivial, the netmap-specific
code is all in a new file.

Please be aware that in netmap mode the physical interface is disconnected from
the host stack, so libpcap will steal the traffic not just make a copy.

For the full version of the code (including linux and autotools support) see
	https://code.google.com/p/netmap-libpcap/

MFC after:	3 days
2014-10-06 15:48:28 +00:00
Baptiste Daroussin
11fce282db Import byacc 20141005 from vendor 2014-10-06 15:12:59 +00:00
Luigi Rizzo
2d4dfaf58b Fix comment and sort rights by name
MFC after:	3 days
2014-10-06 15:03:08 +00:00
Craig Rodrigues
ab7bf3d49d MFV:
use calloc in get_line() when allocating line to ensure it is fully initialized,
 fixes a later uninitialized value in copy_param() (FreeBSD #193499).

PR: 193499
Submitted by: Thomas E. Dickey  <tom@invisible-island.net>
2014-10-06 14:43:02 +00:00
Andrew Turner
9514a9d161 Merge the big-endian ARM targets together, and the little-endian ARM
targets. With this we assume any ARM target containing eb is big-endian,
otherwise it is little-endian.
2014-10-05 11:06:22 +00:00
Andrew Turner
e0d0c7b8f3 Silence a warning about Tag_Virtualization_use being unknown. We don't
handle merging this tag correctly, however it's unused.
2014-10-04 14:30:16 +00:00
Andrew Turner
657be2acf7 Add movw and movt relocations to the list of relocations against function
names that must nnot be adjusted. This fixes a bug where code such as:
movw r2, :lower16:symbol
movt r2, :upper16:symbol

It is common for clang to generate such code when targeting armv7.
2014-10-04 13:14:37 +00:00
Andrew Turner
0162755064 Allow vld and vst instructions to use the canonical form from ARM ARM when
including an alignment. Previously binutils would only allow instructions
in the form "vld1.64 {d0, d1}, [r0, :128]" where the final comma should
not be there, instead the above instruction should be
"vld1.64 {d0, d1}, [r0:128]".

This change duplicates the alignment code from within the function to
handle this case.
2014-10-03 15:07:43 +00:00
Andrew Turner
cb08295d5d Add all the dmb/dsb optional limitations, including the alternative values.
These are needed for some code llvm generates when targeting ARMv7.
2014-10-03 12:20:37 +00:00
Andrew Turner
671302a908 Allow the optional limitation on dmb instructions as is already the case
with dsb instructions.
2014-10-03 12:14:19 +00:00
Enji Cooper
57718be8fa Import the NetBSD test suite from ^/vendor/NetBSD/tests/09.30.2014_20.45 ,
minus the vendor Makefiles

Provide directions for how to bootstrap the vendor sources in
FREEBSD-upgrade

MFC after 2 weeks
Discussed with: rpaulo
Sponsored by: EMC / Isilon Storage Division
2014-10-02 23:26:49 +00:00