[CRIU] [PATCH 1/2] zdtm: don't skip mounts with the same root and source
Andrey Vagin
avagin at openvz.org
Tue May 24 14:29:37 PDT 2016
From: Andrew Vagin <avagin at virtuozzo.com>
Now we don't detect extra mounts, if they have peers with the same root
and target paths.
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
test/zdtm.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/test/zdtm.py b/test/zdtm.py
index 1e02a6c..353ec26 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -879,7 +879,7 @@ def get_visible_state(test):
except IOError, e:
if e.errno != errno.EINVAL:
raise e
- mounts[pid] = set(cmounts)
+ mounts[pid] = cmounts
return files, maps, mounts
def check_visible_state(test, state, opts):
@@ -903,9 +903,15 @@ def check_visible_state(test, state, opts):
old_mounts = state[2][pid]
new_mounts = new[2][pid]
- if old_mounts != new_mounts:
- print "%s: Old mounts lost: %s" % (pid, old_mounts - new_mounts)
- print "%s: New mounts appeared: %s" % (pid, new_mounts - old_mounts)
+ for i in xrange(len(old_mounts)):
+ m = old_mounts.pop(0)
+ if m in new_mounts:
+ new_mounts.remove(m)
+ else:
+ old_mounts.append(m)
+ if old_mounts or new_mounts:
+ print "%s: Old mounts lost: %s" % (pid, old_mounts)
+ print "%s: New mounts appeared: %s" % (pid, new_mounts)
raise test_fail_exc("mounts compare")
--
2.7.4
More information about the CRIU
mailing list