diffkemp
diffkemp copied to clipboard
Migrate tests to new kernels
Currently, most of our tests are for kernel versions 3.10.0-xxx.el7 (CentOS/RHEL 7). This is very impractical since compilation of these kernels requires GCC 7.5. This will especially pose problems to our CI as the given GCC version is only available in Ubuntu 16.04 which has already reached its EOL, but also it makes development on modern Linux distros difficult.
The tests should be migrated to newer kernels (either 4.18.0-xxx.el8, which is CentOS/RHEL 8 or some newer upstream kernel). This is, however, not easy to do, since we should keep testing the same properties/scenarios.
The only possible solution that comes to mind is for each test:
- Discover which case/feature the test checks (by investigating the tested function, checking the surrounding commits in
git log
, or finding the original PR). - Disable the tested feature in DiffKemp (e.g. comment out the part of the code handling the feature).
- Re-run analysis of all KABI functions in newer kernels and compare the results with the results from the current master.
- If a new difference is found, chances are that the different function requires the particular disabled feature. In such a case, create a new test.
Another approach would be to patch the kernel to compile under GCC 8+. I've attached an example patch for 3.10.0-514.el7 (it doesn't work on other kernel versions, a more flexible way would have to be used, e.g. a patching function in rhel-kernel-get).