Hi,

On 28-04-2024 9:34 a.m., Andreas Beckmann wrote:
What kernel is running inside the test environment and what is the best way to install its headers?

Can you help me find the answer? I guess you don't mean "the current kernel of the suite under test" but rather a flavor? We use autopkgtest-build-qemu, which uses vmdb2, to build the image. The kernel used is also logged in the autopkgtest log, so you can also look it up :).

Would Depends: linux-headers-generic work?

I don't know.

Or better in the test script to
   test -d /lib/modules/$(uname -r)/build || \
   apt-get install linux-headers-$(uname -r)

But I have a strong preference for (test) Depends over running $(apt-get install) inside the test for two reasons: 1) you get Autopkgtest-Triggers for the kernel (headers) for free, meaning that we'll know if the kernel breaks this package 2) the autopkgtest setup for migration is a bit weird and getting it right shouldn't be the responsibility of the test [1].

Paul

[1] https://wiki.debian.org/ContinuousIntegration/AutopkgtestBestPractices (under "Don't").

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to