ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
df98bb
From 55cde82204724df756a198da691471f2f3f83d5a Mon Sep 17 00:00:00 2001
df98bb
From: David Tardon <dtardon@redhat.com>
df98bb
Date: Wed, 31 Mar 2021 10:08:31 +0200
df98bb
Subject: [PATCH] test-install-root: create referenced targets
df98bb
df98bb
(cherry picked from commit cd228002ccedb927b4531a4b7dd9ea7015fdb657)
df98bb
df98bb
Related: #1835351
df98bb
---
df98bb
 src/test/test-install-root.c | 6 ++++++
df98bb
 1 file changed, 6 insertions(+)
df98bb
df98bb
diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c
df98bb
index fe1ca5b16f..f8b41b04db 100644
df98bb
--- a/src/test/test-install-root.c
df98bb
+++ b/src/test/test-install-root.c
df98bb
@@ -1061,6 +1061,12 @@ int main(int argc, char *argv[]) {
df98bb
         p = strjoina(root, "/usr/lib/systemd/system-preset/");
df98bb
         assert_se(mkdir_p(p, 0755) >= 0);
df98bb
 
df98bb
+        p = strjoina(root, "/usr/lib/systemd/system/multi-user.target");
df98bb
+        assert_se(write_string_file(p, "# pretty much empty", WRITE_STRING_FILE_CREATE) >= 0);
df98bb
+
df98bb
+        p = strjoina(root, "/usr/lib/systemd/system/graphical.target");
df98bb
+        assert_se(write_string_file(p, "# pretty much empty", WRITE_STRING_FILE_CREATE) >= 0);
df98bb
+
df98bb
         test_basic_mask_and_enable(root);
df98bb
         test_linked_units(root);
df98bb
         test_default(root);