Commit ccf4b8b4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9f986d44
......@@ -1361,6 +1361,7 @@ void test_file_access_mmapbase(void)
/* dirtying a page in one mapping automatically mmaps dirty page in all
* other wcfs mappings */
diag("dirty page in vma2 -> dirties vma1");
err = fileh_mmap(vma2, fh, 100, 4);
ok1(!err);
......@@ -1389,10 +1390,10 @@ void test_file_access_mmapbase(void)
ok1( M(vma, 2)); CHECK_PAGE (page2, 102, PAGE_DIRTY, 2);
ok1( M(vma, 3)); CHECK_PAGE (page3, 103, PAGE_DIRTY, 2);
ok1( M(vma2, 0)); CHECK_PAGE (page0, 100, PAGE_DIRTY, 2);
ok1(!M(vma2, 1)); CHECK_NOPAGE( 101 );
ok1( M(vma2, 2)); CHECK_PAGE (page2, 102, PAGE_DIRTY, 2);
ok1( M(vma2, 3)); CHECK_PAGE (page3, 103, PAGE_DIRTY, 2);
ok1( M(vma2, 0));
ok1(!M(vma2, 1));
ok1( M(vma2, 2));
ok1( M(vma2, 3));
ok1(B(vma, 3*PSb + 0) == 13); /* set by write */
ok1(B(vma, 3*PSb + 1) == 103);
......@@ -1405,9 +1406,23 @@ void test_file_access_mmapbase(void)
CHECK_MRU (page3, page0, page2);
CHECK_DIRTY (page3, page0, page2);
// XXX unmap vma2 ?
/* discard - changes should go away */
diag("discard");
fileh_dirty_discard(fh);
ok1(!M(vma, 0)); CHECK_NOPAGE( 100 );
ok1(!M(vma, 1)); CHECK_NOPAGE( 101 );
ok1(!M(vma, 2)); CHECK_NOPAGE( 102 );
ok1(!M(vma, 3)); CHECK_NOPAGE( 103 );
ok1(!M(vma2, 0));
ok1(!M(vma2, 1));
ok1(!M(vma2, 2));
ok1(!M(vma2, 3));
// XXX discard
// XXX writeout STORE, MARK, STORE+MARK
......@@ -1431,7 +1446,7 @@ int main()
{
tap_fail_callback = abort; // XXX to catch failure immediately
if (1) {
if (0) {
test_vmamap();
test_file_access_synthetic();
test_file_access_pagefault();
......
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