From: Peter Xu <peterx@redhat.com>
To: John Hubbard <jhubbard@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Shuah Khan <shuah@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 10/11] selftests/mm: move uffd* routines from vm_util.c to uffd-common.c
Date: Mon, 5 Jun 2023 11:59:12 -0400 [thread overview]
Message-ID: <ZH4GUODwj9L9paey@x1n> (raw)
In-Reply-To: <20230603021558.95299-11-jhubbard@nvidia.com>
On Fri, Jun 02, 2023 at 07:15:57PM -0700, John Hubbard wrote:
> Move the uffd*() routines to their natural home. Note that
> ksm_functional_tests.c also depend, intentionally (due to a recent
> commit [1]), upon uffd-common.[ch].
>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Peter Xu <peterx@redhat.com>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> ---
> tools/testing/selftests/mm/Makefile | 7 +-
> tools/testing/selftests/mm/hugepage-mremap.c | 2 +-
> .../selftests/mm/ksm_functional_tests.c | 2 +-
> tools/testing/selftests/mm/uffd-common.c | 105 ++++++++++++++++++
> tools/testing/selftests/mm/uffd-common.h | 12 +-
> tools/testing/selftests/mm/vm_util.c | 104 -----------------
> tools/testing/selftests/mm/vm_util.h | 10 --
> 7 files changed, 122 insertions(+), 120 deletions(-)
>
> diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
> index 23af4633f0f4..a15572758954 100644
> --- a/tools/testing/selftests/mm/Makefile
> +++ b/tools/testing/selftests/mm/Makefile
> @@ -109,8 +109,11 @@ include ../lib.mk
>
> $(TEST_GEN_PROGS): vm_util.c
>
> -$(OUTPUT)/uffd-stress: uffd-common.c
> -$(OUTPUT)/uffd-unit-tests: uffd-common.c
> +$(OUTPUT)/uffd-stress: uffd-common.c
> +$(OUTPUT)/uffd-unit-tests: uffd-common.c
> +$(OUTPUT)/hugepage-mremap: uffd-common.c
> +$(OUTPUT)/write_to_hugetlbfs: uffd-common.c
> +$(OUTPUT)/ksm_functional_tests: uffd-common.c
Sorry, John, I still cannot follow..
As I said before uffd-common.[ch] was for uffd stress/unit tests. I
confess my fault to not have named it uffd-test-common.[ch] already.
I think it's fine to keep uffd_*() helpers in vm_util.[ch] for now, until
it grows. Just like if one day we'll have a pagemap.c test we don't
necessary need to move pagemap_*() helpers from vm_utils.[ch] into
pagemap.[ch]. It just keeps common test helpers.
Can we avoid linking those into other tests in whatever way? Maybe
renaming it to uffd-test-common.[ch] may be cleaner?
--
Peter Xu
next prev parent reply other threads:[~2023-06-05 16:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-03 2:15 [PATCH v2 00/11] A minor flurry of selftest/mm fixes John Hubbard
2023-06-03 2:15 ` [PATCH v2 01/11] selftests/mm: fix uffd-stress unused function warning John Hubbard
2023-06-03 2:15 ` [PATCH v2 02/11] selftests/mm: fix unused variable warnings in hugetlb-madvise.c, migration.c John Hubbard
2023-06-05 11:35 ` David Hildenbrand
2023-06-05 15:41 ` Peter Xu
2023-06-03 2:15 ` [PATCH v2 03/11] selftests/mm: fix "warning: expression which evaluates to zero..." in mlock2-tests.c John Hubbard
2023-06-05 11:36 ` David Hildenbrand
2023-06-05 15:43 ` Peter Xu
2023-06-05 19:23 ` John Hubbard
2023-06-03 2:15 ` [PATCH v2 04/11] selftests/mm: fix invocation of tests that are run via shell scripts John Hubbard
2023-06-03 2:15 ` [PATCH v2 05/11] selftests/mm: .gitignore: add mkdirty, va_high_addr_switch John Hubbard
2023-06-05 15:53 ` Peter Xu
2023-06-05 19:13 ` John Hubbard
2023-06-03 2:15 ` [PATCH v2 06/11] selftests/mm: fix two -Wformat-security warnings in uffd builds John Hubbard
2023-06-05 11:37 ` David Hildenbrand
2023-06-05 15:55 ` Peter Xu
2023-06-03 2:15 ` [PATCH v2 07/11] selftests/mm: fix a "possibly uninitialized" warning in pkey-x86.h John Hubbard
2023-06-03 2:15 ` [PATCH v2 08/11] selftests/mm: fix uffd-unit-tests.c build failure due to missing MADV_COLLAPSE John Hubbard
2023-06-04 4:27 ` John Hubbard
2023-06-03 2:15 ` [PATCH v2 09/11] selftests/mm: move psize(), pshift() into vm_utils.c John Hubbard
2023-06-03 2:15 ` [PATCH v2 10/11] selftests/mm: move uffd* routines from vm_util.c to uffd-common.c John Hubbard
2023-06-05 11:38 ` David Hildenbrand
2023-06-05 15:59 ` Peter Xu [this message]
2023-06-05 19:09 ` John Hubbard
2023-06-05 19:24 ` Peter Xu
2023-06-05 19:28 ` John Hubbard
2023-06-03 2:15 ` [PATCH v2 11/11] Documentation: kselftest: "make headers" is a prerequisite John Hubbard
2023-06-05 11:38 ` David Hildenbrand
-- strict thread matches above, loose matches on Subject: below --
2023-06-20 1:17 [PATCH] mm/memory_hotplug.c: don't fail hot unplug quite so eagerly John Hubbard
2023-06-20 1:17 ` [PATCH v2 10/11] selftests/mm: move uffd* routines from vm_util.c to uffd-common.c John Hubbard
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=ZH4GUODwj9L9paey@x1n \
--to=peterx@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nathan@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.