Bug#743029: marked as done (autopkgtest: Support access to package repository during testrun)
Jakub Wilk [2014-03-31 10:10 +0200]:
> But after the package is built and the dependencies are installed,
> adt-run could (and should) block the network access.
Could, certainly. Should, I doubt that. It's very useful to be able to
access the package archive for testing things that interact with it,
such as apt, schroot, pbuilder, etc.
This could presumably become a new feature such as
"Feature: no-network". However, in some conditions that can't be
implemented, e. g. if you run adt-run as user and have no root on the
testbed (corner case, I know, but possible).
> But anyway, the details of adt-run operation should be irrelevant
> for the test writers. They should be concerned only about what the
> specification says. The spec doesn't currently give you a way to
> declare that your test need Internet access, which means you can't
> access it.
It means that it's not defined. It really depends on the environment
where you run adt-run and how you set up testbeds.
> >For running debootstrap it's probably a good idea to take the apt
> >mirror from /etc/apt/sources.list instead of just assuming a
> >static one like cdn.debian.net.
> There's no guarantee that apt is installed, unless you depend on it.
Yes, if tests need it they should do that. It's kind of an implied
dependency though as adt-run needs to call apt.
> Even if you depend on it, there's no guarantee that there's anything
> interesting in /etc/apt/sources.lists.
For local test beds, certainly; CI production testbeds would be rather
useless without proper apt sources.
So I'm not quite sure what to do about this in autopkgtest itself, as
most of this is outside of its control. Should this be clarified in
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)