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 E7EA3C5AD49 for ; Tue, 3 Jun 2025 13:21:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8AD956B044A; Tue, 3 Jun 2025 09:21:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 85E116B044C; Tue, 3 Jun 2025 09:21:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 774DD6B044D; Tue, 3 Jun 2025 09:21:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 5D5B16B044A for ; Tue, 3 Jun 2025 09:21:29 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0F66C120993 for ; Tue, 3 Jun 2025 13:21:29 +0000 (UTC) X-FDA: 83514151098.24.822BC81 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf02.hostedemail.com (Postfix) with ESMTP id 3DCF080005 for ; Tue, 3 Jun 2025 13:21:27 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dht3Pp93; spf=pass (imf02.hostedemail.com: domain of broonie@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1748956887; 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=Sdx5GR3ttXYidjg4tIjqo3xYqn+WsgvjZSo0aTfBWFk=; b=vz7KZhnoJXc35qqKK95/Q61dCc0G3WFFenNJibokgYau/2QsQcM5u0hxz9e72jzMZkxuys TekZhlK0qtvRKwvqORn+uMbRhJ4rKXzrLGvyIlFELOJ05Yarsmk/GNqocxUusdjY+Hae8m bUZdKkoVHFmtiDqCbVHMuykLz16RszE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1748956887; a=rsa-sha256; cv=none; b=1dY0TCGMh905A08FoYZwXS2+8lnbW4L1dl7D08J+pdfJpWvj9YVvi5W+oKvCPnYCdQn5uu F9JzszLE8OzdQKAYEu9LoqtfwiRzxGhSqxf0PTlQVqfO+wJhjt/SkcSenzk4Sog7wsbVNW eCogzfAjyGDsTs/Uw6f4pyaIZ0LYU0g= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dht3Pp93; spf=pass (imf02.hostedemail.com: domain of broonie@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 1D2C244C65; Tue, 3 Jun 2025 13:21:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79F95C4CEED; Tue, 3 Jun 2025 13:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748956886; bh=zH4rUyvq8kOPfx1d1qPsT3TCt7wQNpsiju3FOhyNFCQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dht3Pp931bj65euV99zmThwCaRTyizAb+Jan0MzDsI8jPYpT/7k+RwXq34aF3Rr4w +fvYFNDVUmsw1dgmKRJ0h4h9mYSsNA/0hgOCgcFDVH8UzVjVBCj9kQUlCUTcZkFg7m 05z0UG4j9eaxtvBdqWjz4K/JyfS6iVdJVtIkig5sLp7HDJIKE4IrUt+gZMG8XNdL6e AvnuZO0A7XCqCFWq+b3b5duJVDHhUy0/2TnS5iGTp1qX1EebT1YroY3BqvIjhoGSJ6 KhkcD1oHSSPWuR1A1Onr2WvJbtZPMBKrzQaraQ8ErCmsmAij2uCnOS8UBNzcZQdFNx 5NlA3MeYaa3Cg== Date: Tue, 3 Jun 2025 14:21:21 +0100 From: Mark Brown To: David Hildenbrand Cc: Andrew Morton , Shuah Khan , Lorenzo Stoakes , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test Message-ID: <9961082f-848d-43d3-b97d-3df675ca4415@sirena.org.uk> References: <20250527-selftests-mm-cow-dedupe-v2-0-ff198df8e38e@kernel.org> <20250527-selftests-mm-cow-dedupe-v2-3-ff198df8e38e@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6FZ12iParXl9eD5E" Content-Disposition: inline In-Reply-To: X-Cookie: Avec! X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3DCF080005 X-Stat-Signature: sh4xq4ryaokqugg1czfh8prxuz6b3eb8 X-Rspam-User: X-HE-Tag: 1748956887-211256 X-HE-Meta: U2FsdGVkX19774dSoS6bPqA4TTPSk4kZxNfSsdu8HjZdhzp+b6WHKRM5EDnzJenNgTVNZ8evu3FZgB5qX/a21dRn+YnGrXtUK7r9bIVpqSjE1P+w1LGL9lg4l3YhNtJXGfn/APRl/C+xSWuPMHxb5IG2C5rxW3IZKNwlXNsPUtmhD1QkZJebG9lnH6uC6NBDfBtW3qedOSn+GPxiGV3t44C6BPMH7KLfs5CAZJ4Uh/sDa17xTKOextQYT/4JHw+ZRfHFrhD5tWbb1KpwFrS6baNKWKGbDgTllSNqwhGCFEjbRDEyTE/p+EuqYvfERdHiFJy13+amyAVBtXit/zaVYGhUXU+GdSXck6FJSwweX3AyJ4gVQyUwMrPWN++VfMzrIZWKX7zXWCph3/Tek6bJ+tmPKHmTHaVmFmlfdKrfCuMcys0mX32m74g8oFKIUZdQGgO4MKo6xN9UK/UwLOdVUPI2YvaTwFk/xjRtOkcZkC7VkmfrL+C34MwznSC2DQqiSFDhsR3eLJz2kpygyhG4SUrV99Ki4h59E5ExixPX0t4QCNRZyeUa4s+bC0A9N8ayosTNhyItiMUOkJRpPS48xN8zAzxrVZxOYj4wecYx09X076/4eCbDM7aMETJd5NCBWsVqU2Eu4A4X7x4aeW/rwIDcde2zb2Xqdogzh7rB9h4eh46/xmM697f+bqrnz+a+3QkkuxX18BIflmxE0aSmHXFuIXegRUCo5sgF+gOwGIcOowQw0OxMyt5zLBILn6jjtaY/iJXvlFwriwIbVy2X8lB4TZz021B0orvcHt2j9ATM74JDKiq66IAtvhGCpYBw/pnTHNludTH/php7RlBNoo9k5yxCioKo784P9QNjqfwHbvsJN+XhZiQ5O1+R7wAo5vTzPDNlQJAPnW6r+JzimzH0JGhu3mCCf0laLU+wxigm54ljV26qj6m4RWFydhT1t0Kq2kCRAN/Ws1Rzlqe fK+k8AJu AjPjwoWJFiBPuZTjRQgQE0vhEEuUnGmYb9RzPRRm1yhlDg5h09ftuX6Cg/RfNPxlYo+zTU9rJPTaLfHtaAMfQLj4kELbwHhsk3czJ2b2OheGVy7//+tjom82Ait36obxuFIfoGQHZPUxdC/gH2LXe99JYetk/ksEeOEw19G2LLoexgTjNJH2EqzCG7Pvc+dTuO4NBFZ2ipPcsHlwFFeqvPPrbksX71RyDZ5qZmOGHpLxSJagTBmqfLuff9/p3B/wKH+wQzmn62wHFwRoLi1nDDpQcbooBOT8LqWEX4E3yNbG8vr5nQhjJfAd2Xg== 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: --6FZ12iParXl9eD5E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 03, 2025 at 02:51:45PM +0200, David Hildenbrand wrote: > On 27.05.25 18:04, Mark Brown wrote: > > ret = mprotect(mem, size, PROT_READ); > > - ret |= mprotect(mem, size, PROT_READ|PROT_WRITE); > > if (ret) { > Not sure if that change is really required: if the second mprotect succeeds, > errno should not be updated. At least if my memory is correct :) > Same applies to similar cases below. I thought about checking to see if that was guaranteed to be the case, then I thought that if that wasn't clear to me right now without checking it probably also wasn't going to be obvious to future readers so it was better to just write something clear. Previously we didn't report errno so it didn't matter. > > } else { > > - ksft_test_result_fail("Leak from parent into child\n"); > Same here and in other cases below (I probably didn't catch all). > We should log that somehow to indicate what exactly is going wrong, likely > using ksft_print_msg(). Can you send a patch with the logging that you think would be clear please? I dropped these because they just seemed to be reporting the overall point of the test, unlike the cases where we ran into some error during the setup and didn't actually manage to perform the test we were trying to do. Perhaps the tests should be renamed. > > tmp = malloc(size); > > if (!tmp) { > > - ksft_test_result_fail("malloc() failed\n"); > > + ksft_print_msg("malloc() failed\n"); > perror? malloc() can only set one errno. --6FZ12iParXl9eD5E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmg+9tAACgkQJNaLcl1U h9ALZwf+KcO2BAip9nr8HfmSM0LrVxshV2/1yhu+F0+8i7WhuFXk+1gK/ub0Ue0F IhbjYpgC19NQXStOO+NNyG3VJ8ldaOZL3225ADsAjUT+0e7mKaDI3oW2XKNGQOK8 XCi0/c2xaSCRyANRmYvVHGdzwDqmGZMNDBucCKdr9OZk80s2899XAFqQV35Wp2zV 71B0pJeaiW0Leb2ym6pzfr6mq/+0FBaEFwk/J14FvzBsyVQYTXPM/WVGbcyW+iEb xpdn2cWjA1JRkzA6P/AA7Qhler6UxFACZ2HiVDrlOSP0fNQMFOqw3Im07giphodQ QONqZpVJ4ofJp/RM1pN29stc12RnXA== =eR7D -----END PGP SIGNATURE----- --6FZ12iParXl9eD5E--