Commit be2edfaf authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fb6932a2
......@@ -1251,7 +1251,9 @@ void test_file_access_mmapbase(void)
ok1(list_empty(&fh->dirty_pages));
/* read page[0] - served from base mmap and no RAM page is loaded */
ok1(B(vma, 0*PSb) == 100);
ok1(B(vma, 0*PSb + 0) == 100);
ok1(B(vma, 0*PSb + 1) == 100);
ok1(B(vma, 0*PSb + PSb - 1) == 100);
ok1(!M(vma, 0)); CHECK_NOPAGE( 100 );
ok1(!M(vma, 1)); CHECK_NOPAGE( 101 );
......@@ -1261,8 +1263,7 @@ void test_file_access_mmapbase(void)
ok1(list_empty(&ram->lru_list));
ok1(list_empty(&fh->dirty_pages));
/* write to page[2] = XXX */
/* write to page[2] - page2 is copy-on-write created in RAM */
B(vma, 2*PSb) = 12;
page2 = pagemap_get(&fh->pagemap, 102);
......@@ -1271,6 +1272,10 @@ void test_file_access_mmapbase(void)
ok1( M(vma, 2)); CHECK_PAGE (page2, 102, PAGE_DIRTY, 1);
ok1(!M(vma, 3)); CHECK_NOPAGE( 103 );
ok1(B(vma, 2*PSb + 0) == 12); /* set by write */
ok1(B(vma, 2*PSb + 1) == 102);
ok1(B(vma, 2*PSb + PSb - 1) == 102);
ok1(ram->lru_list.prev == &page2->lru);
ok1(page2->lru.prev == &ram->lru_list);
}
......@@ -1282,7 +1287,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