]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-sched-prio.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / test / test-sched-prio.c
index 81d9abc2d51d7d26d9b6aee4c005af04e7433f88..804cee34e961f514899a56f46e0191766ca574a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -34,10 +35,16 @@ int main(int argc, char *argv[]) {
         FDSet *fdset = NULL;
         int r;
 
+        r = enter_cgroup_subroot();
+        if (r == -ENOMEDIUM) {
+                log_notice_errno(r, "Skipping test: cgroupfs not available");
+                return EXIT_TEST_SKIP;
+        }
+
         /* prepare the test */
         assert_se(set_unit_path(get_testdata_dir("")) >= 0);
         assert_se(runtime_dir = setup_fake_runtime_dir());
-        r = manager_new(UNIT_FILE_USER, true, &m);
+        r = manager_new(UNIT_FILE_USER, MANAGER_TEST_RUN_MINIMAL, &m);
         if (MANAGER_SKIP_TEST(r)) {
                 log_notice_errno(r, "Skipping test: manager_new: %m");
                 return EXIT_TEST_SKIP;