]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/vm: cleanup hugetlb file after mremap test
authorMike Kravetz <mike.kravetz@oracle.com>
Sat, 5 Mar 2022 04:28:48 +0000 (20:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Mar 2022 19:08:32 +0000 (11:08 -0800)
commit040fd13f4dda7653ecea9daf401ae68124a5d1ed
tree6088a44412b5772d3304e0863ef4ab16088130e7
parent502fadaf7d561b3fa3039af64736e8e3718ed33d
selftests/vm: cleanup hugetlb file after mremap test

The hugepage-mremap test will create a file in a hugetlb filesystem.  In
a default 'run_vmtests' run, the file will contain all the hugetlb
pages.  After the test, the file remains and there are no free hugetlb
pages for subsequent tests.  This causes those hugetlb tests to fail.

Change hugepage-mremap to take the name of the hugetlb file as an
argument.  Unlink the file within the test, and just to be sure remove
the file in the run_vmtests script.

Link: https://lkml.kernel.org/r/20220201033459.156944-1-mike.kravetz@oracle.com
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Yosry Ahmed <yosryahmed@google.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/vm/hugepage-mremap.c
tools/testing/selftests/vm/run_vmtests.sh