Kernel regression testing for shipping with Fedora 32 release

Kernel regression testing for shipping with Fedora 32 release

kernel_linux

Here in this article we will show how we can help Fedora by carrying out Kernel new version regression testing on your personal platform and share the results. This will help Fedora to fix any bugs and gather details on the compatibility of the kernel with various platforms on which they are getting tested.

Test Environment

Fedora 31 updated install

Procedure

Step1: Download the kernel 5.6 version rpm’s from the below URL for testing

URL - https://koji.fedoraproject.org/koji/buildinfo?buildID=1491815

Download kernel 5.6 rpms

-rwxr-xr-x. 1 admin admin     21064 Apr 12 18:10 kernel-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin     21172 Apr 12 18:13 kernel-debug-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin    137288 Apr 12 18:14 kernel-debug-modules-internal-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin   2147984 Apr 12 18:15 kernel-debug-modules-extra-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin    126224 Apr 12 18:15 kernel-modules-internal-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin   2064628 Apr 12 18:16 kernel-modules-extra-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin  13584288 Apr 12 18:18 kernel-devel-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin  35707088 Apr 12 18:23 kernel-debug-core-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin  33745648 Apr 12 18:24 kernel-core-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin  30057208 Apr 12 18:24 kernel-modules-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin  71133232 Apr 12 18:32 kernel-debuginfo-common-x86_64-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin  13679964 Apr 12 18:58 kernel-debug-devel-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin  30824180 Apr 12 18:58 kernel-debug-modules-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin 618067200 Apr 12 19:09 kernel-debuginfo-5.6.3-300.fc31.x86_64.rpm
-rwxr-xr-x. 1 admin admin 633400636 Apr 12 19:13 kernel-debug-debuginfo-5.6.3-300.fc31.x86_64.rpm

Step2: Install the above downloaded RPM’s

sudo dnf install kernel-5.6.3-300.fc31.x86_64.rpm kernel-debug-5.6.3-300.fc31.x86_64.rpm kernel-debug-modules-internal-5.6.3-300.fc31.x86_64.rpm kernel-debug-modules-extra-5.6.3-300.fc31.x86_64.rpm kernel-modules-internal-5.6.3-300.fc31.x86_64.rpm kernel-modules-extra-5.6.3-300.fc31.x86_64.rpm  kernel-devel-5.6.3-300.fc31.x86_64.rpm kernel-debug-core-5.6.3-300.fc31.x86_64.rpm  kernel-core-5.6.3-300.fc31.x86_64.rpm  kernel-modules-5.6.3-300.fc31.x86_64.rpm  kernel-debuginfo-common-x86_64-5.6.3-300.fc31.x86_64.rpm kernel-debug-devel-5.6.3-300.fc31.x86_64.rpm  kernel-debug-modules-5.6.3-300.fc31.x86_64.rpm kernel-debuginfo-5.6.3-300.fc31.x86_64.rpm  kernel-debug-debuginfo-5.6.3-300.fc31.x86_64.rpm

Step3: Reboot the system with Kernel 5.6 option selected

Step4: Install the required packages to run the test cases

sudo dnf install gcc git python3-fedora

Step5: Clone the kernel test repository

git clone https://pagure.io/kernel-tests.git
cd kernel-tests
ls -ltr

Output:

-rw-rw-r--.  1 admin admin 18472 Apr 12 19:43 LICENSE
-rw-rw-r--.  1 admin admin  1221 Apr 12 19:43 config.example
drwxrwxr-x.  2 admin admin  4096 Apr 12 19:43 include
-rwxrwxr-x.  1 admin admin  1445 Apr 12 19:43 fedora_submit.py
-rw-rw-r--.  1 admin admin  5629 Apr 12 19:43 documentation.txt
drwxrwxr-x.  3 admin admin  4096 Apr 12 19:43 destructive
drwxrwxr-x. 15 admin admin  4096 Apr 12 19:43 default
drwxrwxr-x.  3 admin admin  4096 Apr 12 19:43 performance
drwxrwxr-x.  5 admin admin  4096 Apr 12 19:43 minimal
drwxrwxr-x.  5 admin admin  4096 Apr 12 19:43 stress
drwxrwxr-x.  3 admin admin  4096 Apr 12 19:43 secureboot
-rwxrwxr-x.  1 admin admin  4661 Apr 12 19:43 runtests.sh
drwxrwxr-x.  2 admin admin  4096 Apr 12 19:43 utils
drwxrwxr-x.  3 admin admin  4096 Apr 12 19:43 thirdparty

Step6: You need make, libtirpc,libtirpc-devel and policycoreutils-python-utils in order to run the tests, if it is not already installed

sudo dnf install make libtirpc libtirpc-devel policycoreutils-python-utils

Step7: Allow testsuite to make their heap memory executable

sudo semanage boolean -m --on selinuxuser_execheap

Step8: Configure automatic submission of the test results and your FAS username

cd kernel-tests
cp config.example .config
vi .config

Look for lines with “submit=” and “username=” and set these settings to “submit=authenticated” and “username=”.

Step9: Run the test case

sudo ./runtests.sh

Output:

Test suite called with default
./default/insert_leap_second                                     PASS   
./default/selinux-dac-controls                                   PASS   
./default/paxtest                                                SKIP   
./default/mq-memory-corruption                                   PASS   
./default/posix_timers                                           PASS   
./default/libhugetlbfs                                           SKIP   
./default/sysfs-perms                                            PASS   
./default/memfd                                                  PASS   
./default/stack-randomness                                       PASS   
./default/timer-overhead                                         PASS   
./default/cachedrop                                              PASS   
./default/modsign                                                PASS   

Test suite complete                                              PASS   

Your log file is being submitted...
FAS password:
Upload successful!
The following information is not submitted with your log;
it is for informational purposes only.
Vulnerability status:
/sys/devices/system/cpu/vulnerabilities/itlb_multihit:KVM: Vulnerable
/sys/devices/system/cpu/vulnerabilities/l1tf:Mitigation: PTE Inversion
/sys/devices/system/cpu/vulnerabilities/mds:Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
/sys/devices/system/cpu/vulnerabilities/meltdown:Mitigation: PTI
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass:Vulnerable
/sys/devices/system/cpu/vulnerabilities/spectre_v1:Mitigation: usercopy/swapgs barriers and __user pointer sanitization
/sys/devices/system/cpu/vulnerabilities/spectre_v2:Mitigation: Full generic retpoline, STIBP: disabled, RSB filling
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort:Not affected

Step10: Run the performance test suite

sudo ./runtests.sh -t performance

Output:

Test suite called with performance
lib_timing.c: In function ‘touch’:
lib_timing.c:1626:9: warning: type defaults to ‘int’ in declaration of ‘psize’ [-Wimplicit-int]
 1626 |  static psize;
      |         ^~~~~
...
Calculating context switch overhead
Tue 14 Apr 2020 09:57:52 AM IST
./performance/lmbench3                                           PASS   

Test suite complete                                              PASS   

Your log file is being submitted...
FAS password:
Upload successful!
The following information is not submitted with your log;
it is for informational purposes only.
Vulnerability status:
/sys/devices/system/cpu/vulnerabilities/itlb_multihit:KVM: Vulnerable
/sys/devices/system/cpu/vulnerabilities/l1tf:Mitigation: PTE Inversion
/sys/devices/system/cpu/vulnerabilities/mds:Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
/sys/devices/system/cpu/vulnerabilities/meltdown:Mitigation: PTI
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass:Vulnerable
/sys/devices/system/cpu/vulnerabilities/spectre_v1:Mitigation: usercopy/swapgs barriers and __user pointer sanitization
/sys/devices/system/cpu/vulnerabilities/spectre_v2:Mitigation: Full generic retpoline, STIBP: disabled, RSB filling
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort:Not affected

Step11: Turn SELinux boolean selinuxuser_execheap back to default state

sudo semanage boolean -m --off

For more details and queries follow “QA:Testcase kernel regression“.

Please get the new kernel regression tested and submit the result to get it even more better.

Hope you enjoyed reading this article. Thank you..