Commit a035458f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d3fe8249
......@@ -1248,6 +1248,9 @@ void test_file_access_mmapbase(void)
err = fileh_mmap(vma, fh, 100, 4);
ok1(!err);
ok1(fh->mmaps.next == &vma->same_fileh);
ok1(vma->same_fileh.next == &fh->mmaps);
/* all pages initially unmapped */
ok1(!M(vma, 0)); CHECK_NOPAGE( 100 );
ok1(!M(vma, 1)); CHECK_NOPAGE( 101 );
......@@ -1346,6 +1349,26 @@ void test_file_access_mmapbase(void)
// XXX verify notify_munmap was correctly called
/* map vma back - dirty pages should be there _and_ mapped to vma.
* (this differs from !wcfs case which does not mmap dirty pages until access) */
diag("vma mmap again");
err = fileh_mmap(vma, fh, 100, 4);
ok1(!err);
ok1(fh->mmaps.next == &vma->same_fileh);
ok1(vma->same_fileh.next == &fh->mmaps);
ok1( M(vma, 0)); CHECK_PAGE (page0, 100, PAGE_DIRTY, 1);
ok1(!M(vma, 1)); CHECK_NOPAGE( 101 );
ok1( M(vma, 2)); CHECK_PAGE (page2, 102, PAGE_DIRTY, 1);
ok1(!M(vma, 3)); CHECK_NOPAGE( 103 );
CHECK_MRU (page0, page2);
CHECK_DIRTY (page0, page2);
// XXX read page0
// XXX read page3
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment