Package: autodep8
Version: 0.22
Severity: normal
Tags: patch
Control: block -1 with 959910
Control: tag 959910 patch

Hi,

*-dkms autopkgtests are currently quite useless without some linux-headers-*
installed to build against (#945594). I think this is solved best in
autodep8 which "defines" the environment for the test.
Even with kernel headers installed, the test may fail early (while
installing test dependencies) if dkms autoinstall fails and not give a
helpful failure log. I therefore sent two patches for dkms (#959910) that
allow disabling autoinstall mode by creating a flag file and then do the
autoinstall step-by-step with verbose error reporting on failure. This
will be done for all installed kernel headers, independent of the
running kernel, s.t. this should work even in a plain chroot.

This will only work if autoinstall is disabled early enough, therefore
my patch drops the "Depends: @" from the generated test, the
dkms-autopkgtest script will install the *-dkms packages anyway.

I'm a but unsure about the restrictions of the test:
* isolation-machine should not be needed any more, since the test script
  is now independent of the running kernel
* breaks-testbed could be needed, since the test script (which
  needs-root) installs/removes packages and 'changes configuration
  files'
* skippable is currently not used, but something using it could be
  implemented in dkms's dkms-autopkgtest script at some point
* superficial because this only tests whether the module can be built

I tested these changes in dkms and autodep8 on bbswitch-dkms in Debian,
but I have no idea which impact they might have on Ubuntu.
At least the list of kernel header packages would need to be different.
Ideally the list of kernel header packages should not be hardcoded but
generated at runtime, but that would have to happen for the correct
release, ...

Andreas
>From e3489a39da32b60479b43440f672c87740112f50 Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <a...@debian.org>
Date: Thu, 7 May 2020 20:03:20 +0200
Subject: [PATCH] install linux-headers-* for dkms tests

---
 support/dkms/generate | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/support/dkms/generate b/support/dkms/generate
index 0883cd8..0fbd440 100755
--- a/support/dkms/generate
+++ b/support/dkms/generate
@@ -2,7 +2,29 @@
 
 cat <<EOF
 Test-Command: /usr/lib/dkms/dkms-autopkgtest
-Restrictions: needs-root, allow-stderr, isolation-machine
-Depends: @, dkms
+Restrictions: needs-root, allow-stderr, breaks-testbed, skippable, superficial
+Depends: dkms,
+ linux-headers-4kc-malta [mipsel],
+ linux-headers-5kc-malta [mips64el mipsel],
+ linux-headers-686 [i386],
+ linux-headers-686-pae [i386],
+ linux-headers-amd64 [amd64],
+ linux-headers-arm64 [arm64],
+ linux-headers-armmp [armhf],
+ linux-headers-armmp-lpae [armhf],
+ linux-headers-cloud-amd64 [amd64],
+ linux-headers-cloud-arm64 [arm64],
+ linux-headers-loongson-3 [mips64el mipsel],
+ linux-headers-marvell [armel],
+ linux-headers-octeon [mips64el mipsel],
+ linux-headers-powerpc64le [ppc64el],
+ linux-headers-rpi [armel],
+ linux-headers-rt-686-pae [i386],
+ linux-headers-rt-amd64 [amd64],
+ linux-headers-rt-arm64 [arm64],
+ linux-headers-rt-armmp [armhf],
+ linux-headers-s390x [s390x],
 Features: test-name=dkms-autopkgtest
 EOF
+# list of header packages generated with
+# rmadison --source linux -s sid | grep headers | grep -v common | grep 
5.6.0-1 | sed -r 's/-5.6.0-1-/-/; s/\s*\|.*\|\s*/ [/; s/,//; s/^/ /; s/$/], /'
-- 
2.20.1

Reply via email to