Commit Graph

329 Commits

Author SHA1 Message Date
Luca Boccassi
6b5e99f1d7 Build with and suggest fido2 and tpm libraries
These are used via dlopen only if available by some tools like
systemd-cryptsetup, systemd-cryptenroll and systemd-repart,
with graceful fallbacks if they are not found.
Build-depend on them so that the features get compiled in
(apart from stage1 builds), and add appropriate Suggests.

Closes: #991129 #1003383
2022-01-13 23:42:02 +00:00
Michael Biebl
18bde6d38f autopkgtest: add systemd-oomd dependency to upstream test
We want systemd-oomd to be tested via the upstream provided
TEST-55-OOMD.
2022-01-09 19:51:07 +01:00
Michael Biebl
e8fdd523f6 autopkgtest: install dbus-user-session for upstream test
Required by TEST-43-PRIVATEUSER-UNPRIV and TEST-20-MAINPIDGAMES.

See also https://github.com/systemd/systemd/issues/21720#issuecomment-992005494
2021-12-21 01:23:04 +01:00
Luca Boccassi
ec5cc0a2a0 autopkgtest: install libdw and libelf for upstream test
Pulled in via dlopen since https://github.com/systemd/systemd/pull/21454
2021-12-21 01:23:04 +01:00
Michael Biebl
cdf1c199fd Merge branch 'debian/master' into debian/experimental 2021-10-12 11:58:00 +02:00
Michael Biebl
ff6fd33762 autopkgtest: Merge configuration of logind test with timedated and related tests
They share the same restrictions and merging them avoids a bit of
duplication.
2021-10-01 10:12:05 +02:00
Michael Biebl
98e96f771a autopktest: Fix timedated test dependencies
Add an explicit systemd-timesyncd dependency as it is required by the
timedated test.
2021-10-01 10:11:52 +02:00
Michael Biebl
8af109415d Fix test dependencies of upstream test
After splitting out the standalone binaries for sysusers and tmpfiles
into separate packages (which conflict with the main systemd package),
we can no longer use the '@' notation in the upstream test.

This reverts commit 5eeeb1b562 and also
adds systemd-tests and systemd-timesyncd to the upstream test
dependencies.
2021-08-08 22:46:06 +02:00
Michael Biebl
265477ab8b autopkgtest: clean up dependencies of boot-smoke test
A lot of the dependencies are not needed but were originally added to
avoid a testbed reset and make it possible to reuse the testbed of the
upstream test. This turned out to be a maintenance problem and the
dependencies were not updated accordingly. Instead of trying to keep the
two tests in sync, trim down the boot-smoke dependencies to its bare
minimum.
2021-07-31 21:48:46 +02:00
Michael Biebl
5f089a58bf autopkgtest: add systemd-timesyncd dependency to timedated test
We need systemd-timesyncd in the timedated test, not just an arbitrary
provider of time-daemon.
2021-07-31 21:05:32 +02:00
Michael Biebl
5092b19836 autopkgtest: add udev dependency to unit-tests
Without a properly set up hwdb the test-sd-hwdb test is skipped.
2021-06-17 18:09:37 +02:00
Luca Boccassi
c649031591 autopkgtest: add dependency on dosfstools for upstream test
Needed to create EFI partition (vfat)
2021-06-17 18:09:25 +02:00
Dan Streetman
c7ecd05006 d/t: replace 'root-unittests' shell script with simple call to upstream script
The upstream test runner script is much better, as it only prints failing test
output, and gives a summary of the test results at the end.
2021-05-19 13:09:33 +02:00
Michael Biebl
c66fa7a777 d/t/control: drop obsolete alternative util-linux dependency
Gbp-Dch: Ignore
2021-05-07 14:06:09 +02:00
Frantisek Sumsal
53c68cdb95 upstream-ci: fix test_no_failed() check
Without `--plain` `systemctl` prints a circle (●) in the first column
for each failed service, which with the current code interferes with
attempted journal listing for each such service:

```
test_no_failed (__main__.ServicesTest)
No failed units ... -------- journal for failed service ● -----------
Invalid unit name "●" escaped as "\xe2\x97\x8f" (maybe you should use systemd-escape?).
-- Journal begins at Sun 2021-04-25 03:05:23 UTC, ends at Sun 2021-04-25 09:00:32 UTC. --
-- No entries --
FAIL
```
2021-05-07 12:23:58 +02:00
Dan Streetman
e4c364bc4c d/t/boot-smoke: update test to avoid false negatives 2021-05-07 12:23:58 +02:00
Dan Streetman
5eeeb1b562 d/t/control: install all binary packages for upstream test
With the change to just call the upstream script to run the integration
tests, the packages to test need to be installed so the test-function
script can list out the files each package contains, and copy those files
into each nspawn and/or qemu testbed. Without all packages installed,
some tests fail; specifically TEST-30 currently requires systemd-timesyncd
which was not previously installed for the 'upstream' test suite.

This changes the control file to just install all binary packages, using
the '@' notation.
2021-05-07 12:23:58 +02:00
Dan Streetman
ae1129ecd0 d/t/upstream: use NO_BUILD=1
Also don't bother sed-modifying test-functions file, as the NO_BUILD
changes remove the need for that.
2021-05-07 12:23:58 +02:00
Dan Streetman
3d97be7786 Slight adjustments to previous patch for deny/black-list naming
Also add in two vars used by the integration runner script
2021-05-07 12:23:58 +02:00
Zbigniew Jędrzejewski-Szmek
de959cc3ea Let "upstream" test use upstream test runner 2021-05-07 12:23:58 +02:00
Luca Boccassi
e1af3aed57 upstream suite: add build-dep on vim-tiny
Required by some of the images in the upstream test suite
2021-05-07 12:23:58 +02:00
Balint Reczey
532abf5b61 debian/tests/control: Upstream test depends on attr 2021-05-06 23:00:03 +02:00
Matthias Klumpp
63f22a7a8d Configure localed to run locale-gen to generate missing locale
This applies an (upstreamed) patch to permit systemd-localed to run
locale-gen to generate missing locale when requested to switch the
system locale.
This makes localectl usable on Debian for changing locale without
breaking system localization or even prevent certain applications from
running at all after switching to a non-generated locale.
2021-01-18 03:05:05 +01:00
Michael Biebl
85438481ca d/t/timedated: Ignore return code of dbus-monitor in wait_mon()
We are not really interested in the return code and error messages from
dbus-monitor after killing it, so ignore them to avoid undesired
autopkgtest failures.

Follow-up for commit 3de342799c.
2020-12-03 23:52:50 +01:00
Balint Reczey
3de342799c debian/tests/timedated: Wait for the killed child only
There may be other children of the script due to autopkgtest machinery
and they exit after the script exited.

LP: #1904406
2020-12-02 23:24:06 +01:00
Michael Biebl
ed35a87e6f Merge branch 'debian/experimental' into debian/master 2020-12-02 23:18:37 +01:00
Michael Biebl
d21ae0f7c4 Revert "d/t/timedated: use /bin/bash to work around job handling issue in dash"
This reverts commit e437da1e4f.
2020-12-01 19:45:17 +01:00
Michael Biebl
e23f9a2fb3 systemd Debian release 246.6-5
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEECbOsLssWnJBDRcxUauHfDWCPItwFAl+9cvYACgkQauHfDWCP
 Itz03w/+K7laA+3yUOP0U4P7kfzm9lsCrdDdIK2XTlSTMq2Q605H7JomAmZWE4GH
 bET11ChHqpNpQDNrizu6UeJLBovTlfuxZYB0wvNseJxhojs3XFGLzW7sqdmHGDjB
 III0NaLd+3dr3PsygOtmtIexa6ybnvU4s7zy7sWFUp1ZBi89xl4LTjEybBraEc04
 WUeCVZtQ4rtWu1oSgdyXMnVhEjg95q400kfOSwNGsidyhV+QkXhnn6wJhPfJukgv
 529D6qVTfhozVypHmK4iG/1ZYJnXOydA35JShkp1b6pfigtKvlA+8m/8BWm4QAI4
 svLItgA+TbQoLs8wjAxcVIMUYYOgdYsIa3hIhjBM+yV0u5dGffgYy/BdIXPxOSou
 3V0dLpGsJJzJO804a2Y2hFRQa/aNMJ1wbUEdUlI3qFLReLeCvsMDQXO3TotAYWSY
 5LDlbPTQpppmlRyaVBek863+OL/1zwTKkwij+tnATcEmW+SIz3vMUEBMEDk/8KJI
 klqfk53KF+kYRMtkAcUjxmjOT7zvztBTJpSQGizJbfhAdtXnqBBR7tClX29ChzbT
 lamvVcrdHLhI2/FPSmyhL19syLx5nxMASf5psVJbQj8uX3iRLAivylTh6/Mx26Md
 67pXSZeDMFFlUFnUUnaL2pKpAILPmiUjnROL4VErdhYcykMTakw=
 =Q6O6
 -----END PGP SIGNATURE-----

Merge tag 'debian/246.6-5' into debian/experimental

systemd Debian release 246.6-5
2020-11-26 17:58:35 +01:00
Michael Biebl
e437da1e4f d/t/timedated: use /bin/bash to work around job handling issue in dash
See: #975010
2020-11-18 01:12:08 +01:00
Luca Boccassi
cde07844e6 d/t/control: install squashfs-tools for upstream test
Required by TEST-50-DISSECT since upstream PR:
https://github.com/systemd/systemd/pull/16046
2020-11-12 21:22:59 +01:00
Dan Streetman
89b1131248 d/t/upstream: convert 'blacklist' term to 'deny-list'
Support transition for upstream-ci from
https://github.com/systemd/systemd/pull/16262
2020-11-12 21:22:59 +01:00
Dan Streetman
e530c346bd Add libzstd-dev and zstd as build and test deps
For upstream PR:
https://github.com/systemd/systemd/pull/15422
2020-07-23 11:54:27 +00:00
Martin Pitt
d388b5d3e5 debian/tests/localed-locale: Fix for environments without en_US.UTF-8
Unconditionally back up/restore locale configuration files and generate
en_US.UTF-8. Previously the test failed in environments which have some
locale other than en_US.UTF-8 in /etc/default/locale.

Also fix the assertion of /etc/locale.conf not being present after
localectl. This only applies to Debian/Ubuntu tests, not upstream ones
(see Use-Debian-specific-config-files.patch)
2020-07-14 17:41:59 +02:00
Dan Streetman
898358a430 d/t/storage: check for ext2 or ext4 fs when using crypttab 'tmp' option
https://github.com/systemd/systemd/pull/15853
2020-07-05 19:21:55 +02:00
Dan Streetman
1300eeb4be d/t/upstream: use --directory or --file param for journalctl
properly tell journalctl if the journal to parse is a dir or file
2020-07-05 19:21:46 +02:00
Dan Streetman
35bde17b60 d/t/upstream: capture new merged 'system.journal' from tests
This was changed with the upstream PR:
https://github.com/systemd/systemd/pull/15281
2020-07-05 19:21:35 +02:00
Michael Biebl
f28333a0f1 d/t/boot-and-services: use canonical name for NetworkManager service 2020-07-05 10:48:05 +02:00
Balint Reczey
3f13216aae debian/tests/boot-and-services: Handle missing fstab
LP: #1877078
2020-05-26 16:30:12 +02:00
Dan Streetman
b8e583b980 d/t/logind: use grep -s when checking /sys/power/state
Some kernels in Ubuntu (e.g. linux-kvm) do not enable CONFIG_PM, which
results in stderr output when the logind test tries to grep the power
state file, causing the test to fail.  The test already handles skipping
the test if suspend isn't supported, so just use -s to suppress grep
from printing to stderr if the file doesn't exist.
2020-03-25 15:00:06 -04:00
Michael Biebl
25fdd3fa06 debiant/tests/udev: replace deprecated ADTTMP with AUTOPKGTEST_TMP 2019-11-08 23:50:42 +01:00
Dan Streetman
1d407ce943 d/t/upstream: change BLACKLIST env var into per-test file that upstream can control
Currently, the 'upstream' test runs all upstream-provided tests at tests/TEST-*,
except for any that are in a hardcoded list contained in this test.

Any change to the hardcoded blacklist involves patching the debian repo, which is
not an ideal way for upstream systemd to manage a hopefully temporary blacklist of
problematic tests.

There was discussion around making the blacklist entirely provided by an upstream
env var, configured in the upstream webhooks that control the Ubuntu CI tests,
but that results in 2 problems; 1) Debian would no longer be able to easily
control its own blacklist, and 2) upstream would only have an all-or-none control
over the blacklist, meaning that it could only enable or disable any specific
test for all PRs; it could not enable a test for only a specific PR that was
attempting to fix the flaky test (for example).

This approach moves blacklist control into the systemd tests themselves, by changing
the 'upstream' test to look for a file in the test directory, and skipping the test
if such file is found.  This way, Debian (and Ubuntu and other Debian derivatives)
can continue to manage their own blacklist, but also upstream can control
the blacklist for individual tests on a per-PR basis.

For example, if upstream has the file 'tests/TEST-01-BASIC/blacklist-ubuntu-ci'
in its repo, Ubuntu CI will skip this test for all PRs opened.  Then, a PR can
be opened that both fixes the test, as well as removes this file.  The Ubuntu CI
will then run the test, but only for the PR that attempts to fix it.  Once that
PR is merged, all future tests will then run the fixed test.

The specific naming of the per-test blacklist file, for tests run from the
upstream repo, is either "blacklist-ubuntu-ci" to completely blacklist the test
on all archs, or "blacklist-ubuntu-ci-$DPKGARCH" to blacklist the test only
for a specific arch, for example "blacklist-ubuntu-ci-amd64".  For tests run
from Debian (or Ubuntu), which are run without the TEST_UPSTREAM param set,
the blacklist filename is 'blacklist-upstream-ci[-$DPKGARCH]'.

Note that the $DPKGARCH is specified as the value returned by
'dpkg --print-architecture', not the value returned from 'uname -m' (e.g.
to blacklist a test for intel 64-bit, 'amd64' should be used, not 'x86_64').
This naming matches the title of the ubuntu tests, such as 'bionic-amd64',
'bionic-arm64', etc.
2019-10-17 06:00:36 -04:00
Dan Streetman
c9865ca6b5 d/t/control: install seabios for upstream test
Some archs (at least arm64) qemu implementation require the vga bios.
2019-08-30 23:18:55 +00:00
Dan Streetman
de9338cf56 d/t/control: upstream test requires qemu-system-ppc on ppc64el 2019-08-30 23:18:55 +00:00
Michael Biebl
af25bbb8f6 d/t/boot-smoke: check for NetworkManager instead of D-Bus activated polkitd
polkit.service is started on-demand via D-Bus activation. This means it
is not a good indicator if a boot was successful. Instead check if
NetworkManager is running as it is started via multi-user.target.

Closes: #934992
2019-08-21 00:11:44 +02:00
Dan Streetman
3e5879804c d/t/boot-smoke: remove check for running jobs
The check for is-system-running handles verifying that systemd completes
all its jobs during startup, making this test redundant.  Also, since the
testbed can (and does) start more jobs after is-system-running, this test
can provide a false negative if any of those jobs continue running after
this check's timeout.
2019-08-12 11:24:55 -04:00
Dan Streetman
8e9bbcfe38 d/t/boot-smoke: call fail if pidof polkitd fails 2019-08-12 11:24:55 -04:00
Dan Streetman
d0ada35331 d/t/boot-smoke: wait for is-system-running
There is currently no delay to wait for is-system-running to reach running
or degraded, so it's very possible for there to be running jobs.  This adds
a delay until is-system-running is 'running' or 'degraded', and gathers
extra artifacts if the system is 'degraded'.

Additional details are in this Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1825997

Note that bug description states:
"This patch is not required for debian, because debian's boot-smoke does
not include the wait for systemctl is-system-running", however this patch
adds that wait, because without it, the check for running jobs can easily
fail, if the system isn't fully running yet.
2019-08-12 11:24:55 -04:00
Dan Streetman
f6d63ec4e1 d/t/boot-smoke: gather still running jobs in fail() 2019-08-12 11:24:53 -04:00
Dan Streetman
dc215aee10 d/t/boot-smoke: in fail() set +e so errors are ignored while gathering data 2019-08-12 11:24:50 -04:00
Dan Streetman
90298d3e23 d/t/boot-smoke: pass failure reason to fail() to print instead of separate echo 2019-08-12 10:42:28 -04:00