Commit Graph

6028 Commits

Author SHA1 Message Date
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