[X/Z/A][PATCH 0/5] fix memory-hotplug test
Po-Hsu Lin (Sam)
po-hsu.lin at canonical.com
Tue Aug 15 11:58:24 UTC 2017
The memory-hotplug test in the kernel tree needs to be fixed:
1. The test will pass even the memory blocks are failed to be offlined.
2. It's using a random number generator to decide if each memory block
needs to be offlined, which is not ideal for testing as the block it
tries to unplug might be different between two runs.
3. The "-r" flag, percent-of-memory-to-offline, does not match what is
says. It's being used as the percentage to get a memory block offlined
Apply the following patch from upstream can fix these issues:
593f9278 - selftests: typo correction for memory-hotplug test
a34b28c9 - selftests: check hot-pluggagble memory for memory-hotplug test
72441ea5 - selftests: check percentage range for memory-hotplug test
02d8f075 - selftests: add missing test name in memory-hotplug test
5ff0c60b - selftests: fix memory-hotplug test
Run the script directly, it will fail when all memory blocks are busy.
And it will try to unplug memory blocks in a fixed order.
Negligible, it's just affecting this specific test case among those
On Thu, Aug 10, 2017 at 2:32 PM, Po-Hsu Lin <po-hsu.lin at canonical.com> wrote:
> The memory-hotplug test in the kernel selftest directory has a flag which is
> called "percent-of-memory-to-offline". However it is using a random number
> to decide if each memory block needs to be offlined (with 10% chance).
> This might cause all memory blocks being skipped, or throw an error if the
> block is busy. Also, it does not match with the meaning of the flag.
> This patch set will fix the test by offlining a certain amount of memory blocks
> and it will try to offline them one-by-one instead of doing this randomly to
> avoid the block is busy issue and make it more reproducible.
> Skipping Trusty as the ubuntu_kernel_selftests test suite was blacklisted on it.
> Po-Hsu Lin (5):
> selftests: typo correction for memory-hotplug test
> selftests: check hot-pluggagble memory for memory-hotplug test
> selftests: check percentage range for memory-hotplug test
> selftests: add missing test name in memory-hotplug test
> selftests: fix memory-hotplug test
> .../selftests/memory-hotplug/mem-on-off-test.sh | 86 +++++++++++++++++-----
> 1 file changed, 67 insertions(+), 19 deletions(-)
More information about the kernel-team