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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
6f4f0296
Commit
6f4f0296
authored
Jul 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b5211351
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
wcfs/__init__.py
wcfs/__init__.py
+4
-2
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+5
-1
No files found.
wcfs/__init__.py
View file @
6f4f0296
...
@@ -108,9 +108,11 @@ class _Mapping(object):
...
@@ -108,9 +108,11 @@ class _Mapping(object):
# .file _File
# .file _File
# .blk_start offset of this mapping in file
# .blk_start offset of this mapping in file
# .mem mmaped memory
# .mem mmaped memory
pass
# XXX property .blk_stop = blk_start + len(mem) // blksize & assert len(mem) % blksize == 0
@
property
def
blk_stop
(
mmap
):
assert
len
(
mmap
.
mem
)
%
mmap
.
file
.
blksize
==
0
return
mmap
.
blk_start
+
len
(
mmap
.
mem
)
//
mmap
.
file
.
blksize
# connect creates new Conn viewing WCFS state as of @at.
# connect creates new Conn viewing WCFS state as of @at.
...
...
wcfs/wcfs_test.py
View file @
6f4f0296
...
@@ -1704,9 +1704,13 @@ def test_wcfspy_virtmem():
...
@@ -1704,9 +1704,13 @@ def test_wcfspy_virtmem():
wconn
=
t
.
wc
.
connect
(
at1
)
wconn
=
t
.
wc
.
connect
(
at1
)
defer
(
wconn
.
close
)
defer
(
wconn
.
close
)
m1
=
wconn
.
mmap
(
zf
.
_p_oid
,
2
,
2
)
m1
=
wconn
.
mmap
(
zf
.
_p_oid
,
2
,
3
)
defer
(
m1
.
unmap
)
defer
(
m1
.
unmap
)
assert
m1
.
blk_start
==
2
assert
m1
.
blk_stop
==
5
assert
len
(
m1
.
mem
)
==
3
*
zf
.
blksize
# ---- misc ---
# ---- misc ---
...
...
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