diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-06-21 22:53:20 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-06-21 22:53:20 +0300 |
commit | ef01498cb0570438155bf1f7d049b9ac36dbd910 (patch) | |
tree | 39e79250c0a92f592c4c376eeb715b07ce3e3132 /test | |
parent | 19f3d897d143791f40b1cdcf615336373df4617b (diff) |
Fix clone_extents() not working on Mac OS.
Diffstat (limited to 'test')
-rw-r--r-- | test/tests/clone_extents.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/tests/clone_extents.cpp b/test/tests/clone_extents.cpp index eda574bd..652e719e 100644 --- a/test/tests/clone_extents.cpp +++ b/test/tests/clone_extents.cpp @@ -124,8 +124,8 @@ static inline void TestCloneExtents() { if(shouldbe.data()[n] != handles[1].fh.address()[n]) { - std::cerr << "Byte at offset " << n << " is '" << (int) *(char *) &shouldbe.data()[n] << "' in source and is '" << (int) *(char *) &handles[1].fh.address()[n] - << "' in destination." << std::endl; + std::cerr << "Byte at offset " << n << " is '" << (int) *(char *) &shouldbe.data()[n] << "' in source and is '" + << (int) *(char *) &handles[1].fh.address()[n] << "' in destination." << std::endl; BOOST_REQUIRE(shouldbe.data()[n] == handles[1].fh.address()[n]); break; } @@ -196,7 +196,7 @@ static inline void TestCloneOrCopyFileWhole() dest_stat.fill(destfh).value(); std::cout << "Source file has " << src_stat.st_blocks << " blocks allocated. Destination file has " << dest_stat.st_blocks << " blocks allocated." << std::endl; - BOOST_CHECK(src_stat.st_blocks <= dest_stat.st_blocks); + BOOST_CHECK(abs((long) src_stat.st_blocks - (long) dest_stat.st_blocks) < ((long) src_stat.st_blocks / 8)); for(size_t n = 0; n < maximum_extent; n++) { |