1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00
systemd/test/TEST-21-SYSUSERS
Zbigniew Jędrzejewski-Szmek 8c3534b5db test: rework how images are created
Before, we'd create a separate image for each test, in
/var/tmp/systemd-test.XXXXX/rootdisk.img. Most of the images
where very similar, except that each one had some unit files installed
specifically for the test. The installation of those custom unit files
was removed in previous commits (all the unit files are always installed).

The new approach is to only create as few distinct images as possible.
We have:
default.img: the "normal" image suitable for almost all the tests
basic.img: the same as default image but doesn't mask any services
cryptsetup.img: p2 is used for encrypted /var
badid.img: /etc/machine-id is overwritten with stuff
selinux.img: with selinux added for fun and fun
and a few others:

ls -l build/test/*img
lrwxrwxrwx 1 root root 38 Mar 21 21:23 build/test/badid.img -> /var/tmp/systemd-test.PJFFeo/badid.img
lrwxrwxrwx 1 root root 38 Mar 21 21:17 build/test/basic.img -> /var/tmp/systemd-test.na0xOI/basic.img
lrwxrwxrwx 1 root root 43 Mar 21 21:18 build/test/cryptsetup.img -> /var/tmp/systemd-test.Tzjv06/cryptsetup.img
lrwxrwxrwx 1 root root 40 Mar 21 21:19 build/test/default.img -> /var/tmp/systemd-test.EscAsS/default.img
lrwxrwxrwx 1 root root 39 Mar 21 21:22 build/test/nspawn.img -> /var/tmp/systemd-test.HSebKo/nspawn.img
lrwxrwxrwx 1 root root 40 Mar 21 21:20 build/test/selinux.img -> /var/tmp/systemd-test.daBjbx/selinux.img
lrwxrwxrwx 1 root root 39 Mar 21 21:21 build/test/test08.img -> /var/tmp/systemd-test.OgnN8Z/test08.img

I considered trying to use the same image everywhere. It would probably be
possible, but it would be very brittle. By using separate images where it is
necessary we keep various orthogonal modifications independent.

The way that images are cached is complicated by the fact that we still
want to keep them in /var/tmp. Thus, an image is created on first use and
linked to from build/test/ so it can be found by other tests.

Tests cannot be run in parallel. I think that is an acceptable limitation.
Creation of the images was probably taking more resources then the actual
tests, so we should be better off anyway.
2020-03-28 11:51:29 +01:00
..
inline.expected-group test/TEST-21-SYSUSERS: add tests for new functionality 2018-02-02 10:40:24 +01:00
inline.expected-passwd test/TEST-21-SYSUSERS: add tests for new functionality 2018-02-02 10:40:24 +01:00
Makefile test: replace duplicated Makefile by symbolic link 2018-10-09 19:11:21 +09:00
test-1.expected-group
test-1.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-1.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-2.expected-group test/TEST-21-SYSUSERS: add tests for new functionality 2018-02-02 10:40:24 +01:00
test-2.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-2.input test/TEST-21-SYSUSERS: add tests for new functionality 2018-02-02 10:40:24 +01:00
test-3.expected-group
test-3.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-3.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-4.expected-group
test-4.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-4.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-5.expected-group sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-5.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-5.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-6.expected-group sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-6.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-6.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-7.expected-group test: add a test for sysusers 2018-03-02 07:12:40 +09:00
test-7.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-7.input test: add a test for sysusers 2018-03-02 07:12:40 +09:00
test-8.expected-group sysusers: support u username -:300 style syntax (#8325) 2018-03-02 12:56:44 +01:00
test-8.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-8.input sysusers: support u username -:300 style syntax (#8325) 2018-03-02 12:56:44 +01:00
test-9.expected-group sysusers: support u username -:300 style syntax (#8325) 2018-03-02 12:56:44 +01:00
test-9.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-9.input sysusers: support u username -:300 style syntax (#8325) 2018-03-02 12:56:44 +01:00
test-10.expected-group sysusers: do not implicitly create group by 'm' if 'u' with the same name exists 2018-03-02 07:38:28 +09:00
test-10.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-10.input sysusers: do not implicitly create group by 'm' if 'u' with the same name exists 2018-03-02 07:38:28 +09:00
test-11.expected-group test: add a sysusers test with NIS entries 2018-03-17 14:18:26 +01:00
test-11.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-11.initial-group test: add a sysusers test with NIS entries 2018-03-17 14:18:26 +01:00
test-11.initial-passwd test: add a sysusers test with NIS entries 2018-03-17 14:18:26 +01:00
test-11.input test: add a sysusers test with NIS entries 2018-03-17 14:18:26 +01:00
test-12.expected-group sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737) 2018-04-18 18:32:21 +02:00
test-12.expected-passwd meson: make nologin path build time configurable 2019-07-18 12:46:35 +02:00
test-12.initial-group sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737) 2018-04-18 18:32:21 +02:00
test-12.initial-passwd sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737) 2018-04-18 18:32:21 +02:00
test-12.input sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737) 2018-04-18 18:32:21 +02:00
test-13.expected-group sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00
test-13.expected-passwd sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00
test-13.input sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00
test-14.expected-group sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00
test-14.expected-passwd sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00
test-14.initial-group sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00
test-14.input sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00
test.sh test: rework how images are created 2020-03-28 11:51:29 +01:00
unhappy-1.expected-err
unhappy-1.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
unhappy-2.expected-err
unhappy-2.input codespell: fix spelling errors 2019-04-29 16:47:18 +02:00
unhappy-3.expected-err sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00
unhappy-3.input sysusers: support creating users with a specific primary group 2020-02-02 16:53:22 +01:00