1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00
Commit Graph

3236 Commits

Author SHA1 Message Date
Daan De Meyer
bb8b8875f4
Merge pull request #24944 from DaanDeMeyer/repart-rootless
repart: Add support for running without root privileges
2022-11-16 09:09:06 +01:00
Pasha Vorobyev
d7fe0a6723 MemoryZSwapMax directive to configure new memory.zswap.max cgroup file 2022-11-15 21:15:37 +01:00
Daan De Meyer
e2d057456d repart: Run most repart integration tests without root privileges
To make sure rootless mode keeps working, let's run all repart
integration tests that we can without root privileges. The only ones
we need to keep running with root privileges are the tests that operate
on a block/loop device and those that use --image=.
2022-11-15 20:23:51 +01:00
Daan De Meyer
bf3598beff mkfs-util: Add support to populate vfat without mounting using mcopy
mkfs.vfat doesn't support specifying a root directory to bootstrap
the filesystem from (see https://github.com/dosfstools/dosfstools/issues/183).
Instead, we can use the mcopy tool from the mtools package to copy
files into the vfat filesystem after creating it without needing to
mount the vfat filesystem.
2022-11-15 20:07:54 +01:00
Daan De Meyer
56bb434e9b repart: Add integration test for --include/--exclude-partitions 2022-11-15 13:45:28 +01:00
Daan De Meyer
14697c4156 repart: Add Minimize= integration test 2022-11-14 13:06:17 +01:00
Daan De Meyer
46fddd8eb6
Merge pull request #24803 from DaanDeMeyer/repart-copy-deny-list
repart: Don't descend into directories assigned to other partitions
2022-11-11 13:19:58 +01:00
Luca Boccassi
021397f776
Merge pull request #25325 from yuwata/resolve-cap-per-link-setting-by-global
resolve: provide effective mDNS or LLMNR settings
2022-11-10 23:20:40 +01:00
Lennart Poettering
63b130a6fc test: add quick test for ensuring image UUID is deterministic based on the seed passed to repart 2022-11-10 17:33:51 +01:00
Lennart Poettering
71ea84369e locale: honour new env var $SYSTEMD_UTF8=
This is useful to force off fancy unicode glyph use (i.e. use "->"
instead of "→"), which is useful in tests where locales might be
missing, and thus control via $LC_CTYPE is not reliable.

Use this in TEST-58, to ensure the output checks we do aren't confused
by missing these glyphs being unicode or not.
2022-11-10 17:20:36 +01:00
Daan De Meyer
bd69c2a85f repart: Add integration test for #24678 2022-11-10 16:40:33 +01:00
Yu Watanabe
b77899af0d test: add tests for mDNS and LLMNR settings 2022-11-10 21:54:56 +09:00
Yu Watanabe
e4b3f0dfe9 test: create config under /run 2022-11-10 21:54:56 +09:00
Yu Watanabe
7618ab1b71 test-network: skip test_match if alternative name is not supported by kernel
Fixes #25259.
2022-11-10 10:05:43 +00:00
Lennart Poettering
baf6c93296 test: add trivial test for systemd-dissect --mtree 2022-11-09 22:20:51 +01:00
Lennart Poettering
efffde8e5f test: extend TEST-50-DISSECT for systemd-dissect --list and --with 2022-11-09 14:57:23 +01:00
Frantisek Sumsal
45ff459b6a test: adjust systemd-mount's tests based on recent coverage reports 2022-11-08 12:44:37 +01:00
Frantisek Sumsal
bf9b5691b8 test: install realpath into the test images 2022-11-08 12:43:57 +01:00
Frantisek Sumsal
9ffa095e46 test: fix a race in the systemd-mount test
Where we might check the automount unit before systemd has a chance to
react.
2022-11-08 12:01:13 +01:00
Luca Boccassi
1824d3d6cc
Merge pull request #25286 from mrc0mmand/systemd-mount-test-fix
test: replace tmpfs with vfat when testing --owner=
2022-11-07 20:24:52 +01:00
Frantisek Sumsal
5c1a5ac172
Merge pull request #25279 from mrc0mmand/firstboot-test-fixes
test: cover some interactive/error paths in firstboot
2022-11-07 18:41:44 +00:00
Frantisek Sumsal
be7463e309 test: replace tmpfs with vfat when testing --owner= 2022-11-07 15:59:37 +01:00
Frantisek Sumsal
dbd8dbdfc1 test: cover some interactive/error paths in firstboot 2022-11-07 14:48:37 +01:00
Frantisek Sumsal
1edad89399 test: fix keymaps installation on Arch
Where the keymaps live under /usr/share/kbd/keymaps/.
2022-11-07 14:48:37 +01:00
Frantisek Sumsal
0c416ea01b test: fix locale installation when locale-gen is used
locale-gen might merge all compiled locales into a simple archive, so we
need to install it as well if necessary.
2022-11-07 14:48:37 +01:00
Yu Watanabe
aaa411b9f4
Merge pull request #25277 from mrc0mmand/also-coverage
test: add coverage for systemd-mount
2022-11-07 21:59:44 +09:00
Frantisek Sumsal
eb5d7730e1 test: don't ignore non-existent paths in inst_recursive()
The process substitution in the while loop hides errors raised by the
find utility, which might (and did), in turn, hide errors in test setup.
2022-11-07 12:18:49 +01:00
Frantisek Sumsal
6da7d0c766 test: add coverage for systemd-mount 2022-11-07 09:08:27 +01:00
Luca Boccassi
f10ad99ab0
Merge pull request #25107 from lucab/ups/sysusers-gid-check-username
sysusers: cross-check user and group names too
2022-11-06 23:58:53 +01:00
Christian Göttsche
a45efc9e4b test: fstab-generator: adjust PATH for fsck
fsck(8) is located in /usr/sib/ on Debian sid:

    stdout:
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-01-dev-nfs.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-02-dhcp.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-03-dhcp6.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-04-nfs.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-05-nfs4.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-06-ipv4.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-07-ipv6.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-08-implicit-nfs.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-09-cifs.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-10-iscsi.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-11-live.input
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-12-dev-sdx.input
    --- /dev/fd/63  2022-11-04 15:39:13.131532174 +0100
    +++ /dev/fd/62  2022-11-04 15:39:13.131532174 +0100
    @@ -6,3 +6,4 @@
     initrd-usr-fs.target.requires
     initrd-usr-fs.target.requires/sysroot.mount
     sysroot.mount
    +systemd-fsck-root.service
    **** Unexpected output for /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-12-dev-sdx.input
    stderr:
    Skipping root directory handling, as root on NFS was requested.
    Skipping root directory handling, as root on NFS was requested.
    Skipping root directory handling, as root on NFS was requested.
    Skipping root directory handling, as root on NFS was requested.
    Skipping root directory handling, as root on NFS was requested.
    Skipping root directory handling, as root on NFS was requested.
    Skipping root directory handling, as root on NFS was requested.
    Skipping root directory handling, as root on NFS was requested.
    Skipping root directory handling, as root on CIFS was requested.
    Skipping root directory handling, as root on iSCSI was requested.
    Skipping root directory handling, as root on live image was requested.
    Found entry what=/dev/sdx1 where=/sysroot type=n/a opts=ro
    Checking was requested for /dev/sdx1, but the fsck command does not exist.
2022-11-04 23:40:50 +01:00
Luca Boccassi
6e14e70599
Merge pull request #25257 from fbuihuu/fix-test-execute-on-opensuse
Fix test execute on opensuse
2022-11-04 18:29:51 +01:00
Franck Bui
09415aef94 tests: minor simplification in test-execute
No functional change.
2022-11-04 12:53:17 +01:00
Franck Bui
d723b0467d tests: make test-execute pass on openSUSE
In my understanding user group "3" (aka "sys") is kept for historical reasons
but not really useful these days. That's probably explained why this group
isn't defined on openSUSE.

Hence let's drop reference to this user group, this shouldn't lessen the
revelance of the test since SupplementaryGroups= is still tested with 2 other
groups.
2022-11-04 12:39:56 +01:00
Frantisek Sumsal
59377dbef2 test: re-enable skipped systemd-firstboot --locale-messages= test
Since the original issue should be resolved by #25253.
2022-11-04 09:44:34 +01:00
Frantisek Sumsal
d1020334fd test: introduce sanity coverage for auxiliary utils 2022-11-03 23:08:58 +01:00
Luca BRUNO
76ad8ef68d
test-sysusers: check group creation with matching user entry 2022-11-03 15:12:15 +00:00
Frantisek Sumsal
8b1879bcd0 test: cover a couple of previously missed analyze code paths 2022-11-03 11:33:13 +01:00
Frantisek Sumsal
926d95cd4c test: cover legacy/deprecated systemd-analyze verbs
They're no longer documented since 26e1e97345 but still work.
2022-11-03 11:26:08 +01:00
Frantisek Sumsal
6c83054c01 test: add a sanity coverage for systemd-analyze verbs 2022-11-03 06:25:51 +09:00
Frantisek Sumsal
23f3a6f5ff test: further extend systemctl's sanity coverage
Also, fix a race condition introduced by d16684fe13:
```
[   16.904218] H testsuite-26.sh[394]: + systemd-run --unit failed.service /bin/false
[   16.964783] H systemd[845]: failed.service: Executing: /bin/false
[   16.965062] H systemd[1]: Started failed.service.
[   16.965462] H testsuite-26.sh[844]: Running as unit: failed.service
[   16.966390] H testsuite-26.sh[394]: + systemctl is-failed failed.service
[   16.977970] H testsuite-26.sh[846]: active
[   16.978403] H systemd[1]: failed.service: Main process exited, code=exited, status=1/FAILURE
[   16.978478] H systemd[1]: failed.service: Failed with result 'exit-code'.
```
2022-11-02 18:26:27 +01:00
Yu Watanabe
005fdee2dd
Merge pull request #25229 from mrc0mmand/extend-coverage
test: extend the sanity coverage a bit
2022-11-02 08:24:38 +09:00
Yu Watanabe
fcd7998880 test-network: wait for bound interface to be processed by udevd
If another bound interface (dummy98) will be removed before that dummy99
is processed by udevd, then removing dummy98 in the next step makes the
target interface (test1) bring down.

Follow-up for 3e2f7c46da.
2022-11-02 08:24:01 +09:00
Frantisek Sumsal
d16684fe13 test: add a couple of sanity tests for systemctl 2022-11-01 22:15:24 +01:00
Luca Boccassi
2f23762451
Merge pull request #25192 from yuwata/wait-online-altname
wait-online: support alternative interface names
2022-11-01 18:31:08 +01:00
Frantisek Sumsal
c5c258ae0a test: rename TEST-26-SETENV to TEST-26-SYSTEMCTL 2022-11-01 17:53:42 +01:00
Frantisek Sumsal
70e9066bc2 test: add a couple of sanity tests for loginctl 2022-11-01 17:32:17 +01:00
Yu Watanabe
d8746f1620 test-network: explicitly prepare default.link
On CentOS CI (Arch), 99-default.link is masked. Let's explicitly provide
the same .link file with a different prefix number.
2022-11-01 22:38:37 +09:00
Yu Watanabe
b95d35b5ed test-network: resolve interface name from alternative name 2022-11-01 22:38:37 +09:00
Yu Watanabe
d7ff72ec9c test-network: fix use of undeclared variable 2022-11-01 22:38:37 +09:00
Yu Watanabe
dee6c26f3e test-network: make link_exists() support alternative names 2022-11-01 22:38:37 +09:00