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
b24422e5
Commit
b24422e5
authored
Jul 11, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a5a55c6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+11
-8
No files found.
bigfile/tests/test_virtmem.c
View file @
b24422e5
...
...
@@ -1118,7 +1118,9 @@ void test_pagefault_savestate()
* data and everything else comes as read-only mmap from wcfs file.
*/
/* file that mmaps blkdata */
// XXX
/* BigFileMMap is BigFile that mmaps blkdata for read from a regular file.
*
* Store, contrary to load, is done via regular file writes. */
struct
BigFileMMap
{
BigFile
;
int
fd
;
/* fd of file to mmap */
...
...
@@ -1171,6 +1173,7 @@ static const struct bigfile_ops mmapfile_ops = {
};
/* verify virtmem behaviour when it is given BigFile with .mmap_* to handle data load. */
void
test_file_access_mmapbase
(
void
)
{
RAM
*
ram
;
...
...
@@ -1211,7 +1214,7 @@ void test_file_access_mmapbase(void)
.
fd
=
fd
,
};
/* fstore stores dat
e
into file[blk] */
/* fstore stores dat
a
into file[blk] */
void
fstore
(
blk_t
blk
,
blk_t
data
)
{
blk_t
*
buf
;
int
i
;
...
...
@@ -1361,8 +1364,8 @@ void test_file_access_mmapbase(void)
CHECK_MRU
(
page0
,
page2
);
CHECK_DIRTY
(
page0
,
page2
);
/* dirtying a page in one mapping
automatically mmaps dirty page in all
* other wcfs mappings */
/* dirtying a page in one mapping
should automatically mmap the dirty page
*
in all
other wcfs mappings */
diag
(
"dirty page in vma2 -> dirties vma1"
);
err
=
fileh_mmap
(
vma2
,
fh
,
100
,
4
);
ok1
(
!
err
);
...
...
@@ -1376,10 +1379,10 @@ void test_file_access_mmapbase(void)
ok1
(
M
(
vma
,
2
));
CHECK_PAGE
(
page2
,
102
,
PAGE_DIRTY
,
2
);
ok1
(
!
M
(
vma
,
3
));
CHECK_NOPAGE
(
103
);
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_NOPAGE
(
103
);
ok1
(
M
(
vma2
,
0
));
ok1
(
!
M
(
vma2
,
1
));
ok1
(
M
(
vma2
,
2
));
ok1
(
!
M
(
vma2
,
3
));
CHECK_MRU
(
page0
,
page2
);
CHECK_DIRTY
(
page0
,
page2
);
...
...
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