From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Ryan Roberts <ryan.roberts@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
kernel@collabora.com, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 5/5] selftests/mm: run_vmtests.sh: add missing tests
Date: Thu, 1 Feb 2024 17:26:29 +0500 [thread overview]
Message-ID: <cbf00ee3-bb41-47b3-af03-8f26e313d0d5@collabora.com> (raw)
In-Reply-To: <ab7523db-f032-4f99-8090-785f126a3ae2@arm.com>
On 2/1/24 5:11 PM, Ryan Roberts wrote:
> On 25/01/2024 15:46, 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
>>
>> Changes since v2:
>> - Add a comment
>> - Move tests down in the file
>> - Add "-d" option which poisons the pages and aren't being useable after
>> the test
>> ---
>> tools/testing/selftests/mm/Makefile | 5 +++++
>> tools/testing/selftests/mm/run_vmtests.sh | 8 ++++++++
>> 2 files changed, 13 insertions(+)
>>
>> diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
>> index 2453add65d12f..f3aec7be80730 100644
>> --- a/tools/testing/selftests/mm/Makefile
>> +++ b/tools/testing/selftests/mm/Makefile
>> @@ -114,6 +114,11 @@ 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 += hugetlb_reparenting_test.sh
>> +
>> +# required by charge_reserved_hugetlb.sh
>> +TEST_FILES += write_hugetlb_memory.sh
>>
>> include ../lib.mk
>>
>> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
>> index e373d592dbf5c..a0f37e4438937 100755
>> --- a/tools/testing/selftests/mm/run_vmtests.sh
>> +++ b/tools/testing/selftests/mm/run_vmtests.sh
>> @@ -19,6 +19,7 @@ usage: ${BASH_SOURCE[0]:-$0} [ options ]
>> -t: specify specific categories to tests to run
>> -h: display this message
>> -n: disable TAP output
>> + -d: run destructive tests
>
> You probably want to clarify the behaviour for -a (all). I guess providing -a
> should NOT run destructive tests unless -d is also explicitly provided.
>
>>
>> The default behavior is to run required tests only. If -a is specified,
>> will run all tests.
>> @@ -79,6 +80,7 @@ EOF
>> }
>>
>> RUN_ALL=false
>> +RUN_DESTRUCTIVE_TEST=false
>
> Either call this RUN_DESTRUCTIVE (my preference) or at least make it plural
> (RUN_DESTRUCTIVE_TESTS).
>
>> TAP_PREFIX="# "
>>
>> while getopts "aht:n" OPT; do
>> @@ -87,6 +89,7 @@ while getopts "aht:n" OPT; do
>> "h") usage ;;
>> "t") VM_SELFTEST_ITEMS=${OPTARG} ;;
>> "n") TAP_PREFIX= ;;
>> + "a") RUN_DESTRUCTIVE_TEST=true ;;
>
> The help you added says the option is -d, but this is looking for -a, and
> conflicting with the existing -a=all option.
Sorry, that's a typo. I'll resolve your above comments with fix patch as well.
>
>> esac
>> done
>> shift $((OPTIND -1))
>> @@ -304,6 +307,11 @@ CATEGORY="process_mrelease" run_test ./mrelease_test
>> CATEGORY="mremap" run_test ./mremap_test
>>
>> CATEGORY="hugetlb" run_test ./thuge-gen
>> +CATEGORY="hugetlb" run_test ./charge_reserved_hugetlb.sh -cgroup-v2
>> +CATEGORY="hugetlb" run_test ./hugetlb_reparenting_test.sh -cgroup-v2
>> +if $RUN_DESTRUCTIVE_TEST; then
>> +CATEGORY="hugetlb" run_test ./hugetlb-read-hwpoison
>> +fi
>>
>> if [ $VADDR64 -ne 0 ]; then
>>
>
>
--
BR,
Muhammad Usama Anjum
prev parent reply other threads:[~2024-02-01 12:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 15:46 [PATCH v3 0/5] selftests/mm: Improve run_vmtests.sh Muhammad Usama Anjum
2024-01-25 15:46 ` [PATCH v3 1/5] selftests/mm: hugetlb_reparenting_test: do not unmount Muhammad Usama Anjum
2024-01-25 15:46 ` [PATCH v3 2/5] selftests/mm: run_vmtests: remove sudo and conform to tap Muhammad Usama Anjum
2024-02-01 12:04 ` Ryan Roberts
2024-02-01 12:24 ` Muhammad Usama Anjum
2024-02-01 12:45 ` Ryan Roberts
2024-01-25 15:46 ` [PATCH v3 3/5] selftests/mm: save and restore nr_hugepages value Muhammad Usama Anjum
2024-01-25 15:46 ` [PATCH v3 4/5] selftests/mm: protection_keys: save/restore nr_hugepages settings Muhammad Usama Anjum
2024-03-13 14:58 ` Joey Gouly
2024-03-13 18:12 ` Muhammad Usama Anjum
2024-03-14 9:31 ` Joey Gouly
2024-01-25 15:46 ` [PATCH v3 5/5] selftests/mm: run_vmtests.sh: add missing tests Muhammad Usama Anjum
2024-02-01 12:11 ` Ryan Roberts
2024-02-01 12:26 ` Muhammad Usama Anjum [this message]
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=cbf00ee3-bb41-47b3-af03-8f26e313d0d5@collabora.com \
--to=usama.anjum@collabora.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=ryan.roberts@arm.com \
--cc=shuah@kernel.org \
/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