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.
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
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
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
- 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.
Otherwise logs are missing on failures:
cp: -r not specified; omitting directory '/var/tmp/systemd-test.Nq2jqR/journal/59852163a37d458f9d238b65f279b6fa'
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.
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.
_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.
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>.
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.
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.
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.
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.
"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
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.
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.
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
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.
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.
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
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
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'.
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.
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.
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.
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.
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
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.
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.
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.
... 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.
debian/tests/control: Rearrange tests and avoid removing test dependencies to
minimize testbed resets. This considerably speeds up running the autopkgtests.
Wrap test dependencies.
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.
- /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.
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.
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".
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)