diffkemp icon indicating copy to clipboard operation
diffkemp copied to clipboard

Migrate tests to new kernels

Open viktormalik opened this issue 3 years ago • 1 comments

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:

  1. Discover which case/feature the test checks (by investigating the tested function, checking the surrounding commits in git log, or finding the original PR).
  2. Disable the tested feature in DiffKemp (e.g. comment out the part of the code handling the feature).
  3. Re-run analysis of all KABI functions in newer kernels and compare the results with the results from the current master.
  4. 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.

viktormalik avatar Jul 01 '21 10:07 viktormalik

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).

linux-3.10.0-gcc8.patch.txt

lenticularis39 avatar Jul 08 '21 12:07 lenticularis39