Skip to content
Commit dd9b35ef authored by Breno Leitao's avatar Breno Leitao Committed by Andrew Morton
Browse files

selftests/mm: restore number of hugepages

The test mm `hugetlb_fault_after_madv` selftest needs one and only one
huge page to run, thus it sets `/proc/sys/vm/nr_hugepages` to 1.

The problem is that further tests require the previous number of hugepages
allocated in order to succeed.

Save the number of huge pages before changing it, and restore it once the
test finishes, so, further tests could run successfully.

Link: https://lkml.kernel.org/r/20231103173400.1608403-1-leitao@debian.org


Fixes: 116d5730 ("selftests/mm: add a new test for madv and hugetlb")
Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Reported-by: default avatarRyan Roberts <ryan.roberts@arm.com>
Closes: https://lore.kernel.org/all/662df57e-47f1-4c15-9b84-f2f2d587fc5c@arm.com/


Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 9297e536
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment