[CRIU] [PATCH] zdtm.py: add multiple features support
Andrew Vagin
avagin at virtuozzo.com
Tue May 30 11:19:14 PDT 2017
On Mon, May 22, 2017 at 07:15:28PM +0300, Pavel Tikhomirov wrote:
> From: root <ptikhomirov at virtuozzo.com>
>
> Else got:
> [criu]# ./test/zdtm.py run -t zdtm/static/pidns01
> Checking feature ns_pid ns_get_userns ns_get_parent
> Error (criu/cr-check.c:1366): Unknown feature ns_pid ns_get_userns ns_get_parent
> Skipping zdtm/static/pidns01 (no ns_pid ns_get_userns ns_get_parent feature)
>
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> ---
> test/zdtm.py | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/test/zdtm.py b/test/zdtm.py
> index 26b8939..35409f3 100755
> --- a/test/zdtm.py
> +++ b/test/zdtm.py
> @@ -1712,15 +1712,16 @@ default_test = {}
> l.skip(t, "manual run only")
> continue
>
> - feat = tdesc.get('feature', None)
> - if feat:
> - if feat not in features:
> - print "Checking feature %s" % feat
> - features[feat] = criu.check(feat)
> -
> - if not features[feat]:
> - l.skip(t, "no %s feature" % feat)
> - continue
> + feats = tdesc.get('feature', None)
feats = tdesc.get('feature', "")
and you will not need to next "if"
> + if feats:
> + for feat in feats.split():
> + if feat not in features:
> + print "Checking feature %s" % feat
> + features[feat] = criu.check(feat)
> +
> + if not features[feat]:
> + l.skip(t, "no %s feature" % feat)
> + continue
>
> if self_checkskip(t):
> l.skip(t, "checkskip failed")
> --
> 2.9.3
>
More information about the CRIU
mailing list