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 9017DC5AE59 for ; Tue, 3 Jun 2025 18:27:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 12B8C6B0085; Tue, 3 Jun 2025 14:27:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DCA66B0089; Tue, 3 Jun 2025 14:27:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01A126B0088; Tue, 3 Jun 2025 14:27:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C91A76B04E9 for ; Tue, 3 Jun 2025 14:27:29 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4C5E0EEA77 for ; Tue, 3 Jun 2025 18:27:29 +0000 (UTC) X-FDA: 83514922218.08.E0E89DC Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id 96FFC140013 for ; Tue, 3 Jun 2025 18:27:27 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=VJApOzfh; spf=pass (imf26.hostedemail.com: domain of broonie@kernel.org designates 139.178.84.217 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=1748975247; 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=dmwuBj2ieNXWYYhpbWwBHR3h+wlmTuedp4QIRQP+D9U=; b=O8w2Iar/9ADrOy+6cdbbnPpUpYpHl8/CRc7yzDPv6ECSusnCXV2Ix9RFnTGzc0i8WznksE CjtRXLo7hbBZ5YFaBcIj4R8+NINlOcUPEacuJA0J97AGyT0lvsvicW82uPdHhXYcHYdl2t rYxZwGtWSnmfN3Pbari6VUrdubdFLF0= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=VJApOzfh; spf=pass (imf26.hostedemail.com: domain of broonie@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1748975247; a=rsa-sha256; cv=none; b=mnuaRwb/KwLr49szQ5nBzQnvyvl0H1Y5M34v2BxfrfkpFMzAocvD0NRS9jbgciHckBd5Al mJB9ioulUWbTY0xJB38cajWqA2FkaA5OMNkXusg2hDkc268XNkJuy5knF8LLxYNgp5/8e+ EyTx+1iKPX5s0SfNNXAwIBMEoejUFdw= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B6B785C5A84; Tue, 3 Jun 2025 18:25:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C77AC4CEED; Tue, 3 Jun 2025 18:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748975246; bh=ckhw827S1BHIzOOsklyV4f5zZYq6GzhskiPmH9tlxgI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VJApOzfhV9fbEzynGEdok9VjWoCb7Zo0WIq1Yo4MAW8HsrK5lfqLh3IgF33b0Oyo5 UQn885AEGJZfooJizhCV84rKMjABAFcv1NuxQ2W9gACRBxXg184Hyo2Hr9luVRFk41 dcdPfQYGPjbn2tLoeZGofz7MauWnlJ/pajRWdMKX4gue+RSHF3CS/rZwmsT6fryRiz D9W/83FRVkjQSd462IuobALHZE8IPZR86PEZjaQ7tqsF6NkycgvoHM7hMqIDhRSxnB NYabQVJDdJSLO0Qskpz8l+ETWZlY3RgCBP3Kxq/Aswh/sXqx9bqwwnFTypxx6yZn7f i8NPPUHDYBakQ== Date: Tue, 3 Jun 2025 19:27:20 +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 2/4] selftests/mm: Add helper for logging test start and results Message-ID: <5e00c276-2d3b-4004-9f98-4703e2d642f9@sirena.org.uk> References: <20250527-selftests-mm-cow-dedupe-v2-0-ff198df8e38e@kernel.org> <20250527-selftests-mm-cow-dedupe-v2-2-ff198df8e38e@kernel.org> <63e00cf8-8592-4117-bb27-42bc8c1f8921@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="U87MoMgTYp3o0nhz" Content-Disposition: inline In-Reply-To: <63e00cf8-8592-4117-bb27-42bc8c1f8921@redhat.com> X-Cookie: Avec! X-Rspamd-Queue-Id: 96FFC140013 X-Stat-Signature: wpb9f1n7ie4hauige43y47ejqd5u6s11 X-Rspam-User: X-Rspamd-Server: rspam07 X-HE-Tag: 1748975247-947011 X-HE-Meta: U2FsdGVkX19ss7ubBgu25URULdqE8ksUTuiDwJBiDTp8E6IdqTdAtQZ69K4xrtQz30U1mNNZqrecWn4YFDJsYwNKAf50OldMshrNXSDekwuu0pLmLWVkiVvGSl5dC4u/MXDwrJQ91rtYy351b3kdTJCcTDwa9Z4Lmu70Ii8n5apKjNstNHXEiUBzdGWSdOz/f84eiKEC4owPtLKwK6NPvmJrAmS6lxpl3IB+ksXXZut6hruYfAJqclEI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000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: --U87MoMgTYp3o0nhz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 03, 2025 at 02:37:41PM +0200, David Hildenbrand wrote: > On 27.05.25 18:04, Mark Brown wrote: > > +static char test_name[1024]; > > + > > +static inline void log_test_start(const char *name, ...) > > +{ > > + va_list args; > > + va_start(args, name); > > + > > + vsnprintf(test_name, sizeof(test_name), name, args); > > + ksft_print_msg("[RUN] %s\n", test_name); > We could allocate the array in log_test_start() and free it in > log_test_result(). Then, we could assert more easily that we always have a > log_test_result() follow exactly one log_test_start() etc. We could, however we don't have vasprintf() in nolibc and people have been doing work towards making nolibc more generally useful as a libc for the selftests (and/or the selftest interfaces more friendly to nolibc). I don't really know what the end goal with that is but given the fairly small gain and the hope that this won't be a long term framework for anything I'd rather not add something that gets in the way of whatever's going on there. Ideally the test programs would be refactored and these helpers deleted, but as we said previously that's a bigger job that neither of us is likely to get to in the short term :( --U87MoMgTYp3o0nhz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmg/PogACgkQJNaLcl1U h9B5Kgf5AUmj3DzX7FVW0uxuQnTuNoG9OfKh4yzJffzPIA7Z+MnjQgY9tahrBn81 wgz4LO7oLOyIy7fKV4YJqDKzxa5HluHG2uNQ7eHxMpgjD4vVD3/BjM4yWlWPMA0h KYXvf60i08dIoKyK67/XnWO8Vu1l8oz7ecj91UGMD962hzRDU6ZkTpq/eOAww5vC zA4eSj1fHA+HBINxxrOfd1FWvTUEOF2pemHv5W96eZXVukmCYb1C4uPCProQ2nqy jNIrIkZdII3SwcurjSZWn2FEpwMgeTJR3iDo/XSfYN9gfx4np+HATvvCbmx4nkd+ GDPOC/WHvte6MK6g4NopNT+ZUkTZ4Q== =VuyZ -----END PGP SIGNATURE----- --U87MoMgTYp3o0nhz--