qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/functional/x86_64: Accept a few locked pages in test_memlock.py
@ 2025-09-15 18:55 Richard Henderson
  2025-09-15 20:16 ` Thomas Huth
  2025-09-16  1:38 ` Richard Henderson
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Henderson @ 2025-09-15 18:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: thuth

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.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tests/functional/x86_64/test_memlock.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/functional/x86_64/test_memlock.py b/tests/functional/x86_64/test_memlock.py
index 2b515ff979..81bce80b0c 100755
--- a/tests/functional/x86_64/test_memlock.py
+++ b/tests/functional/x86_64/test_memlock.py
@@ -37,7 +37,8 @@ def test_memlock_off(self):
 
         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')
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-16 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-15 18:55 [PATCH] tests/functional/x86_64: Accept a few locked pages in test_memlock.py Richard Henderson
2025-09-15 20:16 ` Thomas Huth
2025-09-16  1:38 ` Richard Henderson
2025-09-16  5:18   ` Thomas Huth
2025-09-16 16:55     ` Richard Henderson
2025-09-16 18:39       ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).