Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
2f5b9904
Commit
2f5b9904
authored
Apr 27, 2016
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zdtm: Helper for ns compare
Signed-off-by:
Pavel Emelyanov
<
xemul@virtuozzo.com
>
parent
0edee567
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
zdtm.py
test/zdtm.py
+9
-6
No files found.
test/zdtm.py
View file @
2f5b9904
...
...
@@ -982,13 +982,16 @@ def get_freezer(desc):
fr
=
cg_freezer
(
path
=
fd
[
0
],
state
=
fd
[
1
])
return
fr
def
cmp_ns
(
ns1
,
match
,
ns2
,
msg
):
ns1_ino
=
os
.
stat
(
ns1
)
.
st_ino
ns2_ino
=
os
.
stat
(
ns2
)
.
st_ino
if
eval
(
"
%
r
%
s
%
r"
%
(
ns1_ino
,
match
,
ns2_ino
)):
print
"
%
s match (
%
r
%
s
%
r) fail"
%
(
msg
,
ns1_ino
,
match
,
ns2_ino
)
raise
test_fail_exc
(
"
%
s compare"
%
msg
)
def
check_joinns_state
(
t
):
nsstat
=
os
.
stat
(
"/proc/
%
s/ns/net"
%
t
.
getpid
())
joinns
=
os
.
stat
(
join_ns_file
)
if
nsstat
.
st_ino
!=
joinns
.
st_ino
:
print
"should join in namespace
%
d"
%
joinns
.
st_ino
print
"now in namespace
%
d"
%
nsstat
.
st_ino
raise
test_fail_exc
(
"join-ns compare"
)
cmp_ns
(
"/proc/
%
s/ns/net"
%
t
.
getpid
(),
"!="
,
join_ns_file
,
"join-ns"
)
def
do_run_test
(
tname
,
tdesc
,
flavs
,
opts
):
...
...
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