Lines Matching refs:p

21         const char *p;  in TEST()  local
33 p = strjoina(root, "/usr/lib/systemd/system/a.service"); in TEST()
34 assert_se(write_string_file(p, in TEST()
41 p = strjoina(root, "/usr/lib/systemd/system/b.service"); in TEST()
42 assert_se(symlink("a.service", p) >= 0); in TEST()
47 p = strjoina(root, "/usr/lib/systemd/system/c.service"); in TEST()
48 assert_se(symlink("/usr/lib/systemd/system/a.service", p) >= 0); in TEST()
53 p = strjoina(root, "/usr/lib/systemd/system/d.service"); in TEST()
54 assert_se(symlink("c.service", p) >= 0); in TEST()
64 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/a.service"); in TEST()
65 assert_se(streq(changes[0].path, p)); in TEST()
83 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/a.service"); in TEST()
84 assert_se(streq(changes[0].path, p)); in TEST()
92 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/a.service"); in TEST()
93 assert_se(streq(changes[0].path, p)); in TEST()
111 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/a.service"); in TEST()
112 assert_se(streq(changes[0].path, p)); in TEST()
132 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/a.service"); in TEST()
133 assert_se(streq(changes[0].path, p)); in TEST()
147 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/a.service"); in TEST()
148 assert_se(streq(changes[0].path, p)); in TEST()
151 assert_se(streq(changes[1].path, p)); in TEST()
162 p = strjoina(root, "/usr/lib/systemd/system/e.service"); in TEST()
163 assert_se(symlink("../../../../../../dev/null", p) >= 0); in TEST()
168 assert_se(unlink(p) == 0); in TEST()
169 assert_se(symlink("/usr/../dev/null", p) >= 0); in TEST()
174 assert_se(unlink(p) == 0); in TEST()
178 p = strjoina(root, "/usr/lib/systemd/system/f.service"); in TEST()
179 assert_se(write_string_file(p, in TEST()
190 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/x.target.wants/f.service"); in TEST()
191 assert_se(streq(changes[0].path, p)); in TEST()
193 p = strjoina(root, "/usr/lib/systemd/system/f.service"); in TEST()
194 assert_se(streq(changes[1].source, p)); in TEST()
203 const char *p, *q; in TEST() local
224 p = strjoina(root, "/opt/linked.service"); in TEST()
225 assert_se(write_string_file(p, in TEST()
229 p = strjoina(root, "/opt/linked2.service"); in TEST()
230 assert_se(write_string_file(p, in TEST()
234 p = strjoina(root, "/opt/linked3.service"); in TEST()
235 assert_se(write_string_file(p, in TEST()
243 p = strjoina(root, "/usr/lib/systemd/system/linked2.service"); in TEST()
244 assert_se(symlink("/opt/linked2.service", p) >= 0); in TEST()
246 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/linked3.service"); in TEST()
247 assert_se(symlink("/opt/linked3.service", p) >= 0); in TEST()
258 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/linked.service"); in TEST()
259 assert_se(streq(changes[0].path, p)); in TEST()
269 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/linked.service"); in TEST()
270 assert_se(streq(changes[0].path, p)); in TEST()
279 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/linked.service"); in TEST()
285 if (p && streq(changes[i].path, p)) in TEST()
286 p = NULL; in TEST()
292 assert_se(!p && !q); in TEST()
301 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/linked.service"); in TEST()
306 if (p && streq(changes[i].path, p)) in TEST()
307 p = NULL; in TEST()
313 assert_se(!p && !q); in TEST()
321 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/linked2.service"); in TEST()
327 if (p && streq(changes[i].path, p)) in TEST()
328 p = NULL; in TEST()
334 assert_se(!p && !q); in TEST()
352 const char *p; in TEST() local
354 p = strjoina(root, "/usr/lib/systemd/system/test-default-real.target"); in TEST()
355 assert_se(write_string_file(p, "# pretty much empty", WRITE_STRING_FILE_CREATE) >= 0); in TEST()
357 p = strjoina(root, "/usr/lib/systemd/system/test-default.target"); in TEST()
358 assert_se(symlink("test-default-real.target", p) >= 0); in TEST()
375 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR "/" SPECIAL_DEFAULT_TARGET); in TEST()
376 assert_se(streq(changes[0].path, p)); in TEST()
387 const char *p; in TEST() local
389 p = strjoina(root, "/usr/lib/systemd/system/real-add-dependency-test-target.target"); in TEST()
390 assert_se(write_string_file(p, "# pretty much empty", WRITE_STRING_FILE_CREATE) >= 0); in TEST()
392 p = strjoina(root, "/usr/lib/systemd/system/add-dependency-test-target.target"); in TEST()
393 assert_se(symlink("real-add-dependency-test-target.target", p) >= 0); in TEST()
395 p = strjoina(root, "/usr/lib/systemd/system/real-add-dependency-test-service.service"); in TEST()
396 assert_se(write_string_file(p, "# pretty much empty", WRITE_STRING_FILE_CREATE) >= 0); in TEST()
398 p = strjoina(root, "/usr/lib/systemd/system/add-dependency-test-service.service"); in TEST()
399 assert_se(symlink("real-add-dependency-test-service.service", p) >= 0); in TEST()
405p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/real-add-dependency-test-target.target.wants/real-add-d… in TEST()
406 assert_se(streq(changes[0].path, p)); in TEST()
415 const char *p; in TEST() local
424 p = strjoina(root, "/usr/lib/systemd/system/template@.service"); in TEST()
425 assert_se(write_string_file(p, in TEST()
430 p = strjoina(root, "/usr/lib/systemd/system/template-symlink@.service"); in TEST()
431 assert_se(symlink("template@.service", p) >= 0); in TEST()
446 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/template@def.service"); in TEST()
447 assert_se(streq(changes[0].path, p)); in TEST()
461 assert_se(streq(changes[0].path, p)); in TEST()
477 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/template@foo.service"); in TEST()
478 assert_se(streq(changes[0].path, p)); in TEST()
492 assert_se(streq(changes[0].path, p)); in TEST()
510 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/template@quux.service"); in TEST()
511 assert_se(streq(changes[0].path, p)); in TEST()
529 const char *p; in TEST() local
535 p = strjoina(root, "/usr/lib/systemd/system/indirecta.service"); in TEST()
536 assert_se(write_string_file(p, in TEST()
540 p = strjoina(root, "/usr/lib/systemd/system/indirectb.service"); in TEST()
541 assert_se(write_string_file(p, in TEST()
545 p = strjoina(root, "/usr/lib/systemd/system/indirectc.service"); in TEST()
546 assert_se(symlink("indirecta.service", p) >= 0); in TEST()
556 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/indirectb.service"); in TEST()
557 assert_se(streq(changes[0].path, p)); in TEST()
568 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/indirectb.service"); in TEST()
569 assert_se(streq(changes[0].path, p)); in TEST()
577 const char *p, *q; in TEST() local
586 p = strjoina(root, "/usr/lib/systemd/system/preset-yes.service"); in TEST()
587 assert_se(write_string_file(p, in TEST()
591 p = strjoina(root, "/usr/lib/systemd/system/preset-no.service"); in TEST()
592 assert_se(write_string_file(p, in TEST()
596 p = strjoina(root, "/usr/lib/systemd/system-preset/test.preset"); in TEST()
597 assert_se(write_string_file(p, in TEST()
608 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/preset-yes.service"); in TEST()
609 assert_se(streq(changes[0].path, p)); in TEST()
619 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/preset-yes.service"); in TEST()
620 assert_se(streq(changes[0].path, p)); in TEST()
639 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/preset-yes.service"); in TEST()
645 assert_se(streq(changes[i].path, p)); in TEST()
659 p = strjoina(root, "/usr/lib/systemd/system/preset-yes.service"); in TEST()
666 if (streq(fl->path, p)) { in TEST()
682 const char *p; in TEST() local
690 p = strjoina(root, "/usr/lib/systemd/system/xx.service"); in TEST()
691 assert_se(write_string_file(p, "# Empty\n", WRITE_STRING_FILE_CREATE) >= 0); in TEST()
702 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/xx.service"); in TEST()
703 assert_se(write_string_file(p, "# Empty override\n", WRITE_STRING_FILE_CREATE) >= 0); in TEST()
709 assert_se(streq(changes[0].path, p)); in TEST()
713 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/xx.service.d/dropin.conf"); in TEST()
714 …assert_se(write_string_file(p, "# Empty dropin\n", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_MKDI… in TEST()
720 assert_se(streq(changes[0].path, p)); in TEST()
722 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/xx.service.d"); in TEST()
724 assert_se(streq(changes[1].path, p)); in TEST()
732 const char *p; in TEST() local
738 p = strjoina(root, "/usr/lib/systemd/system/prefix-1.service"); in TEST()
739 assert_se(write_string_file(p, in TEST()
743 p = strjoina(root, "/usr/lib/systemd/system/prefix-2.service"); in TEST()
744 assert_se(write_string_file(p, in TEST()
748 p = strjoina(root, "/usr/lib/systemd/system-preset/test.preset"); in TEST()
749 assert_se(write_string_file(p, in TEST()
761 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/prefix-1.service"); in TEST()
762 assert_se(streq(changes[0].path, p)); in TEST()
778 const char *p; in TEST() local
783 p = strjoina(root, "/usr/lib/systemd/system/static-instance@.service"); in TEST()
784 assert_se(write_string_file(p, in TEST()
791 p = strjoina(root, "/usr/lib/systemd/system/static-instance@foo.service"); in TEST()
792 assert_se(symlink("static-instance@.service", p) >= 0); in TEST()
799 const char *p; in TEST() local
810 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-1.service"); in TEST()
811 assert_se(write_string_file(p, in TEST()
815 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-1.service.d/dropin.conf"); in TEST()
816 assert_se(write_string_file(p, in TEST()
822 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/with-dropin-2.service"); in TEST()
823 assert_se(write_string_file(p, in TEST()
827 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-2.service.d/dropin.conf"); in TEST()
828 assert_se(write_string_file(p, in TEST()
834 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-3.service"); in TEST()
835 assert_se(write_string_file(p, in TEST()
839 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/with-dropin-3.service.d/dropin.conf"); in TEST()
840 assert_se(write_string_file(p, in TEST()
846 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-4a.service"); in TEST()
847 assert_se(write_string_file(p, in TEST()
851 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/with-dropin-4a.service.d/dropin.conf"); in TEST()
852 assert_se(write_string_file(p, in TEST()
858 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-4b.service"); in TEST()
859 assert_se(write_string_file(p, in TEST()
871 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-1.service"); in TEST()
872 assert_se(streq(changes[0].path, p)); in TEST()
873 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/graphical.target.wants/with-dropin-1.service"); in TEST()
874 assert_se(streq(changes[1].path, p)); in TEST()
885 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-2.service"); in TEST()
886 assert_se(streq(changes[0].path, p)); in TEST()
887 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/graphical.target.wants/with-dropin-2.service"); in TEST()
888 assert_se(streq(changes[1].path, p)); in TEST()
899 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-3.service"); in TEST()
900 assert_se(streq(changes[0].path, p)); in TEST()
901 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/graphical.target.wants/with-dropin-3.service"); in TEST()
902 assert_se(streq(changes[1].path, p)); in TEST()
913 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-4a.service"); in TEST()
914 assert_se(streq(changes[0].path, p)); in TEST()
915 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-4b.service"); in TEST()
916 assert_se(streq(changes[1].path, p)); in TEST()
928 const char *p; in TEST() local
937 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-1@.service"); in TEST()
938 assert_se(write_string_file(p, in TEST()
942 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-1@.service.d/dropin.conf"); in TEST()
943 assert_se(write_string_file(p, in TEST()
949 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-2@.service"); in TEST()
950 assert_se(write_string_file(p, in TEST()
954p = strjoina(root, "/usr/lib/systemd/system/with-dropin-2@instance-1.service.d/dropin.conf"); in TEST()
955 assert_se(write_string_file(p, in TEST()
961 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-3@.service"); in TEST()
962 assert_se(write_string_file(p, in TEST()
967 p = strjoina(root, "/usr/lib/systemd/system/with-dropin-3@.service.d/dropin.conf"); in TEST()
968 assert_se(write_string_file(p, in TEST()
980p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-1@instance-1.servic… in TEST()
981 assert_se(streq(changes[0].path, p)); in TEST()
982p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/graphical.target.wants/with-dropin-1@instance-1.service… in TEST()
983 assert_se(streq(changes[1].path, p)); in TEST()
993p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-2@instance-1.servic… in TEST()
994 assert_se(streq(changes[0].path, p)); in TEST()
995p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/graphical.target.wants/with-dropin-2@instance-1.service… in TEST()
996 assert_se(streq(changes[1].path, p)); in TEST()
1004p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-2@instance-2.servic… in TEST()
1005 assert_se(streq(changes[0].path, p)); in TEST()
1013p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/with-dropin-3@instance-2.servic… in TEST()
1014 assert_se(streq(changes[0].path, p)); in TEST()
1028 const char *p; in TEST() local
1032 p = strjoina(root, "/usr/lib/systemd/system/foo@.service"); in TEST()
1033 assert_se(write_string_file(p, in TEST()
1040 p = strjoina(root, "/usr/lib/systemd/system-preset/test.preset"); in TEST()
1041 assert_se(write_string_file(p, in TEST()
1053 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/foo@bar0.service"); in TEST()
1054 assert_se(streq(changes[0].path, p)); in TEST()
1061 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/multi-user.target.wants/foo@bar0.service"); in TEST()
1062 assert_se(streq(changes[0].path, p)); in TEST()
1246 const char *p; in intro() local
1250 p = strjoina(root, "/usr/lib/systemd/system/"); in intro()
1251 assert_se(mkdir_p(p, 0755) >= 0); in intro()
1253 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/"); in intro()
1254 assert_se(mkdir_p(p, 0755) >= 0); in intro()
1256 p = strjoina(root, "/run/systemd/system/"); in intro()
1257 assert_se(mkdir_p(p, 0755) >= 0); in intro()
1259 p = strjoina(root, "/opt/"); in intro()
1260 assert_se(mkdir_p(p, 0755) >= 0); in intro()
1262 p = strjoina(root, "/usr/lib/systemd/system-preset/"); in intro()
1263 assert_se(mkdir_p(p, 0755) >= 0); in intro()
1265 p = strjoina(root, "/usr/lib/systemd/system/multi-user.target"); in intro()
1266 assert_se(write_string_file(p, "# pretty much empty", WRITE_STRING_FILE_CREATE) >= 0); in intro()
1268 p = strjoina(root, "/usr/lib/systemd/system/graphical.target"); in intro()
1269 assert_se(write_string_file(p, "# pretty much empty", WRITE_STRING_FILE_CREATE) >= 0); in intro()