[CRIU] [PATCH v2] zdtm.py: check for link remap files presence on test end

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Tue Aug 2 06:46:17 PDT 2016


These files have to be removed after successful restore.

v2:
Check link remap files only for tests with "--link-remap" option in
descriptor.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 test/zdtm.py |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/zdtm.py b/test/zdtm.py
index 52b656e..1438b55 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -954,6 +954,13 @@ def check_visible_state(test, state, opts):
 			print "%s: New mounts appeared: %s" % (pid, new_mounts)
 			raise test_fail_exc("mounts compare")
 
+	if '--link-remap' in test.getdopts():
+		import glob
+		link_remap_list = glob.glob(os.path.dirname(test.getname()) + '/link_remap*')
+		if link_remap_list:
+			print "%s: link-remap files left: %s" % (test.getname(), link_remap_list)
+			raise test_fail_exc("link remaps left")
+
 
 class noop_freezer:
 	def __init__(self):



More information about the CRIU mailing list