Re: autopkgtest + chroot howto ? - Was: Re: Is it possible to run autopkgtest without a virtual machine ?

2014-02-07 Thread Antonio Terceiro
On Sun, Jan 26, 2014 at 06:09:51PM +0100, Martin Pitt wrote:
 I advise to use the schroot runner instead. schroots are easy to set
 up these days with mk-sbuild, and with some additional love (like
 installing and configuring apt-cacher-ng and symlinking
 /var/lib/schroot/union/overlay/ and /var/lib/schroot/unpack/ to /tmp/,
 and having /tmp on a tmpfs),  set up, tear down, and package
 installation are extremely fast.

This schroot tip is precious! I have just reduced the build time (which
was mostly spent installing dependencies -- I was already using
apt-cacher-ng) of a package from ~4min to ~30s!

But instead of symlinking /var/lib/schroot/union/overlay/¹ , I configured
my sbuild chroots adding

  union-overlay-directory=/dev/shm

¹ that would affect all my chroots, not only the ones I use for sbuild.
  I expected the non-sbuild ones to still be there after a reboot. ;-)

-- 
Antonio Terceiro terce...@debian.org


signature.asc
Description: Digital signature


Re: autopkgtest + chroot howto ? - Was: Re: Is it possible to run autopkgtest without a virtual machine ?

2014-02-07 Thread Julian Taylor
On Fri, Feb 7, 2014 at 2:09 PM, Antonio Terceiro terce...@debian.orgwrote:

 On Sun, Jan 26, 2014 at 06:09:51PM +0100, Martin Pitt wrote:
  I advise to use the schroot runner instead. schroots are easy to set
  up these days with mk-sbuild, and with some additional love (like
  installing and configuring apt-cacher-ng and symlinking
  /var/lib/schroot/union/overlay/ and /var/lib/schroot/unpack/ to /tmp/,
  and having /tmp on a tmpfs),  set up, tear down, and package
  installation are extremely fast.

 This schroot tip is precious! I have just reduced the build time (which
 was mostly spent installing dependencies -- I was already using
 apt-cacher-ng) of a package from ~4min to ~30s!

 But instead of symlinking /var/lib/schroot/union/overlay/¹ , I configured
 my sbuild chroots adding

   union-overlay-directory=/dev/shm



you can archive similar speeds without a tmpfs using eatmydata, just stick
LD_PRELOAD=/usr/lib/libeatmydata/libeatmydata.so
in your rc equivalent.
This is also significantly faster than using dpkg --force-unsafe-io.

Using mount options that reduce failure safety on the partition/subvolume
holding the chroot build folder also helps a bit (nobarrier,
data=writeback, commit=3600 etc.)


autopkgtest + chroot howto ? - Was: Re: Is it possible to run autopkgtest without a virtual machine ?

2014-01-26 Thread Olivier Berger
Hi.

I haven't been able to find a comprehensive set of instructions on how
to get started with autopkgtest, and I imagined that chroot would be an
interesting option.

I quite don't see the interest of the adt-virt-null, as I suppose that a
clean test bed is generally required when testing... :-/

Has anyone spotted a howto document for autopkgtest + adt-virt-chroot ?

Thanks in advance.

Best regards,

Charles Plessy ple...@debian.org writes:

 Le Fri, Jun 22, 2012 at 01:24:43PM +0900, Charles Plessy a écrit :
 
 adt-run needs a virtual machine.  I know that some developers have
 some workarounds, but couldn't autopkgtest also support running tests on the 
 local
 system ?  This would be tremendously useful when the tests can be contained 
 in
 the binary packages, as it would make it very easy for our users and 
 ourselves
 to test the packages.

 Thanks to Michael's hint, I found that the following command will work 
 locally.

 sudo adt-run --no-built-binaries foo.dsc --- adt-virt-null

 (See https://lists.debian.org/debian-devel/2012/06/msg00501.html )


-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/877g9msvq7@inf-8660.int-evry.fr



Re: autopkgtest + chroot howto ? - Was: Re: Is it possible to run autopkgtest without a virtual machine ?

2014-01-26 Thread Stefano Zacchiroli
On Sun, Jan 26, 2014 at 02:45:04PM +0100, Olivier Berger wrote:
 I haven't been able to find a comprehensive set of instructions on how
 to get started with autopkgtest, and I imagined that chroot would be
 an interesting option.

This doesn't directly answer your question (sorry), but you might also
be interested in sadt --- simple DEP-8 test runner --- by Jakub Wilk,
which has recently joined the devscripts happy bunch. Just install
devscripts (= 2.14.1, currently in unstable only) and have a look at
man 1 sadt.

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  z...@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Former Debian Project Leader  . . @zack on identi.ca . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »


signature.asc
Description: Digital signature


Re: autopkgtest + chroot howto ? - Was: Re: Is it possible to run autopkgtest without a virtual machine ?

2014-01-26 Thread Martin Pitt
Hey Olivier,

Olivier Berger [2014-01-26 14:45 +0100]:
 I haven't been able to find a comprehensive set of instructions on how
 to get started with autopkgtest, and I imagined that chroot would be an
 interesting option.

TBH I never use it myself, it's largely obsolete. You shouldn't use it
with a plain directory chroot, as it cannot properly clean up after
itself. You can call it with a dchroot name, so that dchroot does the
overlays/cleanup, but as dchroot has been superseded by schroot that's
obsolete.

I advise to use the schroot runner instead. schroots are easy to set
up these days with mk-sbuild, and with some additional love (like
installing and configuring apt-cacher-ng and symlinking
/var/lib/schroot/union/overlay/ and /var/lib/schroot/unpack/ to /tmp/,
and having /tmp on a tmpfs),  set up, tear down, and package
installation are extremely fast. Then running autopkgtests with them
is a simple matter of e. g.

  adt-run pkgname --- adt-virt-schroot sid

if sid is your desired schroot name.

 I quite don't see the interest of the adt-virt-null, as I suppose that a
 clean test bed is generally required when testing... :-/

It is mainly useful for two cases:

 * You already have all the test dependencies installed on your
   developer machine and just want to quickly run tests of your
   package. It doesn't suffice for verifying that your test
   depends are sufficient and your test actually works in a
   minimal/untainted environment, but if you just want to test a
   change, its the fastest thing you can get.

 * You use adt-virt-null within an already built test bed such as
   Qemu. (That's how Ubuntu currently runs its production
   autopkgtests, as there is no adt-virt-qemu yet  [1])

FTR, adt-virt-lxc is also a very nice runner as it provides much
better isolation than schroots; but currently it requires an image
with cloud-init, and AFAIK there are no ready-made daily Debian cloud
images at the moment. Improving lxc itself and/or adt-virt-lxc to work
for arbitrary containers would be nice.

Martin

[1] 
http://bazaar.launchpad.net/~auto-package-testing-dev/auto-package-testing/trunk/

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140126170951.gd3...@piware.de



Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-25 Thread Ian Jackson
Charles Plessy writes (Re: Is it possible to run autopkgtest without a virtual 
machine ?):
 I guess that the next step is to let autopkgtest run as a user
 (http://bugs.debian.org/648148), make it easier to invoke
 (adt-virt-null is not mentionned in the manual page, and even with
 --no-built-binaries it still tries to download some stuff or create
 a GPG key), and give it a more user-friendly output.

Right.  (Sorry that that bug has become entangled with TMPDIR stuff.)

 For people with free time, that would probably be high-impact
 contribution.  I will add more autopkgtest to my packages, and would
 love to be able to tell to our users a simple command to test if the
 package is working on their system.

Great.

Ian.


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20456.22580.112070.116...@chiark.greenend.org.uk



[DEP 8] Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-25 Thread Ian Jackson
Charles Plessy writes ([DEP 8] Re: Is it possible to run autopkgtest without a 
virtual machine ?):
 For networking, how about a needs-networking restriction ?

I'm definitely in general in favour of expanding the set of
restrictions etc.  We need to be sure that the semantics are clear
though.

Would that mean only that the machine needs to have a non-localhost
network interface, or also that it can access the global internet
somehow (and if so which protocols) ?

 For protecting the user from side effects of runnign the tests,
 there is the Restrictions field where one can declare that tests can
 break the system.  Perhaps a milder restriction could be added, for
 tests that can disturb the system (such as restarting services,
 etc.), so that other tests can be considered safe for local
 execution.  A large number of regression tests that I know are
 completely safe, like checking that 2 + 2 returns 4, with of course
 the limitation that running them exposes to the same possible bugs
 as for using the program in other contexts.

Again, yes.

Perhaps you could describe those of your package(s) and the test(s)
which would benefit from this ?  That would make it easier to think
about what exactly the restrictions should be.

 I think that it would be a great feature to be able to run such
 tests locally with a simple command that can take advantage of
 autopkgtest.

Yes.

   This means also shipping them in a binary package, but
 we have already such packages containing exactly the test data that
 is needed.

No, this won't work because the tests might need stuff from the source
package; might need the source package to be built; and we shouldn't
clog the archive up with test suites; the build depends would need to
be installed anyway.

The right answer is simply for such an automatic tool to download the
source package.

Ian.


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20456.22853.76070.451...@chiark.greenend.org.uk



Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-25 Thread Jakub Wilk

* Charles Plessy ple...@debian.org, 2012-06-22, 17:46:
adt-run needs a virtual machine. I know that some developers have 
some workarounds, but couldn't autopkgtest also support running tests 
on the local system? This would be tremendously useful when the tests 
can be contained in the binary packages, as it would make it very easy 
for our users and ourselves to test the packages.


Thanks to Michael's hint, I found that the following command will work 
locally.


sudo adt-run --no-built-binaries foo.dsc --- adt-virt-null

(See https://lists.debian.org/debian-devel/2012/06/msg00501.html )

I guess that the next step is to let autopkgtest run as a user 
(http://bugs.debian.org/648148), make it easier to invoke 
(adt-virt-null is not mentionned in the manual page, and even with 
--no-built-binaries it still tries to download some stuff or create a 
GPG key), and give it a more user-friendly output.


You might be interested in my own minimalistic DEP-8 test runner:
https://bitbucket.org/jwilk/debian-misc/src/tip/sadt

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120625123245.ga7...@jwilk.net



Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-25 Thread Ian Jackson
Jakub Wilk writes (Re: Is it possible to run autopkgtest without a virtual 
machine ?):
 You might be interested in my own minimalistic DEP-8 test runner:
 https://bitbucket.org/jwilk/debian-misc/src/tip/sadt

Oooh, how exciting, another implementation :-).

Thanks,
Ian.


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20456.23550.672090.657...@chiark.greenend.org.uk



Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-25 Thread Ian Jackson
Ian Jackson writes (Re: Is it possible to run autopkgtest without a virtual 
machine ?):
 Jakub Wilk writes (Re: Is it possible to run autopkgtest without a virtual 
 machine ?):
  You might be interested in my own minimalistic DEP-8 test runner:
  https://bitbucket.org/jwilk/debian-misc/src/tip/sadt
 
 Oooh, how exciting, another implementation :-).

On this subject, I ought to point out that (thinking I had the only
implementation) I fixed a spec bug relating to the use of TMPDIR.

The spec now tells test scripts to use ADTTMP so perhaps you would
like to update your test runner to provide that too ?

Thanks,
Ian.


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20456.23826.924121.837...@chiark.greenend.org.uk



Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-25 Thread Jakub Wilk

* Ian Jackson ijack...@chiark.greenend.org.uk, 2012-06-25, 13:44:

You might be interested in my own minimalistic DEP-8 test runner:
https://bitbucket.org/jwilk/debian-misc/src/tip/sadt

Oooh, how exciting, another implementation :-).


On this subject, I ought to point out that (thinking I had the only 
implementation) I fixed a spec bug relating to the use of TMPDIR.


The spec now tells test scripts to use ADTTMP so perhaps you would like 
to update your test runner to provide that too ?


Done, thanks for reminder. :)

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120625133536.gb1...@jwilk.net



Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-22 Thread Charles Plessy
Le Fri, Jun 22, 2012 at 01:24:43PM +0900, Charles Plessy a écrit :
 
 adt-run needs a virtual machine.  I know that some developers have
 some workarounds, but couldn't autopkgtest also support running tests on the 
 local
 system ?  This would be tremendously useful when the tests can be contained in
 the binary packages, as it would make it very easy for our users and ourselves
 to test the packages.

Thanks to Michael's hint, I found that the following command will work locally.

sudo adt-run --no-built-binaries foo.dsc --- adt-virt-null

(See https://lists.debian.org/debian-devel/2012/06/msg00501.html )

I guess that the next step is to let autopkgtest run as a user
(http://bugs.debian.org/648148), make it easier to invoke (adt-virt-null is not
mentionned in the manual page, and even with --no-built-binaries it still tries
to download some stuff or create a GPG key), and give it a more user-friendly
output.

For people with free time, that would probably be high-impact contribution.  I
will add more autopkgtest to my packages, and would love to be able to tell to
our users a simple command to test if the package is working on their system.

Have a nice week-end,

-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120622084616.ga30...@falafel.plessy.net



Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-22 Thread Goswin von Brederlow
Charles Plessy ple...@debian.org writes:

 Dear all,

 I think that the idea behind autopkgtest (DEP 8) is very interesting, and 
 could
 eventually replace build-time regression tests.  To train myself, I tried to
 implement simple tests for the tabix package.

 However, adt-run needs a virtual machine.  I know that some developers have
 some workarounds, but couldn't autopkgtest also support running tests on the 
 local
 system ?  This would be tremendously useful when the tests can be contained in
 the binary packages, as it would make it very easy for our users and ourselves
 to test the packages.

 Have a nice day,

I think test should be run in a container (or VM) but never the local
system itself. The absolute minimum would be a chroot but a container
would give better control over things like networking.

MfG
Goswin


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/877guzlnxv.fsf@frosties.localnet



[DEP 8] Re: Is it possible to run autopkgtest without a virtual machine ?

2012-06-22 Thread Charles Plessy
Le Fri, Jun 22, 2012 at 11:02:04AM +0200, Goswin von Brederlow a écrit :
 
 I think test should be run in a container (or VM) but never the local
 system itself. The absolute minimum would be a chroot but a container
 would give better control over things like networking.

Hello Goswin

For networking, how about a needs-networking restriction ?

For protecting the user from side effects of runnign the tests, there is the
Restrictions field where one can declare that tests can break the system.
Perhaps a milder restriction could be added, for tests that can disturb the
system (such as restarting services, etc.), so that other tests can be
considered safe for local execution.  A large number of regression tests that I
know are completely safe, like checking that 2 + 2 returns 4, with of course
the limitation that running them exposes to the same possible bugs as for using
the program in other contexts.

I think that it would be a great feature to be able to run such tests locally
with a simple command that can take advantage of autopkgtest.  This means also
shipping them in a binary package, but we have already such packages containing
exactly the test data that is needed.

Have a nice day

-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120623032924.gb15...@falafel.plessy.net