[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDQr1E31Gw-x-XTE@kernel.org>
Date: Mon, 26 May 2025 11:52:36 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: pratyush@...nel.org, jasonmiu@...gle.com, graf@...zon.com,
changyuanl@...gle.com, dmatlack@...gle.com, rientjes@...gle.com,
corbet@....net, rdunlap@...radead.org,
ilpo.jarvinen@...ux.intel.com, kanie@...ux.alibaba.com,
ojeda@...nel.org, aliceryhl@...gle.com, masahiroy@...nel.org,
akpm@...ux-foundation.org, tj@...nel.org, yoann.congal@...le.fr,
mmaurer@...gle.com, roman.gushchin@...ux.dev, chenridong@...wei.com,
axboe@...nel.dk, mark.rutland@....com, jannh@...gle.com,
vincent.guittot@...aro.org, hannes@...xchg.org,
dan.j.williams@...el.com, david@...hat.com,
joel.granados@...nel.org, rostedt@...dmis.org,
anna.schumaker@...cle.com, song@...nel.org, zhangguopeng@...inos.cn,
linux@...ssschuh.net, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-mm@...ck.org,
gregkh@...uxfoundation.org, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, rafael@...nel.org, dakr@...nel.org,
bartosz.golaszewski@...aro.org, cw00.choi@...sung.com,
myungjoo.ham@...sung.com, yesanishhere@...il.com,
Jonathan.Cameron@...wei.com, quic_zijuhu@...cinc.com,
aleksander.lobakin@...el.com, ira.weiny@...el.com,
andriy.shevchenko@...ux.intel.com, leon@...nel.org, lukas@...ner.de,
bhelgaas@...gle.com, wagi@...nel.org, djeffery@...hat.com,
stuart.w.hayes@...il.com, ptyadav@...zon.de
Subject: Re: [RFC v2 13/16] luo: add selftests for subsystems un/registration
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.
Powered by blists - more mailing lists