cxx/test/std
Ed Schouten b33ae5ba7d 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!)


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232049 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-12 15:44:39 +00:00
..
algorithms Need to wrap a bit in an ifdef, since there are no initializer_lists in C++03 2015-02-11 15:48:21 +00:00
atomics Move a test to the new tests directory. 2015-01-06 22:18:27 +00:00
containers Use generic feature name for sanitizers that replace new and delete 2015-03-10 20:46:04 +00:00
depr Walter Brown sent a list of tests which needed 'additional includes' to match what was in the standard. Added these includes to the tests. No changes to the library or test results. 2015-01-09 20:25:52 +00:00
diagnostics libc++ implements its' hash objects as deriving from std::unary_function, and the tests test for that. STL @ MS pointed out that the standard doesn't requie these objects to derive from unary_function, and so the tests should not require that either. Change the tests to check for the embedded typedefs - which ARE required. No change to the library. 2015-01-07 21:53:23 +00:00
experimental Remove XFAIL on string view test for apples clang compiler. Thanks to Marshall for the fix 2015-02-24 10:52:07 +00:00
extensions Fix more issues exposed by -pedantic-errors in c++03 mode 2015-02-10 17:20:18 +00:00
input.output Add option to disable access to the global filesystem namespace. 2015-03-12 15:44:39 +00:00
iterators [libcxx] Make __wrap_iter work with gcc. 2015-01-27 19:27:39 +00:00
language.support Use generic feature name for sanitizers that replace new and delete 2015-03-10 20:46:04 +00:00
localization Add option to disable access to the global filesystem namespace. 2015-03-12 15:44:39 +00:00
numerics Add support for arc4random() to random_device. 2015-03-10 07:46:06 +00:00
re Fix for PR22061 by K-ballo 2015-01-28 22:22:35 +00:00
strings Use generic feature name for sanitizers that replace new and delete 2015-03-10 20:46:04 +00:00
thread Use generic feature name for sanitizers that replace new and delete 2015-03-10 20:46:04 +00:00
utilities Use generic feature name for sanitizers that replace new and delete 2015-03-10 20:46:04 +00:00
nothing_to_do.pass.cpp Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00