]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/mm: restore default nr_hugepages value during cleanup in hugetlb_reparentin...
authorDonet Tom <donettom@linux.ibm.com>
Thu, 10 Apr 2025 10:07:48 +0000 (05:07 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 May 2025 00:48:29 +0000 (17:48 -0700)
commit585a9145886ad1d06b39ddcd72d457f37ebb4ff4
treecc2dc24dc98d762c619f1cf011b1140c824e74af
parent2a6ed1b411c5a037033a4dccc65cf4a90e4ae40a
selftests/mm: restore default nr_hugepages value during cleanup in hugetlb_reparenting_test.sh

During cleanup, the value of /proc/sys/vm/nr_hugepages is currently being
set to 0.  At the end of the test, if all tests pass, the original
nr_hugepages value is restored.  However, if any test fails, it remains
set to 0.

With this patch, we ensure that the original nr_hugepages value is
restored during cleanup, regardless of whether the test passes or fails.

Link: https://lkml.kernel.org/r/20250410100748.2310-1-donettom@linux.ibm.com
Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests")
Signed-off-by: Donet Tom <donettom@linux.ibm.com>
Cc: Li Wang <liwang@redhat.com>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/hugetlb_reparenting_test.sh