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 7084FC5AD49 for ; Mon, 26 May 2025 08:53:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B7D856B0089; Mon, 26 May 2025 04:53:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B2DEF6B008A; Mon, 26 May 2025 04:53:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FA6A6B008C; Mon, 26 May 2025 04:53:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7C4846B0089 for ; Mon, 26 May 2025 04:53:01 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1141C1D054D for ; Mon, 26 May 2025 08:53:01 +0000 (UTC) X-FDA: 83484444162.16.028D38A Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf11.hostedemail.com (Postfix) with ESMTP id 6228640002 for ; Mon, 26 May 2025 08:52:59 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iF9pvvSu; spf=pass (imf11.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@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=1748249579; 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=dqc8J1niAUiNxTJRJ/gQB5GNzq4vwBxjcmjICm602GA=; b=VbUyVadcPlPvS4WwRBK420U65v7Bsb4yGyA5CeFnGfKUVvzsEferOwxF69OPEehYP3serU qAWTwSOLm0RXzJHBPehrjHWgjcRzEI7EM/+v5BN8QGJMMKs915/znjTVfoux3dYuEREpFf LDs5DswaF/kYeWDazCfpb9GTLICUNvA= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iF9pvvSu; spf=pass (imf11.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1748249579; a=rsa-sha256; cv=none; b=kpycZxvfAkVFSAKs0o2H62qD915dNxyE6/ncxjbBdNuxfSf/q2WailKHiisqqLDYDsYLx9 1Hhe56Bil7YZPKkKVcCHwcB0IUsWffTic6hUfBIvnVe5e4RuMkzvJz8RHO5HX2+kFOKAAm OWSEaYBu2jtD0zHUuGEH+Qrj5mo9Zn8= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1FF4D5C4B0B; Mon, 26 May 2025 08:50:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC087C4CEE7; Mon, 26 May 2025 08:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748249577; bh=VfuSt7kKM5zbhq1CtSFslTThQxTeKYACMDUcF/4c7eg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iF9pvvSuPzCA2oalIkwuKSJQlORfPKX5Dg3FIVu1zdLk0eh8sB7gAvfRFPFEuZ5ZS VYfu/QUO85MaiFokb3R02Mr/oQPqThly24t98vvm4vaAOuSyr4UfRPVYpuUx4ctewt /m4WfLmw2gTRK3g3tL4KLALrLQzAw+WJ3W98uEErQVuELu2BWcF1DKlJqIlRp5eSFG yn5fUUPBwnu5nR3UXbJ2x6nbyvc77P8Y6bVnzkwWkkqx0ZcSErS0ejDS67NNq/gE+d aRZ9scgA5O3XNCGu49Fo1t0WQzlDw4u0EWqF6V4966NRifSKTSJu9DQu0s6PH9Vkbv 0yyWz5yWV9/Ow== Date: Mon, 26 May 2025 11:52:36 +0300 From: Mike Rapoport To: Pasha Tatashin Cc: pratyush@kernel.org, jasonmiu@google.com, graf@amazon.com, changyuanl@google.com, dmatlack@google.com, rientjes@google.com, corbet@lwn.net, rdunlap@infradead.org, ilpo.jarvinen@linux.intel.com, kanie@linux.alibaba.com, ojeda@kernel.org, aliceryhl@google.com, masahiroy@kernel.org, akpm@linux-foundation.org, tj@kernel.org, yoann.congal@smile.fr, mmaurer@google.com, roman.gushchin@linux.dev, chenridong@huawei.com, axboe@kernel.dk, mark.rutland@arm.com, jannh@google.com, vincent.guittot@linaro.org, hannes@cmpxchg.org, dan.j.williams@intel.com, david@redhat.com, joel.granados@kernel.org, rostedt@goodmis.org, anna.schumaker@oracle.com, song@kernel.org, zhangguopeng@kylinos.cn, linux@weissschuh.net, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, gregkh@linuxfoundation.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, rafael@kernel.org, dakr@kernel.org, bartosz.golaszewski@linaro.org, cw00.choi@samsung.com, myungjoo.ham@samsung.com, yesanishhere@gmail.com, Jonathan.Cameron@huawei.com, quic_zijuhu@quicinc.com, aleksander.lobakin@intel.com, ira.weiny@intel.com, andriy.shevchenko@linux.intel.com, leon@kernel.org, lukas@wunner.de, bhelgaas@google.com, wagi@kernel.org, djeffery@redhat.com, stuart.w.hayes@gmail.com, ptyadav@amazon.de Subject: Re: [RFC v2 13/16] luo: add selftests for subsystems un/registration Message-ID: References: <20250515182322.117840-1-pasha.tatashin@soleen.com> <20250515182322.117840-14-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250515182322.117840-14-pasha.tatashin@soleen.com> X-Rspam-User: X-Rspamd-Queue-Id: 6228640002 X-Rspamd-Server: rspam09 X-Stat-Signature: xsg6iore8jz9efwwicm4w4wgmgukr8z7 X-HE-Tag: 1748249579-119647 X-HE-Meta: U2FsdGVkX1/74lWo6hMekqod8PQQP9fYmFxNKJeVe+JeCNbqS8HPEw5kuzUvHKm4InpGudrUN4Mr023CKbx2LFFVaPDlY9gEOD9tFlTUqbQr0HcRAF1R2K7WEelaiG4KZYaxdM45yf8cJ+pD/2Z5xrNfLSoMy5bvyB4TllZplxIeKGpzsTO4AHoBcmvmCazCoE3ZgK+kr9JMjOdYFixj94zxMv8UbgBnMHXWsBMyiap1gK5t4l9cJWO5hZ3sKwwxlrqwJZxL10vNyGdMYoabHE+9oj6/kObPBEdD2UYhv6jPxx/gj9DaB6k1MX0NmfkdOYsXc34FM2vGcrZtwGi/pQxs3mCHs78gZggy1XVJVHkkEZIkAOFWC+QOaDxfaSU4Rc24a8kvIfE1eiNeBJ6s+HsvFByorxDVN3SO34RZo/cLG1tWDTTMMnbsRFg5r3GTYDdiNzy+RjbMXCATcV9TBYSLeJsvJMbtvKHYUeIMt4oYCQY5BBptWTYs5hJW0PbiiWOrDnlhTsYke3xj5/GMQ3yzpaHdLCIkn+Uu5jsMg4TJESdeMe/l3GPJuSGo/VByyeCm7Fn58MuIQejJgh+COeLDSAVLASm/5M8yVB1BLGc2DwItxG0ze/Bcq0rgRFVFwcWjy/YrKRlg+os1cZecBh42ux+GqFIjrOmrjEIwSbMZ66balwDVJm2V5mJ9HieJtwEBxdnszddlw/niyK0BHBib6mu7TytaUWQtdkhJd/CsrHVSu/085Htg27fAtIOmsG3D0PbbH5Fu9yYjCPXpLa4NKX1egoG8BEPVlTFFweAAAFj6M6kyulxWiTLEC8RAYDSgowlcqIJrbSdOKUutqve5Fay/LB6Q1n40z7j1F+z+q85dsZ2SIk3WMBQpsnyp9v2Gj+xrh+JsMRopCxvK0ICO0bIjcZxLAHqHv6RcFRdFvNZe7aMFPE1uzN8WecFBiNlL3oHiLI5xGw+yiAe UpvdT58p G8MffRTDCcc6BPSiUYYyBi1F2C4HMwI3e37evaYwnlC3/gD02ahpMe52lqPRqarK41yhDoqMW8M+Ijz2f98KB8t7JfUCP71/h586wMLidfroqG+yTRDQnj2kmNqTAgLC20K68DptMv2C3OnKeZCVi8D4de4uPVdV/KlSFYsR89i2EXJ6pG+HAZt8OdQMJ24DpFlxty34livDLhKUcLIkgsIb4vKUXiLVKXU+aeN+28irQufK4WWBQY1cHAag/jJ0BV04aDqlAAq6kkau2V747902uaWtiHCvyyg3Z6TPoKZROPeWY+gZuGeD65t1z+nKxxJctcX+FO1NHw20= 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: On Thu, May 15, 2025 at 06:23:17PM +0000, Pasha Tatashin wrote: > Introduce a self-test mechanism for the LUO to allow verification of > core subsystem management functionality. This is primarily intended > for developers and system integrators validating the live update > feature. > > The tests are enabled via the new Kconfig option > CONFIG_LIVEUPDATE_SELFTESTS (default 'n') and are triggered through > a new ioctl command, LIVEUPDATE_IOCTL_SELFTESTS, added to the > /dev/liveupdate device node. > > This ioctl accepts commands defined in luo_selftests.h to: > - LUO_CMD_SUBSYSTEM_REGISTER: Creates and registers a dummy LUO > subsystem using the liveupdate_register_subsystem() function. It > allocates a data page and copies initial data from userspace. > - LUO_CMD_SUBSYSTEM_UNREGISTER: Unregisters the specified dummy > subsystem using the liveupdate_unregister_subsystem() function and > cleans up associated test resources. > - LUO_CMD_SUBSYSTEM_GETDATA: Copies the data page associated with a > registered test subsystem back to userspace, allowing verification of > data potentially modified or preserved by test callbacks. > This provides a way to test the fundamental registration and > unregistration flows within the LUO framework from userspace without > requiring a full live update sequence. I don't think ioctl for selftest is a good idea. Can't we test register/unregister and state machine transitions with kunit? And have a separate test module that registers as a subsystem, preserves it's state and then verifies the state after the reboot. This will require running qemu and qemu usage in tools/testing is a mess right now, but still. -- Sincerely yours, Mike.