Bug#1059765: linux: isolation-machine autopkgtest fails for multiple reasons

2024-01-01 Thread Paul Gevers

Hi

On 01-01-2024 22:33, Bastian Blank wrote:

Do we have serial of the machines?


Do you mean of the system where the VM's run, or of the VM itself? IIRC 
the qemu backend of autopkgtest is talking to the VM over serial, but if 
you want to be sure, I'll need to check.


Paul


OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1059765: linux: isolation-machine autopkgtest fails for multiple reasons

2024-01-01 Thread Bastian Blank
On Mon, Jan 01, 2024 at 10:33:10PM +0100, Bastian Blank wrote:
> Turns out this requires more work.  Currently it is not possible to
> build some tests.

I'll remove the current selftest stuff.

This needs much more work, too much work for now.  The runner does not
support recursive test selection.  Many tests fail instead of skipping
itself on missing requirements.

Bastian

-- 
Immortality consists largely of boredom.
-- Zefrem Cochrane, "Metamorphosis", stardate 3219.8



Bug#1059765: linux: isolation-machine autopkgtest fails for multiple reasons

2024-01-01 Thread Bastian Blank
On Sun, Dec 31, 2023 at 06:33:29PM +0100, Bastian Blank wrote:
> On Sun, Dec 31, 2023 at 04:47:28PM +0100, Paul Gevers wrote:
> > Recently I added some isolation-machine support to ci.debian.net and one of
> > the first packages I tried to run the test for is src:linux.
> Do you have a handy script available to try this by hand?  I was just
> looking at this test (to unravel the loop logic and replace it with one
> test per kernel), but I'm not sure if this ever worked before.

Turns out this requires more work.  Currently it is not possible to
build some tests.

Plan:
- get vmlinux.h working
- build a linux-selftests package
- from there run tests

Do we have serial of the machines?  Otherwise running those tests is not
adviced anyway, as we will have no way to see if something breaks.

Bastian

-- 
Lots of people drink from the wrong bottle sometimes.
-- Edith Keeler, "The City on the Edge of Forever",
   stardate unknown



Bug#1059765: linux: isolation-machine autopkgtest fails for multiple reasons

2023-12-31 Thread Paul Gevers

Hi Bastian,

On 31-12-2023 18:33, Bastian Blank wrote:

Do you have a handy script available to try this by hand?  I was just
looking at this test (to unravel the loop logic and replace it with one
test per kernel), but I'm not sure if this ever worked before.


It was nearly completely attached at the bottom of the e-mail. Writing 
it out and providing a patch (from memory, so untested) as well.


# in path with src:linux unpacked
# Apply patch
export ADT_REBOOT_MARK=step0 # or whatever number matches your kernel
export AUTOPKGTEST_TMP=$(mktemp -d)
chmod a+x debian/tests/selftests
debian/tests/selftests

Paul
diff --git a/debian/tests/selftests b/debian/tests/selftests
index 02cc29372e..ff12a0cd17 100644
--- a/debian/tests/selftests
+++ b/debian/tests/selftests
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/bin/bash -eux
 
 PATH=/usr/sbin:/sbin:/usr/bin:/bin
 
@@ -81,8 +81,8 @@ step=$((step + 1))
 if [ "$step" -lt "$steps" ]; then
 # Load the next kernel
 ver=$abiname${localversion[$step]}
-kexec -l /boot/vmlinuz-$ver --initrd /boot/initrd.img-$ver --reuse-cmdline
-/tmp/autopkgtest-reboot step$step
+#kexec -l /boot/vmlinuz-$ver --initrd /boot/initrd.img-$ver --reuse-cmdline
+#/tmp/autopkgtest-reboot step$step
 fi
 
 exit 0


OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1059765: linux: isolation-machine autopkgtest fails for multiple reasons

2023-12-31 Thread Bastian Blank
On Sun, Dec 31, 2023 at 04:47:28PM +0100, Paul Gevers wrote:
> Recently I added some isolation-machine support to ci.debian.net and one of
> the first packages I tried to run the test for is src:linux.

Do you have a handy script available to try this by hand?  I was just
looking at this test (to unravel the loop logic and replace it with one
test per kernel), but I'm not sure if this ever worked before.

Bastian

-- 
Earth -- mother of the most beautiful women in the universe.
-- Apollo, "Who Mourns for Adonais?" stardate 3468.1



Bug#1059765: linux: isolation-machine autopkgtest fails for multiple reasons

2023-12-31 Thread Paul Gevers

Source: linux
Version: 6.6.8-1
Severity: normal

Dear linux maintainers,

Recently I added some isolation-machine support to ci.debian.net and one 
of the first packages I tried to run the test for is src:linux. 
Unfortunately, the isolation-machine based test (selftests) fails (the 
reboot that autopgtest schedules just hangs until it times out). I 
haven't used kexec before in my life, so I'm not totally sure what to 
expect from $(kexec -l ...) but I *suspect* (after reading the 
autopkgtest spec [1]) that the call after kexec in selftests is wrong:

"""
In some cases your test needs to do the reboot by itself, e. g. through
kexec, or a reboot command that is hardcoded in the piece of software
that you want to test. To support those, you need to call
/tmp/autopkgtest-reboot-prepare my_mark at a point as close as
possible to the reboot instead; this will merely save the state but not
issue the actual reboot by itself
"""
(so /tmp/autopkgtest-reboot-prepare instead of /tmp/autopkgtest-reboot, 
and maybe it should be *before* the kexec call)
On the other hand, when I run $(uname -a) after a $(manual kexec -l ..) 
call, it looks like I'm still running the "old" kernel, so I'm not sure 
if that line does what I would hope it to do either (it's extremely 
quick too).


When I play a bit and finally can get the test to run for the current 
kernel (manually passing the right step number in ADT_REBOOT_MARK for 
the current kernel and an appropriate AUTOPKGTEST_TMP [2]) I also notice 
that $(make headers_install) ends with:

"""
/bin/sh: 1: rsync: not found
"""
so that's a missing test dependency.

After all that, the test (for the rt kernel) runs nice although it seems 
to hang on (maybe just a very long running test with no output, I waited 
several minutes, is that timeout referenced in seconds or minutes?):

"""
ok 7 selftests: cgroup: test_cpuset
# timeout set to 45
# selftests: cgroup: test_zswap
"""
Second time I ran this was for the regular kernel used by 
autopkgtest-build-qemu and that passed that stage with ease and seemed 
to run to the end (with failures, but those you can iron out once we get 
decent logs).


Also, I suspect the total test will timeout (after 2:47) if we test all 
desired kernel flavors in one test. So instead of squeezing everything 
in one autopkgtest (stanza) it's probably smarter to generate a stanza 
per kernel you want to run (because then you're only limited by the 
overall timeout of 8.5 hours).


Paul

[1] 
https://salsa.debian.org/ci-team/autopkgtest/-/blob/master/doc/README.package-tests.rst 



[2] # emacs debian/tests/selftests # to disable kexec and 
/tmp/autopkgtest-reboot call and to set -x

chmod a+x debian/tests/selftests
# export ADT_REBOOT_MARK=step0
# export root@host:/tmp/autopkgtest.Y35OYd/build.rih/src# export 
AUTOPKGTEST_TMP=$(mktemp -d)

# debian/tests/selftests # testing the default installed kernel


OpenPGP_signature.asc
Description: OpenPGP digital signature