Commit Graph

307 Commits

Author SHA1 Message Date
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
Dan Streetman
ffbe3afd1a d/t/storage: fail if socket info not in ask_password contents 2019-07-25 11:54:45 -04:00
Dan Streetman
b25028f63e d/t/storage: convert password agent into normal Thread
There is no need to fork() a password agent; if it's a normal Thread
then it can generate testcase failures and can be easily stopped
and join()ed.
2019-07-25 11:54:45 -04:00
Dan Streetman
9ff84f7786 d/t/storage: use short timeout waiting for scsi_debug block dev to appear 2019-07-25 11:54:45 -04:00
Dan Streetman
54fce9cf49 d/t/storage: manage scsi_debug using add_hosts
This allows each test to run independently using their own untouched
scsi device, without the need to rmmod/modprobe the module.

Closes: #929728
2019-07-25 11:54:40 -04:00
Dan Streetman
e44222a95c d/t/storage: don't search for 'scsi_debug' in ask_password
A previous commit changed the plaintext_name to a unique per-test name,
so there is no need to match the ask_password content on 'scsi_debug' now,
since just matching the plaintext_name should be unique.
2019-07-24 14:15:09 -04:00
Dan Streetman
753da881de d/t/storage: wait for service to start, only stop if active
This removes the systemctl start, as the service should already be
running (or starting, or failed).  Instead, just wait for the service
to actually reach 'active' or 'failed' state.  Then, only stop the
service if its state is 'active'.

Previous attempts to fix hung or flaky test runs included adding a start
before the stop, but the start-the-stop calls can lead to cancelled jobs
instead of a properly stopped service, which is again flaky.
2019-07-24 14:15:09 -04:00
Dan Streetman
f4f6a47596 d/t/storage: increase wait for plaintext_dev from 5 to 30 seconds
Also change the wait time from magic number into variable, and fix
typo in failure message.
2019-07-24 14:15:09 -04:00
Dan Streetman
02df3e5aa4 d/t/storage: change plaintext_name to include testname
Setting the plaintext name to include the testname makes debugging failures
easier.

Also for convenience, create service_name field in setup method, for use
in tests and/or teardown method.
2019-07-24 14:15:09 -04:00
Dan Streetman
7e35c1e64c d/t/control: upstream test requires dmeventd
Specifically, test/TEST-02-CRYPTSETUP/test.sh calls install_dmevent
which requires dmeventd to be installed.
2019-07-17 20:46:10 -04:00
Dan Streetman
bf96c9cb34 d/t/upstream: always cleanup after (and before) each test
run the 'clean' target before setup/run, to match the upstream
'all' target's behavior; also the clean (again) target must be
run separately, as the failure of setup or run will stop make,
and cleanup won't be done if called in the same make line.
2019-07-17 20:46:10 -04:00
Dan Streetman
012e932cca d/t/control: mark udev test skippable
The udev test will return 77 (from udev-test.pl) if it can't
setup the test environment; mark it skipped in that case.
2019-07-17 20:46:10 -04:00
Dan Streetman
116ae74377 d/t/control: root-unittests can break networking, add breaks-testbed 2019-07-17 20:46:10 -04:00
Dan Streetman
37fa56d3c0 d/t/timedated: replace systemctl is-active with systemctl show
is-active return code isn't the correct way to verify a service is
fully stopped; instead use show --property=ActiveState to verify it
is 'inactive'

This also could use the text output of is-active, but (per manpage)
the show command is "intended to be used whenever computer-parsable
output is required."

systemctl is-active returns non-zero even while the service is
'deactivating', but not actually stopped, which allows the testcase
to fail intermittently on slow machines, if the service hasn't
actually stopped before reaching the check to verify the service
stopped.

For example:
$ systemctl is-active systemd-timesyncd
active
$ timedatectl set-ntp false ; systemctl is-active systemd-timesyncd ; echo $?
deactivating
3

So the test code which does:
$ while systemctl is-active --quiet systemd-timesyncd; do sleep 1; done
will never actually perform that sleep.
2019-07-17 20:45:06 -04:00
Dan Streetman
7806ce8dde d/t/upstream: add TEST-30, TEST-34 to blacklist
Unfortunately, these tests are failing on i386 builds, very
intermittently; this causes headaches for upstream systemd
maintainers and submitters, when the Ubuntu CI fails, because
the failure isn't related to the PRs the tests are running for,
and determining that from the Ubuntu CI log file and other artifacts
is very time-consuming.

This just blacklists the tests for now, until we can figure out why
they are failing and fix them.

TEST-30 is discussed:
https://github.com/systemd/systemd/issues/12268

TEST-34 is discussed:
https://github.com/systemd/systemd/issues/12932
2019-07-08 20:55:06 -04:00
Dan Streetman
a223575e53 d/t/boot-and-services: check for any kernel message, not just first kernel message
The test currently looks for the first(ish) kernel log message, which may
not be present.  If it's not, the test case fails.

This isn't the fault of systemd/journald, the problem is the kernel filled
up its klog buffer before we started journald to read them.  This can be
caused by a too-small kernel klog buffer, or could be caused by a large
number of kernel boot-time messages.  More details are in this Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1830479

While catching all the kernel log messages since boot is important, this
test case is testing systemd, not the kernel, and should not fail if
the kernel's log buffer is filling during boot.

This problem has caused upstream systemd to disable Ubuntu CI on arm64
for many months:
https://github.com/systemd/systemd/issues/11104

Closes: #929730
2019-06-27 14:42:20 -04:00
Dan Streetman
acabce1ac0 d/t/boot-and-services: fix test_failing()
BugLink: https://bugs.launchpad.net/bugs/1831296

The test case was checking for a failing result of 'code=killed', but
the recent change now causes the failure to be 'code=dumped'.  The
test should pass if the result is either.
2019-06-21 16:36:10 -04:00
Martin Pitt
b96b67cac4 boot-and-service autopkgtest: Ensure graphical.target gets booted
Follow-up to commit fbdd60c51. LXC's debian template sets
multi-user.target by default, so gdm never gets started.

Gbp-Dch: Ignore
2019-04-03 23:50:19 +02:00
Martin Pitt
fbdd60c51a Enable boot-and-service autopkgtest in containers
- Skip tests which can't work in containers.
- Add missing rsyslog test dependency.
- e2scrub_reap.service fails in containers, ignore (filed as #926138)
- Relax pgrep pattern for gdm, as there's no wayland session in
  containers.
2019-03-31 22:56:33 +02:00
Martin Pitt
c923cd4a7e Enable udev autopkgtest in containers
This test doesn't actually need udev.service (which is disabled in
containers) and works fine in LXC.
2019-03-31 21:48:42 +02:00
Martin Pitt
558fae47bf Revert "debian/tests/boot-smoke: Create "render" system group"
This reverts commit 2ab793c735.

Commit 8ca0c4921b creates the group in the package now.

Gbp-Dch: Ignore
2019-03-14 21:50:00 +01:00
Martin Pitt
8d72f4f1c3 Revert "debian/tests/unit-config: Tolerate path variations"
The double slashes got fixed properly upstream again:
https://github.com/systemd/systemd/commit/23bdba61b

This reverts commit 3da52a0fab.
2019-03-14 13:29:49 +01:00
Martin Pitt
57465d928d debian/tests/timedated: Fix race condition
If timesyncd is running in the testbed, set-ntp does not synchronously
disable it, so wait until it goes down.

Gbp-Dch: Ignore
2019-03-11 08:09:33 +01:00