You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: fix check for major page faults in test_balloon.py::test_stats
Major page fault occur when a page fault can only be satisfied via disk
I/O [1]. In `test_stats`, we asserted that the number of major page
faults increased during execution of `make_guest_dirty_memory`, but this
cannot happen, as it uses MAP_ANONYMOUS, and thus will not trigger any
major page faults. The reason the test used to work in the past is that
it was not waiting for the VM to boot, so the first reading of the
balloon statistics happened before the boot process was finished.
However, during boot we _do_ expect major faults to happen, as things
need to be read from the rootfs.
Fix the test to instead just assert a non-zero number of major faults
happened during boot.
[1]: https://en.wikipedia.org/wiki/Page_fault#Major
Signed-off-by: Patrick Roy <[email protected]>
0 commit comments