From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72FC6C83F1A for ; Fri, 11 Jul 2025 08:35:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C8CA36B009E; Fri, 11 Jul 2025 04:35:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BC1046B00A0; Fri, 11 Jul 2025 04:35:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A61E36B00A1; Fri, 11 Jul 2025 04:35:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 889FD6B009E for ; Fri, 11 Jul 2025 04:35:06 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 4114DC2B48 for ; Fri, 11 Jul 2025 08:35:06 +0000 (UTC) X-FDA: 83651323812.14.E398038 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf23.hostedemail.com (Postfix) with ESMTP id 9759A140003 for ; Fri, 11 Jul 2025 08:35:04 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=PFZETary; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of broonie@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1752222904; a=rsa-sha256; cv=none; b=dupWbhyW4qDuMQgA2s0eTOPyj/lQnxWjQJGeFbzuUfVdcXSi43NfKU/LnBG1tHUFM6eUi3 1W8A91To8pmUjOPdD0kXAf/ESnLH4K78IqVOFJKrpsw89w8uwA5jbKlOoYoc3R8WGmLIyM Rm8xKX2/oGNz8BvLTwcoiY2w/bY7HqI= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=PFZETary; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of broonie@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1752222904; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vpLjfSix1i7/dGjFxkXv7Egc26qV16I0n3KMf/Zda8g=; b=2Fg/pALpG/yLPVxz8y2UpACFh1Tqfq0jsTPHl1j6RXRBoNuciYR6Ou0lOjnjrukz4tplE0 E2nHUCyElZwPZqMFjpwOkiopirBkM8Weq/Iq+sfpeEIR6DUyh9zjHQXAbSd6SFhCq/9O/f KcKdP121pPl7lKBQy/6tnA98ctVzSD4= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 08656A54D1E; Fri, 11 Jul 2025 08:35:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25F6BC4CEEF; Fri, 11 Jul 2025 08:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752222903; bh=TAy1v2ajYNRGrEGIYaOIVT0gQxyBaqDqSGRU+ULeuMY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PFZETary2Wmb/a1YyTnhMYE2rTNLLfWVHnGKdyQK5sEUkqlK24B7htHKckNKFz+Ej tzsjFbkN2tC9otJUNuBT2X3hBzPQiGjUGzu5L2O74fKJblieiceWp8QJc2nCW63p2n Rej2kDL08IPeiPwU3LPwVuwbmdL/e8AhbWC8WkqpCQM8drQ6A4d8a2mlc0E7S+ej06 KXIIzT7CVpelZxEXOpv5eOVRX/QZSIWKP57uGwYSiKZSomwx9q6dZ2/1763jvR0MxP tMWXK15cBQAVfaO3HufN0I7NwTjKksXmFZgxun8DxMSrEo/SjJRtKQg/wqNvQc6XoG 1APe+34jXP8KQ== Date: Fri, 11 Jul 2025 09:34:38 +0100 From: Mark Brown To: Zi Yan Cc: wang lian , Liam.Howlett@oracle.com, akpm@linux-foundation.org, brauner@kernel.org, david@redhat.com, gkwang@linx-info.com, jannh@google.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, lorenzo.stoakes@oracle.com, p1ucky0923@gmail.com, ryncsn@gmail.com, shuah@kernel.org, sj@kernel.org, vbabka@suse.cz, zijing.zhang@proton.me Subject: Re: [PATCH v3] selftests/mm: add process_madvise() tests Message-ID: References: <48D7AAD0-07C9-4E2D-9171-081A503B47AF@nvidia.com> <20250709123224.6593-1-lianux.mm@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HI5VLhoBXNGsODFu" Content-Disposition: inline In-Reply-To: X-Cookie: Do not cut switchbacks. X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 9759A140003 X-Stat-Signature: tms4fsitd4zsjbo598w5hjpph889fkim X-HE-Tag: 1752222904-709236 X-HE-Meta: U2FsdGVkX19ghZYlLAPWUQIqxLsX9bZ5u1BGHlgdMjIuHfe7tZkRJpcVz6DqoniTSG/UvMIDmilPL3AQt8OdfeULVsPb8INrzb8Gj22AjinfiL41k978Zys7myKQb1f5+iIQ/6/v+apCperuUbff9Zih1BK3p4bxW+PvfFGclJOCQw02LEx6QLkT96ZqYVySnysMUUcOBYuKU+zMjxYbo4mZiRUiRqlgS3dMyGrJ095PH3Ax+2dsykFu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a+KCQL1V+ppA/mPJ8DEHy4cxIwX6fV8MWFaGefsI8FdFIe4VKzM0JpL+0s+OMp3S/sUBTIV8ilS1IDt2X3HRH5Cn3hp7A4WQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: --HI5VLhoBXNGsODFu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 10, 2025 at 12:28:13PM -0400, Zi Yan wrote: > On 10 Jul 2025, at 4:42, Mark Brown wrote: > > On Wed, Jul 09, 2025 at 10:46:07AM -0400, Zi Yan wrote: > >> Right. My /usr/include/sys does not have pidfd.h. IMHO selftests > >> should not rely on userspace headers, otherwise we cannot test > >> latest kernel changes. > > That's not realistic, we need to be able to use things like libc and for > > many areas you'd just end up copying or reimplmenenting the userspace > > libraries. There's some concerns for sure, for example we used to have > Sure. For libraries like libc, it is unrealistic to not rely on it. > But for header files, are we expecting to install any kernel headers > to the running system to get selftests compiled? If we are testing > RC versions and header files might change before the actual release, > that would pollute the system header files, right? Right, for the kernel's headers there's two things - we use a combination of tools/include and 'make headers_install' which populates usr/include in the kernel tree (apparently mm rejects the latter but it is widely used in the selftests, especially for architecture specifics). These install locally and used before the system headers. > > OTOH in a case like this where we can just refer directly to a kernel > > header for some constants or structs then it does make sense to use the > > kernel headers, or in other cases where we're testing things that are > That is exactly my point above. What was said was a bit stronger though, and might lead people down a wheel reinvention path. --HI5VLhoBXNGsODFu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhwzJ4ACgkQJNaLcl1U h9C7egf9FmlKl+ceVeTLDerFTWBe1c6B4gT5syI3bD6wP/vgY4VLzggDjc0Artgp +DOtkHndeNo9/Ie9kttstdqWkkfIyDnhMSDMlNbRZlY+HXlszEHTpjiPryr3/MtM 6UD1jp0dxAFRkiywNwWI3enPqLSukLLUOA6GYYz8oVFR12xZJ+/SHRgzIh6lITZe BNGvKR2AYqsXpfJi3Cbs/Phr7AhycV1qMhGAb7WKiX9ckPskxfqAP6cnvJFUix0Q jrNqEMCefKvsZAOSIzgYJCiBQGTtJs7fHPZef8VtZvZRlFImtWHC5spGxAG6UCPL p4Kcj9xuI4xPBmciCtyIyLDxJNe6nA== =brBx -----END PGP SIGNATURE----- --HI5VLhoBXNGsODFu--