All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] tests/functional: add memlock tests
@ 2025-04-17  7:22 Alexandr Moshkov
  2025-04-17  7:22 ` [PATCH v4 1/2] tests/functional: add skipLockedMemoryTest decorator Alexandr Moshkov
  2025-04-17  7:22 ` [PATCH v4 2/2] tests/functional: add memlock tests Alexandr Moshkov
  0 siblings, 2 replies; 4+ messages in thread
From: Alexandr Moshkov @ 2025-04-17  7:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cleber Rosa, yc-core @ yandex-team . ru, Paolo Bonzini,
	Daniel P . Berrangé, Alexandr Moshkov

Add new tests to check the correctness of the `-overcommit memlock`
option (possible values: off, on, on-fault) by using
`/proc/{qemu_pid}/smaps` file to check in Size, Rss and Locked fields of
anonymous segments:

* if `memlock=off`, then Locked = 0 on every anonymous smaps;
* if `memlock=on`, then Size, Rss and Locked values must be equal for
every anon smaps where Rss is not 0;
* if `memlock=on-fault`, then Rss and Locked must be equal on every anon
smaps and anonymous segment with Rss < Size must exists.

---

v3 -> v4:
* add skipLockedMemoryTest decorator to skip test if system's locked
  memory limit is below the required threashold;
* add to MemlockTest skipLockedMemoryTest decorator with 2 GB limit.

v2 -> v3:
Move tests to tests/functional dir, as the tests/avocado dir is being phased out.
v2 was [PATCH v2] tests/avocado: add memlock tests.
Supersedes: <20250414075702.9248-1-dtalexundeer@yandex-team.ru>

v1 -> v2:
In the previous send, i forgot to specify new patch version (v2)
So i resend previous patch with version specified.


Alexandr Moshkov (2):
  tests/functional: add skipLockedMemoryTest decorator
  tests/functional: add memlock tests

 tests/functional/meson.build             |   1 +
 tests/functional/qemu_test/__init__.py   |   2 +-
 tests/functional/qemu_test/decorators.py |  19 +++++
 tests/functional/test_memlock.py         | 102 +++++++++++++++++++++++
 4 files changed, 123 insertions(+), 1 deletion(-)
 create mode 100644 tests/functional/test_memlock.py

-- 
2.34.1



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

end of thread, other threads:[~2025-04-17  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17  7:22 [PATCH v4 0/2] tests/functional: add memlock tests Alexandr Moshkov
2025-04-17  7:22 ` [PATCH v4 1/2] tests/functional: add skipLockedMemoryTest decorator Alexandr Moshkov
2025-04-17  9:43   ` Daniel P. Berrangé
2025-04-17  7:22 ` [PATCH v4 2/2] tests/functional: add memlock tests Alexandr Moshkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.