2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 13:28:27 +00:00

zdtm: allow ignore taint via environment variable

With this change tainted kernels can be ignored with setting
ZDTM_IGNORE_TAINT=1. This is just to simplify the CI script to not
require to change every call of zdtm. Setting the variable once should
be enough.

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2021-06-14 20:40:51 +00:00 committed by Andrei Vagin
parent a92833818b
commit b4c7267b0e

View File

@ -1938,7 +1938,7 @@ class Launcher:
self.__taint = taintfd.read() self.__taint = taintfd.read()
if int(self.__taint, 0) != 0: if int(self.__taint, 0) != 0:
print("The kernel is tainted: %r" % self.__taint) print("The kernel is tainted: %r" % self.__taint)
if not opts["ignore_taint"]: if not opts["ignore_taint"] and os.getenv("ZDTM_IGNORE_TAINT") != '1':
raise Exception("The kernel is tainted: %r" % self.__taint) raise Exception("The kernel is tainted: %r" % self.__taint)
def __show_progress(self, msg): def __show_progress(self, msg):