Cleanups for test/units directory (#38807)

This commit is contained in:
Yu Watanabe
2025-09-04 18:11:27 +09:00
committed by GitHub
77 changed files with 46 additions and 59 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ TEST_RET(cgroup_mask, .sd_booted = true) {
/* 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);
+1 -1
View File
@@ -21,7 +21,7 @@ TEST_RET(default_memory_low, .sd_booted = true) {
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);
+1 -1
View File
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
/* 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());
+1 -1
View File
@@ -25,7 +25,7 @@ int main(int argc, char *argv[]) {
/* 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());