From: Ryan Roberts <ryan.roberts@arm.com>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>
Cc: kernel@collabora.com, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] selftests/mm: run_vmtests.sh: add missing tests
Date: Tue, 23 Jan 2024 09:33:38 +0000 [thread overview]
Message-ID: <e92f7c49-5268-421e-a017-af268c845b1b@arm.com> (raw)
In-Reply-To: <20240123073615.920324-1-usama.anjum@collabora.com>
On 23/01/2024 07:36, Muhammad Usama Anjum wrote:
> Add missing tests to run_vmtests.sh. The mm kselftests are run through
> run_vmtests.sh. If a test isn't present in this script, it'll not run
> with run_tests or `make -C tools/testing/selftests/mm run_tests`.
>
> Cc: Ryan Roberts <ryan.roberts@arm.com>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
> Changes since v1:
> - Copy the original scripts and their dependence script to install directory as well
> ---
> tools/testing/selftests/mm/Makefile | 3 +++
> tools/testing/selftests/mm/run_vmtests.sh | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
> index 2453add65d12f..c9c8112a7262e 100644
> --- a/tools/testing/selftests/mm/Makefile
> +++ b/tools/testing/selftests/mm/Makefile
> @@ -114,6 +114,9 @@ TEST_PROGS := run_vmtests.sh
> TEST_FILES := test_vmalloc.sh
> TEST_FILES += test_hmm.sh
> TEST_FILES += va_high_addr_switch.sh
> +TEST_FILES += charge_reserved_hugetlb.sh
> +TEST_FILES += write_hugetlb_memory.sh
> +TEST_FILES += hugetlb_reparenting_test.sh
I see you are exporting 3 scripts, but only invoking 2 of them from
run_vmtests.sh below. Is one a helper that gets called indirectly?
>
> include ../lib.mk
>
> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
> index 246d53a5d7f28..12754af00b39c 100755
> --- a/tools/testing/selftests/mm/run_vmtests.sh
> +++ b/tools/testing/selftests/mm/run_vmtests.sh
> @@ -248,6 +248,9 @@ CATEGORY="hugetlb" run_test ./map_hugetlb
> CATEGORY="hugetlb" run_test ./hugepage-mremap
> CATEGORY="hugetlb" run_test ./hugepage-vmemmap
> CATEGORY="hugetlb" run_test ./hugetlb-madvise
> +CATEGORY="hugetlb" run_test ./charge_reserved_hugetlb.sh -cgroup-v2
> +CATEGORY="hugetlb" run_test ./hugetlb_reparenting_test.sh -cgroup-v2
> +CATEGORY="hugetlb" run_test ./hugetlb-read-hwpoison
I'm not really a fan of adding this last test here; its destructive because it
poisons 8 hugepages. So at a minimum, I think you need to modify the code in
run_vmtests.sh to ensure those extra pages are allocated (there is already a
section in the script that allocates hugepages).
However, given this test is destructive, I'd prefer that it wasn't run as part
of the main test set. Because the first time you run it, it will presumably
pass, but now some of the hugepages are poisoned so next time you run it, there
won't be enough unpoisoned hugepages and a test will fail. So you have very
confusing behaviour for a developer who might be running these tests multiple
times per boot (e.g. me).
Perhaps we can add a -d (destructive) option to the script, and this test will
only be run if that option is passed?
Thanks,
Ryan
>
> nr_hugepages_tmp=$(cat /proc/sys/vm/nr_hugepages)
> # For this test, we need one and just one huge page
next prev parent reply other threads:[~2024-01-23 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 7:36 Muhammad Usama Anjum
2024-01-23 7:36 ` [PATCH v2 2/2] selftests/mm: run_vmtests: remove sudo and conform to tap Muhammad Usama Anjum
2024-01-23 9:33 ` Ryan Roberts [this message]
2024-01-23 14:45 ` [PATCH v2 1/2] selftests/mm: run_vmtests.sh: add missing tests Muhammad Usama Anjum
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=e92f7c49-5268-421e-a017-af268c845b1b@arm.com \
--to=ryan.roberts@arm.com \
--cc=akpm@linux-foundation.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
--cc=usama.anjum@collabora.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