llvm-project/libcxx/test/support
Ed Schouten 97fdea618e Add option to disable access to the global filesystem namespace.
Systems like FreeBSD's Capsicum and Nuxi CloudABI apply the concept of
capability-based security on the way processes can interact with the
filesystem API. It is no longer possible to interact with the VFS
through calls like open(), unlink(), rename(), etc. Instead, processes
are only allowed to interact with files and directories to which they
have been granted access. The *at() functions can be used for this
purpose.

This change adds a new config switch called
_LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE. If set, all functionality
that requires the global filesystem namespace will be disabled. More
concretely:

- fstream's open() function will be removed.
- cstdio will no longer pull in fopen(), rename(), etc.
- The test suite's get_temp_file_name() will be removed. This will cause
  all tests that use the global filesystem namespace to break, but will
  at least make all the other tests run (as get_temp_file_name will not
  build anyway).

It is important to mention that this change will make fstream rather
useless on those systems for now. Still, I'd rather not have fstream
disabled entirely, as it is of course possible to come up with an
extension for fstream that would allow access to local filesystem
namespaces (e.g., by adding an openat() member function).

Differential revision:	http://reviews.llvm.org/D8194
Reviewed by:		jroelofs (thanks!)

llvm-svn: 232049
2015-03-12 15:44:39 +00:00
..
Counter.h Fix PR22366. When move-constructing an associative container and explicitly passing an allocator that compares different, we were not calling the destructor of the elements in the moved-from container. 2015-01-28 19:54:25 +00:00
DefaultOnly.h Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch. 2014-01-16 16:58:45 +00:00
MoveOnly.h We had two identical files named 'MoveOnly.h' in the test suite. Move one to support/, remove the other, and update all the tests that included them. No functionality change. 2015-01-28 21:22:53 +00:00
allocators.h Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch. 2014-01-16 16:58:45 +00:00
asan_testing.h [asan] Make vector asan annotations exception-friendly 2014-09-02 23:43:38 +00:00
cmpxchg_loop.h PR20546: Fix tests for compare_exchange_weak. 2014-09-06 20:38:25 +00:00
constexpr_char_traits.hpp Add pragma system header to some experimental headers and add newlines to files. 2015-02-10 17:32:49 +00:00
count_new.hpp Use generic feature name for sanitizers that replace new and delete 2015-03-10 20:46:04 +00:00
counting_predicates.hpp Whitespace maintenance. Remove a bunch of tabs that snuck in. No functionality change 2014-10-18 11:03:33 +00:00
hexfloat.h
min_allocator.h Add bare_allocator archetype that implements the minimal possible allocator interface. 2014-08-15 04:15:41 +00:00
nasty_containers.hpp Implement LWG 2324: Insert iterator constructors should use addressof(). Add two new container classes to the test suite that overload operator &, and add test cases to the insert/front_insert/back_insert iterator tests that use these containers. 2014-03-03 19:20:40 +00:00
nasty_macros.hpp Remove use of _[A-Z] identifiers and poison them to detect usage 2015-02-05 23:01:40 +00:00
nothing_to_do.pass.cpp test commit 2014-07-24 18:41:56 +00:00
platform_support.h Add option to disable access to the global filesystem namespace. 2015-03-12 15:44:39 +00:00
private_constructor.hpp Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch. 2014-01-16 16:58:45 +00:00
test_allocator.h Bug #19473. If you pass an allocator to std::function, we should use that allocator, not construct one from scratch. Add a test to make sure 2014-04-18 17:23:36 +00:00
test_iterators.h Since Eric poisoned the comma operator on all our test iterators, we no longer need 'comma_iterator'. Remove it from the test suite. 2014-11-18 16:15:00 +00:00
tracked_value.h Add TrackedValue to test/support. Thanks to Louis Dionne 2015-03-09 18:02:16 +00:00
user_defined_integral.hpp [libcxx] Properly convert the count arguments to the *_n algorithms before use. 2015-02-10 16:46:42 +00:00