Commit Graph

350 Commits

Author SHA1 Message Date
Dimitri John Ledkov
5594ebf325
debian/tests/storage: fix for LUKS2 and avoid interactive password prompts. 2019-02-14 14:48:02 +00:00
Dimitri John Ledkov
f93b9e46b5
Blacklist TEST-10-ISSUE-2467 #11706 2019-02-13 00:38:21 +00:00
Dimitri John Ledkov
7dff5196e2
debian/tests/control: add socat to upstream tests for pull #11591 2019-02-09 14:09:43 +00:00
Dimitri John Ledkov
a106d9c60b
debian/tests/upstream: Mark TEST-13-NSPAWN-SMOKE as flakey. 2019-01-28 13:49:08 +00:00
Dimitri John Ledkov
bfafb0924a
debian/tests/storage: improve cleanups.
On fast ppc64el machines, cryptsetup start job may not complete by the time
tearDown is executed. In that case stop, causes to simply cancel the start job
without actually cleaning up the dmsetup node. This leads to failing subsequent
test as it no longer starts with a clean device. Thus ensure the
systemd-cryptsetup unit is started, before stopping it.

Also rmmod scsi_debug module at the end, to allow re-running the test in a
loop.
2019-01-28 13:04:21 +00:00
Martin Pitt
1eb1439867 tests: Disable flaky TEST-17-UDEV-WANTS upstream test
See https://github.com/systemd/systemd/issues/11195
2018-12-21 12:10:44 +01:00
Martin Pitt
2c194b155b tests: Disable some flaky upstream tests
See https://github.com/systemd/systemd/issues/11195
2018-12-19 08:30:18 +01:00
Michael Biebl
259bb89643 autopkgtest: Drop test_custom_cgroup_cleanup from boot-and-services
So far, we tried to avoid cleaning up manually created cgroups via a
Debian specific patch. This patch was dropped though and that particular
use case was never really supported upstream.
As this would trigger an autopkgtest failure now, let's remove this test.

Follow-up for commit 9738816398.

Gbp-Dch: Short
2018-11-21 21:47:22 +01:00
Michael Biebl
b5c1aba27e autopktest: Add e2fsprogs dependency to upstream test
Some of the upstream tests require mkfs.ext4.

Closes: #887250
2018-11-17 23:02:36 +01:00
Michael Biebl
ede53b8844 autopkgtest: Use shutil.which() which is provided by Python 3
Suggested in https://salsa.debian.org/systemd-team/systemd/merge_requests/11

Gbp-Dch: Short
2018-11-16 23:34:23 +01:00
Martin Pitt
fef30053a9 autopkgtest: Avoid test bed reset for boot-smoke
Make "boot-smoke"'s dependencies a strict superset of "upstream"'s, so
that autopkgtest doesn't have to provide a new testbed.
2018-10-31 23:31:06 +01:00
Martin Pitt
7c79f66f8f Enable QEMU on more architectures in "upstream" autopkgtest
Taken from the Ubuntu package, so apparently QEMU works well enough on
these architectures now.
2018-10-31 23:29:59 +01:00
Martin Pitt
05550734a4 debian/tests/boot-and-services: Accept gdm with Wayland session
Remove the Xorg check and use pgrep to accept any gdm session type.

Gbp-Dch: Ignore
2018-10-27 09:08:05 +02:00
Martin Pitt
1044f758b6 debian/tests/boot-and-services: Use gdm instead of lightdm
This seems to work more reliably, on Ubuntu CI's i386 instances lightdm
fails.

Backported from Ubuntu package, thanks Dimitri John Ledkov!

https://github.com/systemd/systemd/issues/10497
2018-10-25 20:56:37 +02:00
Martin Pitt
22ac85b278 Revert "test: Add accountsservice dependency to boot-and-services test"
This did not help.

This reverts commit 42a377a7f5.

Gbp-Dch: Ignore
2018-10-25 08:24:32 +02:00
Martin Pitt
42a377a7f5 test: Add accountsservice dependency to boot-and-services test
It appears lightdm fails to start up without it, even though it's just a
Recommends:, and it does seem to work without it on amd64. But it does
not hurt much, so let's see if it helps.

https://github.com/systemd/systemd/issues/10497

Gbp-Dch: Short
2018-10-24 16:53:12 +02:00
Michael Biebl
675c1ed011 debian/tests/upstream: Clean up after each test run
Otherwise the loopback images used by qemu are not properly released and
we might run out of disk space.
2018-10-18 02:52:59 +02:00
Michael Biebl
242c96addb test: Use installed catalogs when test-catalog is not located at build dir
This makes it possible to run test-catalog as installed test, so we no
longer need to mark it as EXFAIL in our root-unittests autopkgtest.
2018-09-12 19:07:08 +02:00
Michael Biebl
b3d45c99f6 autopkgtest: Remove needs-recommends runtime restriction
This restriction has been deprecated and there are plans to remove it
altogether. The tests pass withouth needs-recommends, so it seems safe
to remove.

See 9fade8dcb5
2018-09-11 03:03:12 +02:00
Michael Biebl
1a9426c134 autopkgtest: Add dbus-user-session and libpam-systemd dependency to root-unittests
Without a working D-Bus user session, a lot of the test-bus-* tests are
skipped.
2018-07-20 23:54:49 +02:00
Michael Biebl
1d838336a0 autopkgtest: Add iputils-ping dependency to root-unittests
The ping binary is required by test-bpf.
2018-07-20 23:51:07 +02:00
Michael Biebl
98996e8a65 autopkgtest: Add various dependencies to make upstream test pass on Debian
- netcat-openbsd: Required by TEST-12-ISSUE-3171.
- busybox-static: Required by TEST-13-NSPAWN-SMOKE.
- plymouth: Required by TEST-15-DROPIN and TEST-22-TMPFILES.
2018-07-19 00:37:38 +02:00
Michael Biebl
fb125cc30e debian/tests/localed-x11-keymap: Deal with absence of /etc/default/keyboard more gracefully 2018-07-17 12:04:00 +02:00
Michael Biebl
dbb29f1369 autopkgtest: Drop no-longer needed workaround from upstream test 2018-07-16 11:17:41 +02:00
Michael Biebl
4ae56d17be autopkgtest: Make AppArmor violator test work with merged-usr 2018-07-09 04:19:11 +02:00
Martin Pitt
a57fbd1450 autopkgtest: Add missing python3 test dependency for udev test 2018-07-08 20:41:30 +02:00
Martin Pitt
568bb9f047 autopkgtest: Install libnss-systemd
Make sure that dynamic users can be resolved. This e. g. prevents a
startup failure for systemd-resolved.
2018-07-08 12:58:12 +02:00
Dimitri John Ledkov
cb3c4f8f91 Run all upstream tests, and then report all that failed. 2018-06-12 20:44:12 +00:00
Martin Pitt
50e860fd3e debian/tests/boot-and-services: Ignore cpi.service failure
This is apparently a regression in Ubuntu 18.04, not in systemd, so
ignore it.
2018-05-14 11:45:02 +02:00
Evgeny Vereshchagin
368160993f upstream autopkgtest: Copy journal subdirectories
Otherwise logs are missing on failures:

   cp: -r not specified; omitting directory '/var/tmp/systemd-test.Nq2jqR/journal/59852163a37d458f9d238b65f279b6fa'
2018-04-10 21:45:49 +02:00
Martin Pitt
b833092230 debian/tests/boot-smoke: More robust journal checking
Also fail the test if calling journalctl fails, and avoid calling it
twice. See https://github.com/systemd/systemd/pull/8032
2018-02-10 12:55:43 +01:00
Martin Pitt
4f8eb632e6 debian/tests/upstream: Only show ≥ warning in journal dumps
Showing the entire debug log is too hard to scan visually, and most of
the time the warnings and errors are sufficient to explain a failure.
Put the journal files into the artifacts though, in case the debug
information is necessary.
2017-11-24 17:17:02 +01:00
Martin Pitt
e91f20d9eb Merge logind-kill-off autopkgtest into logind test
This was horribly inefficient as a separate test (from commit
6bd0dab41e), as that cost two VM resets plus accompanying boots; and
this does not change any state thus does not require this kind of
isolation.
2017-09-14 23:03:27 +02:00
Dimitri John Ledkov
6bd0dab41e
Disable KillUserProcesses, yet again, with meson this time. 2017-08-18 13:35:17 +01:00
Felipe Sateler
f891976454 Add fdisk to the dependencies of the upstream autopkgtest
The upstream autopkgtest uses sfdisk, which is now in the non-essential fdisk package.

Closes: #872119
2017-08-15 17:00:25 -03:00
Evgeny Vereshchagin
22a7c0558f debian/tests/upstream: Disable check for ninja executable
_ninja_bin was added in https://github.com/systemd/systemd/pull/6544 in
order to make the tests work on CentOS. As we don't actually do a "ninja
install" and ninja is not available, replace the check with a dummy
value.
2017-08-07 08:37:09 +02:00
Martin Pitt
de13027ff7 debian/tests/upstream: Add systemd-coredump and quota test dependencies
Without these, dracut complains about the missing libdw.so, and test
setup about missing "quotaon".  These errors become fatal with
<https://github.com/systemd/systemd/pull/6475>.
2017-07-30 10:06:59 +02:00
Martin Pitt
602ca961b4 debian/tests/upstream: Fix Makefile.guess failure
Makefile.guess tries to find the build directory if $BUILD_DIR is not
set. This doesn't always exist for an autopkgtest, thus fix it to ".";
it is not actually being used anyway. Adjust the sed for using the
system-installed nspawn binary accordingly.
2017-07-30 09:51:43 +02:00
Martin Pitt
43566b4f93 debian/tests/upstream: Fix for ninja migration
Generalize the sed match to not only catch "make install" but also
"ninja install", by just matching onlines which specify "DESTDIR" and
"install". This fixes the "upstream" test after
https://github.com/systemd/systemd/commit/209f4b9e33

See https://github.com/systemd/systemd/issues/6474

Gbp-Dch: Short
2017-07-28 12:21:50 +02:00
Michael Biebl
1866313760 udev autopkgtest: no longer install test-udev binary manually
This is now done by the upstream build system.

See https://github.com/systemd/systemd/pull/6178
2017-07-12 22:28:57 +02:00
Michael Biebl
db8bd967bf Split upstream tests into systemd-tests binary package
Closes: #859152
2017-04-08 11:40:37 +02:00
Martin Pitt
c09b438cf0 root-unittest: Drop obsolete FIXME
We actually do want to run "udev" as a separate test, as that needs
machine isolation while all the others only require container isolation.
2017-03-05 14:30:47 +01:00
Martin Pitt
a2cc9d4459 udev autopkgtest: Drop obsolete sys.tar.xz fallback
This was only necessary for supporting 232 as well.
2017-03-05 14:30:47 +01:00
Michael Biebl
b691eb8cd6 Fix location of installed tests 2017-03-03 17:51:42 +01:00
Martin Pitt
639184fc39 root-unittests autopkgtest: Skip test-udev
It has its own autopkgtest and needs some special preparation. At some
point that should be merged into root-unittests, but let's quickfix this
to unbreak upstream CI.
2017-03-03 16:58:29 +01:00
Martin Pitt
9da6d428c0 debian/tests/udev: Adjust path for "make install-tests" layout
Also, "make install-tests" apparently forgets to install test-udev, so
do that manually for now.

Gbp-Dch: Ignore
2017-03-02 16:03:40 +01:00
Martin Pitt
5914346127 Use "make install-tests" for shipped unit tests
This installs the necessary test data along with the programs and thus
we can greatly reduce the blacklist in debian/tests/root-unittests and
also simplify debian/rules.
2017-03-02 12:07:01 +01:00
Martin Pitt
95391f1ae4 logind autopkgtest: Adjust to work in containers
Skip the suspend and ACL test when running in containers, and relax the
isolation restriction.
2017-02-21 21:47:38 +01:00
Martin Pitt
9604489bfe boot-smoke autopkgtest: Run in containers, too
There is no particular reason why this wouldn't work in containers, and
it works fine in LXC.
2017-02-21 21:40:08 +01:00
Martin Pitt
862554e544 boot-and-services autopkgtest: Skip CgroupsTest on unified hierarchy
The test needs some serious reworking for the unified hierarchy (and
should be replaced with an upstream test too), so just skip it for now.
2017-02-20 11:15:45 +01:00
Martin Pitt
2a28de56de root-unittests autopkgtest: Blacklist test-journal-importer
This got added in a recent PR, but running this requires using "make
install-tests" which hasn't landed yet.
2017-02-16 21:33:48 +01:00
Martin Pitt
1bd9a3b957 udev autopkgtest: Adjust to script-based test /sys creation
PR #5250 changes from the static sys.tar.xz to creating the test /sys
directory with a script. Get along with both cases until 233 gets
released and packaged.
2017-02-11 16:54:26 +01:00
Martin Pitt
3afc624373 autopkgtest: Run all upstream unit tests as root
Ship all upstream unit tests in libsystemd-dev, and run them all as root
in autopkgtest.

Closes: #854392
2017-02-09 19:29:25 +01:00
Martin Pitt
ac866cbd38 Add autopkgtest for test-seccomp
Ship test-seccomp in libsystemd-dev and run it as autopkgtest, so that
it's easier to spot regressions like issue #5215.

Gbp-Dch: Short
2017-02-03 10:07:45 +01:00
Martin Pitt
3316971a85 Add policykit-1 test dependency for networkd-test.py
See https://github.com/systemd/systemd/pull/4701
2016-11-20 13:47:47 +01:00
Evgeny Vereshchagin
9a11f52bb4 debian/tests/upstream: Print all journal files
We don't print all journal files. This is misleading a bit:
https://github.com/systemd/systemd/pull/4331#issuecomment-252830790
https://github.com/systemd/systemd/pull/4395#discussion_r87948836
2016-11-18 10:00:50 +01:00
Martin Pitt
b88b6dd581 debian/tests/boot-and-services: Always run seccomp test
seccomp is now available on all architectures on which Debian and Ubuntu run
tests, so stop making this test silently skip if seccomp is disabled.
2016-11-15 09:16:15 +01:00
Martin Pitt
71d26a6a7a debian/tests/systemd-fsckd: Create /etc/default/grub.d if necessary 2016-11-09 13:27:00 +01:00
Martin Pitt
fa9a5e33a0 debian/tests/upstream: Fix clobbering of merged-/usr symlinks
"dpkg-deb -x" replaces the "/bin -> usr/bin" symlinks with directories, as
that's tar's default. Call tar manually with --dereference to keep the links.

https://github.com/systemd/systemd/issues/4630

Gbp-Dch: short
2016-11-09 12:56:04 +01:00
Martin Pitt
50e0787a4d debian/tests/unit-config: Query pkg-config for system unit dir
This fixes confusion on merged-/usr systems where both /usr/lib/systemd and
/lib/systemd exist. It's actually useful to verify that systemd.pc says the
truth.
2016-11-09 11:46:12 +01:00
Martin Pitt
51a7d5d6ab debian/tests/boot-and-services: Check common properties of CLI programs
Verify that CLI programs have a sane behaviour and exit code when being called
with --help, --version, or an invalid option.

This reproduces #843509 aka. issue #4605.
2016-11-07 23:15:53 +01:00
Martin Pitt
fde252bda7 debian/tests/logind: Adjust "in logind session" test for unified cgroup hierarchy
https://github.com/systemd/systemd/commit/5da38d076 switched to the unified
hierarchy for systemd's own cgroup. This changes the format in
/proc/pid/cgroup, so support both in the "logind" test.

Gbp-Dch: Short
2016-11-07 13:06:28 +01:00
Martin Pitt
dec106b8e9 debian/tests/logind: Split out "pid in logind session" test
This accidentally slipped into test_shutdown() when this got reorganized, but
it's an unrelated test.

Gbp-Dch: Short
2016-11-07 12:33:29 +01:00
Martin Pitt
16d72ac45d debian/tests/logind: Copy the current on-disk unit instead of the on-memory one
With https://github.com/systemd/systemd/pull/4493, systemctl cat now warns that
the on-disk unit changed, which causes failure due to unexpected stderr.

We actually intend to use the on-disk one instead of the potentially older
in-memory one, so change this to ask for the unit file path and operate on that
instead.
2016-10-28 12:19:07 +02:00
Martin Pitt
5fc1668918 debian/tests/upstream: Add gcc/libc-dev/make test dependencies
So that the tests can build helper binaries.
2016-10-18 10:46:11 +02:00
Martin Pitt
f142ef34c1 debian/tests/upstream: Run tests via Makefile
This avoids replicating the logic and also takes building helper binaries into
account.

The current Makefiles call "make all" on the entire upstream tree which we need
to disable -- first, we don't actually want/need to do that for testing .debs,
and second the build should not happen as root.
2016-10-18 08:46:22 +02:00
Martin Pitt
068efe4aac debian/tests/upstream: Stop specifying initrd
Since https://github.com/systemd/systemd/commit/61fea35e14d8 this is being
autodetected on Debian correctly.
2016-10-18 08:14:22 +02:00
Martin Pitt
9cba5a09dd debian/tests/storage: Avoid rmmod scsi_debug
rmmod can often be brittle, so just clear the fake drive in between tests
instead of rmmod/modprobe.

LP: #1626737
2016-09-25 23:08:22 +02:00
Martin Pitt
20f60ac579 debian/tests/upstream: Drop blacklisting
https://github.com/systemd/systemd/pull/3587 landed a while ago and these tests
now work fine without qemu.
2016-09-25 23:08:22 +02:00
Martin Pitt
7be9ecba04 Replace remaining systemctl --failed with --state=failed
"--failed" is deprecated in favor of --state.
2016-09-25 23:08:22 +02:00
Martin Pitt
c80c55b22d debian/tests/storage: Avoid stderr output of stopping systemd-cryptsetup@.service 2016-09-20 13:25:28 +02:00
Martin Pitt
972e467665 debian/tests/systemd-fsckd: Robustify check for "unit was running"
In some cases ActiveEnterTimestampMonotonic is zero even for units that did
run. Stop trying to interpret individual properties and just rely on "systemctl
status" to do it for us.

This also shows the complete status output on test failure, which eases
debugging.

LP: #1624406
2016-09-19 22:36:59 +02:00
Martin Pitt
39fc527be0 debian/tests/boot-smoke: Only run 5 iterations
20 iterations take about 45 minutes in our cloud environment, so dial that down
for now. It's simple enough to bump back once we actually run into a hard to
reproduce boot failure, but it has not happened in a long time.

Gbp-Dch: Short
2016-09-19 22:36:59 +02:00
Martin Pitt
a1bbdee842 debian/tests/smoke: Store udev db dump artifact on failure 2016-09-10 13:20:16 +02:00
Martin Pitt
2e9ebeb1f9 debian/tests/localed-x11-keymap: Check that localed works without /etc/default/keyboard
This reproduces #833849.
2016-08-14 09:24:29 +02:00
Martin Pitt
a4d7f8fb15 debian/tests/localed-x11-keymap: Robustify cleanup
Ensure that /etc/default/keyboard always gets restored even on a failure.

Gbp-Dch: Short
2016-08-14 09:23:36 +02:00
Michael Biebl
afcfe60a53 debian/tests/udev: Update test-udev location
The test-udev binary was moved to $libdir/udev, update the test
accordingly. Followup fix for 7f15fae093
2016-07-07 15:33:01 +02:00
Michael Prokop
3b32860391 debian/tests/logind: ensure correct version of logind is running
systemd-logind can't be restarted during upgrades, see git commit b8c239e12 and
https://github.com/systemd/systemd/issues/1163

But if we don't upgrade logind during our tests we might end up with calling
unsupported methods, e.g. failing as follows during an autopkgtest test run
within a jessie environment with the systemd backport:

| Error: org.freedesktop.DBus.Error.UnknownMethod
| Unknown method 'ScheduledShutdown' or interface 'org.freedesktop.login1.Manager'.
2016-07-07 12:24:29 +02:00
Martin Pitt
10b923ee62 debian/tests/boot-smoke: Stop running in containers again
Too unreliable on Ubuntu s390x right now.
2016-07-01 14:13:20 +02:00
Martin Pitt
44612a1416 Directly run test/networkd-test.py in autopkgtest
Sync test/networkd-test.py with current upstream master, and remove our debian/tests/networkd copy.
2016-06-30 16:06:50 +02:00
Martin Pitt
bb04342882 debian/tests/networkd: Sync with upstream PR#3628 2016-06-30 12:34:16 +02:00
Martin Pitt
43aff570eb debian/tests/networkd: Sync with upstream 2016-06-29 15:22:52 +02:00
Martin Pitt
40dfecc86b debian/tests/boot-smoke: Run in containers as well 2016-06-29 15:22:52 +02:00
Martin Pitt
5600722fc0 debian/tests/control: Update copied qemu-systemd-x86 test dependency 2016-06-29 15:22:52 +02:00
Martin Pitt
774f8b0483 debian/tests/networkd: Sync with upstream 2016-06-29 11:30:40 +02:00
Martin Pitt
5de873cdbd debian/tests/networkd: Stop skipping the two DHCP6 tests
This regression seems to have been fixed now.
2016-06-29 11:26:32 +02:00
Martin Pitt
46be001b74 debian/tests/storage: Sync and settle udev after luksFormat
This hopefully reduces the chance of seeing some half-written signatures.
2016-06-27 14:26:51 +02:00
Martin Pitt
038e56c26b debian/tests/upstream: Fix typo that causes some tests to not run with QEMU 2016-06-24 16:16:39 +02:00
Martin Pitt
3f51ce753e debian/tests/upstream: Do not run the QEMU tests on i386
Nested QEMU on i386 causes testbed hangs on Ubuntu's cloud infrastructure,
which is the only place where these actually run.
2016-06-23 10:43:21 +02:00
Martin Pitt
a6ee982a31 debian/tests/upstream: Blacklist tests failing without QEMU
Some tests fail on platforms without QEMU at the moment due to
https://github.com/systemd/systemd/pull/3587.
Blacklist these for now if QEMU is not available.
2016-06-23 10:36:19 +02:00
Martin Pitt
e2e18a10b7 debian/tests/upstream: Clean up old journals before running a test
This avoids printing a wrong one on failure.
2016-06-23 10:20:18 +02:00
Martin Pitt
7b4025fc05 Make debian/tests/upstream non-fatal on ppc64el
Some tests fail on ppc64el at the moment; only get their logs, don't fail the
entire autopkgtest there.
2016-06-22 23:17:42 +02:00
Martin Pitt
8d5de5725d upstream autopkgtest: Limit QEMU test dependencies to x86
The upstream tests currently only support i386 and amd64 in QEMU, and we do not
want to run for foreign architectures, so there is
no point installing qemu-system-x86 on non-x86.
2016-06-21 23:49:56 +02:00
Martin Pitt
28b7a0b5b8 debian/tests/systemd-fsckd: Adjust was_running() to also work for version 230
The start time apparently does not appear in the ExecStart= property any more.
Query ActiveEnterTimestampMonotonic instead, which is a more "official"
property.

Also change is_active_unit() to allow easier debugging.
2016-06-21 23:39:22 +02:00
Martin Pitt
063876a729 debian/tests/upstream: Show journals on failure
Also adjust the path to the SELinux pp binary in test/TEST-06-SELINUX/test.sh.
2016-06-21 14:56:56 +02:00
Martin Pitt
106f40ff93 Add "upstream" autopkgtest
This runs the test/TEST* upstream integration tests in QEMU and nspawn.

We need to modify test-functions a bit: We don't want to run this against a
built source tree (which we don't even have for a distro test run), but against
the installed packages.

Skip TEST-06-SELINUX for now as this does not work in Ubuntu (even after
install policycoreutils): The test expects a /usr/libexec/selinux/hll/pp file
which does not exist.
2016-06-21 13:06:21 +02:00
Martin Pitt
96713ccb3c Fix test_domain_specific_dns for many DNS servers
Fix test from commit f1c7ded77d: If we already have three nameservers in
resolv.conf, then we can't rely on our test one to be there. Adjust the test
case accordingly, similar to what do_test() does.
2016-06-07 10:46:20 +02:00
Martin Pitt
f1c7ded77d Fix networkd integration with resolvconf for domain-limited DNS servers
DNS servers which only apply to particular domains should/must not appear in
/etc/resolv.conf as globl name servers.

Thanks Andy Whitcroft for the initial fix!

Add corresponding test case to debian/tests/networkd.

LP: #1587762
2016-06-02 11:16:31 +02:00
Martin Pitt
ca2e6ef5a5 debian/tests/boot-and-services, test_no_failed(): Show journal of failed units 2016-06-01 22:44:15 +02:00
Martin Pitt
0cea7cc147 debian/tests/boot-and-services: Adjust test_tmp_mount() for fixed systemctl exit code for "unit not found"
The exit code got fixed in upstream commit ca473d57, for the upcoming systemd
231.
2016-05-31 13:22:02 +02:00
Martin Pitt
7c0561f033 boot-and-services autopkgtest: Add missing xserver-xorg and lightdm-greeter test dependencies
So that lightdm can start. (See LP #1581106)
2016-05-25 09:03:14 +02:00
Martin Pitt
75a9f425b7 Remove "bootchart" autopkgtest
This upstream version does not ship bootchart any more. It will be packaged separately.
2016-05-22 22:53:54 +02:00
Martin Pitt
6cb6c65f4f Drop cmdline-upstart-boot autopkgtest
It was still needed up to Ubuntu 16.04 LTS, but upstart-sysv is not supported
any more in Debian and Ubuntu now.

Also, should upstart-sysv ever come back, this test should be moved into the
upstart package.
2016-05-12 21:17:59 +02:00
Martin Pitt
4a5b0df050 debian/tests/boot-smoke: Configure dummy X.org driver
(like in the boot-and-services test). This should avoid lightdm randomly fail.

LP: #1571673
2016-04-20 09:00:34 +02:00
Martin Pitt
2c61cc9874 debian/tests/boot-smoke: Add some extra debugging if there are pending jobs after 10s
This should help to figure out why lightdm is sometimes "restarting". See
<https://launchpad.net/bugs/1571673>.
2016-04-18 17:31:18 +02:00
Martin Pitt
d3e7a70d51 debian/tests/cmdline-upstart-boot: In test_rsyslog(), check for messages from dbus instead of NetworkManager
NM 1.2 does not seem to log to syslog by default any more.
2016-04-12 10:08:56 +02:00
Martin Pitt
f2031001b0 debian/tests/unit-config: More checks for linked units
Check disabling of a "systemctl link"ed unit, and check "systemctl enable" on a
unit with full path which is not in the standard directories.
2016-04-11 20:56:32 +02:00
Martin Pitt
6ebdc0dcfa debian/tests/unit-config: Use systemd-sysv-install instead of update-rc.d directly
So that the test works under Fedora too.
2016-04-07 22:38:19 +02:00
Martin Pitt
4384ae3ea6 debian/tests/unit-config: Detect if system units are in /usr/
So that the test works on systems with merged /usr.
2016-04-07 22:32:38 +02:00
Martin Pitt
12085d6ac6 debian/tests/unit-config: Check that enable/disable commands are idempotent 2016-04-07 21:49:45 +02:00
Martin Pitt
400b6df031 debian/tests/unit-config: Call "daemon-reload" to clean up generated units in between tests 2016-04-07 21:40:28 +02:00
Martin Pitt
148044d692 Add "udev" autopkgtest for running the upstream test/udev-test.pl 2016-04-06 10:19:50 +02:00
Martin Pitt
47c119cd74 debian/tests/boot-and-services: Avoid race in NspawnTests.test_service()
Don't assert on "Stopped Container c1" message in NspawnTests.test_service(),
this is sometimes not present. Just check that the unit did not fail.
2016-03-09 18:06:42 +01:00
Martin Pitt
1b5b60375e debian/tests/networkd: Skip DHCPv6 tests for downstream packages too
This is an actual regression in networkd-229, to be investigated. But this
shouldn't hold up reverse dependencies.
2016-03-08 13:19:33 +01:00
Martin Pitt
5406a85f20 debian/tests/boot-and-services: Fix waiting for units
Wait for units to stop with a "systemctl is-active" loop instead of static
sleeps.
2016-03-07 11:09:25 +01:00
Evgeny Vereshchagin
d6a2d8c071 debian/tests/boot-and-services: search systemd-coredump's output by SYSLOG_IDENTIFIER
We lose _EXE sometimes: https://bugs.freedesktop.org/show_bug.cgi?id=50184
So, use SYSLOG_IDENTIFIER instead.

See also https://github.com/systemd/systemd/pull/2648#issuecomment-188936881
2016-03-03 15:56:42 +01:00
Martin Pitt
b2e4f1bbca debian/tests/networkd: Skip test_hogplug_dhcp_ip6 when running against upstream as well
This is a real bug, but should not block other upstream PRs.
2016-03-01 12:03:59 +01:00
Martin Pitt
45f38dcccc debian/tests/timedated: Add tests for "timedatectl set-local-rtc"
This requires the fix for https://github.com/systemd/systemd/issues/2638.
2016-02-29 07:35:44 +01:00
Martin Pitt
ea3fde415d debian/tests/control: Fix wrong empty line
Typo from commit 98771fa4dc.
2016-02-27 12:33:06 +01:00
Martin Pitt
98771fa4dc debian/tests/bootchart: Don't run for upstream tests
bootchart now got removed from master, so move its autopkgtest below the
"NOUPSTREAM" section in debian/tests/control to speed up upstream tests.

Also drop the $TEST_UPSTREAM check from the autopkgtest as that's redundant
now.
2016-02-25 17:57:38 +01:00
Martin Pitt
54e0510590 debian/tests/boot-and-services: Sync journal in nspawn test
Sync the journal before examining it.
2016-02-24 08:05:39 +01:00
Martin Pitt
f6b88f7e1b debian/tests/boot-and-services: Show verbose journal output on failure in nspawn test 2016-02-22 21:27:30 +01:00
Martin Pitt
3e405eab16 debian/tests/bootchart: Skip test if bootchart is not available
bootchart is in the process of moving to a separate repository.

Only do that when testing in upstream mode. For the distro we want to assert
that bootchart is available for the time being.
2016-02-19 18:03:29 +01:00
Martin Pitt
97e951d6ad debian/tests/networkd: Skip test_coldplug_dhcp_ip6 when running against upstream
This test is brittle there. To be investigated.
2016-02-19 08:25:11 +01:00
Martin Pitt
29bc0c4060 debian/tests/boot-and-services: Skip journal test for test_bash_crash when running against upstream
This currently fails most of the time. To be investigated.
2016-02-18 19:18:57 +01:00
Martin Pitt
ca5b98fb13 debian/tests/systemd-fsckd: Use grub.d/50-cloudimg-settings.cfg as a template for generating our custom one
... instead of 90-autopkgtest.cfg. The latter does not exist on non-x86
architectures and is not relevant for this test.

This should fix the non-rebooting ppc64el instances in Ubuntu CI.
2016-02-18 17:54:30 +01:00
Martin Pitt
388a7e7658 debian/tests/boot-and-services: Explicitly sync the journal and reduce timeout again
This refines 8637e11. Thanks Evgeny Vereshchagin for the suggestion!
2016-02-18 16:05:38 +01:00
Martin Pitt
8637e1162b debian/tests/boot-and-services: Increase timeouts of test_bash_crash from 5 to 50 seconds 2016-02-18 15:32:58 +01:00
Martin Pitt
4f1bf9f6b4 Speed up autopkgtests
debian/tests/control: Rearrange tests and avoid removing test dependencies to
minimize testbed resets. This considerably speeds up running the autopkgtests.

Wrap test dependencies.
2016-02-10 12:37:23 +01:00
Martin Pitt
d3729a6d7b debian/tests/control: Reorder tests
Add a comment which ones should not be run for an upstream build: In
particular, systemd-fsckd relies on a downstream patch, and
cmdline-upstart-boot is not relevant for testing upstream.
2016-02-10 09:55:06 +01:00
Martin Pitt
52e789f06e Drop debian/tests/ifupdown-hotplug
The units moved into ifupdown, so the test should go there too.
See <https://bugs.debian.org/814312>.
2016-02-10 09:19:33 +01:00
Martin Pitt
a863860881 debian/tests/storage: Remove duplicated code 2016-02-09 10:49:03 +01:00
Martin Pitt
b231b2a125 debian/tests/systemd-fsckd: Tame overly strict test for failed plymouth unit
This is a race condition with plymouthd auto-stopping.

LP: #1543144
2016-02-08 22:45:11 +01:00
Martin Pitt
032c1526f8 Drop Fix-up-tmpfiles.d-permissions-properly.patch
- /run/lock is already created differently by
   Make-run-lock-tmpfs-an-API-fs.patch, and contradicts to that.
 - /run/lock/lockdev/ isn't being used anywhere and will be dropped
   upstream soon; apply that patch separately as
   tmpfiles-drop-run-lock-lockdev.patch.
 - Move dropping of "group:wheel" (which has never existed in Debian) into
   debian/rules, to also catch occurrences in other parts of the file which
   the static patch would overlook. This should ideally be fixed upstream
   (https://github.com/systemd/systemd/issues/2492)

Remove the hack in debian/tests/boot-and-services as this is now unnecessary.
2016-02-01 13:36:09 +01:00
Martin Pitt
8943853783 debian/tests/boot-and-services: Adjust for testing upstream builds
Skip tests which are known to fail/not applicable with testing upstream builds.
In that mode, fix the groups in tmpfiles.d files which don't exist on Debian
(to be fixed upstream).

For this we currently need some seddery in tmpfiles.d/, until they get fixed
upstream.
2016-01-31 22:10:29 +01:00
Martin Pitt
051dc85c84 debian/tests/boot-and-services: Check for reaching graphical.target instead of default.target
The latter is a session systemd state only, but we want to check the system
state.
2016-01-31 22:10:29 +01:00
Martin Pitt
dc96070acc debian/tests/localed-x11-keymap: Adjust for testing upstream builds
Test /etc/X11/xorg.conf.d/00-keyboard.conf if $TEST_UPSTREAM is set.
2016-01-31 22:10:29 +01:00
Martin Pitt
2a8b53fef8 debian/tests/localed-locale: Adjust for testing upstream builds
Check /etc/locale.conf if $TEST_UPSTREAM is set
2016-01-31 22:10:29 +01:00
Martin Pitt
8618891905 debian/tests/timedated: Adjust for testing upstream builds
Verify /etc/localtime symlink. Skip verifying the /etc/timezone file (which is
Debian specific) if $TEST_UPSTREAM is set.
2016-01-31 22:10:29 +01:00
Martin Pitt
9b6e890efc Add "storage" autopkgtest
Initially this covers some basic use cases with LUKS cryptsetup devices.
2015-11-30 07:48:49 +01:00
Martin Pitt
6bd3257e55 debian/tests/boot-and-services: Adjust checked log message for container shutdown
Don't check for "Requesting system poweroff" log message in nspawn test,
current upstream master does not write that any more. Instead check for
"Stopped Container c1".
2015-11-28 15:33:24 +01:00
Martin Pitt
46e1020e73 debian/tests/networkd: Fix failure if D-Bus is not installed in the testbed 2015-11-27 11:34:35 +01:00
Martin Pitt
b4e6ceef66 debian/tests/networkd: Fix noisy failure if systemd-run networkd-test-router.service fails 2015-11-27 11:29:31 +01:00
Martin Pitt
60366d409d boot-and-services and networkd tests: Simplify timeout loops 2015-11-27 11:15:13 +01:00
Martin Pitt
2bfa2091e2 debian/tests/networkd: For IPv6 tests, also wait for IPv4 address to arrive
s-n-wait-online already exits after getting an IPv6 address, but we verify
both.
2015-11-27 11:12:40 +01:00
Martin Pitt
db2e7f9c2a debian/tests/networkd: Fix resolv.conf check for many nameservers
If /etc/resolv.conf already has three nameservers, accept that too (as then the
additional test one can't be added any more).
2015-11-23 10:39:14 +01:00
Martin Pitt
c1b580de19 debian/tests/boot-and-services: Fix test_bash_crash()
Wait until bash crash stack trace is in the journal before asserting on it.

Also relax RE to work on non-x86 architectures. On e. g. ppc64el we merely get

Stack trace of thread 1091:
  #0  0x00003fff9ad4f3b8 kill (libc.so.6)
  #1  0x0000000010068370 kill_pid (bash)
2015-11-23 09:32:30 +01:00
Martin Pitt
d4874a5ca6 debian/tests/networkd: On failure, only show journal for current test 2015-11-23 08:15:45 +01:00
Martin Pitt
cc625078aa debian/tests/networkd: Add networkd router-side tests
Add router setup using an (isolated) networkd process for configuring the veths
and DHCP server.
2015-11-23 08:15:45 +01:00
Martin Pitt
08c259f9e3 debian/tests/networkd: Factor out dnsmasq specific test "router" setup
So that we can test against other implementations. Also skip dnsmasq tests if
dnsmasq is not installed.
2015-11-23 08:15:45 +01:00