Re: [PATCH v1] thermal: Introduce a debugfs-based testing facility

From: Rafael J. Wysocki
Date: Mon Aug 19 2024 - 09:50:15 EST


On Fri, Aug 2, 2024 at 8:05 PM Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> wrote:
>
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> Introduce a facility allowing the thermal core functionality to be
> exercised in a controlled way in order to verify its behavior, without
> affecting its regular users noticeably.
>
> It is based on the idea of preparing thermal zone templates along with
> their trip points by writing to files in debugfs. When ready, those
> templates can be used for registering test thermal zones with the
> thermal core.
>
> The temperature of a test thermal zone created this way can be adjusted
> via debugfs, which also triggers a __thermal_zone_device_update() call
> for it. By manipulating the temperature of a test thermal zone, one can
> check if the thermal core reacts to the changes of it as expected.
>
> Concise "howto" documentation is included in one of the source files.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> ---
>
> In its current form, this is quite limited, but still quite useful at
> least for me. In the future, it can be extended to allow "mock" test
> cooling devices to be registered and bound to trip points in "mock"
> test thermal zones, so that governor response can be tested at least
> in some scenarios. On top of that, a test scripts can be developed
> for automated testing of the thermal core. IOW, it's just a start.

Due to the lack of comments for the last 2 weeks I gather that this is
not controversial.

Since I want it in, I'll go ahead and put it into my linux-next
branch, but if there are any comments still, please let me know.