Re: [PATCH] selftests: cpufreq: Disable the runner timeout
From: Rafael J. Wysocki (Intel)
Date: Fri Nov 20 2026 - 11:56:38 EST
On Tue, Nov 17, 2026 at 6:30 AM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> On 13-11-26, 16:39, Gyokhan Kochmarla wrote:
> > cpufreq_basic_tests() reads and writes every policy file, offlines and
> > onlines every non-boot CPU five times, and then shuffles all
> > frequencies and governors of every policy. The amount of work scales
> > with the number of CPUs, but the test runs under the default 45 second
> > kselftest timeout.
> >
> > On large systems the hotplug loop alone does not fit. On a 256 CPU x86
> > machine each offline/online pair takes about 0.5 seconds, so the
> > reboot_cpus 5 step needs more than 10 minutes. Even with the timeout
> > raised to 180 seconds it is killed in the second of the five loops,
> > and the frequency and governor tests never run:
> >
> > not ok 1 selftests: cpufreq: main.sh # TIMEOUT 180 seconds
> >
> > A larger fixed value would only move the problem to the next bigger
> > machine. The basic test has a fixed number of iterations and does not
> > wait on external events, so disable the timeout with timeout=0, as
> > ftrace, timers and net/forwarding already do.
> >
> > Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test")
> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Gyokhan Kochmarla <gyokhan@xxxxxxxxx>
> > ---
> > tools/testing/selftests/cpufreq/settings | 5 +++++
> > 1 file changed, 5 insertions(+)
> > create mode 100644 tools/testing/selftests/cpufreq/settings
> >
> > diff --git a/tools/testing/selftests/cpufreq/settings b/tools/testing/selftests/cpufreq/settings
> > new file mode 100644
> > index 000000000000..d3e07370a7e4
> > --- /dev/null
> > +++ b/tools/testing/selftests/cpufreq/settings
> > @@ -0,0 +1,5 @@
> > +# The basic test hotplugs every non-boot CPU five times and then walks
> > +# all frequencies and governors of every policy, so its runtime grows
> > +# with the number of CPUs. No fixed timeout fits every machine, and the
> > +# test always terminates on its own, so disable the runner timeout.
> > +timeout=0
>
> Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
Applied as 7.5 material, thanks!