selftests/mm: protection_keys: save/restore nr_hugepages settings
authorMuhammad Usama Anjum <usama.anjum@collabora.com>
Thu, 25 Jan 2024 15:46:07 +0000 (20:46 +0500)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 23:38:55 +0000 (15:38 -0800)
commitc23ea61726d57d11d5c16a0b7943da85b7bd9f3f
tree0e6f6c99b4a0810a107f51abdf6c56636de000c6
parent7d695b1c3695b4d0417674f15e2ccde12a272e16
selftests/mm: protection_keys: save/restore nr_hugepages settings

Save and restore nr_hugepages before changing it during the test.  A test
should not change system wide settings.

Link: https://lkml.kernel.org/r/20240125154608.720072-5-usama.anjum@collabora.com
Fixes: 5f23f6d082a9 ("x86/pkeys: Add self-tests")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/protection_keys.c