Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
be2edfaf
Commit
be2edfaf
authored
Jul 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fb6932a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+9
-4
No files found.
bigfile/tests/test_virtmem.c
View file @
be2edfaf
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment