systemd/test/test-execute
Lennart Poettering f9c91932b4 execute: add support for XDG_STATE_HOME for placing service state data in --user mode
This adds support for the new XDG_STATE_HOME env var that was added to
the xdg basedir spec. Previously, because the basedir spec didn't know
the concept we'd alias the backing dir for StateDirectory= to the one
for ConfigurationDirectory= when runnin in --user mode. With this change
we'll make separate. This brings us various benefits, such as proper
"systemctl clean" support, where we can clear service state separately
from service configuration, now in user mode too.

This does not come without complications: retaining compatibility with
older setups is difficult, because we cannot possibly identitfy which
files in existing populated config dirs are actually "state" and which
one are true" configuration.

Hence let's deal with this pragmatically: if we detect that a service
that has both dirs configured only has the configuration dir existing,
then symlink the state dir to the configuration dir to retain
compatibility.

This is not great, but it's the only somewhat reasonable way out I can
see.

Fixes: #25739
2023-06-28 22:01:55 +02:00
..
exec-ambientcapabilities-merge-nfsnobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ambientcapabilities-merge-nobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ambientcapabilities-merge.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ambientcapabilities-nfsnobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ambientcapabilities-nobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ambientcapabilities.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-basic.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-bindpaths.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-capabilityboundingset-invert.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-capabilityboundingset-merge.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-capabilityboundingset-reset.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-capabilityboundingset-simple.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-condition-failed.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-condition-skip.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-cpuaffinity1.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-cpuaffinity2.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-cpuaffinity3.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-credentials-dir-specifier.service test-execute: add basic tests for LoadCredential= and SetCredential= 2023-02-15 10:10:54 +09:00
exec-dynamicuser-fixeduser-adm.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-dynamicuser-fixeduser-games.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-dynamicuser-fixeduser-one-supplementarygroup.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-dynamicuser-fixeduser.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-dynamicuser-runtimedirectory1.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-dynamicuser-runtimedirectory2.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-dynamicuser-runtimedirectory3.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-dynamicuser-statedir-migrate-step1.service test-execute: drop capabilities when testing with user manager 2023-02-15 10:10:54 +09:00
exec-dynamicuser-statedir-migrate-step2.service test-execute: drop capabilities when testing with user manager 2023-02-15 10:10:54 +09:00
exec-dynamicuser-statedir.service test-execute: add unit tests for *DirectorySymlink= 2023-06-08 23:11:42 +01:00
exec-dynamicuser-supplementarygroups.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-environment-empty.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-environment-multiple.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-environment-no-substitute.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-environment.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-environmentfile.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-execsearchpath-environment-path-set.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-execsearchpath-environment.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-execsearchpath-environmentfile-set.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-execsearchpath-environmentfile.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-execsearchpath-passenvironment-set.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-execsearchpath-passenvironment.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-execsearchpath-unit-specifier.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-execsearchpath.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-group-nfsnobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-group-nobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-group-nogroup.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-group.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ignoresigpipe-no.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ignoresigpipe-yes.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-inaccessiblepaths-mount-propagation.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-inaccessiblepaths-sys.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ioschedulingclass-best-effort.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ioschedulingclass-idle.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-ioschedulingclass-none.service test: make test-execute pass on Linux 5.15 2021-11-24 16:15:14 +01:00
exec-ioschedulingclass-realtime.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-load-credential.service test-execute: add basic tests for LoadCredential= and SetCredential= 2023-02-15 10:10:54 +09:00
exec-mount-apivfs-no.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-networknamespacepath-privatemounts-no.service test-execute: add test for NetworkNamespacePath= 2023-03-04 02:50:15 +09:00
exec-networknamespacepath-privatemounts-yes.service test-execute: add test for NetworkNamespacePath= 2023-03-04 02:50:15 +09:00
exec-noexecpaths-simple.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-oomscoreadjust-negative.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-oomscoreadjust-positive.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-passenvironment-absent.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-passenvironment-empty.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-passenvironment-repeated.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-passenvironment.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-personality-aarch64.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-personality-loongarch64.service test: add LoongArch 64bit testcase 2021-12-22 11:07:56 +08:00
exec-personality-ppc64.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-personality-ppc64le.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-personality-s390.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-personality-x86-64.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-personality-x86.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatedevices-disabled-by-prefix.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatedevices-no-capability-mknod.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatedevices-no-capability-sys-rawio.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatedevices-no.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatedevices-yes-capability-mknod.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatedevices-yes-capability-sys-rawio.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatedevices-yes-with-group.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatedevices-yes.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatenetwork-yes-privatemounts-no.service test-execute: simplify the tests for PrivateNetwork= 2023-03-04 02:49:13 +09:00
exec-privatenetwork-yes-privatemounts-yes.service test-execute: simplify the tests for PrivateNetwork= 2023-03-04 02:49:13 +09:00
exec-privatetmp-disabled-by-prefix.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatetmp-no.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-privatetmp-yes.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-protecthome-tmpfs-vs-protectsystem-strict.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-protectkernellogs-no-capabilities.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-protectkernellogs-yes-capabilities.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-protectkernelmodules-no-capabilities.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-protectkernelmodules-yes-capabilities.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-protectkernelmodules-yes-mount-propagation.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-readonlypaths-mount-propagation.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-readonlypaths-simple.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-readonlypaths-with-bindpaths.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-readonlypaths.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-readwritepaths-mount-propagation.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-restrictnamespaces-merge-all.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-restrictnamespaces-merge-and.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-restrictnamespaces-merge-or.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-restrictnamespaces-mnt-deny-list.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-restrictnamespaces-mnt.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-restrictnamespaces-no.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-restrictnamespaces-yes.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-runtimedirectory-mode.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-runtimedirectory-owner-nfsnobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-runtimedirectory-owner-nobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-runtimedirectory-owner-nogroup.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-runtimedirectory-owner.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-runtimedirectory.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-set-credential.service test-execute: add basic tests for LoadCredential= and SetCredential= 2023-02-15 10:10:54 +09:00
exec-specifier-interpolation.service test-execute: use bash instead of perl 2023-05-09 08:11:10 +02:00
exec-specifier-system.service test-execute: drop capabilities when testing with user manager 2023-02-15 10:10:54 +09:00
exec-specifier-user.service execute: add support for XDG_STATE_HOME for placing service state data in --user mode 2023-06-28 22:01:55 +02:00
exec-specifier.service test-execute: drop capabilities when testing with user manager 2023-02-15 10:10:54 +09:00
exec-specifier@.service test-execute: drop capabilities when testing with user manager 2023-02-15 10:10:54 +09:00
exec-standardinput-data.service test: drop whitespace after shell redirection operators 2023-02-06 09:19:04 +01:00
exec-standardinput-file-cat.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-standardinput-file.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-standardoutput-append.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-standardoutput-file.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-standardoutput-truncate.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-supplementarygroups-multiple-groups-default-group-user.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-supplementarygroups-multiple-groups-withgid.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-supplementarygroups-multiple-groups-withuid.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-supplementarygroups-single-group-user.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-supplementarygroups-single-group.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-supplementarygroups.service tests: minor simplification in test-execute 2022-11-04 12:53:17 +01:00
exec-systemcallerrornumber-name.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallerrornumber-number.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-failing2.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-failing3.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-failing.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-not-failing2.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-not-failing3.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-not-failing.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-override-error-action2.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-override-error-action.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-system-user-nfsnobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-system-user-nobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-system-user.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-with-errno-in-allow-list.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-with-errno-multi.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-with-errno-name.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-systemcallfilter-with-errno-number.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-temporaryfilesystem-options.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-temporaryfilesystem-ro.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-temporaryfilesystem-rw.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-temporaryfilesystem-usr.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-umask-0177.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-umask-default.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-umask-namespace.service tests: add test case for UMask=+BindPaths= combination 2021-11-12 16:02:26 +01:00
exec-unsetenvironment.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-user-nfsnobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-user-nobody.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-user.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-workingdirectory-trailing-dot.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00
exec-workingdirectory.service tests: add spdx license header to test unit/link/network/conf files 2021-10-18 09:04:45 +02:00