[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#800845: autopkgtest: Add support for nested VMs

Hey Christian,

Christian Seiler [2016-03-06 18:18 +0100]:
> I've implemented this in the following way:
>  - touch /run/autopkgtest-update-initramfs-at-reboot in setup_baseimage()
>  - /sbin/autopkgtest-reboot{,-prepare}:
>       - if /run/autopkgtest-update-initramfs-at-reboot exists AND 
>            update-initramfs is present, update the initramfs
>  - /usr/share/initramfs-tools/hooks/autopkgtest (created in
>    setup_baseimage()):
>       - unconditionally remove /run/autopkgtest-update-initramfs-at-reboot
>         Because a initramfs-tools hook will only be called if an initramfs
>         is generated - but if it's generated anyway, we might as well
>         remove the flag file, because then we can save ourselves a lot of
>         work.

Thanks. I applied [1] this with a few niggles ("anyway" -> "already",
PEP-8, not mix "[] || foo" and "if; then" in the same command).
I also redirected the u-i output to /dev/null, as this is run within
the context of the *test* and thus clutters up or even breaks tests
(those that don't have "allow-stderr) -- see all three
QemuRunner.test_reboot_* test cases which got broken by this. This of
course now means that *if* the command fails then the test will also
fail without any noticeable output :-(

I can't say that this makes me happy, due to the performance impact on
most real-life test runs (--apt-upgrade), not supporting r/o testbeds,
code leaking into common testbed code, and the initramfs update
running in test context. But this at least gets master back to a
reasonably working state.

So I'll still look into adding pre-reboot hooks, removing the drive
there, and writing the new udev rule into /run/ instead of /etc; this
should address the above issues.

As there was quite some back-and-forth in master, I now rebased the
recent commits to make them easier to review/understand. Sorry world
for making the next git pull a bit inconvenient!



[1] http://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=bc57502f1bcb

Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20160307/43d58260/attachment.sig>

Reply to: