summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-01-31 16:41:16 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-02-01 11:38:35 +0100
commit3e74e6a15b1b31538222d16136d9743cff26f62e (patch)
tree6fac8c923730892ac8ee7eaa7c63f95c8dc5e190 /test
parentbasic/user-util: create /etc from take_etc_passwd_lock (diff)
downloadsystemd-3e74e6a15b1b31538222d16136d9743cff26f62e.tar.xz
systemd-3e74e6a15b1b31538222d16136d9743cff26f62e.zip
test-sysusers: check that sysusers creates /etc when missing
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-sysusers.sh.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test-sysusers.sh.in b/test/test-sysusers.sh.in
index 950dc297d8..fab37960bc 100755
--- a/test/test-sysusers.sh.in
+++ b/test/test-sysusers.sh.in
@@ -99,6 +99,14 @@ $SYSUSERS --root=$TESTDIR \
compare $SOURCE/inline "(--inline --replace=…)"
+echo "*** Testing --inline with no /etc"
+rm -rf $TESTDIR/etc
+$SYSUSERS --root=$TESTDIR --inline \
+ "u u1 222 - - /bin/zsh" \
+ "g g1 111"
+
+compare $SOURCE/inline "(--inline)"
+
rm -f $TESTDIR/etc/sysusers.d/* $TESTDIR/usr/lib/sysusers.d/*
cat >$TESTDIR/etc/login.defs <<EOF