Commit Graph

60 Commits

Author SHA1 Message Date
Luca Boccassi
75a50442af autopkgtest: ignore rng-tools-debian failure in boot-and-services
It seems sometimes it fails, which has happened on jammy-amd64:

https://bugs.debian.org/969568
2022-05-15 14:10:07 +01:00
Luca Boccassi
b865dc9aae autopkgtest: disable networkd in rebooting tests
It seems that on Semaphore CI, running in Bullseye images, having
both Network-Manager and systemd-networkd enabled causes
'systemctl start network-online.target' to get stuck, and fail
the run. Disable networkd in those tests.

See: https://github.com/systemd/systemd/issues/22991
2022-05-15 14:10:07 +01: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
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
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
ca4674f900 autopkgtests: Replace obsolete $ADT_* variables
Use their $AUTOPKGTEST_* equivalents.

These were introduced in autopkgtest 4.0 (June 2016), and all our CI
systems use a much newer version.

Gbp-Dch: Short
2019-03-01 09:17:36 +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
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
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
Michael Biebl
4ae56d17be autopkgtest: Make AppArmor violator test work with merged-usr 2018-07-09 04:19:11 +02: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
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
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
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
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
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
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
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
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
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
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
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
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
60366d409d boot-and-services and networkd tests: Simplify timeout loops 2015-11-27 11:15:13 +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
244df30edd debian/tests/boot-and-services: Ignore failures of console-setup.service
Work around <https://launchpad.net/bugs/1516591>.
2015-11-16 12:52:18 +01:00
Martin Pitt
e466243193 debian/tests/boot-and-services: Fix crash journal wait loop
Wait until a bash crash appears in the journal, not just any crash.
2015-11-14 12:48:20 +01:00
Martin Pitt
349caad6b4 debian/tests/boot-and-services: Add test case for systemd-coredump 2015-11-13 10:01:30 +01:00
Martin Pitt
ffa1eebce2 boot-and-services autopkgtest: Ignore thermald
Since 1.4.3-2 it starts by default, but fails in most virtual envs.
2015-07-31 06:17:10 +02:00
Martin Pitt
aa27188d1f boot-and-services, display-managers autopkgtests: Install and configure dummy X.org driver
So that these work in headless machines/VMs.
2015-07-01 10:22:36 +02:00
Martin Pitt
92bc4b1755 boot-and-services autopkgtest: Fix SeccompTest.test_failing
We need to reset scfail.service which we expect to fail. Otherwise
ServicesTest.test_no_failed fails on that when it runs later on.
2015-06-10 13:59:15 +02:00
Martin Pitt
cdea89592a debian/tests/boot-and-services: PEP-8 fixes 2015-06-10 12:59:35 +02:00
Martin Pitt
0ce4e05abc boot-and-services autopkgtest: Check that we don't get an unwanted tmp.mount
Unless /etc/fstab explicitly specifies it. This reproduces the regression of
220 to mount tmp.mount automatically.
2015-06-10 12:27:36 +02:00
Martin Pitt
cf875f3ec0 boot-and-services autopkgtest: Add SeccompTest
This verifies that SystemCallFilter works.
2015-06-10 08:21:33 +02:00
Martin Pitt
0849551008 debian/tests: Call /tmp/autopkgtest-reboot
To work with autopkgtest >= 3.11.1, which dropped the obsolete one in /sbin.
2015-03-04 22:44:36 +01:00
Martin Pitt
f1674f2ef4 boot-and-services autopkgtest: Check cleanup of temporary files during boot
This also adds a test for /var/tmp/ cleanup. As
Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch disables /var/tmp/
cleanup (see Debian #675422), comment out that check.

This reproduces #779169.
2015-02-25 09:49:01 +01:00
Martin Pitt
38a66b5f41 boot-and-services and display-manager autopkgtest: Add systemd-sysv as proper test dependency
This avoids having to explicitly apt-get installing it. This works now also
under Ubuntu 15.04.
2015-02-25 08:19:10 +01:00
Martin Pitt
c2253eb13e debian/tests/boot-and-services: Reboot also if lightdm was just installed but isn't running yet 2015-02-23 09:15:13 +01:00
Martin Pitt
13f3b99eda debian/tests/boot-and-services: Skip AppArmor test if AppArmor is not enabled 2015-02-23 07:49:25 +01:00