From: Muchun Song <songmuchun@bytedance.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Mina Almasry <almasrymina@google.com>,
Yosry Ahmed <yosryahmed@google.com>,
Shuah Khan <shuah@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] selftests/vm: cleanup hugetlb file after mremap test
Date: Wed, 2 Feb 2022 21:11:05 +0800 [thread overview]
Message-ID: <CAMZfGtXTWK-1G1Qm_Zqmd--5bcDtm4YzA6SSHHRutefgC7KXAQ@mail.gmail.com> (raw)
In-Reply-To: <20220201033459.156944-1-mike.kravetz@oracle.com>
On Tue, Feb 1, 2022 at 11:35 AM Mike Kravetz <mike.kravetz@oracle.com> wrote:
>
> 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.
>
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
> ---
[...]
> diff --git a/tools/testing/selftests/vm/run_vmtests.sh b/tools/testing/selftests/vm/run_vmtests.sh
> index e09040a3dc08..e10d50e0b8e8 100755
> --- a/tools/testing/selftests/vm/run_vmtests.sh
> +++ b/tools/testing/selftests/vm/run_vmtests.sh
> @@ -111,13 +111,14 @@ fi
> echo "-----------------------"
> echo "running hugepage-mremap"
> echo "-----------------------"
> -./hugepage-mremap 256
> +./hugepage-mremap $mnt/huge_mremap
> if [ $? -ne 0 ]; then
> echo "[FAIL]"
> exitcode=1
> else
> echo "[PASS]"
> fi
> +rm -f $mnt/huge_mremap
>
A little strange (since file creation and deletion are not in the same place).
I know $mnt/huge_mremap is created in hugepage-mremap. But I think
hugepage-mremap should do the housekeeping instead of deleting the file
here. Or we can create the file before doing the test. Like:
+ touch $mnt/huge_mremap
-./hugepage-mremap 256
+./hugepage-mremap $mnt/huge_mremap
+rm -f $mnt/huge_mremap
Otherwise LGTM.
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Thanks.
next prev parent reply other threads:[~2022-02-02 13:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 3:34 Mike Kravetz
2022-02-01 16:45 ` Shuah Khan
2022-02-01 19:06 ` Mina Almasry
2022-02-02 13:11 ` Muchun Song [this message]
2022-02-02 19:34 ` Yosry Ahmed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMZfGtXTWK-1G1Qm_Zqmd--5bcDtm4YzA6SSHHRutefgC7KXAQ@mail.gmail.com \
--to=songmuchun@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=shuah@kernel.org \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox