Commit graph

73317 commits

Author SHA1 Message Date
Daan De Meyer 6be4dab095 systemctl: Implement --wait for kill command
TEST-26-SYSTEMCTL is racy as we call systemctl is-active immediately
after systemctl kill. Let's implement --wait for systemctl kill and
use it in TEST-26-SYSTEMCTL to avoid the race.
2024-05-01 09:40:32 +02:00
Daan De Meyer 0e7e84cbb1
Merge pull request #32540 from DaanDeMeyer/mkosi
mkosi: Enable more integration tests
2024-05-01 09:04:49 +02:00
Yu Watanabe 9d3d6c1e07 core/exec-credential: update comment 2024-05-01 15:58:20 +09:00
Mike Yuan 13e380b054
man/run0: fix typo (missing "by") 2024-05-01 14:43:32 +08:00
Daan De Meyer 5bcf0881a3 core: Fix file descriptor leak 2024-05-01 11:52:13 +09:00
Martin Srebotnjak 582cda44c7 po: Translated using Weblate (Slovenian)
Currently translated at 14.8% (35 of 235 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-05-01 00:52:39 +02:00
Daan De Meyer 4b1edf5cc6 test: Add disabled mkosi tests to meson.build
Makes it easier to track which ones still need to be fixed.
2024-04-30 22:10:05 +02:00
Richard Maw f2018d060f test: Enable more mkosi integration tests 2024-04-30 22:10:05 +02:00
Daan De Meyer 51273281cd test: Bump mkosi integration test timeout to 1800 seconds
Same timeout as the bash framework.
2024-04-30 22:10:05 +02:00
Daan De Meyer 9a69900a4b test: Make journal storage configurable per test and make persistent for TEST-09-JOURNAL
Also fix a bug in the logic since it's 'volatile' and not 'runtime'.
2024-04-30 22:10:05 +02:00
Daan De Meyer b8afa59583 test: Drop /usr overlay workaround
/usr is not erofs anymore in the mkosi images so let's drop the
workaround where we mount a writable tmpfs on top of /usr.
2024-04-30 22:10:05 +02:00
Daan De Meyer db07533f74 Revert "TEST-25-IMPORT: Skip if importctl not installed"
This reverts commit dcb17e3295.

importctl is now correctly installed on opensuse, so no need for
this workaround anymore.
2024-04-30 22:10:05 +02:00
Daan De Meyer 27246d2bb6 TEST-71-HOSTNAME: Ignore error from reset-failed
On OpenSUSE the systemd-hostnamed does not fail and is unloaded which
causes reset-failed to fail. So let's ignore any errors from reset-failed
to make the test more robust.
2024-04-30 22:10:05 +02:00
Daan De Meyer b676bbbfc6 TEST-46-HOMED: Check for sshd pam snippet in /usr/lib/pam.d as well
opensuse ships pam snippets in /usr/lib/pam.d.
2024-04-30 22:10:05 +02:00
Daan De Meyer e290b45dfa TEST-82-SOFTREBOOT: Exit with exit status 123
Required to make mkosi consider the test successful.
2024-04-30 22:10:05 +02:00
Daan De Meyer e1f17dc641 TEST-35-LOGIN: Exclude manager entry in testcase_sanity_check()
Otherwise we try to kill the wrong session.
2024-04-30 22:10:05 +02:00
Daan De Meyer b03c2d51b2 TEST-18-FAILUREACTION: Exit with 123 on success
mkosi expects the virtual machine/container to exit with exit status
123 on success so let's make sure that's the case.
2024-04-30 22:10:05 +02:00
Daan De Meyer 8c89620e80 TEST-09-REBOOT: Make journalctl grep pattern more specific
We might be rotating because we reached limits, which is perfectly
fine, so don't fail if that happens.
2024-04-30 22:10:05 +02:00
Daan De Meyer 409c8a8ee0 TEST-13-NSPAWN: Skip on virtiofs
The rootfs only has 64K UIDs available when booting with virtiofs,
whereas the nspawn tests want to use user namespace which require
more than 64K UIDs.
2024-04-30 22:10:05 +02:00
Richard Maw 3630f5aaf8 TEST-13-NSPAWN: move disk images to /var/tmp
/tmp may not be large enough to contain disk images
and will result in strange errors when it runs out of space.
2024-04-30 22:10:02 +02:00
Yu Watanabe 4e494e6aac tree-wise: several cleanups for logging
- drop unnecessary SYNTHETIC_ERRNO() when the logger does not propagate
  error code,
- drop unnecessary '%m' in error message when the error code is
  specified with SYNTHETIC_ERRNO(),
- add missing full stop at the end of log message,
- use RET_GATHER(),
- add missing ", ignoring.",
- upeercase the first letter, etc., etc...
2024-05-01 04:41:06 +09:00
Richard Maw 047d5b6a32 TEST-13-NSPAWN: move container template to /usr/share
Having directories in / causes problems for make-root-on-boot images
2024-04-30 18:17:13 +02:00
Daan De Meyer b81ece59c4 TEST-04-JOURNAL: Make LogFilterPatterns= tests more robust
Let's use oneshot services as we don't need long running services
for the tests we're doing. Let's also increase the sleeps a little
as the current values weren't sufficient when running the test locally
on my machine with mkosi.
2024-04-30 18:17:13 +02:00
Daan De Meyer 191a31fbcf TEST-83-BTRFS: Skip if root filesystem is not btrfs 2024-04-30 18:17:13 +02:00
Richard Maw 37029ce769 TEST-35-LOGIN: Handle multiple lock messages per sleep
If 3 lock messages get sent when going to sleep
then we can falsely assume we have woken up if we only assume we have at least two
so checking we have more than we did before sleeping addresses that issue.
2024-04-30 18:17:13 +02:00
Daan De Meyer f991c3871b mkosi: Fix %__check_files eval in opensuse build script
Make sure the correct buildroot gets expanded instead of the default
opensuse build root location.

We also remove debug files from the unpackaged files list as they're
handled separately by rpm.
2024-04-30 18:17:11 +02:00
Luca Boccassi ba2caa8a38 build-path: fix SIGSEGV on RISC-V and MIPS
On RISC-V and MIPS DT_STRTAB is an offset, not a full address.

Follow-up for 91d149cfb4
2024-04-30 18:11:10 +02:00
Piotr Drąg 2ff22bf132 catalog: update Polish translation
Includes changes up to 844863c61e
2024-04-30 18:09:56 +02:00
Antonio Alvarez Feijoo 1434754430 network-generator: add missing return on error after the logging refactor
Fixes 3cb618084a
2024-04-30 18:09:37 +02:00
Daan De Meyer 3c9a807ac8 mkosi: Install more locales on CentOS/Fedora
Required for TEST-73-LOCALE.
2024-04-30 17:01:41 +02:00
Daan De Meyer 0d73e224e2 mkosi: Install tpm2-tools in system image
Required for TEST-70-TPM2.
2024-04-30 17:01:41 +02:00
Daan De Meyer 695ebbaf7f mkosi: Override /sbin/init in minimal-base
Required for TEST-13-NSPAWN.
2024-04-30 17:01:41 +02:00
Daan De Meyer 27f166c523 mkosi: Use systemd.crash_action=poweroff in integration tests
Some integration tests expect to be able to reboot so switch to using
the new systemd.crash_action=poweroff instead.
2024-04-30 17:01:41 +02:00
Richard Maw 334e707329 mkosi: Add curl package for journal tests 2024-04-30 17:01:41 +02:00
Daan De Meyer e911a335ed mkosi: Mask systemd-networkd-wait-online when --runtime-network=none
Otherwise it will wait forever waiting for an interface to appear.
See https://github.com/systemd/systemd/issues/29388.
2024-04-30 17:01:41 +02:00
Daan De Meyer d99deaaaea mkosi: Disable --runtime-scratch=no for tests
Breaks TEST-83-BTRFS if enabled.
2024-04-30 17:01:41 +02:00
Daan De Meyer 989d46df8b mkosi: Install locales on debian/ubuntu
Required for TEST-73-LOCALE.
2024-04-30 17:01:41 +02:00
Daan De Meyer 06489e8332 mkosi: Make sure our extra kernel command line overrides the config one 2024-04-30 17:01:41 +02:00
Daan De Meyer a531931cd4 mkosi: Simply remove all the debian patches instead of mounting over them
The build sources are ephemeral anyways, so we can just remove the patches
instead of hiding them.
2024-04-30 17:01:41 +02:00
Daan De Meyer e839cb1cf8 mkosi: Use symlinks instead of bind mounts for Arch
With bind mounts, the directories we bind mount to get recorded as
the meson source and build directories. This means meson will complain
if we later try to run meson install -C /work/build in the virtual
machine or container. If we use symlinks, the directories we symlink to
will be recorded as the meson source and build directories, which means
meson install -C /work/build will work when executed after booting the
VM or container.

I tried to do the same for debian as well but the debian package tooling
changes directory into the build directory and then does meson setup ..
which is completely broken when switching to a symlink.
2024-04-30 17:01:41 +02:00
Daan De Meyer 48e0399bee mkosi: Install minimal-base to /usr/share/testsuite-13-container-template
Required for TEST-13-NSPAWN.
2024-04-30 17:01:41 +02:00
Daan De Meyer a8bc9400a8 mkosi: Remove more files from Arch minimal image 2024-04-30 17:01:41 +02:00
Luca Boccassi da77ea5c63
Merge pull request #32523 from cgzones/inaccessible_label
shared: create inaccessible files with correct security label
2024-04-30 16:20:49 +02:00
Piotr Drąg ade7fed923 po: add a false positive to POTFILES.skip
Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect this file as containing translations. Avoid this
behavior by putting the file in POTFILES.skip.
2024-04-30 16:18:42 +02:00
Skia ad23fca3ae docs: autopkgtest: refresh the docs with up-to-date information
@iainlane doesn't work on Ubuntu infrastructure anymore, and `bionic` is still ESM, but not really supported anymore either.  
`noble`, which is the latest Ubuntu, probably is better for testing `systemd` in 2024, and pinging `qa-help` on IRC is the current official way to contact the team behind Ubuntu's infrastructure.
2024-04-30 16:16:31 +02:00
Frantisek Sumsal 9fe18055fe test: exclude gperf files from captured coverage
Recent lcov started complaining loudly about unknown lines in gperf
files:

...
Found gcov version: 13.2.1
Using intermediate gcov format
Recording 'internal' directories:
...
Finished processing 1634 GCNO files
Apply filtering..
Message summary:
  1 error message:
    range: 1
  28 warning messages:
    gcov: 27
    usage: 1
geninfo: ERROR: (range) unknown line '33' in /build/src/home/homed-gperf.gperf: there are only 22 lines in the file.
  Use 'geninfo --filter range' to remove out-of-range lines.
        (use "geninfo --ignore-errors range ..." to bypass this error)

Since we drop the coverage of built files from the final report anyway,
let's do it also when capturing both initial and real coverage to avoid
this error.
2024-04-30 15:42:45 +02:00
Daan De Meyer c89244842b test: Don't persist journal in mkosi image if we're not debugging tests
If we're not debugging tests, there's no point in persisting the journal,
so let's use the volatile journal storage mode in that case to avoid doing
unnecessary work.

We don't disable journal storage alltogether since various tests check
that stuff is written to the journal.
2024-04-30 15:20:55 +02:00
Daan De Meyer 123450e58e journal: Add journal.storage credential
In mkosi CI, we want persistent journals when running interactively
and runtime journals when running in CI, so let's add a credential
that allows us to configure which one to use.
2024-04-30 14:19:55 +02:00
dependabot[bot] 9c53f6a7ae build(deps): bump pkg/debian from 640ff73 to 9a5adf2
Bumps pkg/debian from `640ff73` to `9a5adf2`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 12:09:12 +02:00
Daan De Meyer c676ed3fc1
Merge pull request #32575 from DaanDeMeyer/fix
Various mkosi fixes
2024-04-30 12:08:42 +02:00