summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental/filesystem/fs.op.funcs
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-18 02:11:48 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-18 02:11:48 +0000
commitccc9826f566ddbc1bc977a9e0a2ef218ea485067 (patch)
tree20279df27be5ba3ab4cbd7bba5d31d758151475e /libcxx/test/std/experimental/filesystem/fs.op.funcs
parent1040b4479cff239dcb78ad14d1a0f2bde6557f55 (diff)
downloadbcm5719-llvm-ccc9826f566ddbc1bc977a9e0a2ef218ea485067.tar.gz
bcm5719-llvm-ccc9826f566ddbc1bc977a9e0a2ef218ea485067.zip
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. llvm-svn: 273075
Diffstat (limited to 'libcxx/test/std/experimental/filesystem/fs.op.funcs')
-rw-r--r--libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp
index 7082c9d121b..14ea0805785 100644
--- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp
@@ -88,6 +88,8 @@ TEST_CASE(basic_space_test)
TEST_CHECK(expect.f_bfree > 0);
TEST_CHECK(expect.f_bsize > 0);
TEST_CHECK(expect.f_blocks > 0);
+ TEST_CHECK(expect.f_frsize > 0);
+ const std::uintmax_t bad_value = static_cast<std::uintmax_t>(-1);
const std::uintmax_t expect_cap = expect.f_blocks * expect.f_frsize;
// Other processes running on the operating system may have changed
// the amount of space available. Check that these are within tolerances.
@@ -101,11 +103,14 @@ TEST_CASE(basic_space_test)
StaticEnv::SymlinkToDir
};
for (auto& p : cases) {
- std::error_code ec = std::make_error_code(std::errc::address_in_use);
+ std::error_code ec = GetTestEC();
space_info info = space(p, ec);
TEST_CHECK(!ec);
+ TEST_CHECK(info.capacity != bad_value);
TEST_CHECK((expect.f_blocks * expect.f_frsize) == info.capacity);
+ TEST_CHECK(info.free != bad_value);
TEST_CHECK(EqualDelta((expect.f_bfree * expect.f_frsize), info.free, delta));
+ TEST_CHECK(info.available != bad_value);
TEST_CHECK(EqualDelta((expect.f_bavail * expect.f_frsize), info.available, delta));
}
}
OpenPOWER on IntegriCloud