#128 First draft of 'how to do a kernel regression test'
Merged 4 years ago by pbokoc. Opened 5 years ago by giardia.
fedora-docs/ giardia/quick-docs howto-kernel-test  into  master

fix typo
Fabrizio Pasqualin • 4 years ago  
* more clear path for test suite on test image
Fabrizio Pasqualin • 4 years ago  
rebasing
Fabrizio Pasqualin • 4 years ago  
Guide is now focusing more on Kernel Test Days
Fabrizio Pasqualin • 4 years ago  
file modified
+1 -1
@@ -58,7 +58,7 @@ 

  * xref:kernel/overview.adoc[Kernel]

  ** xref:kernel/troubleshooting.adoc[Troubleshooting]

  ** xref:kernel/build-custom-kernel.adoc[Building a Custom Kernel]

- 

+ ** xref:kernel/howto-kernel-testday.adoc[Guide for Kernel Test Days]

  

  

  * Virtualization

@@ -0,0 +1,117 @@ 

+ Kernel Test Days

+ ================

+ Author Name <giardia@fedoraproject.org>

+ 2019-04-08

+ :description: A quick guide for Kernel Test Days.

+ :toc:

+ :compat-mode!:

+ 

+ During *Kernel Test Days*, contributors are asked to run a _Kernel Regression Test_ which will help to detect and troubleshoot any issue with a new kernel version, before wider usage.

+ It consist in running a series of tests provided by the https://pagure.io/kernel-tests[Kernel Test Suite]

+ 

+ The main goal of a Kernel Test Day is to test a new kernel on many different machines as possible, so every new Kernel Test Day is announced some days in advance with a https://fedoramagazine.org/[fedoramagazine] post.

+ 

+ == What to do during Kernel Test Days

+ 

+ The first thing to do is to get the right kernel version to test.

+ There are different ways to get the kernel and test it:

+ 

+ === Using a test day image

+ 

+ During test days a dedicated wiki page will provide a link to download a *test day image* which is a live distro of Fedora with the kernel version to test already in it.

+ The test day image also contain the _test suite_, aka the scripts to test the kernel on your machine.

+ The downloaded .iso file must then be written in a bootable USB stick.

+ 

+ TIP: Check https://docs.fedoraproject.org/en-US/quick-docs/creating-and-using-a-live-installation-image/#proc_creating-and-using-live-usb[this guide] for creating a bootable USB stick.

+ 

+ You can then boot the live image and run the tests without worries of messing up with your OS.

+ 

+ === Using a Virtual Machine

+ 

+ You can also install the required kernel version on a Virtual Machine running an up to date Fedora release and do the test in the VM.

+ In this case you can just add https://copr.fedorainfracloud.org/coprs/jforbes/kernel-stabilization/[this] *Copr repository* on the Fedora distro running in your VM.

+ 

+ Once you added the repository,install the kernel to test:

+  

+   sudo dnf upgrade && sudo dnf install kernel-5.0.0-200.fc29.x86_64

+ 

+ * In the example above we install kernel-5.0.0-200 on fedora 29 with 64 bit architecture.

+ * Reboot and you are ready to test.

+ 

+ === Using Koji

+ 

+ During kernel test days, the dedicated wiki page will provide a link to download the newly built kernel version to test, directly from koji builds.

+ This is recommended for secure boot users.

+ 

+ IMPORTANT: *Disclaimer*: You could also install and test the new kernel on your Workstation/Server installation, on a bare metal machine, but make sure you have no important data on that installation, things might go wrong -- don't do this on your production machine!

+ 

+ === Lets prepare for testing (and earn a new Fedora Badge!)

+ 

+ Before testing, you need to install some packages:

+ 

+  sudo dnf install gcc git python-fedora keyutils libtirpc-devel

+ 

+ * If you are using the _*test day image*_ you already have the kernel-test suite in the kernel-tests folder; enter the folder with 

+ 

+  cd /home/liveuser/kernel-tests

+ 

+ * If you are not using the test day image you will need to clone the kernel-tests repo.

+ Use this command in terminal: 

+ 

+  git clone https://pagure.io/kernel-tests.git

+ 

+ this will download the same folder that you find in the test day image, with the testing scripts.

+ When the download is finished, enter the kernel-tests folder:

+ 

+  cd kernel-tests

+ 

+ Once inside the kernel-tests folder, it’s time to edit some configuration files; first we need to copy the content of the `config.example` file in a new hidden file named `.config`

+ 

+  cp config.example .config

+ 

+ Now edit the `.config` file with your favorite editor.

+ 

+ Here we can decide whether or not to upload the results of our tests to Fedora servers.

+ By default, running the tests will not automatically submit results.

+ They will just run and write results on a log file in /kernel-tests/logs/

+  

+ * To submit results anonymously: edit the `.config` file with `submit=anonymous`

+ 

+ * To submit results linked to your FAS username: edit the `.config` file with `submit=authenticated` and `username=<your FAS username>`

+ 

+ If you link your submission to your FAS username, you’ll also receive a https://badges.fedoraproject.org/badge/science-kernel-tester-i[Fedora badge!] 

+ 

+ The results of your test will be uploaded https://apps.fedoraproject.org/kerneltest/[here]

+ 

+ === Running tests

+ 

+ IMPORTANT: *Before running the test, be sure your machine has no workload already, like other cpu intensive processes.You can check using the command: top*

+ 

+ To run the basic set of tests, use this command:

+ 

+      sudo ./runtests.sh

+ 

+ To run the performance test suites, use this command:

+ 

+      sudo ./runtests.sh -t performance

+ 

+ The expected result is that the tests pass.

+ However, some tests may fail occasionally due to system load.

+ Anyway, add whatever results you got from the tests on the dedicated result page of the Kernel Test day!

+  

+ During a kernel test day, a dedicated web application page is created for uploading results, there you can fill a form with a description of the results you got.

+ Just Click on the *Enter Result* button and fill the form.

+ Enter a username in the *Username* field, in the *Profile* field enter a description of the machine you tested the kernel on, and choose the result of your test from the dropdown menu (failed or pass).

+ In the *Bugs* field you can write the number of a bug (or bug numbers divided by semicolons. i.e. '752855;25532') that you opened on Bugzilla, against that particular kernel.

+ If you found a bug in the kernel, please report it via https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=kernel[this link.]

+ If you don't have a Bugzilla account,you can still log in with your FAS account.

+ 

+ NOTE: If a test fails repeatedly, consider helping by reporting the failure on https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=kernel[Bugzilla] 

+ 

+ Finally add any other comments or observations you want in the *Comment* field and Click the *Submit Query* button. 

+ 

+ _*Done!*_

+ 

+ Thanks for helping the fedora team in testing the newest kernel on your machine!

+ 

+ If you want to help more: join the https://fedoraproject.org/wiki/QA[Fedora Quality Assurance] team and propose new test cases for the kernel that are not already on https://fedoraproject.org/wiki/KernelRegressionTests[this] page.

A first attempt at "how to do a kernel regression test" a quick guide to be used by contributors of Kernel Test Days.
Feedback is needed :)

Metadata Update from @jflory7:
- Pull-request tagged with: needs committer review, new change

5 years ago

Looks good in general. A few things that caught my eye:

  • even though the heading is "how to do a kernel regression test", the page really seems to say "how to participate in a kernel regression test day". So, it'll either be better to change the topic to clearly just say "How to particiapte in a regression test day", or the way the page is written must be changed to focus on the regression testing, and adding details about the test day under s a different subsection like "partcipate in a kernel test day: now that you know how to run a regressions test, this is how you can participate in a test day!". What do you think?

  • Is the TOC necessary? It's quite a short page

  • Again, there are two conflicting top level headings which arent both needed: "Kernel regression test" (page title), which dives straight into "How to participate in Kernel Test Days".

Metadata Update from @ankursinha:
- Request assigned

5 years ago

even though the heading is "how to do a kernel regression test", the page really seems to say "how to participate in a kernel regression test day". What do you think?

I agree, i will make some modification so it will be more about just kernel test days, since the main purpose of the guide is to help new contributors to partecipate in test days.

Is the TOC necessary? It's quite a short page

Not necessary but i like to have some links that brings me to the section i'm interested; this is just a personal taste, so i can remove it if is too much
Next commit coming in few days, still time for other suggestions :thumbsup:

1 new commit added

  • Guide is now focusing more on Kernel Test Days
5 years ago

What are these? The next three sections (downloading, testing, using koji) don't appear to be different ways of contributing to a test day. Maybe rephrase it to "there are different ways of obtaining the new kernel to test" if that's what you meant?

Could you tweak the page to put each sentence on a different line? it's suggested for source files---makes reviews and merges both easier.

I'd remove "possibly", it sounds less convincing :P

Cosmetic: missing period at end of sentence (please check other sentences too).

Maybe link to https://bugz.fedoraproject.org/kernel directly? Or to a new bug template with the kernel component set?
Do you think it's worth noting that users can access bugzilla using their FAS?

Should some general information about the Fedora QA team be added to the top of the page maybe? A general overview with a sentence or two to encourage people to join the QA team and participate in their other activities too? What do you think?

Is there a place people should watch to be notified of such test days? The magazine or the commblog or a mailing list?

1 new commit added

  • few changes to address all the suggestions in comments
5 years ago

rebased onto d63dc0a

4 years ago

i got no more suggestions after latest commits, so i assume it looks fine now, so i did a rebase for a fast-forward merge if you like.

1 new commit added

  • * more clear path for test suite on test image
4 years ago

1 new commit added

  • fix typo
4 years ago

Pull-Request has been merged by pbokoc

4 years ago

Merged, thank you for your contribution. The article should appear on the docs site within an hour.