mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 09:39:13 +00:00
zdtm: check the mem_dirty_track if --pre or --snap is set
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
fb7e5a3ee6
commit
49877012e3
2 changed files with 9 additions and 1 deletions
|
|
@ -692,8 +692,10 @@ static int check_mem_dirty_track(void)
|
|||
if (kerndat_get_dirty_track() < 0)
|
||||
return -1;
|
||||
|
||||
if (!kdat.has_dirty_track)
|
||||
if (!kdat.has_dirty_track) {
|
||||
pr_warn("Dirty tracking is OFF. Memory snapshot will not work.\n");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1002,6 +1004,7 @@ struct feature_list {
|
|||
|
||||
static struct feature_list feature_list[] = {
|
||||
{ "mnt_id", check_mnt_id },
|
||||
{ "mem_dirty_track", check_mem_dirty_track },
|
||||
{ "aio_remap", check_aio_remap },
|
||||
{ "timerfd", check_timerfd },
|
||||
{ "tun", check_tun },
|
||||
|
|
|
|||
|
|
@ -1188,6 +1188,11 @@ def run_tests(opts):
|
|||
excl = None
|
||||
features = {}
|
||||
|
||||
if opts['pre'] or opts['snaps']:
|
||||
if not criu_cli.check("mem_dirty_track"):
|
||||
print "Tracking memory is not available"
|
||||
return;
|
||||
|
||||
if opts['keep_going'] and (not opts['all']):
|
||||
print "[WARNING] Option --keep-going is more useful with option --all."
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue