From: Sarthak Sharma <sarthak.sharma@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>,
"Liam R . Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@suse.com>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
John Hubbard <jhubbard@nvidia.com>,
Kalesh Singh <kaleshsingh@google.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Park Tae-sun <ts930@dgu.ac.kr>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Sarthak Sharma <sarthak.sharma@arm.com>
Subject: [PATCH RESEND v2 01/12] selftests/mm: mremap_test: remove command line options
Date: Mon, 2 Nov 2026 15:32:00 +0530 [thread overview]
Message-ID: <20261102100211.141831-2-sarthak.sharma@arm.com> (raw)
In-Reply-To: <20261102100211.141831-1-sarthak.sharma@arm.com>
mremap_test supports command line options for changing
the validation threshold and random pattern seed.
As part of a larger series to remove validation threshold
and randomization, remove all command line options from
the test. The test is already invoked without any
arguments in run_vmtests.sh, so no runner changes are
required.
Suggested-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Sarthak Sharma <sarthak.sharma@arm.com>
---
tools/testing/selftests/mm/mremap_test.c | 45 +-----------------------
1 file changed, 1 insertion(+), 44 deletions(-)
diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
index 31b484517bda..15d8f7458251 100644
--- a/tools/testing/selftests/mm/mremap_test.c
+++ b/tools/testing/selftests/mm/mremap_test.c
@@ -1190,49 +1190,9 @@ static void run_mremap_test_case(struct test test_case, int *failures,
}
}
-static void usage(const char *cmd)
-{
- fprintf(stderr,
- "Usage: %s [[-t <threshold_mb>] [-p <pattern_seed>]]\n"
- "-t\t only validate threshold_mb of the remapped region\n"
- " \t if 0 is supplied no threshold is used; all tests\n"
- " \t are run and remapped regions validated fully.\n"
- " \t The default threshold used is 4MB.\n"
- "-p\t provide a seed to generate the random pattern for\n"
- " \t validating the remapped region.\n", cmd);
-}
-
-static int parse_args(int argc, char **argv, unsigned int *threshold_mb,
- unsigned int *pattern_seed)
-{
- const char *optstr = "t:p:";
- int opt;
-
- while ((opt = getopt(argc, argv, optstr)) != -1) {
- switch (opt) {
- case 't':
- *threshold_mb = atoi(optarg);
- break;
- case 'p':
- *pattern_seed = atoi(optarg);
- break;
- default:
- usage(argv[0]);
- return -1;
- }
- }
-
- if (optind < argc) {
- usage(argv[0]);
- return -1;
- }
-
- return 0;
-}
-
#define MAX_TEST 15
#define MAX_PERF_TEST 3
-int main(int argc, char **argv)
+int main(void)
{
int failures = 0;
unsigned int i;
@@ -1261,9 +1221,6 @@ int main(int argc, char **argv)
pattern_seed = (unsigned int) time(&t);
- if (parse_args(argc, argv, &threshold_mb, &pattern_seed) < 0)
- exit(EXIT_FAILURE);
-
ksft_print_msg("Test configs:\n");
ksft_print_msg("threshold_mb=%u\n", threshold_mb);
ksft_print_msg("pattern_seed=%u\n", pattern_seed);
--
2.53.0
next prev parent reply other threads:[~2026-11-02 10:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 10:01 [PATCH RESEND v2 00/12] improve mremap_test Sarthak Sharma
2026-11-02 10:02 ` Sarthak Sharma [this message]
2026-11-02 10:02 ` [PATCH RESEND v2 02/12] selftests/mm: mremap_test: drop munmap() checks from cleanup paths Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 03/12] selftests/mm: mremap_test: simplify errno handling Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 04/12] selftests/mm: mremap_test: use kselftest helpers Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 05/12] selftests/mm: mremap_test: skip test when userfaultfd is unavailable Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 06/12] selftests/mm: mremap_test: fail unexpected mremap successes Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 07/12] selftests/mm: mremap_test: fail on data corruption Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 08/12] selftests/mm: mremap_test: handle cleanup after mmap failures Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 09/12] selftests/mm: mremap_test: remove perf tests and timing Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 10/12] selftests/mm: mremap_test: replace validation threshold with sampled checks Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 11/12] selftests/mm: mremap_test: replace random data with deterministic pattern Sarthak Sharma
2026-11-02 10:02 ` [PATCH RESEND v2 12/12] selftests/mm: mremap_test: strengthen multi VMA validation Sarthak Sharma
2026-11-11 10:13 ` [PATCH RESEND v2 00/12] improve mremap_test Sarthak Sharma
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=20261102100211.141831-2-sarthak.sharma@arm.com \
--to=sarthak.sharma@arm.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=david@kernel.org \
--cc=jhubbard@nvidia.com \
--cc=kaleshsingh@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=ts930@dgu.ac.kr \
--cc=vbabka@suse.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
all inboxes | Powered by JetHome®