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
bba9d6d2
Commit
bba9d6d2
authored
Jul 11, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
233f81ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+29
-2
No files found.
bigfile/tests/test_virtmem.c
View file @
bba9d6d2
...
@@ -1476,11 +1476,38 @@ void test_file_access_mmapbase(void)
...
@@ -1476,11 +1476,38 @@ void test_file_access_mmapbase(void)
ok1
(
!
M
(
vma
,
2
));
CHECK_NOPAGE
(
102
);
ok1
(
!
M
(
vma
,
2
));
CHECK_NOPAGE
(
102
);
ok1
(
!
M
(
vma
,
3
));
CHECK_NOPAGE
(
103
);
ok1
(
!
M
(
vma
,
3
));
CHECK_NOPAGE
(
103
);
/* writeout in 3 variants - STORE, MARK, STORE+MARK */
diag
(
"writeout"
);
vma_unmap
(
vma
);
CHECK_NOPAGE
(
100
);
CHECK_NOPAGE
(
101
);
CHECK_NOPAGE
(
102
);
CHECK_NOPAGE
(
103
);
// XXX writeout STORE, MARK, STORE+MARK
page0
=
page2
=
page3
=
NULL
;
diag
(
"writeout"
);
/* mkdirty2 prepares state with 2 dirty pages only 1 of which is mapped */
void
mkdirty2
(
int
gen
)
{
err
=
fileh_mmap
(
vma
,
fh
,
100
,
4
);
ok1
(
!
err
);
B
(
vma
,
0
*
PSb
)
=
gen
+
0
;
B
(
vma
,
2
*
PSb
)
=
gen
+
2
;
vma_unmap
(
vma
);
page0
=
pagemap_get
(
&
fh
->
pagemap
,
100
);
ok1
(
page0
);
page2
=
pagemap_get
(
&
fh
->
pagemap
,
102
);
ok1
(
page2
);
err
=
fileh_mmap
(
vma
,
fh
,
100
,
2
);
/* note - only 2 pages */
ok1
(
!
err
);
ok1
(
M
(
vma
,
0
));
CHECK_PAGE
(
page0
,
100
,
PAGE_DIRTY
,
1
);
ok1
(
!
M
(
vma
,
1
));
CHECK_NOPAGE
(
101
);
CHECK_PAGE
(
page2
,
102
,
PAGE_DIRTY
,
0
);
CHECK_NOPAGE
(
103
);
}
mkdirty2
(
10
);
...
...
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