diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-08-01 11:52:21 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-08-01 11:52:21 +0300 |
commit | e2434aa9d42d50651ed9685b5125f58262366081 (patch) | |
tree | 4ea28d1014d83bf36adf74cd9cf9b8b4029d7bc7 /test | |
parent | 964d174c1c44d4810789b198bbf07271cebbe8c8 (diff) |
Add preliminary symlink_handle implementation for POSIX.
Diffstat (limited to 'test')
m--------- | test/kerneltest | 0 | ||||
-rw-r--r-- | test/tests/async_io.cpp | 4 | ||||
-rw-r--r-- | test/tests/map_handle_create_close/runner.cpp | 8 | ||||
-rw-r--r-- | test/tests/symlink_handle_create_close/runner.cpp | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/test/kerneltest b/test/kerneltest -Subproject 07491646b1c1f875d22512e0630902c142eeae5 +Subproject 3ac9da88c562cd6624ad6c59d64c015568155a6 diff --git a/test/tests/async_io.cpp b/test/tests/async_io.cpp index f9d1cfec..1dc07ffb 100644 --- a/test/tests/async_io.cpp +++ b/test/tests/async_io.cpp @@ -35,7 +35,7 @@ static inline void TestAsyncFileHandle() futures.reserve(1024); h.truncate(1024 * 4096).value(); alignas(4096) llfio::byte buffer[4096]; - memset(buffer, 78, 4096); // NOLINT + memset(buffer, 78, 4096); // NOLINT llfio::async_file_handle::const_buffer_type bt{buffer, sizeof(buffer)}; // NOLINT for(size_t n = 0; n < 1024; n++) { @@ -80,7 +80,7 @@ static inline void TestAsyncFileHandle() { llfio::async_file_handle::const_buffers_type out = i.first.get(); // std::cout << out.data()->len << std::endl; - BOOST_CHECK(out.data()->len == 4096); + BOOST_CHECK(out.data()->size() == 4096); } } diff --git a/test/tests/map_handle_create_close/runner.cpp b/test/tests/map_handle_create_close/runner.cpp index cba2d578..2198e7b8 100644 --- a/test/tests/map_handle_create_close/runner.cpp +++ b/test/tests/map_handle_create_close/runner.cpp @@ -116,14 +116,14 @@ template <class U> inline void map_handle_create_close_(U &&f) if (use_file_backing) { auto b = maph.read(0, { {nullptr, 20} }).value(); - KERNELTEST_CHECK(testreturn, b[0].data == addr); - KERNELTEST_CHECK(testreturn, b[0].len == 19); // reads do not read more than the backing length + KERNELTEST_CHECK(testreturn, b[0].data() == addr); + KERNELTEST_CHECK(testreturn, b[0].size() == 19); // reads do not read more than the backing length } else { auto b = maph.read(5, { {nullptr, 5000} }).value(); - KERNELTEST_CHECK(testreturn, b[0].data == addr+5); // NOLINT - KERNELTEST_CHECK(testreturn, b[0].len == 4091); + KERNELTEST_CHECK(testreturn, b[0].data() == addr+5); // NOLINT + KERNELTEST_CHECK(testreturn, b[0].size() == 4091); } // If we are writable, write straight into the map if (maph.is_writable() && addr) diff --git a/test/tests/symlink_handle_create_close/runner.cpp b/test/tests/symlink_handle_create_close/runner.cpp index 1e14f1a0..19447e42 100644 --- a/test/tests/symlink_handle_create_close/runner.cpp +++ b/test/tests/symlink_handle_create_close/runner.cpp @@ -34,6 +34,8 @@ template <class U> inline void symlink_handle_create_close_creation(U &&f) static const result<void> function_not_supported = LLFIO_V2_NAMESPACE::errc::function_not_supported; static const result<void> permission_denied = LLFIO_V2_NAMESPACE::errc::permission_denied; + assert(file_exists.error() == LLFIO_V2_NAMESPACE::errc::file_exists); + // clang-format off static const auto permuter(mt_permute_parameters< result<void>, @@ -54,8 +56,6 @@ template <class U> inline void symlink_handle_create_close_creation(U &&f) { success(), { symlink_handle::mode::write, symlink_handle::creation::if_needed, symlink_handle::flag::none }, { "existing0" }, { "existing1" }}, { success(), { symlink_handle::mode::write, symlink_handle::creation::if_needed, symlink_handle::flag::none }, { "existing1" }, { "existing1" }}, { function_not_supported, { symlink_handle::mode::append, symlink_handle::creation::if_needed, symlink_handle::flag::none }, { "existing1" }, { "existing1" }}, - { success(), { symlink_handle::mode::none, symlink_handle::creation::if_needed, symlink_handle::flag::none }, { "existing0" }, { "existing1" }}, - { success(), { symlink_handle::mode::attr_read, symlink_handle::creation::if_needed, symlink_handle::flag::none }, { "existing0" }, { "existing1" }}, { success(), { symlink_handle::mode::attr_write, symlink_handle::creation::if_needed, symlink_handle::flag::none }, { "existing0" }, { "existing1" }}, // Does the creation parameter have the expected side effects? |