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
71b0888e
Commit
71b0888e
authored
Jul 11, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bba9d6d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
8 deletions
+35
-8
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+35
-8
No files found.
bigfile/tests/test_virtmem.c
View file @
71b0888e
...
...
@@ -1479,16 +1479,15 @@ void test_file_access_mmapbase(void)
/* 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
);
page0
=
page2
=
page3
=
NULL
;
/* mkdirty2 prepares state with 2 dirty pages only 1 of which is mapped */
void
mkdirty2
(
int
gen
)
{
vma_unmap
(
vma
);
CHECK_NOPAGE
(
100
);
CHECK_NOPAGE
(
101
);
CHECK_NOPAGE
(
102
);
CHECK_NOPAGE
(
103
);
page0
=
page2
=
page3
=
NULL
;
err
=
fileh_mmap
(
vma
,
fh
,
100
,
4
);
ok1
(
!
err
);
...
...
@@ -1505,11 +1504,39 @@ void test_file_access_mmapbase(void)
ok1
(
!
M
(
vma
,
1
));
CHECK_NOPAGE
(
101
);
CHECK_PAGE
(
page2
,
102
,
PAGE_DIRTY
,
0
);
CHECK_NOPAGE
(
103
);
CHECK_MRU
(
page2
,
page0
);
CHECK_DIRTY
(
page2
,
page0
);
}
diag
(
"writeout (store)"
);
mkdirty2
(
10
);
ok1
(
!
fileh_dirty_writeout
(
fh
,
WRITEOUT_STORE
));
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
);
CHECK_MRU
(
page2
,
page0
);
CHECK_DIRTY
(
page2
,
page0
);
ok1
(
B
(
vma
,
0
*
PSb
+
0
)
==
10
);
ok1
(
B
(
vma
,
0
*
PSb
+
1
)
==
100
);
ok1
(
B
(
vma
,
0
*
PSb
+
PSb
-
1
)
==
100
);
b0
=
page_mmap
(
page0
,
NULL
,
PROT_READ
);
ok1
(
b0
);
b2
=
page_mmap
(
page2
,
NULL
,
PROT_READ
);
ok1
(
b2
);
ok1
(
b0
[
0
]
==
10
);
ok1
(
b0
[
1
]
==
100
);
ok1
(
b0
[
PSb
-
1
]
==
100
);
ok1
(
b2
[
0
]
==
12
);
ok1
(
b2
[
1
]
==
102
);
ok1
(
b2
[
PSb
-
1
]
==
102
);
xmunmap
(
b0
,
PS
);
xmunmap
(
b2
,
PS
);
...
...
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