mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-02 07:13:31 +01:00
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/[email protected]
Fixes: 29750f71a9 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests")
Signed-off-by: Donet Tom <[email protected]>
Cc: Li Wang <[email protected]>
Cc: "Ritesh Harjani (IBM)" <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Waiman Long <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
1 parent
2a6ed1b411
commit
585a914588
1 file changed
+1
-1
@@ -56,7 +56,7 @@ function cleanup() {
|
||||
rmdir "$CGROUP_ROOT"/a/b 2>/dev/null
|
||||
rmdir "$CGROUP_ROOT"/a 2>/dev/null
|
||||
rmdir "$CGROUP_ROOT"/test1 2>/dev/null
|
||||
echo 0 >/proc/sys/vm/nr_hugepages
|
||||
echo $nr_hugepgs >/proc/sys/vm/nr_hugepages
|
||||
set -e
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user