13.10.2015 04:20, Larry Finger пишет:
On 10/12/2015 05:14 PM, Christian Boltz wrote:
Hello,
Am Sonntag, 11. Oktober 2015 schrieb Stephan Kulow:
Here is the deal: you write a script in your preferred language that will exit 1 if the test failed and 0 if the kmps are fine (the script can be as verbose as you want to). And I will run that script as part of TW snapshot tests.
OK, here we go: [1]
cat install-kmp.sh #!/bin/bash
# ensure kmp packages can be installed. # adjust $kernel_flavors and $kmps to add more tests.
# kernel flavors to test kernel_flavors="default desktop"
for kf in $kernel_flavors ; do # kmp packages to test (for each kernel flavour) kmps="virtualbox-guest-kmp-$kf virtualbox-host-kmp-$kf"
# we only want to ensure that the kmp packages are installable, # so --dry-run is enough (and faster) zypper in --dry-run -y $kmps || exit 1 done
Let's see if this script can make some VirtualBox users happy ;-)
Needless to say that it's easy to add more kernel flavors and kmp packages - but I'll leave that to someone who complains about missing test coverage for one of them ;-)
BTW: Is your deal available for another script? I'd like to add some AppArmor testing ;-)
Regards,
Christian Boltz
[1] says someone who didn't use VirtualBox for years ;-) - so feel free to adjust the script as needed
A good start, but not sufficient. The usual problem is not that the package is missing, but that the kmp's are built for the wrong kernel. That you will not find unless you try to modprobe vboxdrv.
If KMP require exact kernel version N and only kernel N+1 is present installation should fail. At least for virtual box on TW I see hard Requires for exact kernel version and flavor. Test may not be sufficient on Leap where we probably want kABI ...
The problem is that it appears that neither modprobe nor insmod return a proper error code and the script is likely to need to parse the returned result to determine if the load succeeded.
Larry
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org