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
60e76ca4
Commit
60e76ca4
authored
Oct 27, 2015
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zdtm.py: Ability to delay between iterations and pre-dumps
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
2086b56a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
zdtm.py
test/zdtm.py
+14
-4
No files found.
test/zdtm.py
View file @
60e76ca4
...
@@ -555,15 +555,22 @@ def try_run_hook(test, args):
...
@@ -555,15 +555,22 @@ def try_run_hook(test, args):
# Main testing entity -- dump (probably with pre-dumps) and restore
# Main testing entity -- dump (probably with pre-dumps) and restore
#
#
def
iter_parm
(
opt
,
dflt
):
x
=
((
opt
or
str
(
dflt
))
+
":0"
)
.
split
(
':'
)
return
(
xrange
(
0
,
int
(
x
[
0
])),
float
(
x
[
1
]))
def
cr
(
cr_api
,
test
,
opts
):
def
cr
(
cr_api
,
test
,
opts
):
if
opts
[
'nocr'
]:
if
opts
[
'nocr'
]:
return
return
cr_api
.
set_test
(
test
)
cr_api
.
set_test
(
test
)
for
i
in
xrange
(
0
,
int
(
opts
[
'iters'
]
or
1
)):
iters
=
iter_parm
(
opts
[
'iters'
],
1
)
for
p
in
xrange
(
0
,
int
(
opts
[
'pre'
]
or
0
)):
for
i
in
iters
[
0
]:
pres
=
iter_parm
(
opts
[
'pre'
],
0
)
for
p
in
pres
[
0
]:
cr_api
.
dump
(
"pre-dump"
)
cr_api
.
dump
(
"pre-dump"
)
time
.
sleep
(
pres
[
1
])
if
opts
[
'norst'
]:
if
opts
[
'norst'
]:
cr_api
.
dump
(
"dump"
,
opts
=
[
"--leave-running"
])
cr_api
.
dump
(
"dump"
,
opts
=
[
"--leave-running"
])
...
@@ -573,6 +580,9 @@ def cr(cr_api, test, opts):
...
@@ -573,6 +580,9 @@ def cr(cr_api, test, opts):
try_run_hook
(
test
,
[
"--pre-restore"
])
try_run_hook
(
test
,
[
"--pre-restore"
])
cr_api
.
restore
()
cr_api
.
restore
()
time
.
sleep
(
iters
[
1
])
# Additional checks that can be done outside of test process
# Additional checks that can be done outside of test process
def
get_maps
(
test
):
def
get_maps
(
test
):
...
@@ -873,10 +883,10 @@ rp.add_argument("-f", "--flavor", help = "Flavor to run")
...
@@ -873,10 +883,10 @@ rp.add_argument("-f", "--flavor", help = "Flavor to run")
rp
.
add_argument
(
"-x"
,
"--exclude"
,
help
=
"Exclude tests from --all run"
,
action
=
'append'
)
rp
.
add_argument
(
"-x"
,
"--exclude"
,
help
=
"Exclude tests from --all run"
,
action
=
'append'
)
rp
.
add_argument
(
"--sibling"
,
help
=
"Restore tests as siblings"
,
action
=
'store_true'
)
rp
.
add_argument
(
"--sibling"
,
help
=
"Restore tests as siblings"
,
action
=
'store_true'
)
rp
.
add_argument
(
"--pre"
,
help
=
"Do some pre-dumps before dump"
)
rp
.
add_argument
(
"--pre"
,
help
=
"Do some pre-dumps before dump
(n[:pause])
"
)
rp
.
add_argument
(
"--nocr"
,
help
=
"Do not CR anything, just check test works"
,
action
=
'store_true'
)
rp
.
add_argument
(
"--nocr"
,
help
=
"Do not CR anything, just check test works"
,
action
=
'store_true'
)
rp
.
add_argument
(
"--norst"
,
help
=
"Don't restore tasks, leave them running after dump"
,
action
=
'store_true'
)
rp
.
add_argument
(
"--norst"
,
help
=
"Don't restore tasks, leave them running after dump"
,
action
=
'store_true'
)
rp
.
add_argument
(
"--iters"
,
help
=
"Do CR cycle several times before check"
)
rp
.
add_argument
(
"--iters"
,
help
=
"Do CR cycle several times before check
(n[:pause])
"
)
rp
.
add_argument
(
"--fault"
,
help
=
"Test fault injection"
)
rp
.
add_argument
(
"--fault"
,
help
=
"Test fault injection"
)
rp
.
add_argument
(
"--page-server"
,
help
=
"Use page server dump"
,
action
=
'store_true'
)
rp
.
add_argument
(
"--page-server"
,
help
=
"Use page server dump"
,
action
=
'store_true'
)
...
...
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