880e38b206ee452f777922dfa61a959cee0067cb |
|
18-Jun-2016 |
Eric Fiselier <eric@efcs.ca> |
Fix 3 bugs in filesystem tests and implementation. This patch fixes the following bugs, all of which were discovered while testing a 32 bit build on a 64 bit machine. * path.itr/iterator.pass.cpp has undefined behavior. 'path::iterator' stashes the value of the element inside the iterator. This violates the BiDirIterator requirements but is allowed for path::iterator. However this means that using reverse_iterator<path::iterator> has undefined behavior because it assumes that 'Iter tmp = it; return *tmp' will not create a dangling reference. However it does, and this caused this particular test to fail. * path.native.obs/string_alloc.pass.cpp tested the SSO with a long string. On 32 bit builds std::wstring only has the SSO for strings of size 2. The test was using a string of size 4. * fs.op.space/space.pass.cpp had overflows while calculating the expected values. The fix here is to convert the statvfs data members to std::uintmax_t before multiplying them. The internal implementation already does this but the tests needed to do it as well. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/std/experimental/filesystem/class.path/path.itr/iterator.pass.cpp
|
591e18f6aaa7f8a8ae1ed0e239708b5e752173bd |
|
18-Jun-2016 |
Eric Fiselier <eric@efcs.ca> |
Add additional tests in an attempt to diagnose ARM test failures. Currently 4 tests are failing on the ARM buildbot. To try and diagnose each of the failures this patch does the following: 1) path.itr/iterator.pass.cpp * Temporarily print iteration sequence to see where its failing. 2) path.native.obs/string_alloc.pass.cpp * Remove test that ::new is not called when constructing a short string that requires a conversion. Since during the conversion global locale objects might be constructed. 3) fs.op.funcs/space.pass.cpp * Explicitly use uintmax_t in the implementation of space, hopefully preventing possible overflows. * Add additional tests that check for overflow is the calculation of the space_info values. * Add additional tests for the values returned from statfvs. 4) fs.op.funcs/last_write_time.pass.cpp * No changes made yet. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/std/experimental/filesystem/class.path/path.itr/iterator.pass.cpp
|
6e9a694dce70319e60dbdfb09cf055bacb4c948e |
|
17-Jun-2016 |
Eric Fiselier <eric@efcs.ca> |
Add Filesystem TS -- Complete Add the completed std::experimental::filesystem implementation and tests. The implementation supports C++11 or newer. The TS is built as part of 'libc++experimental.a'. Users of the TS need to manually link this library. Building and testing the TS can be disabled using the CMake option '-DLIBCXX_ENABLE_FILESYSTEM=OFF'. Currently 'libc++experimental.a' is not installed by default. To turn on the installation of the library use '-DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON'. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/std/experimental/filesystem/class.path/path.itr/iterator.pass.cpp
|