Bug#844255: autopkgtest: --shell-fail does not work in case the tested package cannot be installed

SZALAY Attila sasa at ubainba.hu
Sun Nov 13 20:29:31 UTC 2016


Package: autopkgtest
Version: 4.2
Severity: normal

Dear Maintainer,

If the package cannot be installed for whatever reason, the --shell-fail
option does not give a shell to examine the situation. Maybe it is related
to the bug #832751 (autopkgtest: aborts the entire test run when one test
has unsatisfiable dependencies) but my issue is not about aborting the test,
but that I'm unable to check the situation afterwards.

A current example:
root at sasa:/home/sasa# autopkgtest src/debian/syslog-ng/git2/build-area/syslog-ng_3.8.1-5_amd64.changes @autopkg_sid.cfg
autopkgtest: DBG: autopkgtest options: Namespace(apt_pocket=[], auto_control=True, build_parallel=None, built_binaries=True, copy=[], env=[], gainroot=None, installed_click=None, logfile=None, output_dir='/tmp/autopkg-output', override_control=None, packages=['src/debian/syslog-ng/git2/build-area/syslog-ng_3.8.1-5_amd64.changes'], set_lang=None, setup_commands=['(O=$(bash -o pipefail -ec \'apt-get update | tee /proc/self/fd/2\') ||{ [ "${O%404*Not Found*}" = "$O" ] || exit 100; sleep 15; apt-get update; } || { sleep 60; apt-get update; } || false) && $(which eatmydata || true) apt-get dist-upgrade -y -o Dpkg::Options::="--force-confnew"'], setup_commands_boot=[], shell=False, shell_fail=True, summary=None, testname=None, timeout_build=None, timeout_copy=None, timeout_factor=1.0, timeout_install=None, timeout_short=None, timeout_test=None, user=None, verbosity=2)
autopkgtest: DBG: virt-runner arguments: ['lxc', 'autopkgtest-sid']
autopkgtest: DBG: actions: [('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-core_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-dbg_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-dev_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-add-contextual-data_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-amqp_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-geoip_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-graphite_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-journal_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-json_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-mongodb_3.8.1-5_amd64.deb', None), 
 ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-python_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-redis_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-riemann_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-smtp_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-sql_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng-mod-stomp_3.8.1-5_amd64.deb', None), ('binary', 'src/debian/syslog-ng/git2/build-area/syslog-ng_3.8.1-5_all.deb', None), ('source', 'src/debian/syslog-ng/git2/build-area/syslog-ng_3.8.1-5.dsc', False)]
autopkgtest: DBG: build binaries: False
autopkgtest: DBG: testbed init
autopkgtest [20:51:41]: version 4.2
autopkgtest [20:51:41]: host sasa; command line: /usr/bin/autopkgtest src/debian/syslog-ng/git2/build-area/syslog-ng_3.8.1-5_amd64.changes @autopkg_sid.cfg
autopkgtest: DBG: got reply from testbed: ok
autopkgtest: DBG: testbed open, scratch=None
autopkgtest: DBG: sending command to testbed: open
WARNING: ext3 signature detected on /dev/lxc/autopkgtest-lxc-dnxvsp at offset 1080. Wipe it? [y/n]: [n]
  Aborted wiping of ext3.
  1 existing signature left on the device.
autopkgtest: DBG: got reply from testbed: ok /tmp/autopkgtest-virt-lxc.shared.lnp59a2q/downtmp
autopkgtest: DBG: sending command to testbed: print-execute-command
autopkgtest: DBG: got reply from testbed: ok lxc-attach,--name,autopkgtest-lxc-dnxvsp,--,env,-i,bash,-c,set%20-a%3B%20%5B%20-r%20/etc/environment%20%5D%20%26%26%20.%20/etc/environment%202%3E/dev/null%20%7C%7C%20true%3B%20%5B%20-r%20/etc/default/locale%20%5D%20%26%26%20.%20/etc/default/locale%202%3E/dev/null%20%7C%7C%20true%3B%20%5B%20-r%20/etc/profile%20%5D%20%26%26%20.%20/etc/profile%202%3E/dev/null%20%7C%7C%20true%3B%20set%20%2Ba%3B%22%24%40%22%3B%20RC%3D%24%3F%3B%20%5B%20%24RC%20%21%3D%20255%20%5D%20%7C%7C%20RC%3D253%3B%20set%20-e%3Bmyout%3D%24%28readlink%20/proc/%24%24/fd/1%29%3Bmyerr%3D%24%28readlink%20/proc/%24%24/fd/2%29%3Bmyout%3D%22%24%7Bmyout/%5B/%5C%5C%5B%7D%22%3B%20myout%3D%22%24%7Bmyout/%5D/%5C%5C%5D%7D%22%3Bmyerr%3D%22%24%7Bmyerr/%5B/%5C%5C%5B%7D%22%3B%20myerr%3D%22%24%7Bmyerr/%5D/%5C%5C%5D%7D%22%3BPS%3D%24%28ls%20-l%20/proc/%5B0-9%5D%2A/fd/%2A%202%3E/dev/null%20%7C%20sed%20-nr%20%27%5C%23%28%27%22%24myout%22%27%7C%27%22%24myerr%22%27%29%23%20%7B%20s%23%5E.%2A/p
 roc/%28%5B0-9%5D%2B%29/.%2A%24%23%5C1%23%3B%20p%7D%27%7Csort%20-u%29%3BKILL%3D%22%22%3Bfor%20pid%20in%20%24PS%3B%20do%20%20%20%20%5B%20%24pid%20-ne%20%24%24%20%5D%20%26%26%20%5B%20%24pid%20-ne%20%24PPID%20%5D%20%7C%7C%20continue%3B%20%20%20%20KILL%3D%22%24KILL%20%24pid%22%3Bdone%3B%5B%20-z%20%22%24KILL%22%20%5D%20%7C%7C%20kill%20-9%20%24KILL%20%3E/dev/null%202%3E%261%20%7C%7C%20true%3Bexit%20%24RC,--
autopkgtest: DBG: sending command to testbed: capabilities
autopkgtest: DBG: got reply from testbed: ok revert revert-full-system root-on-testbed isolation-container reboot suggested-normal-user=nobody downtmp-host=/tmp/autopkgtest-virt-lxc.shared.lnp59a2q/downtmp
autopkgtest: DBG: testbed capabilities: ['revert', 'revert-full-system', 'root-on-testbed', 'isolation-container', 'reboot', 'suggested-normal-user=nobody', 'downtmp-host=/tmp/autopkgtest-virt-lxc.shared.lnp59a2q/downtmp']
autopkgtest [20:52:38]: @@@@@@@@@@@@@@@@@@@@ test bed setup
[...]
Setting up libevtlog0:amd64 (0.2.12-7) ...
Processing triggers for libc-bin (2.24-5) ...
Processing triggers for systemd (232-3) ...
Setting up libffi6:amd64 (3.2.1-6) ...
Setting up libglib2.0-0:amd64 (2.50.2-1) ...
No schema files found: doing nothing.
Setting up syslog-ng-mod-journal (3.8.1-5) ...
Setting up syslog-ng-core (3.8.1-5) ...
Created symlink /etc/systemd/system/multi-user.target.wants/syslog-ng.service -> /lib/systemd/system/syslog-ng.service.
Job for syslog-ng.service failed because the control process exited with error code.
See "systemctl status syslog-ng.service" and "journalctl -xe" for details.
invoke-rc.d: initscript syslog-ng, action "start" failed.
* syslog-ng.service - System Logger Daemon
   Loaded: loaded (/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sun 2016-11-13 19:53:21 UTC; 19ms ago
     Docs: man:syslog-ng(8)
  Process: 998 ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS (code=exited, status=1/FAILURE)
 Main PID: 998 (code=exited, status=1/FAILURE)
   Status: "Starting up... (Sun Nov 13 19:53:21 2016"

Nov 13 19:53:21 autopkgtest-lxc-dnxvsp systemd[1]: syslog-ng.service: Main pr…RE
Nov 13 19:53:21 autopkgtest-lxc-dnxvsp systemd[1]: Failed to start System Log…n.
Nov 13 19:53:21 autopkgtest-lxc-dnxvsp systemd[1]: syslog-ng.service: Unit en…e.
Nov 13 19:53:21 autopkgtest-lxc-dnxvsp systemd[1]: syslog-ng.service: Failed …'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package syslog-ng-core (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of autopkgtest-satdep:
 autopkgtest-satdep depends on syslog-ng-core; however:
  Package syslog-ng-core is not configured yet.

dpkg: error processing package autopkgtest-satdep (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.24-5) ...
Processing triggers for systemd (232-3) ...
Errors were encountered while processing:
 syslog-ng-core
 autopkgtest-satdep
E: Sub-process /usr/bin/dpkg returned an error code (1)
autopkgtest: DBG: testbed command exited with code 100
autopkgtest: DBG: apt-get install failed; status-fd:
dlstatus:1:0.0000:Retrieving file 1 of 7
[...]
pmerror:syslog-ng-core:80.8511:subprocess installed post-installation script returned error exit status 1
pmerror:autopkgtest-satdep:80.8511:dependency problems - leaving unconfigured
pmstatus:libc-bin:80.8511:Running post-installation trigger libc-bin
pmstatus:libc-bin:82.9787:Configuring libc-bin
pmstatus:libc-bin:85.1064:Installed libc-bin
pmstatus:systemd:85.1064:Running post-installation trigger systemd
pmstatus:systemd:87.2340:Configuring systemd
pmstatus:systemd:89.3617:Installed systemd

autopkgtest: DBG: BadPackageError Test dependencies are unsatisfiable. A common reason is that your testbed is out of date with respect to the archive, and you need to use a current testbed or run apt-get update or use -U.
autopkgtest: DBG: testbed stop
autopkgtest: DBG: testbed close, scratch=/tmp/autopkgtest-virt-lxc.shared.lnp59a2q/downtmp
autopkgtest: DBG: sending command to testbed: close
autopkgtest: DBG: got reply from testbed: ok
autopkgtest: DBG: sending command to testbed: quit
blame: arg:src/debian/syslog-ng/git2/build-area/syslog-ng-core_3.8.1-5_amd64.deb deb:syslog-ng-core arg:src/debian/syslog-ng/git2/build-area/syslog-ng-dbg_3.8.1-5_amd64.deb deb:syslog-ng-dbg arg:src/debian/syslog-ng/git2/build-area/syslog-ng-dev_3.8.1-5_amd64.deb deb:syslog-ng-dev arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-add-contextual-data_3.8.1-5_amd64.deb deb:syslog-ng-mod-add-contextual-data arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-amqp_3.8.1-5_amd64.deb deb:syslog-ng-mod-amqp arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-geoip_3.8.1-5_amd64.deb deb:syslog-ng-mod-geoip arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-graphite_3.8.1-5_amd64.deb deb:syslog-ng-mod-graphite arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-journal_3.8.1-5_amd64.deb deb:syslog-ng-mod-journal arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-json_3.8.1-5_amd64.deb deb:syslog-ng-mod-json arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-m
 ongodb_3.8.1-5_amd64.deb deb:syslog-ng-mod-mongodb arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-python_3.8.1-5_amd64.deb deb:syslog-ng-mod-python arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-redis_3.8.1-5_amd64.deb deb:syslog-ng-mod-redis arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-riemann_3.8.1-5_amd64.deb deb:syslog-ng-mod-riemann arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-smtp_3.8.1-5_amd64.deb deb:syslog-ng-mod-smtp arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-sql_3.8.1-5_amd64.deb deb:syslog-ng-mod-sql arg:src/debian/syslog-ng/git2/build-area/syslog-ng-mod-stomp_3.8.1-5_amd64.deb deb:syslog-ng-mod-stomp arg:src/debian/syslog-ng/git2/build-area/syslog-ng_3.8.1-5_all.deb deb:syslog-ng src/debian/syslog-ng/git2/build-area/syslog-ng_3.8.1-5.dsc
badpkg: Test dependencies are unsatisfiable. A common reason is that your testbed is out of date with respect to the archive, and you need to use a current testbed or run apt-get update or use -U.
autopkgtest [20:53:24]: ERROR: erroneous package: Test dependencies are unsatisfiable. A common reason is that your testbed is out of date with respect to the archive, and you need to use a current testbed or run apt-get update or use -U.
autopkgtest: DBG: testbed stop
root at sasa:/home/sasa# 
root at sasa:/home/sasa# cat autopkg_sid.cfg
-s
-dd
--output-dir=/tmp/autopkg-output
--apt-upgrade
--
lxc
autopkgtest-sid



-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages autopkgtest depends on:
ii  apt-utils       1.3.1
ii  libdpkg-perl    1.18.10
ii  procps          2:3.3.12-2
ii  python3         3.5.1-4
ii  python3-debian  0.1.29

Versions of packages autopkgtest recommends:
ii  autodep8  0.8

Versions of packages autopkgtest suggests:
ii  lxc          1:2.0.5-3
pn  lxd-client   <none>
pn  qemu-system  <none>
pn  qemu-utils   <none>
ii  schroot      1.6.10-2+b1

-- no debconf information



More information about the autopkgtest-devel mailing list