From: Richard Henderson <richard.henderson@linaro.org>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] tests/functional/x86_64: Accept a few locked pages in test_memlock.py
Date: Tue, 16 Sep 2025 09:55:38 -0700 [thread overview]
Message-ID: <8ebea8ef-42b9-4e8a-b0dd-9e0bb3bccdef@linaro.org> (raw)
In-Reply-To: <8865c3ad-341a-446e-ba29-e4c9f6bab514@redhat.com>
On 9/15/25 22:18, Thomas Huth wrote:
> On 16/09/2025 03.38, Richard Henderson wrote:
>> On 9/15/25 11:55, Richard Henderson wrote:
>>> 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')
>>
>> I wonder if I should have chosen 64k, which might be one 64k page...
>
> It's a x86 test, so we should not have to worry about 64k pages there, I hope?
Fair enough, though it does beg the question of why it's an x86-specific test. Don't all
host architectures support memory locking?
r~
next prev parent reply other threads:[~2025-09-16 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-09-16 18:39 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ebea8ef-42b9-4e8a-b0dd-9e0bb3bccdef@linaro.org \
--to=richard.henderson@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).