Pull in r233552 from upstream libc++ trunk (by Eric Fiselier):
[libcxx] Fix PR22771 - Support access control SFINAE in the library
version of is_convertible.
Summary:
Currently the conversion check does not take place in a context where
access control SFINAE is applied. This patch changes the context of
the test expression so that SFINAE occurs if access control does not
permit the conversion.
Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771
Reviewers: mclow.lists, rsmith, dim
Reviewed By: dim
Subscribers: dim, rodrigc, emaste, cfe-commits
Differential Revision: http://reviews.llvm.org/D8461
This fixes building clang, and other programs using libc++, with newer
versions of gcc (specifically, gcc 4.8 and higher).
Reported by: rodrigc
This includes these changes: 279219, 279229, 279261, 279534, 279570,
280230, 280231.
In addition, bump __FreeBSD_version for the addition of the new
mtio(4) / sa(4) ioctls.
Thanks to Dan Langille, Harald Schmalzbauer and Rudolf Cejka for spending
a significant amount of time and effort testing these changes.
------------------------------------------------------------------------
r279219 | ken | 2015-02-23 14:59:30 -0700 (Mon, 23 Feb 2015) | 282 lines
Significant upgrades to sa(4) and mt(1).
The primary focus of these changes is to modernize FreeBSD's
tape infrastructure so that we can take advantage of some of the
features of modern tape drives and allow support for LTFS.
Significant changes and new features include:
o sa(4) driver status and parameter information is now exported via an
XML structure. This will allow for changes and improvements later
on that will not break userland applications. The old MTIOCGET
status ioctl remains, so applications using the existing interface
will not break.
o 'mt status' now reports drive-reported tape position information
as well as the previously available calculated tape position
information. These numbers will be different at times, because
the drive-reported block numbers are relative to BOP (Beginning
of Partition), but the block numbers calculated previously via
sa(4) (and still provided) are relative to the last filemark.
Both numbers are now provided. 'mt status' now also shows the
drive INQUIRY information, serial number and any position flags
(BOP, EOT, etc.) provided with the tape position information.
'mt status -v' adds information on the maximum possible I/O size,
and the underlying values used to calculate it.
o The extra sa(4) /dev entries (/dev/saN.[0-3]) have been removed.
The extra devices were originally added as place holders for
density-specific device nodes. Some OSes (NetBSD, NetApp's OnTap
and Solaris) have had device nodes that, when you write to them,
will automatically select a given density for particular tape drives.
This is a convenient way of switching densities, but it was never
implemented in FreeBSD. Only the device nodes were there, and that
sometimes confused users.
For modern tape devices, the density is generally not selectable
(e.g. with LTO) or defaults to the highest availble density when
the tape is rewritten from BOT (e.g. TS11X0). So, for most users,
density selection won't be necessary. If they do need to select
the density, it is easy enough to use 'mt density' to change it.
o Protection information is now supported. This is either a
Reed-Solomon CRC or CRC32 that is included at the end of each block
read and written. On write, the tape drive verifies the CRC, and
on read, the tape drive provides a CRC for the userland application
to verify.
o New, extensible tape driver parameter get/set interface.
o Density reporting information. For drives that support it,
'mt getdensity' will show detailed information on what formats the
tape drive supports, and what formats the tape drive supports.
o Some mt(1) functionality moved into a new mt(3) library so that
external applications can reuse the code.
o The new mt(3) library includes helper routines to aid in parsing
the XML output of the sa(4) driver, and build a tree of driver
metadata.
o Support for the MTLOAD (load a tape in the drive) and MTWEOFI
(write filemark immediate) ioctls needed by IBM's LTFS
implementation.
o Improve device departure behavior for the sa(4) driver. The previous
implementation led to hangs when the device was open.
o This has been tested on the following types of drives:
IBM TS1150
IBM TS1140
IBM LTO-6
IBM LTO-5
HP LTO-2
Seagate DDS-4
Quantum DLT-4000
Exabyte 8505
Sony DDS-2
contrib/groff/tmac/doc-syms,
share/mk/bsd.libnames.mk,
lib/Makefile,
Add libmt.
lib/libmt/Makefile,
lib/libmt/mt.3,
lib/libmt/mtlib.c,
lib/libmt/mtlib.h,
New mt(3) library that contains functions moved from mt(1) and
new functions needed to interact with the updated sa(4) driver.
This includes XML parser helper functions that application writers
can use when writing code to query tape parameters.
rescue/rescue/Makefile:
Add -lmt to CRUNCH_LIBS.
src/share/man/man4/mtio.4
Clarify this man page a bit, and since it contains what is
essentially the mtio.h header file, add new ioctls and structure
definitions from mtio.h.
src/share/man/man4/sa.4
Update BUGS and maintainer section.
sys/cam/scsi/scsi_all.c,
sys/cam/scsi/scsi_all.h:
Add SCSI SECURITY PROTOCOL IN/OUT CDB definitions and CDB building
functions.
sys/cam/scsi/scsi_sa.c
sys/cam/scsi/scsi_sa.h
Many tape driver changes, largely outlined above.
Increase the sa(4) driver read/write timeout from 4 to 32
minutes. This is based on the recommended values for IBM LTO
5/6 drives. This may also avoid timeouts for other tape
hardware that can take a long time to do retries and error
recovery. Longer term, a better way to handle this is to ask
the drive for recommended timeout values using the REPORT
SUPPORTED OPCODES command. Modern IBM and Oracle tape drives
at least support that command, and it would allow for more
accurate timeout values.
Add XML status generation. This is done with a series of
macros to eliminate as much duplicate code as possible. The
new XML-based status values are reported through the new
MTIOCEXTGET ioctl.
Add XML driver parameter reporting, using the new MTIOCPARAMGET
ioctl.
Add a new driver parameter setting interface, using the new
MTIOCPARAMSET and MTIOCSETLIST ioctls.
Add a new MTIOCRBLIM ioctl to get block limits information.
Add CCB/CDB building routines scsi_locate_16, scsi_locate_10,
and scsi_read_position_10().
scsi_locate_10 implements the LOCATE command, as does the
existing scsi_set_position() command. It just supports
additional arguments and features. If/when we figure out a
good way to provide backward compatibility for older
applications using the old function API, we can just revamp
scsi_set_position(). The same goes for
scsi_read_position_10() and the existing scsi_read_position()
function.
Revamp sasetpos() to take the new mtlocate structure as an
argument. It now will use either scsi_locate_10() or
scsi_locate_16(), depending upon the arguments the user
supplies. As before, once we change position we don't have a
clear idea of what the current logical position of the tape
drive is.
For tape drives that support long form position data, we
read the current position and store that for later reporting
after changing the position. This should help applications
like Bacula speed tape access under FreeBSD once they are
modified to support the new ioctls.
Add a new quirk, SA_QUIRK_NO_LONG_POS, that is set for all
drives that report SCSI-2 or older, as well as drives that
report an Illegal Request type error for READ POSITION with
the long format. So we should automatically detect drives
that don't support the long form and stop asking for it after
an initial try.
Add a partition number to the sa(4) softc.
Improve device departure handling. The previous implementation
led to hangs when the device was open.
If an application had the sa(4) driver open, and attempted to
close it after it went away, the cam_periph_release() call in
saclose() would cause the periph to get destroyed because that
was the last reference to it. Because destroy_dev() was
called from the sa(4) driver's cleanup routine (sacleanup()),
and would block waiting for the close to happen, a deadlock
would result.
So instead of calling destroy_dev() from the cleanup routine,
call destroy_dev_sched_cb() from saoninvalidate() and wait for
the callback.
Acquire a reference for devfs in saregister(), and release it
in the new sadevgonecb() routine when all devfs devices for
the particular sa(4) driver instance are gone.
Add a new function, sasetupdev(), to centralize setting
per-instance devfs device parameters instead of repeating the
code in saregister().
Add an open count to the softc, so we know how many
peripheral driver references are a result of open
sessions.
Add the D_TRACKCLOSE flag to the cdevsw flags so
that we get a 1:1 mapping of open to close calls
instead of a N:1 mapping.
This should be a no-op for everything except the
control device, since we don't allow more than one
open on non-control devices.
However, since we do allow multiple opens on the
control device, the combination of the open count
and the D_TRACKCLOSE flag should result in an
accurate peripheral driver reference count, and an
accurate open count.
The accurate open count allows us to release all
peripheral driver references that are the result
of open contexts once we get the callback from devfs.
sys/sys/mtio.h:
Add a number of new mt(4) ioctls and the requisite data
structures. None of the existing interfaces been removed
or changed.
This includes definitions for the following new ioctls:
MTIOCRBLIM /* get block limits */
MTIOCEXTLOCATE /* seek to position */
MTIOCEXTGET /* get tape status */
MTIOCPARAMGET /* get tape params */
MTIOCPARAMSET /* set tape params */
MTIOCSETLIST /* set N params */
usr.bin/mt/Makefile:
mt(1) now depends on libmt, libsbuf and libbsdxml.
usr.bin/mt/mt.1:
Document new mt(1) features and subcommands.
usr.bin/mt/mt.c:
Implement support for mt(1) subcommands that need to
use getopt(3) for their arguments.
Implement a new 'mt status' command to replace the old
'mt status' command. The old status command has been
renamed 'ostatus'.
The new status function uses the MTIOCEXTGET ioctl, and
therefore parses the XML data to determine drive status.
The -x argument to 'mt status' allows the user to dump out
the raw XML reported by the kernel.
The new status display is mostly the same as the old status
display, except that it doesn't print the redundant density
mode information, and it does print the current partition
number and position flags.
Add a new command, 'mt locate', that will supersede the
old 'mt setspos' and 'mt sethpos' commands. 'mt locate'
implements all of the functionality of the MTIOCEXTLOCATE
ioctl, and allows the user to change the logical position
of the tape drive in a number of ways. (Partition,
block number, file number, set mark number, end of data.)
The immediate bit and the explicit address bits are
implemented, but not documented in the man page.
Add a new 'mt weofi' command to use the new MTWEOFI ioctl.
This allows the user to ask the drive to write a filemark
without waiting around for the operation to complete.
Add a new 'mt getdensity' command that gets the XML-based
tape drive density report from the sa(4) driver and displays
it. This uses the SCSI REPORT DENSITY SUPPORT command
to get comprehensive information from the tape drive about
what formats it is able to read and write.
Add a new 'mt protect' command that allows getting and setting
tape drive protection information. The protection information
is a CRC tacked on to the end of every read/write from and to
the tape drive.
Sponsored by: Spectra Logic
MFC after: 1 month
------------------------------------------------------------------------
------------------------------------------------------------------------
r279229 | ken | 2015-02-23 22:43:16 -0700 (Mon, 23 Feb 2015) | 5 lines
Fix printf format warnings on sparc64 and mips.
Sponsored by: Spectra Logic
MFC after: 1 month
------------------------------------------------------------------------
------------------------------------------------------------------------
r279261 | ken | 2015-02-24 21:30:23 -0700 (Tue, 24 Feb 2015) | 23 lines
Fix several problems found by Coverity.
lib/libmt/mtlib.c:
In mt_start_element(), make sure we don't overflow the
cur_sb array. CID 1271325
usr.bin/mt/mt.c:
In main(), bzero the mt_com structure so that we aren't
using any uninitialized stack variables. CID 1271319
In mt_param(), only allow one -s and one -p argument. This
will prevent a memory leak caused by overwriting the
param_name and/or param_value variables. CID 1271320 and
CID 1271322
To make things simpler in mt_param(), make sure there
there is only one exit path for the function. Make sure
the arguments are explicitly freed.
Sponsored by: Spectra Logic
Pointed out by: emaste
MFC after: 1 month
------------------------------------------------------------------------
------------------------------------------------------------------------
r279534 | ken | 2015-03-02 11:09:49 -0700 (Mon, 02 Mar 2015) | 18 lines
Change the sa(4) driver to check for long position support on
SCSI-2 devices.
Some older tape devices claim to be SCSI-2, but actually do support
long position information. (Long position information includes
the current file mark.) For example, the COMPAQ SuperDLT1.
So we now only disable the check on SCSI-1 and older devices.
sys/cam/scsi/scsi_sa.c:
In saregister(), only disable fetching long position
information on SCSI-1 and older drives. Update the
comment to explain why.
Confirmed by: dvl
Sponsored by: Spectra Logic
MFC after: 3 weeks
------------------------------------------------------------------------
------------------------------------------------------------------------
r279570 | ken | 2015-03-03 15:49:07 -0700 (Tue, 03 Mar 2015) | 21 lines
Add density code for DAT-72, and notes on DAT-160.
As it turns out, the density code for DAT-160 (0x48) is the same
as for SDLT220. Since the SDLT values are already in the table,
we will leave them in place.
Thanks to Harald Schmalzbauer for confirming the DAT-72 density code.
lib/libmt/mtlib.c:
Add DAT-72 density code, and commented out DAT-160 density
code. Explain why DAT-160 is commented out. Add notes
explaining where the bpi values for these formats came from.
usr.bin/mt/mt.1:
Add DAT-72 density code, and add a note explaining that
the SDLTTapeI(110) density code (0x48) is the same as
DAT-160.
Sponsored by: Spectra Logic
MFC after: 3 weeks
------------------------------------------------------------------------
------------------------------------------------------------------------
r280230 | ken | 2015-03-18 14:52:34 -0600 (Wed, 18 Mar 2015) | 25 lines
Fix a couple of problems in the sa(4) media type reports.
The only drives I have discovered so far that support medium type
reports are newer HP LTO (LTO-5 and LTO-6) drives. IBM drives
only support the density reports.
sys/cam/scsi/scsi_sa.h:
The number of possible density codes in the medium type
report is 9, not 8. This caused problems parsing all of
the medium type report after this point in the structure.
usr.bin/mt/mt.c:
Run the density codes returned in the medium type report
through denstostring(), just like the primary and secondary
density codes in the density report. This will print the
density code in hex, and give a text description if it
is available.
Thanks to Rudolf Cejka for doing extensive testing with HP LTO drives
and Bacula and discovering these problems.
Tested by: Rudolf Cejka <cejkar at fit.vutbr.cz>
Sponsored by: Spectra Logic
MFC after: 4 days
------------------------------------------------------------------------
------------------------------------------------------------------------
r280231 | ken | 2015-03-18 14:54:54 -0600 (Wed, 18 Mar 2015) | 16 lines
Improve the mt(1) rblim display.
The granularity reported by READ BLOCK LIMITS is an exponent, not a
byte value. So a granularity of 0 means 2^0, or 1 byte. A
granularity of 1 means 2^1, or 2 bytes.
Print out the individual block limits on separate lines to improve
readability and avoid exceeding 80 columns.
usr.bin/mt/mt.c:
Fix and improve the 'mt rblim' output. Add a MT_PLURAL()
macro so we can print "byte" or "bytes" as appropriate.
Sponsored by: Spectra Logic
MFC after: 4 days
------------------------------------------------------------------------
Sponsored by: Spectra Logic
Release 2015b - 2015-03-19 23:28:11 -0700
Changes affecting future time stamps
Mongolia will start observing DST again this year, from the last
Saturday in March at 02:00 to the last Saturday in September at 00:00.
(Thanks to Ganbold Tsagaankhuu.)
Palestine will start DST on March 28, not March 27. Also,
correct the fall 2014 transition from September 26 to October 24.
Adjust future predictions accordingly. (Thanks to Steffen Thorsen.)
Changes affecting past time stamps
The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
regression. (Thanks to Stuart Bishop for reporting the problem.)
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: America/Antigua, America/Cayman,
Pacific/Midway, and Pacific/Saipan.
Changes affecting time zone abbreviations
Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
(Thanks to Hank W.)
Update most userspace consumers of capability.h to use capsicum.h instead.
auditdistd is not updated as I will make the change upstream and then do a
vendor import sometime in the next week or two.
Note that a significant fraction does not apply, as FreeBSD 10 doesn't
contain a Capsicumised ping, casperd, libcasper, etc. When these features
are merged, the capsicum.h change will need to be merged with them.
Sponsored by: Google, Inc.
Pull in r228344 from upstream libc++ trunk (by Eric Fiselier):
Get tests running with warnings. Fix warnings in headers and tests
This fixes a number of -Wunused-local-typedef warnings in libc++ headers.
MFC r279758:
Fix another -Wunused-local-typedef warning in libc++, in include/__tree.
Release 2015a - 2015-01-29
Changes affecting future time stamps
The Mexican state of Quintana Roo, represented by America/Cancun,
will shift from Central Time with DST to Eastern Time without DST
on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.)
Chile will not change clocks in April or thereafter; its new standard time
will be its old daylight saving time. This affects America/Santiago,
Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.)
New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
(Thanks to Tim Parenti.)
Changes affecting past time stamps
Iceland observed DST in 1919 and 1921, and its 1939 fallback
transition was Oct. 29, not Nov. 29. Remove incorrect data from
Shanks about time in Iceland between 1837 and 1908.
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: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
and Asia/Muscat.
bfd_dwarf2_find_line() calls find_line() with NULL functionname_ptr,
which resulted in a crash on certain ELF objects.
This change was implemented independently from upstream binutils, but
I have checked that the crash does not happen there.
Sponsored by: The FreeBSD Foundation
Make libcxxrt's parsing of DWARF exception handling tables work on
architectures with strict alignment, by using memcpy() instead of
directly reading fields.
Reported by: Daisuke Aoyama <aoyama@peach.ne.jp>
Reviewed by: imp, bapt
Tested by: bapt
Differential Revision: https://reviews.freebsd.org/D1967
MFC r279310:
Since newer versions of compiler-rt require unwind.h, and we want to use
the copy in libcxxrt for it, fix the arm-specific header to define the
_Unwind_Action type.
Submitted by: andrew
Merge upstream Clang revision 211785:
This commit implements the -fuse-ld= option, so that the user
can specify -fuse-ld=bfd to use ld.bfd.
This commit re-applies r194328 with some test case changes.
It seems that r194328 was breaking macosx or mingw build
because clang can't find ld.bfd or ld.gold in the given sysroot.
We should use -B to specify the executable search path instead.
Patch originally by David Chisnall.
This is a direct commit to stable/10 as this is change is already
included in Clang 3.5 in HEAD. The patch is also reworked slightly for
Clang 3.4.1.
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Harden InitListExpr::isStringLiteralInit() against getInit()
returning null.
This led to a crash on invalid code (sorry, no good test case).
Fixes <rdar://problem/15831804>.
This fixes an assertion when compiling certain incorrect code, as
reported upstream in http://llvm.org/PR22684 .
Direct commit to stable/10 and stable/9, since head has clang 3.5.1,
which already includes this change.
Reported by: hbowden@securelabsllc.com
Fix ldscripts such that ld(1) collects the .fini_array section in the same
order as the .init_array section. Finalisation routines need to be called
in the opposite order as their corresponding initialisation routines but
rtld(1) handles that by calling the function pointers in .fini_array in
reverse order.
Reviewed by: kib
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).
Fix PCH deserialization bug with local static symbols being treated
as local extern.
This triggered a miscompilation of code using Boost's
function_template.hpp when it was included inside a PCH file. A
local static within that header would be treated as local extern,
resulting in the wrong mangling. This only occurred during PCH
deserialization.
Fixes <rdar://problem/15975816> and <rdar://problem/15926311>.
This fixes a crash in audio/murmur, which is using both PCH and Boost.
Direct commit to stable/10 and stable/9, since head has clang 3.5.1,
which already includes this change.
Reported by: smh
PR: 197389
almost all recent changes to libc++ and libcxxrt.
MFC r256642:
Since C++ typeinfo objects are currently not guaranteed to be merged at
runtime by the dynamic linker, check for their equality in libcxxrt by
not only comparing the typeinfo's name pointers, but also comparing the
full names, if necessary. (This is similar to what GNU libstdc++ does
in its default configuration.) The 'deep' check can be turned off again
by defining LIBCXXRT_MERGED_TYPEINFO, and recompiling libcxxrt.
Reviewed by: theraven
MFC r270522 (by rdivacky):
The standard we compile libc++ with is called c++11 not c++0x.
MFC r273066 (by bapt):
Import patch from libc++ r197313 which allows using libc++ headers with gcc
Differential Revision: https://reviews.freebsd.org/D942
Reviewed by: imp
MFC r273381 (by bapt):
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 r273382 (by bapt):
Fix build by marking the new functions as weak
This is a temporary fix
MFC r273407 (by bapt):
When using an external gcc 4.8+ and not building libstdc++ then create in the objectdir a
fake libstdc++.so and libstdc++.a which is a symlink on libc++ that allow g++ to satisfy
its links dependencies in the least hackish way.
Please note that this hacky libstds++ never get installed on the final system
Reviewed by: imp
MFC r273434 (by bapt):
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
MFC r276417:
Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604.
Interesting fixes:
76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms
30d2ae5 Implement __cxa_throw_bad_array_new_length
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D1390
MFC r277217:
Import libc++ trunk r224926. This fixes a number of bugs, completes
C++14 support[1], adds more C++1z features[2], and fixes the following
LWG issues[3]:
1450: Contradiction in regex_constants
2003: String exception inconsistency in erase.
2075: Progress guarantees, lock-free property, and scheduling
assumptions
2104: unique_lock move-assignment should not be noexcept
2112: User-defined classes that cannot be derived from
2132: std::function ambiguity
2135: Unclear requirement for exceptions thrown in
condition_variable::wait()
2142: packaged_task::operator() synchronization too broad?
2182: Container::[const_]reference types are misleadingly specified
2186: Incomplete action on async/launch::deferred
2188: Reverse iterator does not fully support targets that overload
operator&
2193: Default constructors for standard library containers are explicit
2205: Problematic postconditions of regex_match and regex_search
2213: Return value of std::regex_replace
2240: Probable misuse of term "function scope" in [thread.condition]
2252: Strong guarantee on vector::push_back() still broken with C++11?
2257: Simplify container requirements with the new algorithms
2258: a.erase(q1, q2) unable to directly return q2
2263: Comparing iterators and allocator pointers with different
const-character
2268: Setting a default argument in the declaration of a member
function assign of std::basic_string
2271: regex_traits::lookup_classname specification unclear
2272: quoted should use char_traits::eq for character comparison
2278: User-defined literals for Standard Library types
2280: begin / end for arrays should be constexpr and noexcept
2285: make_reverse_iterator
2288: Inconsistent requirements for shared mutexes
2291: std::hash is vulnerable to collision DoS attack
2293: Wrong facet used by num_put::do_put
2299: Effects of inaccessible key_compare::is_transparent type are not
clear
2301: Why is std::tie not constexpr?
2304: Complexity of count in unordered associative containers
2306: match_results::reference should be value_type&, not const
value_type&
2308: Clarify container destructor requirements w.r.t. std::array
2313: tuple_size should always derive from integral_constant<size_t, N>
2314: apply() should return decltype(auto) and use decay_t before
tuple_size
2315: weak_ptr should be movable
2316: weak_ptr::lock() should be atomic
2317: The type property queries should be UnaryTypeTraits returning
size_t
2320: select_on_container_copy_construction() takes allocators, not
containers
2322: Associative(initializer_list, stuff) constructors are
underspecified
2323: vector::resize(n, t)'s specification should be simplified
2324: Insert iterator constructors should use addressof()
2329: regex_match()/regex_search() with match_results should forbid
temporary strings
2330: regex("meow", regex::icase) is technically forbidden but should
be permitted
2332: regex_iterator/regex_token_iterator should forbid temporary
regexes
2339: Wording issue in nth_element
2341: Inconsistency between basic_ostream::seekp(pos) and
basic_ostream::seekp(off, dir)
2344: quoted()'s interaction with padding is unclear
2346: integral_constant's member functions should be marked noexcept
2350: min, max, and minmax should be constexpr
2356: Stability of erasure in unordered associative containers
2357: Remaining "Assignable" requirement
2359: How does regex_constants::nosubs affect basic_regex::mark_count()?
2360: reverse_iterator::operator*() is unimplementable
[1] http://libcxx.llvm.org/cxx1y_status.html
[2] http://libcxx.llvm.org/cxx1z_status.html
[3] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html
Exp-run: antoine
MFC r277944:
Partially revert r273382, to reduce diffs against upstream. This was a
temporary fix to solve a conflict with an older version of libc++, and
it is no longer relevant.
MFC r278010:
Revert r256642, not only to reduce diffs against upstream libcxxrt, but
also because it is the wrong approach: comparing typeinfo names deeply
causes trouble if two loaded DSOs use independent types of the same
name.
In addition, this particular change was never merged to FreeBSD 10.x and
9.x, so let's get rid of it before it ends up in an 11.x release.
Discussed with: theraven, joerg@netbsd
MFC r278016:
Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc.
Interesting fixes:
1cb607e Correct gcc version check for __cxa_begin_catch() declaration
with or without throw()
Add a few missing llvm/clang patches, update the other ones to be able
to apply with the same patch options onto a fresh upstream llvm/clang
3.4.1 checkout, and use approximately the same header tempate for them.
MFV: Only emit movw on ARMv6T2
Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain
test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS
in base doesn't understand this instruction for this target. One would need
to use --integrated-as to get this to build if desired.
http://llvm.org/viewvc/llvm-project?view=revision&revision=216989
Submitted by: ian
Reviewed by: dim
Obtained from: llvm.org
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
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 r276417:
Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604.
Interesting fixes:
76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms
30d2ae5 Implement __cxa_throw_bad_array_new_length
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D1390
Add netmap support to libpcap. Tcpdump and other native pcap clients
can now run directly on netmap ports using netmap:foo or valeXX:YY
as 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/
r277278 (by ngie):
Fix lib/libthr/tests/detach_test
- Eliminate race with liberal use of sleep(3) [1]
- Fix NetBSD-specific implementation way of testing result from pthread_cancel
by testing with `td` instead of `NULL` [2]
PR: 196738 [1]
PR: 191906 [2]
Sponsored by: EMC / Isilon Storage Division
r276671 (by ngie):
Expect :arithmetic_ops_body to fail with syntax errors on FreeBSD
Sponsored by: EMC / Isilon Storage Division
r277357 (by ngie):
Expect :overflow to fail with FreeBSD's expr as it doesn't have stringent
overflow checks like NetBSD's expr does
PR: 196867
r276590 (by jilles):
Link lib/libc/c063 tests to the build.
Some files lack required #include <sys/stat.h>. The #ifdef is per ngie's
request; the includes are clearly necessary for struct stat.
The faccessat test fails because it tries to use AT_SYMLINK_NOFOLLOW with
faccessat(), which is not specified by POSIX.1-2008.
Differential Revision: https://reviews.freebsd.org/D1411
Reviewed by: ngie
Add fstyp(8). This utility, named after its SVR4 counterpart, detects
filesystems. It differs from file(1) in that it gives machine-parseable
output, it outputs filesystem labels, doesn't get confused by other
formats metadata, and runs in Capsicum sandbox.
Differential Revision: https://reviews.freebsd.org/D1255
Relnotes: yes
Sponsored by: The FreeBSD Foundation
X-MFC note: the svn:mergeinfo for this MFC was accidentally committed via
r277371
r276805 (by ngie):
Build contrib/ofed/usr.{bin,lib} in parallel
Sponsored by: EMC / Isilon Storage Division
r276804 (by ngie):
Fix 'make depend' before infiniband headers have been installed to build host
by removing space between -I and the header directory
Sponsored by: EMC / Isilon Storage Division
(or loading a dso linked to libthr.so into process which was not
linked against threading library).
MFC r276630:
Remove interposing, fix malloc, reinstall signal handlers wrappers on
libthr load.
MFC r276681:
Avoid calling internal libc function through PLT or accessing data
though GOT.
MFC r277032:
Reduce the size of the interposing table and amount of
cancellation-handling code in the libthr.
MFC note:
r276646 ("do not erronously export 'openat' symbol from rtld") is not
applicable to stable/10 yet, since PATHFDS support was not merged.
Pull in r200010 from upstream libc++ trunk (by Marshall Clow):
Rename some internal templates to avoid conflict with complier
intrinsics. __is_constructible --> __libcpp_is_constructible,
__is_nothrow_constructible --> __libcpp_is_nothrow_constructible, and
__is_nothrow_assignable --> __libcpp_is_nothrow_assignable. No
functionality change.
Pull in r206805 from upstream libc++ trunk (by Marshall Clow):
Use compiler intrinsic __is_constructible if available
This should fix building parts of world with -std=c++11 enabled.
Reported by: Oliver Hartmann <ohartman@zedat.fu-berlin.de>
tcpd: complete function prototypes.
tcpd.h: add prototype for hosts_ctl
This clears up at least a build issues on mysql-server
ports. While here also replace some spaces with tabs
in our headers.
PR: 32808
PR: 42336
Add makefile for the "osmtest" utility. While at it:
- Fix depend target by removing a space after an "-I" inclusion option.
- Fix some minor compile issues in the "osmtest" utility.
PR: 196580
MFC Note: text corrected for r274618
r274618:
Add reachover Makefiles for contrib/netbsd-tests/lib/msun
A variant of this code has been tested on amd64/i386 for some time by
EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
code will remain off until it's proven it works on virtual hardware or real
hardware on other architectures
Sponsored by: EMC / Isilon Storage Division
r276521:
Reset errno in :scalbnf_val and :scalbnl_val before running the tests so the
tested errno isn't stale
This was needed in order for the test to pass on amd64 with stable/10
r264400:
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
r265836:
Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
what is needed.
r272343:
r272458:
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
r272890:
Only build/run hsearch_basic and hsearch_r_basic on NetBSD
hdestroy1 is not present on FreeBSD
Sponsored by: EMC / Isilon Storage Division
r272891:
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
r272901:
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
r272902:
Add missing #include <sys/time.h> for gettimeofday
Sponsored by: EMC / Isilon Storage Division
r272903:
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
r272905:
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
r272908:
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
r272909:
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
r272910:
SIGPWR does not exist on FreeBSD
Sponsored by: EMC / Isilon Storage Division
r272914:
Skip over t_spawn_open_nonexistent_diag because it requires NetBSD specific
additions to posix_spawn
Sponsored by: EMC / Isilon Storage Division
r272915:
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
r272979:
Only #include <sys/tls.h> on NetBSD
Sponsored by: EMC / Isilon Storage Division
r272980:
#include libutil.h for fparseln on FreeBSD
Sponsored by: EMC / Isilon Storage Division
r273010:
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
r273011:
Fix compilation errors with missing wide-type headers and fix compilation
warnings with -Wformat
In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
r273012:
- 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
r273015:
Expect nice_err to fail on FreeBSD with unprivileged users
PR: 189821
Sponsored by: EMC / Isilon Storage Division
r273017:
Add #include <stdio.h> for printf
Sponsored by: EMC / Isilon Storage Division
r273019:
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
r273020:
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
r273021:
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
r273022:
Add #include <stdio.h> to get sys_nerr definition
Sponsored by: EMC / Isilon Storage Division
r273023:
__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
r273024:
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
r273025:
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
r273389:
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
r273390:
libutil.h is required for fparseln on FreeBSD
Sponsored by: EMC / Isilon Storage Division
r273391:
Add missing #include for sys/stat.h for fchmod
Sponsored by: EMC / Isilon Storage Division
r273393:
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
r273395:
Mark osi __unused so this compiles cleanly on FreeBSD
Sponsored by: EMC / Isilon Storage Division
r273396:
unlink("/") fails with EISDIR instead of EBUSY on FreeBSD; test for that
instead
Sponsored by: EMC / Isilon Storage Division
r273397:
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
r273410:
Add sys/socket.h #include for bind(2), et al
Sponsored by: EMC / Isilon Storage Division
r273516:
Add netinet/in.h for struct sockaddr_in
Sponsored by: EMC / Isilon Storage Division
r273517:
Expect getgroups_err to fail on FreeBSD
PR: 189941
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
r273520:
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
r273521:
Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)"
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
r273522:
- 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
r273523:
Add limits.h #include for LINE_MAX
Sponsored by: EMC / Isilon Storage Division
r273524:
Add sys/socket.h #include for struct sockaddr_in
Sponsored by: EMC / Isilon Storage Division
r273525:
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
r273526:
Omit the pollts testcases on FreeBSD
Sponsored by: EMC / Isilon Storage Division
r273527:
Omit all of the testcases as revoke(2) is only implemented on devfs(5)
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
r273528:
Mark signo __unused in handler(..)
Sponsored by: EMC / Isilon Storage Division
r273529:
- Omit the poll testcases on FreeBSD (they require pollts)
- Add necessary headers for the testcases
Sponsored by: EMC / Isilon Storage Division
r273530:
Add limits.h #include for INT_MAX
Sponsored by: EMC / Isilon Storage Division
r273533:
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
r273534:
- Mark sig/signo __unused
- Do not provide a relative path via #include "h_macros.h"
Sponsored by: EMC / Isilon Storage Division
r273535:
- 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
r273536:
Add limits.h #include for SSIZE_MAX
Sponsored by: EMC / Isilon Storage Division
r273537:
Add limits.h #include for SSIZE_MAX
Sponsored by: EMC / Isilon Storage Division
r273538:
Fix a typo (__FreeBSD__ -> __NetBSD__ when omitting setrlimit_nthr)
r273539:
Mark signum __unused
Sponsored by: EMC / Isilon Storage Division
r273540:
Omit the mprotect_exec testcase on FreeBSD
Sponsored by: EMC / Isilon Storage Division
r273572:
- 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
r273574:
- 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
r273578:
- 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
r273579:
- 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
r273591:
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
r273592:
- 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
r273928:
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.)
r273933:
Don't prune duplicate services in the expected output from /etc/services on
FreeBSD
Submitted by: pho
r273935:
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
r273936:
Port lib/libc/net/h_dns_server to FreeBSD
Submitted by: pho
r273937:
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
r273938:
getitimer on FreeBSD returns the last set time instead of the remaining time;
test for that instead
Submitted by: pho
r273942:
Skip :sethostname_basic because it messes up the test host's hostname
Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__
r273943:
Port t_kevent to FreeBSD
Submitted by: pho
r273945:
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
r273946:
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
r273947:
Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes
r273948:
Disable testcases 12 and 15-22 on FreeBSD
Submitted by: pho
r273949:
Add new atf_tc_expect_fail to fflush_err; this is a new (within the past couple months) bug
r273950:
Skip :fopen_regular on !NetBSD because it's a NetBSD specific test
Submitted by: pho
r273951:
Expect :sscanf_whitespace to fail on !NetBSD OSes
Submitted by: pho
r273952:
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
r274061:
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
r274062:
inet_network on FreeBSD returns NULL when provided "0x" to inet_network
Submitted by: pho
r274066:
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
r274067:
rpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
like NetBSD
Submitted by: pho
r274072:
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
r274074:
Add Makefile snippet to ease porting NetBSD testcases to FreeBSD from
contrib/netbsd-tests
This Makefile snippet handles polluting testcases with -lnetbsd, specific
headers for ATF version differences, and does necessary rewriting for the
testcases to match the format discussed on the TestSuite wiki page
(t_<foo> -> <foo>_test)
One must define SRCTOP (inspired by projects/bmake), OBJTOP, and TESTSRC
(e.g. contrib/netbsd-tests/lib/libc/gen) to use the Makefile snippet
Test programs are specific either via NETBSD_ATF_TESTS_C or NETBSD_ATF_TESTS_SH
C++ analogs aren't currently implemented.
The imported testcases will be cleaned up to use this Makefile snippet pseudo
"API".
r274079:
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)
r274090:
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
r274142:
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
r274143:
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
r274571:
Use _exit instead of exit so the file descriptors aren't flushed twice in the
child processes
Submitted by: pho
r274572:
Only expect timeouts on powerpc with NetBSD
Submitted by: pho
r274573:
Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD
PR: 191906
In collaboration with: pho
r274574:
Add pthread_np.h #include and initialize the pthread attribute on FreeBSD
Submitted by: pho
r274575:
#ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
the output from the helper program
Submitted by: pho
r274576:
Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c
Submitted by: pho
In collaboration with: kib
r274577:
Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h
r274579:
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
r274597:
Skip the long-double epsilon checks on FreeBSD/i386
Sponsored by: EMC / Isilon Storage Division
r274598:
Reset errno to 0 before running scalbn to be sure that the tested errno is
valid
Sponsored by: EMC / Isilon Storage Division
r274599:
Alias isinff to isinf on FreeBSD
isinf on FreeBSD automatically picks the appropriate type per math.h
Sponsored by: EMC / Isilon Storage Division
r274600:
- 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
r274601:
- 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
r274626:
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
r275033:
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
r276046:
Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to
stable/10
It was added when __FreeBSD_version was ~1100027
r276430:
Expect access_test:access_inval to fail before __FreeBSD_version == 1100033
This will allow me to MFC the test, as jilles@ requested that I don't MFC the
access(2) KBI change to 10-STABLE in r271655
Backport fix for binutils 11867: .quad directive not assembled correctly
Alan Modra (and Alan's employer) graciously permitted use of his patch
under GPLv2.
Obtained from: OpenBSD
gas: use memmove instead of bogus memcpy.
partial_where points into the buffer that begins with buffer_start
so we need to use memmove() to handle the overlap.
Fixes Sourceware-PR 11456.
Obtained from: OpenBSD (CVS rev. 1.2)
Discussed with: sjg
r255285:
If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
into the job queue.
This avoids closing down an entire build on failure of one branch.
Probably has no use outside the context of universe/tinderbox.
Reviewed by: obrien
r255916:
Fix Fx syntax.
PR: 182269
Approved by: re@
r258113:
Avoid SEGV when passed NULL for list
r258114:
Don't SEGV when Hash_Table is uninitialized
r261212:
Merge bmake-20140101 from vendor
r266760:
Portmgr no longer need the UL hack.
Reviewed by: obrien
r268437:
Update to bmake-20140620
Main change is detection of malformed variable references.
Reviewed by: obrien
Pull in r221170 from upstream clang trunk (by Roman Divacky):
Implement vaarg lowering for ppc32. Lowering of scalars and
aggregates is supported. Complex numbers are not.
This adds va_args support for PowerPC (32 bit) to clang.
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D1308
There is no need to use FUNC_END with aeabi_ldiv0 or aeabi_idiv0 as they
are aliases.
Sponsored by: ABT Systems Ltd
MFC 275380:
Use the floating-point instruction on ARMv7 as the clang 3.5 integrated
assembler doesn't allow these two instructions to use co-processor 11.
Sponsored by: ABT Systems Ltd
Allow the UAL APSR_nzcv format for the mrc and mrc2 instructions. The clang
integrated assembler only allows these forms so binutils will need to
support them.
Sponsored by: ABT Systems Ltd
MFC 275584:
Fix mrc and mrc2 with APSR_nzcv. Binutils encodes it internally as 0 where
we need it to be set to 15 for it to be equivalent to r15.
Sponsored by: ABT Systems Ltd
Pull in r223171 from upstream llvm trunk (by Michael Zolotukhin):
PR21302. Vectorize only bottom-tested loops.
rdar://problem/18886083
This fixes a bug in the llvm vectorizer, which could sometimes cause
vectorized loops to perform an additional iteration, leading to possible
buffer overruns. Symptoms of this, which are usually segfaults, were
first noticed when building gcc ports, here:
https://lists.freebsd.org/pipermail/freebsd-ports/2014-September/095466.htmlhttps://lists.freebsd.org/pipermail/freebsd-toolchain/2014-September/001211.html
Since this fix is very important for ports, bump __FreeBSD_version to
make it easier for port maintainers to test whether the fix has been
applied.
Upstream PR: http://llvm.org/PR21302
Pull in r174303 from upstream gcc trunk (by Jason Merrill):
PR c++/48211
* name-lookup.h (cp_class_binding): Make base a pointer.
* name-lookup.c (new_class_binding): Adjust.
(poplevel_class): Adjust.
This fixes a potential segfault when compiling gold, a part of the
devel/binutils port, with gcc. See also the upstream bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48211
Thanks to Jason Merrill, Tom Callaway and Red Hat legal for approving
the use of this patch under the GNU GPL, version 2 or later.
Let GNU ld be less obscure about missing symbols and DSOs. If the BFD
object looks like a typical shared library, suggest adding '-l<foo>',
where <foo> has the 'lib' prefix and '.so<bar>' or '.a' suffix removed.
Otherwise, suggest adding '-l:<foo>', where <foo> is the full DT_SONAME.
Submitted by: Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by: EMC / Isilon storage division
Reviewed by: emaste
PR: 194296
Differential Revision: https://reviews.freebsd.org/D1152
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
Sponsored by: EMC / Isilon Storage Division
r272057:
Import pjdfstest from ^/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91
- Remove tools/regression/pjdfstest
- Add upgrade directions for contrib/pjdfstest
- Add a note to UPDATING for the move (the reachover Makefiles are coming
soon)
Functional differences:
- ftruncate testcases are added from upstream (github)
Non-functional differences:
- The copyright for the project has been updated to 2012
- pjd's contact information has been updated
Discussed with: -testing, jmmv, pjd
Sponsored by: EMC / Isilon Storage Division
r272083:
Expect ELOOP on Darwin/Linux with "O_NOFOLLOW was specified and the target is a
symbolic link" case. Assume EMLINK on the rest of the OSes (FreeBSD, Solaris,
etc)
Sponsored by: EMC / Isilon Storage Division
r272084:
Fix the executed testplan count
Sponsored by: EMC / Isilon Storage Division
r272087:
Increase the memory disk size in the following testcases to avoid mount
failures, which would cause cascade failures in the rest of the test
run:
link/15.t, open/19.t, mkdir/11.t, mkfifo/11.t, symlink/11.t
Fail quickly in all of the testcases if mdconfig, mount, umount, etc
fails to avoid issues similar to this in the future
Submitted by: Casey Peel <cpeel@isilon.com>
Sponsored by: EMC / Isilon Storage Division
r274016:
Integrate pjdfstest test suite execution into kyua
pjdfstest execution is opt-in and must be done as root due to some of the
assumptions made by the test suite and lack of error checking in the non-root
case
A description of how to execute pjdfstest with kyua is provided in
share/pjdfstest/README
Phabric: D824 (an earlier prototype patch)
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
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
Add missing libraries when linking and fix building of some infiniband
utilities by updating some header file locations and compiler include
directives.
Sponsored by: Mellanox Technologies
Make some infiniband example utilities easily buildable:
- Add new Makefiles.
- Add more include directories when building.
- Fixed a printf() formatting string.
Sponsored by: Mellanox Technologies
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
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
Differential Revision: https://reviews.freebsd.org/D1198
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/PR19031http://llvm.org/PR20893
MFC r274483:
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
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.
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 r274294:
Add llvm patch corresponding to r274286.
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
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.