Skip to content

Commit 8d939ae

Browse files
knurdJonathan Corbet
authored andcommitted
docs: verify/bisect: stable regressions: first stable, then mainline
Rearrange the instructions so that readers facing a regression within a stable or longterm series first test its latest release before testing mainline. This is less scary for some people. It also reduces the chance that something goes sideways for readers that compile their first kernel, as mainline can cause slightly more trouble. Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/efd3cb9c68db450091021326bf9c334553df0ec2.1712647788.git.linux@leemhuis.info
1 parent 2bcfd71 commit 8d939ae

1 file changed

Lines changed: 51 additions & 40 deletions

File tree

Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -309,31 +309,32 @@ machine; if you want to compile the kernel on another system, check
309309
.. _rangecheck_bissbs:
310310

311311
* Determine the kernel versions considered 'good' and 'bad' throughout this
312-
guide.
312+
guide:
313313

314-
Do you follow this guide to verify if a bug is present in the code developers
315-
care for? Then consider the mainline release your 'working' kernel (the newest
316-
one you regularly use) is based on to be the 'good' version; if your 'working'
317-
kernel for example is 6.0.13, then your 'good' kernel is 6.0.
314+
* Do you follow this guide to verify if a bug is present in the code the
315+
primary developers care for? Then consider the version of the newest kernel
316+
you regularly use currently as 'good' (e.g. 6.0, 6.0.13, or 6.1-rc2).
318317

319-
In case you face a regression, it depends on the version range where the
320-
regression was introduced:
318+
* Do you face a regression, e.g. something broke or works worse after
319+
switching to a newer kernel version? In that case it depends on the version
320+
range during which the problem appeared:
321321

322-
* Something which used to work in Linux 6.0 broke when switching to Linux
323-
6.1-rc1? Then henceforth regard 6.0 as the last known 'good' version
324-
and 6.1-rc1 as the first 'bad' one.
322+
* Something regressed when updating from a stable/longterm release
323+
(say 6.0.13) to a newer mainline series (like 6.1-rc7 or 6.1) or a
324+
stable/longterm version based on one (say 6.1.5)? Then consider the
325+
mainline release your working kernel is based on to be the 'good'
326+
version (e.g. 6.0) and the first version to be broken as the 'bad' one
327+
(e.g. 6.1-rc7, 6.1, or 6.1.5). Note, at this point it is merely assumed
328+
that 6.0 is fine; this hypothesis will be checked in segment 2.
325329

326-
* Some function stopped working when updating from 6.0.13 to 6.1.5? Then for
327-
the time being consider 6.0 as the last 'good' version and 6.1.5 as
328-
the 'bad' one. Note, at this point it is merely assumed that 6.0 is fine;
329-
this assumption will be checked in segment 2.
330+
* Something regressed when switching from one mainline version (say 6.0) to
331+
a later one (like 6.1-rc1) or a stable/longterm release based on it
332+
(say 6.1.5)? Then regard the last working version (e.g. 6.0) as 'good' and
333+
the first broken (e.g. 6.1-rc1 or 6.1.5) as 'bad'.
330334

331-
* A feature you used in 6.0.13 does not work at all or worse in 6.1.15? In
332-
that case you want to bisect within a stable/longterm series: consider
333-
6.0.13 as the last known 'good' version and 6.0.15 as the first 'bad'
334-
one. Note, in this case you still want to compile and test a mainline kernel
335-
as explained in segment 1: the outcome will determine if you need to report
336-
your issue to the regular developers or the stable team.
335+
* Something regressed when updating within a stable/longterm series (say
336+
from 6.0.13 to 6.0.15)? Then consider those versions as 'good' and 'bad'
337+
(e.g. 6.0.13 and 6.0.15), as you need to bisect within that series.
337338

338339
*Note, do not confuse 'good' version with 'working' kernel; the latter term
339340
throughout this guide will refer to the last kernel that has been working
@@ -392,19 +393,13 @@ machine; if you want to compile the kernel on another system, check
392393

393394
.. _stablesources_bissbs:
394395

395-
* Retrieve the sources for any stable or longterm series you might need.
396-
397-
Is the version you earlier established as 'bad' a stable or longterm release?
398-
Then download the code for the series it belongs to ('linux-6.1.y' in this
399-
example)::
396+
* Is one of the versions you earlier established as 'good' or 'bad' a stable or
397+
longterm release (say 6.1.5)? Then download the code for the series it belongs
398+
to ('linux-6.1.y' in this example)::
400399

401400
git remote set-branches --add stable linux-6.1.y
402401
git fetch stable
403402

404-
If the version earlier established as 'good' is from a different stable or
405-
longterm series (say 6.0.13), repeat the previous step, but this time for the
406-
branch holding the series the 'good' version belongs to (e.g. linux-6.0.y).
407-
408403
.. _oldconfig_bissbs:
409404

410405
* Start preparing a kernel build configuration (the '.config' file).
@@ -545,10 +540,24 @@ be a waste of time. [:ref:`details <introlatestcheck_bisref>`]
545540

546541
.. _checkoutmaster_bissbs:
547542

548-
* Check out the latest Linux codebase::
543+
* Check out the latest Linux codebase.
549544

550-
cd ~/linux/
551-
git switch --discard-changes --detach mainline/master
545+
* Are your 'good' and 'bad' versions from the same stable or longterm series?
546+
Then check the `front page of kernel.org <https://kernel.org/>`_: if it
547+
lists a release from that series without an '[EOL]' tag, checkout the series
548+
latest version ('linux-6.1.y' in the following example)::
549+
550+
cd ~/linux/
551+
git switch --discard-changes --detach stable/linux-6.1.y
552+
553+
Your series is unsupported, if is not listed or carrying a 'end of life'
554+
tag. In that case you might want to check if a successor series (say
555+
linux-6.2.y) or mainline (see next point) fix the bug.
556+
557+
* In all other cases, run::
558+
559+
cd ~/linux/
560+
git switch --discard-changes --detach mainline/master
552561

553562
[:ref:`details <checkoutmaster_bisref>`]
554563

@@ -650,15 +659,15 @@ be a waste of time. [:ref:`details <introlatestcheck_bisref>`]
650659

651660
.. _recheckstablebroken_bissbs:
652661

653-
* Are you facing a problem within a stable/longterm series, but failed to
654-
reproduce it with the mainline kernel you just built? One that according to
655-
the `front page of kernel.org <https://kernel.org/>`_ is still supported? Then
656-
check if the latest codebase for the particular series might already fix the
657-
problem. To do so, check out that series latest version (again, this here is
658-
assumed to be 6.0)::
662+
* Did you just built a stable or longterm kernel? And were you able to reproduce
663+
the regression with it? Then you should test the latest mainline codebase as
664+
well, because the result determines which developers the bug must be submitted
665+
to.
666+
667+
To prepare that test, check out current mainline::
659668

660669
cd ~/linux/
661-
git switch --discard-changes --detach linux-6.0.y
670+
git switch --discard-changes --detach mainline/master
662671

663672
Now use the checked out code to build and install another kernel using the
664673
commands the earlier steps already described in more detail::
@@ -680,7 +689,9 @@ be a waste of time. [:ref:`details <introlatestcheck_bisref>`]
680689
uname -r
681690
cat /proc/sys/kernel/tainted
682691

683-
Now verify if this kernel is showing the problem.
692+
Now verify if this kernel is showing the problem. If it does, then you need
693+
to report the bug to the primary developers; if it does not, report it to the
694+
stable team. See Documentation/admin-guide/reporting-issues.rst for details.
684695

685696
[:ref:`details <recheckstablebroken_bisref>`]
686697

0 commit comments

Comments
 (0)