[CRIU] [PATCH] zdtm.py: grep errors even if criu exists with 0
Pavel Emelyanov
xemul at parallels.com
Mon Oct 26 02:09:11 PDT 2015
On 10/23/2015 07:07 PM, Andrey Vagin wrote:
> From: Andrew Vagin <avagin at openvz.org>
>
> Signed-off-by: Andrew Vagin <avagin at openvz.org>
> ---
> test/zdtm.py | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/test/zdtm.py b/test/zdtm.py
> index 389ff34..aa22d52 100755
> --- a/test/zdtm.py
> +++ b/test/zdtm.py
> @@ -424,11 +424,11 @@ class criu_cli:
>
> print "Run CRIU: [" + action + " " + " ".join(s_args) + "]"
> ret = self.__criu(action, s_args, self.__fault)
> + grep_errors(os.path.join(self.__ddir(), log))
> if ret != 0:
> if self.__fault or self.__test.blocking():
> raise test_fail_expected_exc(action)
> else:
> - grep_errors(os.path.join(self.__ddir(), log))
> raise test_fail_exc("CRIU %s" % action)
>
> def dump(self, action, opts = []):
> @@ -664,11 +664,15 @@ def print_sep(title, sep = "="):
> print "%s %s %s" % (sep, title, sep)
>
> def grep_errors(fname):
> - print_sep("grep Error")
> + first = True
> for l in open(fname):
> if "Error" in l:
> + if first:
> + print_sep("grep Error")
> + first = False
> print l,
> - print_sep("ERROR OVER")
> + if not first:
> + print_sep("ERROR OVER")
Shouldn't we enforce dump/restore error in case errors are in logs, but criu
reports 0?
>
> def run_tests(opts):
> excl = None
>
More information about the CRIU
mailing list