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
35603e51
Commit
35603e51
authored
Oct 20, 2015
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zdtm: Handle crfail tests (expected dump failure)
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
896837ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
zdtm.py
test/zdtm.py
+10
-4
No files found.
test/zdtm.py
View file @
35603e51
...
...
@@ -164,7 +164,7 @@ class test_fail_exc:
def
__init__
(
self
,
step
):
self
.
step
=
step
class
test_fa
ult_inj
ected_exc
:
class
test_fa
il_exp
ected_exc
:
def
__init__
(
self
,
cr_action
):
self
.
cr_action
=
cr_action
...
...
@@ -289,6 +289,9 @@ class zdtm_test:
def
static
(
self
):
return
self
.
__name
.
split
(
'/'
)[
2
]
==
'static'
def
blocking
(
self
):
return
test_flag
(
self
.
__desc
,
'crfail'
)
class
inhfd_test
:
...
...
@@ -372,6 +375,9 @@ class inhfd_test:
def
static
(
self
):
return
True
def
blocking
(
self
):
return
False
test_classes
=
{
'zdtm'
:
zdtm_test
,
'inhfd'
:
inhfd_test
}
...
...
@@ -419,8 +425,8 @@ class criu_cli:
print
"Run CRIU: ["
+
action
+
" "
+
" "
.
join
(
s_args
)
+
"]"
ret
=
self
.
__criu
(
action
,
s_args
,
self
.
__fault
)
if
ret
!=
0
:
if
self
.
__fault
:
raise
test_fa
ult_inj
ected_exc
(
action
)
if
self
.
__fault
or
self
.
__test
.
blocking
()
:
raise
test_fa
il_exp
ected_exc
(
action
)
else
:
grep_errors
(
os
.
path
.
join
(
self
.
__ddir
(),
log
))
raise
test_fail_exc
(
"CRIU
%
s"
%
action
)
...
...
@@ -545,7 +551,7 @@ def do_run_test(tname, tdesc, flavs, opts):
s
=
get_visible_state
(
t
)
try
:
cr
(
cr_api
,
t
,
opts
)
except
test_fa
ult_inj
ected_exc
as
e
:
except
test_fa
il_exp
ected_exc
as
e
:
if
e
.
cr_action
==
"dump"
:
t
.
stop
()
try_run_hook
(
t
,
[
"--fault"
,
e
.
cr_action
])
...
...
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