Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBui Quang Minh <minhquangbui99@gmail.com>2022-07-21 18:46:10 +0300
committerAndrei Vagin <avagin@gmail.com>2022-07-23 22:02:35 +0300
commitebe9db972419da4f9cf4ecd1bdc3bfd7097c28cc (patch)
tree3334da193ca6934b20bf4160b449077c983a0b30 /test
parent90c0f0874ed51c963b90bdb434dd48fe1d3bfb0a (diff)
zdtm: Remove permission part check for skipping vsyscall vma
Normally, vsyscall vma has VM_READ, VM_EXEC permission. However, when CONFIG_LEGACY_VSYSCALL_XONLY=y, that vma only has VM_EXEC. This commit removes the permission part when checking to skip vsyscall vma in x32 tests. Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/zdtm.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/zdtm.py b/test/zdtm.py
index c011c79c0..d264c4878 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1651,6 +1651,15 @@ def get_visible_state(test):
return files, maps, mounts
+def has_vsyscall(maps):
+ vsyscall = u"ffffffffff600000-ffffffffff601000"
+ for i in maps:
+ if vsyscall in i:
+ return i
+
+ return None
+
+
def check_visible_state(test, state, opts):
new = get_visible_state(test)
@@ -1666,9 +1675,9 @@ def check_visible_state(test, state, opts):
new_maps = new[1][pid]
if os.getenv("COMPAT_TEST"):
# the vsyscall vma isn't unmapped from x32 processes
- vsyscall = u"ffffffffff600000-ffffffffff601000 r-xp"
- if vsyscall in new_maps and vsyscall not in old_maps:
- new_maps.remove(vsyscall)
+ entry = has_vsyscall(new_maps)
+ if entry and has_vsyscall(old_maps) is None:
+ new_maps.remove(entry)
if old_maps != new_maps:
print("%s: Old maps lost: %s" % (pid, old_maps - new_maps))
print("%s: New maps appeared: %s" % (pid, new_maps - old_maps))