/* Prepare the manager. */
_cleanup_free_ char *unit_dir = NULL;
- ASSERT_OK(get_testdata_dir("units", &unit_dir));
+ ASSERT_OK(get_testdata_dir("test-cgroup-mask", &unit_dir));
ASSERT_OK(setenv_unit_path(unit_dir));
assert_se(runtime_dir = setup_fake_runtime_dir());
r = manager_new(RUNTIME_SCOPE_USER, MANAGER_TEST_RUN_BASIC, &m);
return log_tests_skipped("cgroupfs not available");
_cleanup_free_ char *unit_dir = NULL;
- ASSERT_OK(get_testdata_dir("units", &unit_dir));
+ ASSERT_OK(get_testdata_dir("test-cgroup-unit-default", &unit_dir));
ASSERT_OK(setenv_unit_path(unit_dir));
assert_se(runtime_dir = setup_fake_runtime_dir());
r = manager_new(RUNTIME_SCOPE_USER, MANAGER_TEST_RUN_BASIC, &m);
/* prepare the test */
_cleanup_free_ char *unit_dir = NULL;
- ASSERT_OK(get_testdata_dir("units", &unit_dir));
+ ASSERT_OK(get_testdata_dir("test-engine", &unit_dir));
ASSERT_OK(setenv_unit_path(unit_dir));
assert_se(runtime_dir = setup_fake_runtime_dir());
/* prepare the test */
_cleanup_free_ char *unit_dir = NULL;
- ASSERT_OK(get_testdata_dir("units", &unit_dir));
+ ASSERT_OK(get_testdata_dir("test-sched-prio", &unit_dir));
ASSERT_OK(setenv_unit_path(unit_dir));
assert_se(runtime_dir = setup_fake_runtime_dir());
set -o pipefail
# shellcheck source=test/units/util.sh
-. "$(dirname "$0")"/util.sh
+. "$(dirname "$0")"/../units/util.sh
assert_eq "$LISTEN_FDS" "$1"
assert_eq "$LISTEN_FDNAMES" "$2"
set -o pipefail
# shellcheck source=test/units/util.sh
-. "$(dirname "$0")"/util.sh
+. "$(dirname "$0")"/../units/util.sh
assert_eq "$LISTEN_FDS" "$1"
assert_eq "$LISTEN_FDNAMES" "$2"
StartLimitIntervalSec=1h
[Service]
-ExecStart=/usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE-short-lived.sh
+ExecStart=/usr/lib/systemd/tests/testdata/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-short-lived.sh
'auxv',
'journal-data',
'knot-data',
- 'test-journals',
- 'units',
+ 'test-cgroup-mask',
+ 'test-cgroup-unit-default',
+ 'test-engine',
'test-execute',
'test-fstab-generator',
+ 'test-journals',
+ 'test-network',
+ 'test-network-generator-conversion',
'test-path',
'test-path-util',
+ 'test-sched-prio',
'test-umount',
- 'test-network',
- 'test-network-generator-conversion',
'integration-tests/TEST-07-PID1/TEST-07-PID1.units',
'integration-tests/TEST-03-JOBS/TEST-03-JOBS.units',
'integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units',
'integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units',
'integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units',
'integration-tests/TEST-30-ONCLOCKCHANGE/TEST-30-ONCLOCKCHANGE.units',
+ 'integration-tests/TEST-38-FREEZER/TEST-38-FREEZER.units',
'integration-tests/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units',
+ 'integration-tests/TEST-55-OOMD/TEST-55-OOMD.units',
+ 'integration-tests/TEST-62-RESTRICT-IFACES/TEST-62-RESTRICT-IFACES.units',
'integration-tests/TEST-63-PATH/TEST-63-PATH.units',
+ 'integration-tests/TEST-65-ANALYZE/TEST-65-ANALYZE.units',
+ 'integration-tests/TEST-66-DEVICE-ISOLATION/TEST-66-DEVICE-ISOLATION.units',
'integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units',
+ 'units',
]
foreach subdir : testdata_subdirs
[Unit]
Description=System Initialization
Documentation=man:systemd.special(7)
-Conflicts=emergency.service emergency.target
+
Wants=local-fs.target swap.target
-After=local-fs.target swap.target emergency.service emergency.target
+After=local-fs.target swap.target
+Conflicts=emergency.service emergency.target
+Before=emergency.service emergency.target
org.freedesktop.systemd1.Manager StartTransientUnit \
"ssa(sv)a(sa(sv))" "$TEST_UNIT" replace 4 \
ExecStart "a(sasb)" 1 \
- /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE-ExtraFileDescriptors-child.sh \
- 5 /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE-ExtraFileDescriptors-child.sh 2 "test:other" "Hello" "Extra" \
+ /usr/lib/systemd/tests/testdata/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-ExtraFileDescriptors-child.sh \
+ 5 /usr/lib/systemd/tests/testdata/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-ExtraFileDescriptors-child.sh 2 "test:other" "Hello" "Extra" \
true \
RemainAfterExit "b" true \
Type "s" oneshot \
-p RemainAfterExit=yes \
--unit=test-23-openfile-existing.service \
--service-type=oneshot \
- /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE-openfile-child.sh 2 "open.txt:colon" "Open" "File"
+ /usr/lib/systemd/tests/testdata/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-child.sh 2 "open.txt:colon" "Open" "File"
cmp <(systemctl show -p OpenFile test-23-openfile-existing.service) <<EOF
OpenFile=/tmp/test-open-file/open.txt::read-only
systemd-run -p OpenFile=/tmp/test.sock:socket:read-only \
--wait \
- /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE-openfile-child.sh 1 "socket" "Socket"
+ /usr/lib/systemd/tests/testdata/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-child.sh 1 "socket" "Socket"
systemctl stop TEST-23-UNIT-FILE-openfile-server.socket
rm /tmp/testwarnings.service
+TESTDATA=/usr/lib/systemd/tests/testdata/TEST-65-ANALYZE.units
+systemd-analyze verify "${TESTDATA}/loopy.service"
+systemd-analyze verify "${TESTDATA}/loopy2.service"
+systemd-analyze verify "${TESTDATA}/loopy3.service"
+systemd-analyze verify "${TESTDATA}/loopy4.service"
+
# Added an additional "INVALID_ID" id to the .json to verify that nothing breaks when input is malformed
# The PrivateNetwork id description and weight was changed to verify that 'security' is actually reading in
# values from the .json file when required. The default weight for "PrivateNetwork" is 2500, and the new weight
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-#
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-
-[Unit]
-Description=Shutdown
-Documentation=man:systemd.special(7)
-DefaultDependencies=no
-RefuseManualStart=yes
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-#
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-
-[Unit]
-Description=Sockets
-Documentation=man:systemd.special(7)
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-#
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-
-[Unit]
-Description=Timers
-Documentation=man:systemd.special(7)
-
-DefaultDependencies=no
-Conflicts=shutdown.target