tests/functional/x86_64: Accept a few locked pages in test_memlock.py

Startup of libgcrypt locks a small pool of pages -- by default 16k.
Testing for zero locked pages is isn't correct, while testing for
32k is a decent compromise.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson
2025-09-16 09:55:52 -07:00
parent 190d5d7fd7
commit aa3c761c70
+2 -1
View File
@@ -37,7 +37,8 @@ class MemlockTest(QemuSystemTest):
status = self.get_process_status_values(self.vm.get_pid())
self.assertTrue(status['VmLck'] == 0)
# libgcrypt may mlock a few pages
self.assertTrue(status['VmLck'] < 32)
def test_memlock_on(self):
self.common_vm_setup_with_memlock('on')