diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-10-12 21:30:34 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-10-12 21:30:34 +0300 |
commit | dfc6285db4909717009cbed6243209586b3581e8 (patch) | |
tree | 1340dc822c728ddad8433b761d77e15ba0dea84a | |
parent | 54c006f378fb7d903054d50f70035acb4b84121d (diff) |
Fix issue0009 which had been refactored to match Windows, and does not work on POSIX.
-rw-r--r-- | include/llfio/revision.hpp | 6 | ||||
-rw-r--r-- | test/tests/issue0009.cpp | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp index df22ca1b..114b6b38 100644 --- a/include/llfio/revision.hpp +++ b/include/llfio/revision.hpp @@ -1,4 +1,4 @@ // Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time -#define LLFIO_PREVIOUS_COMMIT_REF 04826c2e67404ec63782a0025b929c7d717ea1fd -#define LLFIO_PREVIOUS_COMMIT_DATE "2020-10-08 11:04:36 +00:00" -#define LLFIO_PREVIOUS_COMMIT_UNIQUE 04826c2e +#define LLFIO_PREVIOUS_COMMIT_REF 54c006f378fb7d903054d50f70035acb4b84121d +#define LLFIO_PREVIOUS_COMMIT_DATE "2020-10-12 13:31:55 +00:00" +#define LLFIO_PREVIOUS_COMMIT_UNIQUE 54c006f3 diff --git a/test/tests/issue0009.cpp b/test/tests/issue0009.cpp index ac06e445..4b17b9fe 100644 --- a/test/tests/issue0009.cpp +++ b/test/tests/issue0009.cpp @@ -31,8 +31,18 @@ static inline void TestIssue09a() fh.truncate(1).value(); auto sh = llfio::section_handle::section(fh).value(); sh.truncate(1ULL << 40ULL).value(); +#ifdef _WIN32 auto mh = llfio::map_handle::map(sh, 1ULL << 35ULL).value(); auto *addr1 = mh.address(); +#else + auto mh = llfio::map_handle::map(sh, 1ULL << 40ULL).value(); + auto *addr1 = mh.address(); + mh.truncate(1ULL << 35ULL).value(); + { + auto *addr0 = mh.address(); + BOOST_CHECK(addr1 == addr0); + } +#endif mh.truncate(1ULL << 36ULL).value(); { auto *addr2 = mh.address(); |