Fedora is a popular Linux distribution and the upstream community project for Red Hat Enterprise Linux (RHEL). Fedora influences what's included in future RHEL releases.
As a community project, Fedora depends heavily on its community for various purposes, including testing the distribution. The project hosts Test Days regularly for testing the latest Fedora kernel. Members of the Fedora community (or anybody interested in the project) can download and test the newest kernel and submit the results back to Fedora. This approach allows Fedora to understand how the latest kernel works on different systems and supported architectures (physical or virtual). It also allows the community to fix any issues found during the test.
Testing the kernel might sound like a mammoth task; however, do not worry, all of the test cases are automated, and it won't take much of your time from start to finish. This way, you help the Fedora community, and you could earn a badge for your effort.
Test prerequisites
To participate in this effort, you need a system (physical or virtual) that has the latest Fedora distribution installed (depending on which kernel version is under test). Installing Fedora on a virtual machine is a breeze. Once installed, ensure that you upgrade all the packages:
$ dnf upgrade --refresh
[ Learn how to manage your Linux environment for success. ]
Download and install the latest Fedora kernel
Once Fedora is up and running, install the Koji command-line utility. Koji is software that builds RPM packages for Fedora. This application is required to download the RPMs with the kernel you're testing. The exact version number of the kernel being tested should be included on the Test Day page, so adjust as necessary:
$ sudo dnf install koji
$ koji download-build --arch=x86_64 kernel-5.18.1-200.fc36
This command downloads a bunch of RPMs onto your system. These RPMs contain the latest kernel and related packages:
$ ls
anaconda-ks.cfg kernel-devel-5.18.1-200.fc36.x86_64.rpm
kernel-5.18.1-200.fc36.x86_64.rpm kernel-devel-matched-5.18.1-200.fc36.x86_64.rpm
kernel-core-5.18.1-200.fc36.x86_64.rpm kernel-modules-5.18.1-200.fc36.x86_64.rpm
<< snip >>
kernel-debug-modules-5.18.1-200.fc36.x86_64.rpm RECIPE.TXT
kernel-debug-modules-extra-5.18.1-200.fc36.x86_64.rpm
Install these downloaded kernel RPMs:
$ dnf update ./kernel-*.rpm
In this example, the previous kernel version was 5.17, and the new kernel (5.18) has been installed on the system. However, the system is still booting from the older kernel (5.17), so you need to reboot the system to test the 5.18 kernel:
$ ls -l /boot/ | grep vmlin
-rwxr-xr-x. 1 root root 11771888 Jun 6 05:11 vmlinuz-0-rescue-e9d9a3e68678497ca4bf69195b715792
-rwxr-xr-x. 1 root root 11771888 May 30 13:15 vmlinuz-5.17.12-300.fc36.x86_64
-rwxr-xr-x. 1 root root 12897776 Jun 3 12:15 vmlinuz-5.18.1-200.fc36.x86_64
$ uname -r
5.17.12-300.fc36.x86_64
Reboot the system with the following command. Once the system is back up, you can see it has booted using the 5.18 kernel tested in this example:
$ shutdown -r now
$ uname -r
5.18.1-200.fc36.x86_64
[ No-cost online course: Red Hat Enterprise Linux technical overview. ]
Get ready to test the latest kernel
Now that you have booted from the required kernel, install a set of packages that are required by the automated test suite you will be running on the system:
$ dnf install gcc git python3-fedora
$ dnf install make libtirpc libtirpc-devel policycoreutils-python-utils
In addition to installing the required packages, you need to make a tiny modification to the system to make the heap memory executable. This configuration is needed for the automated test suite:
$ semanage boolean -m --on selinuxuser_execheap
Install and run the automated test suite
Now that you've prepared the system and dependencies, it's time to get and run the automated test suite. Clone the repo containing the kernel tests by running the following Git command. Once you have cloned the repo, move to the kernel-tests
directory:
$ git clone https://pagure.io/kernel-tests.git
$ cd kernel-tests
Run a simple shell script named runtest.sh
to launch the test suite. This script tests the kernel on various parameters, including cache, memfd, SELinux, and stack-randomness. Do not worry too much about these components if you are just starting out. You just need to focus on whether all of these tests PASS or FAIL. Depending on your system, the tests shouldn't take more than 10 minutes. If you wish to make your testing effort count and earn a badge from Fedora, please check the final section of this article before running this command:
$ ./runtest.sh
You can run the performance tests using the command below if you have a machine with a good hardware configuration (CPU and RAM). Note that these tests take slightly longer to run.
$ ./runtests.sh -t performance
Once the test run completes, you can revert the earlier change that you made to the system to make the heap memory executable using this command:
$ sudo semanage boolean -m --off selinuxuser_execheap
[ Cheat sheet: Get a list of Linux utilities and commands for managing servers and networks. ]
Make your effort count
Since you have taken the time to test the Fedora kernel, you can make it count. First, create an account with Fedora. Then, within the kernel-tests
directory, create a config file by copying an existing template:
$ cd kernel-tests
$ cp config.example .config
$ vim .config
You need to modify two parameters in this configuration file. The first, submit=authenticated
, tells the test suite that you are interested in submitting the results file to Fedora for analysis. For the second parameter, username=
, enter the username you created when registering your Fedora account. It will ask you for your account password, which you can enter on the command line. You should see a message saying it uploaded successfully. This will help you earn a testing badge from Fedora, which is visible on the portal.
$ grep -E '^submit|^username' .config
submit=authenticated
username='gkamathe'
Test-driven Linux
RHEL is a stable and trusted Linux distribution, and a lot of work goes into achieving that.
The development of projects like Fedora and CentOS reveals much about the direction RHEL is headed. The continued testing these communities do is an important contribution to forming the industry's flagship Linux distribution. Be a part of that process by participating in Fedora Test Days.
À propos de l'auteur
Seasoned Software and Security Engineering professional.
Primary interests are Security, Linux, Malware.
Loves working on the command-line.
Interested in low-level software and understanding how things work.
Parcourir par canal
Automatisation
Les dernières nouveautés en matière d'automatisation informatique pour les technologies, les équipes et les environnements
Intelligence artificielle
Actualité sur les plateformes qui permettent aux clients d'exécuter des charges de travail d'IA sur tout type d'environnement
Cloud hybride ouvert
Découvrez comment créer un avenir flexible grâce au cloud hybride
Sécurité
Les dernières actualités sur la façon dont nous réduisons les risques dans tous les environnements et technologies
Edge computing
Actualité sur les plateformes qui simplifient les opérations en périphérie
Infrastructure
Les dernières nouveautés sur la plateforme Linux d'entreprise leader au monde
Applications
À l’intérieur de nos solutions aux défis d’application les plus difficiles
Programmes originaux
Histoires passionnantes de créateurs et de leaders de technologies d'entreprise
Produits
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Services cloud
- Voir tous les produits
Outils
- Formation et certification
- Mon compte
- Assistance client
- Ressources développeurs
- Rechercher un partenaire
- Red Hat Ecosystem Catalog
- Calculateur de valeur Red Hat
- Documentation
Essayer, acheter et vendre
Communication
- Contacter le service commercial
- Contactez notre service clientèle
- Contacter le service de formation
- Réseaux sociaux
À propos de Red Hat
Premier éditeur mondial de solutions Open Source pour les entreprises, nous fournissons des technologies Linux, cloud, de conteneurs et Kubernetes. Nous proposons des solutions stables qui aident les entreprises à jongler avec les divers environnements et plateformes, du cœur du datacenter à la périphérie du réseau.
Sélectionner une langue
Red Hat legal and privacy links
- À propos de Red Hat
- Carrières
- Événements
- Bureaux
- Contacter Red Hat
- Lire le blog Red Hat
- Diversité, équité et inclusion
- Cool Stuff Store
- Red Hat Summit