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
ccf4b8b4
Commit
ccf4b8b4
authored
Jul 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9f986d44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+21
-6
No files found.
bigfile/tests/test_virtmem.c
View file @
ccf4b8b4
...
...
@@ -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
();
...
...
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