summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-26 11:58:24 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-10-01 17:52:51 +0200
commitbd7e6aa73ac213a7a23ad1837a4e7e0af21c9294 (patch)
tree8d1b917e1f5c9d909b41caf31385699f02f9d3b3 /test
parentbasic/fileio: add chase_symlinks_and_fopen_unlocked() (diff)
downloadsystemd-bd7e6aa73ac213a7a23ad1837a4e7e0af21c9294.tar.xz
systemd-bd7e6aa73ac213a7a23ad1837a4e7e0af21c9294.zip
test/TEST-21-SYSUSERS: turn into a unit test
All this test does is manipulate text files in a subdir specified with --testroot. It can be a normal unittest without the overhead of creating a machine image. As a bonus, also test the .standalone version.
Diffstat (limited to 'test')
l---------test/TEST-21-SYSUSERS/Makefile1
-rwxr-xr-xtest/TEST-21-SYSUSERS/test.sh128
-rw-r--r--test/meson.build15
-rwxr-xr-xtest/test-sysusers.sh.in111
-rw-r--r--test/test-sysusers/inline.expected-group (renamed from test/TEST-21-SYSUSERS/inline.expected-group)0
-rw-r--r--test/test-sysusers/inline.expected-passwd (renamed from test/TEST-21-SYSUSERS/inline.expected-passwd)0
-rw-r--r--test/test-sysusers/test-1.expected-group (renamed from test/TEST-21-SYSUSERS/test-1.expected-group)0
-rw-r--r--test/test-sysusers/test-1.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-1.expected-passwd)0
-rw-r--r--test/test-sysusers/test-1.input (renamed from test/TEST-21-SYSUSERS/test-1.input)0
-rw-r--r--test/test-sysusers/test-10.expected-group (renamed from test/TEST-21-SYSUSERS/test-10.expected-group)0
-rw-r--r--test/test-sysusers/test-10.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-10.expected-passwd)0
-rw-r--r--test/test-sysusers/test-10.input (renamed from test/TEST-21-SYSUSERS/test-10.input)0
-rw-r--r--test/test-sysusers/test-11.expected-group (renamed from test/TEST-21-SYSUSERS/test-11.expected-group)0
-rw-r--r--test/test-sysusers/test-11.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-11.expected-passwd)0
-rw-r--r--test/test-sysusers/test-11.initial-group (renamed from test/TEST-21-SYSUSERS/test-11.initial-group)0
-rw-r--r--test/test-sysusers/test-11.initial-passwd (renamed from test/TEST-21-SYSUSERS/test-11.initial-passwd)0
-rw-r--r--test/test-sysusers/test-11.input (renamed from test/TEST-21-SYSUSERS/test-11.input)0
-rw-r--r--test/test-sysusers/test-12.expected-group (renamed from test/TEST-21-SYSUSERS/test-12.expected-group)0
-rw-r--r--test/test-sysusers/test-12.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-12.expected-passwd)0
-rw-r--r--test/test-sysusers/test-12.initial-group (renamed from test/TEST-21-SYSUSERS/test-12.initial-group)0
-rw-r--r--test/test-sysusers/test-12.initial-passwd (renamed from test/TEST-21-SYSUSERS/test-12.initial-passwd)0
-rw-r--r--test/test-sysusers/test-12.input (renamed from test/TEST-21-SYSUSERS/test-12.input)0
-rw-r--r--test/test-sysusers/test-13.expected-group (renamed from test/TEST-21-SYSUSERS/test-13.expected-group)0
-rw-r--r--test/test-sysusers/test-13.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-13.expected-passwd)0
-rw-r--r--test/test-sysusers/test-13.input (renamed from test/TEST-21-SYSUSERS/test-13.input)0
-rw-r--r--test/test-sysusers/test-14.expected-group (renamed from test/TEST-21-SYSUSERS/test-14.expected-group)0
-rw-r--r--test/test-sysusers/test-14.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-14.expected-passwd)0
-rw-r--r--test/test-sysusers/test-14.initial-group (renamed from test/TEST-21-SYSUSERS/test-14.initial-group)0
-rw-r--r--test/test-sysusers/test-14.input (renamed from test/TEST-21-SYSUSERS/test-14.input)0
-rw-r--r--test/test-sysusers/test-2.expected-group (renamed from test/TEST-21-SYSUSERS/test-2.expected-group)0
-rw-r--r--test/test-sysusers/test-2.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-2.expected-passwd)0
-rw-r--r--test/test-sysusers/test-2.input (renamed from test/TEST-21-SYSUSERS/test-2.input)0
-rw-r--r--test/test-sysusers/test-3.expected-group (renamed from test/TEST-21-SYSUSERS/test-3.expected-group)0
-rw-r--r--test/test-sysusers/test-3.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-3.expected-passwd)0
-rw-r--r--test/test-sysusers/test-3.input (renamed from test/TEST-21-SYSUSERS/test-3.input)0
-rw-r--r--test/test-sysusers/test-4.expected-group (renamed from test/TEST-21-SYSUSERS/test-4.expected-group)0
-rw-r--r--test/test-sysusers/test-4.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-4.expected-passwd)0
-rw-r--r--test/test-sysusers/test-4.input (renamed from test/TEST-21-SYSUSERS/test-4.input)0
-rw-r--r--test/test-sysusers/test-5.expected-group (renamed from test/TEST-21-SYSUSERS/test-5.expected-group)0
-rw-r--r--test/test-sysusers/test-5.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-5.expected-passwd)0
-rw-r--r--test/test-sysusers/test-5.input (renamed from test/TEST-21-SYSUSERS/test-5.input)0
-rw-r--r--test/test-sysusers/test-6.expected-group (renamed from test/TEST-21-SYSUSERS/test-6.expected-group)0
-rw-r--r--test/test-sysusers/test-6.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-6.expected-passwd)0
-rw-r--r--test/test-sysusers/test-6.input (renamed from test/TEST-21-SYSUSERS/test-6.input)0
-rw-r--r--test/test-sysusers/test-7.expected-group (renamed from test/TEST-21-SYSUSERS/test-7.expected-group)0
-rw-r--r--test/test-sysusers/test-7.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-7.expected-passwd)0
-rw-r--r--test/test-sysusers/test-7.input (renamed from test/TEST-21-SYSUSERS/test-7.input)0
-rw-r--r--test/test-sysusers/test-8.expected-group (renamed from test/TEST-21-SYSUSERS/test-8.expected-group)0
-rw-r--r--test/test-sysusers/test-8.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-8.expected-passwd)0
-rw-r--r--test/test-sysusers/test-8.input (renamed from test/TEST-21-SYSUSERS/test-8.input)0
-rw-r--r--test/test-sysusers/test-9.expected-group (renamed from test/TEST-21-SYSUSERS/test-9.expected-group)0
-rw-r--r--test/test-sysusers/test-9.expected-passwd (renamed from test/TEST-21-SYSUSERS/test-9.expected-passwd)0
-rw-r--r--test/test-sysusers/test-9.input (renamed from test/TEST-21-SYSUSERS/test-9.input)0
-rw-r--r--test/test-sysusers/unhappy-1.expected-err (renamed from test/TEST-21-SYSUSERS/unhappy-1.expected-err)0
-rw-r--r--test/test-sysusers/unhappy-1.input (renamed from test/TEST-21-SYSUSERS/unhappy-1.input)0
-rw-r--r--test/test-sysusers/unhappy-2.expected-err (renamed from test/TEST-21-SYSUSERS/unhappy-2.expected-err)0
-rw-r--r--test/test-sysusers/unhappy-2.input (renamed from test/TEST-21-SYSUSERS/unhappy-2.input)0
-rw-r--r--test/test-sysusers/unhappy-3.expected-err (renamed from test/TEST-21-SYSUSERS/unhappy-3.expected-err)0
-rw-r--r--test/test-sysusers/unhappy-3.input (renamed from test/TEST-21-SYSUSERS/unhappy-3.input)0
59 files changed, 126 insertions, 129 deletions
diff --git a/test/TEST-21-SYSUSERS/Makefile b/test/TEST-21-SYSUSERS/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-21-SYSUSERS/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-21-SYSUSERS/test.sh b/test/TEST-21-SYSUSERS/test.sh
deleted file mode 100755
index 3b37f7eaa6..0000000000
--- a/test/TEST-21-SYSUSERS/test.sh
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env bash
-set -e
-TEST_DESCRIPTION="Sysuser-related tests"
-IMAGE_NAME="sysusers"
-. $TEST_BASE_DIR/test-functions
-
-test_setup() {
- mkdir -p $TESTDIR/etc/sysusers.d $TESTDIR/usr/lib/sysusers.d $TESTDIR/tmp
-}
-
-prepare_testdir() {
- rm -f $TESTDIR/etc/*{passwd,group,shadow}
- for i in $1.initial-{passwd,group,shadow}; do
- test -f $i && cp $i $TESTDIR/etc/${i#*.initial-}
- done
- return 0
-}
-
-preprocess() {
- in="$1"
-
- # see meson.build how to extract this. gcc -E was used before to
- # get this value from config.h, however the autopkgtest fails with
- # it
- [[ -e /etc/login.defs ]] && login_defs_file="/etc/login.defs" || login_defs_file="/usr/etc/login.defs"
- SYSTEM_UID_MAX=$(awk 'BEGIN { uid=999 } /^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }' $login_defs_file)
- SYSTEM_GID_MAX=$(awk 'BEGIN { gid=999 } /^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }' $login_defs_file)
-
- # we can't rely on config.h to get the nologin path, as autopkgtest
- # uses pre-compiled binaries, so extract it from the systemd-sysusers
- # binary which we are about to execute
- NOLOGIN=$(strings $(type -p systemd-sysusers) | grep nologin)
-
- sed -e "s/SYSTEM_UID_MAX/${SYSTEM_UID_MAX}/g" \
- -e "s/SYSTEM_GID_MAX/${SYSTEM_GID_MAX}/g" \
- -e "s#NOLOGIN#${NOLOGIN}#g" "$in"
-}
-
-compare() {
- if ! diff -u $TESTDIR/etc/passwd <(preprocess ${1%.*}.expected-passwd); then
- echo "**** Unexpected output for $f"
- exit 1
- fi
-
- if ! diff -u $TESTDIR/etc/group <(preprocess ${1%.*}.expected-group); then
- echo "**** Unexpected output for $f $2"
- exit 1
- fi
-}
-
-test_run() {
- # ensure our build of systemd-sysusers is run
- PATH=${BUILD_DIR}:$PATH
-
- rm -f $TESTDIR/etc/sysusers.d/* $TESTDIR/usr/lib/sysusers.d/*
-
- # happy tests
- for f in test-*.input; do
- echo "*** Running $f"
- prepare_testdir ${f%.input}
- cp $f $TESTDIR/usr/lib/sysusers.d/test.conf
- systemd-sysusers --root=$TESTDIR
-
- compare $f ""
- done
-
- for f in test-*.input; do
- echo "*** Running $f on stdin"
- prepare_testdir ${f%.input}
- touch $TESTDIR/etc/sysusers.d/test.conf
- cat $f | systemd-sysusers --root=$TESTDIR -
-
- compare $f "on stdin"
- done
-
- for f in test-*.input; do
- echo "*** Running $f on stdin with --replace"
- prepare_testdir ${f%.input}
- touch $TESTDIR/etc/sysusers.d/test.conf
- # this overrides test.conf which is masked on disk
- cat $f | systemd-sysusers --root=$TESTDIR --replace=/etc/sysusers.d/test.conf -
- # this should be ignored
- cat test-1.input | systemd-sysusers --root=$TESTDIR --replace=/usr/lib/sysusers.d/test.conf -
-
- compare $f "on stdin with --replace"
- done
-
- # test --inline
- echo "*** Testing --inline"
- prepare_testdir
- # copy a random file to make sure it is ignored
- cp $f $TESTDIR/etc/sysusers.d/confuse.conf
- systemd-sysusers --root=$TESTDIR --inline \
- "u u1 222 - - /bin/zsh" \
- "g g1 111"
-
- compare inline "(--inline)"
-
- # test --replace
- echo "*** Testing --inline with --replace"
- prepare_testdir
- # copy a random file to make sure it is ignored
- cp $f $TESTDIR/etc/sysusers.d/confuse.conf
- systemd-sysusers --root=$TESTDIR \
- --inline \
- --replace=/etc/sysusers.d/confuse.conf \
- "u u1 222 - - /bin/zsh" \
- "g g1 111"
-
- compare inline "(--inline --replace=…)"
-
- rm -f $TESTDIR/etc/sysusers.d/* $TESTDIR/usr/lib/sysusers.d/*
-
- # tests for error conditions
- for f in unhappy-*.input; do
- echo "*** Running test $f"
- prepare_testdir ${f%.input}
- cp $f $TESTDIR/usr/lib/sysusers.d/test.conf
- systemd-sysusers --root=$TESTDIR 2>&1 | tail -n1 > $TESTDIR/tmp/err
- if ! diff -u $TESTDIR/tmp/err ${f%.*}.expected-err; then
- echo "**** Unexpected error output for $f"
- cat $TESTDIR/tmp/err
- exit 1
- fi
- done
-}
-
-do_test "$@"
diff --git a/test/meson.build b/test/meson.build
index 5d9fb5ab50..5656abdf72 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -58,6 +58,21 @@ test_network_generator_conversion_sh = find_program('test-network-generator-conv
############################################################
+test_sysusers_dir = join_paths(meson.current_source_dir(), 'test-sysusers')
+
+test_sysusers_sh = configure_file(
+ input : 'test-sysusers.sh.in',
+ output : 'test-sysusers.sh',
+ configuration : substs)
+if install_tests and conf.get('ENABLE_SYSUSERS') == 1
+ install_data(test_sysusers_sh,
+ install_dir : testsdir)
+ install_subdir('test-sysusers',
+ install_dir : testdata_dir)
+endif
+
+############################################################
+
rule_syntax_check_py = find_program('rule-syntax-check.py')
if want_tests != 'false'
test('rule-syntax-check',
diff --git a/test/test-sysusers.sh.in b/test/test-sysusers.sh.in
new file mode 100755
index 0000000000..ac07c2145b
--- /dev/null
+++ b/test/test-sysusers.sh.in
@@ -0,0 +1,111 @@
+#!/usr/bin/env bash
+set -e
+
+SYSUSERS="${1:-systemd-sysusers}"
+
+[ -e "$(dirname $0)/../systemd-runtest.env" ] && . "$(dirname $0)/../systemd-runtest.env"
+SYSTEMD_TEST_DATA=${SYSTEMD_TEST_DATA:-@SYSTEMD_TEST_DATA@}
+SOURCE=$SYSTEMD_TEST_DATA/test-sysusers
+
+TESTDIR=$(mktemp --tmpdir --directory "test-sysusers.XXXXXXXXXX")
+trap "rm -rf '$TESTDIR'" EXIT INT QUIT PIPE
+
+prepare_testdir() {
+ mkdir -p $TESTDIR/etc/sysusers.d/
+ mkdir -p $TESTDIR/usr/lib/sysusers.d/
+ rm -f $TESTDIR/etc/*{passwd,group,shadow}
+ for i in $1.initial-{passwd,group,shadow}; do
+ test -f $i && cp $i $TESTDIR/etc/${i#*.initial-}
+ done
+ return 0
+}
+
+preprocess() {
+ sed -e "s/SYSTEM_UID_MAX/@SYSTEM_UID_MAX@/g" \
+ -e "s/SYSTEM_GID_MAX/@SYSTEM_GID_MAX@/g" \
+ -e "s#NOLOGIN#@NOLOGIN@#g" "$1"
+}
+
+compare() {
+ if ! diff -u $TESTDIR/etc/passwd <(preprocess ${1%.*}.expected-passwd); then
+ echo "**** Unexpected output for $f"
+ exit 1
+ fi
+
+ if ! diff -u $TESTDIR/etc/group <(preprocess ${1%.*}.expected-group); then
+ echo "**** Unexpected output for $f $2"
+ exit 1
+ fi
+}
+
+rm -f $TESTDIR/etc/sysusers.d/* $TESTDIR/usr/lib/sysusers.d/*
+
+# happy tests
+for f in $SOURCE/test-*.input; do
+ echo "*** Running $f"
+ prepare_testdir ${f%.input}
+ cp $f $TESTDIR/usr/lib/sysusers.d/test.conf
+ $SYSUSERS --root=$TESTDIR
+
+ compare $f ""
+done
+
+for f in $SOURCE/test-*.input; do
+ echo "*** Running $f on stdin"
+ prepare_testdir ${f%.input}
+ touch $TESTDIR/etc/sysusers.d/test.conf
+ cat $f | $SYSUSERS --root=$TESTDIR -
+
+ compare $f "on stdin"
+done
+
+for f in $SOURCE/test-*.input; do
+ echo "*** Running $f on stdin with --replace"
+ prepare_testdir ${f%.input}
+ touch $TESTDIR/etc/sysusers.d/test.conf
+ # this overrides test.conf which is masked on disk
+ cat $f | $SYSUSERS --root=$TESTDIR --replace=/etc/sysusers.d/test.conf -
+ # this should be ignored
+ cat $SOURCE/test-1.input | $SYSUSERS --root=$TESTDIR --replace=/usr/lib/sysusers.d/test.conf -
+
+ compare $f "on stdin with --replace"
+done
+
+# test --inline
+echo "*** Testing --inline"
+prepare_testdir
+# copy a random file to make sure it is ignored
+cp $f $TESTDIR/etc/sysusers.d/confuse.conf
+$SYSUSERS --root=$TESTDIR --inline \
+ "u u1 222 - - /bin/zsh" \
+ "g g1 111"
+
+compare $SOURCE/inline "(--inline)"
+
+# test --replace
+echo "*** Testing --inline with --replace"
+prepare_testdir
+# copy a random file to make sure it is ignored
+cp $f $TESTDIR/etc/sysusers.d/confuse.conf
+$SYSUSERS --root=$TESTDIR \
+ --inline \
+ --replace=/etc/sysusers.d/confuse.conf \
+ "u u1 222 - - /bin/zsh" \
+ "g g1 111"
+
+compare $SOURCE/inline "(--inline --replace=…)"
+
+rm -f $TESTDIR/etc/sysusers.d/* $TESTDIR/usr/lib/sysusers.d/*
+
+# tests for error conditions
+for f in $SOURCE/unhappy-*.input; do
+ echo "*** Running test $f"
+ prepare_testdir ${f%.input}
+ cp $f $TESTDIR/usr/lib/sysusers.d/test.conf
+ $SYSUSERS --root=$TESTDIR 2>&1 | tail -n1 > $TESTDIR/err
+ if ! diff -u $TESTDIR/err ${f%.*}.expected-err; then
+ echo "**** Unexpected error output for $f"
+ cat $TESTDIR/err
+ exit 1
+ fi
+done
diff --git a/test/TEST-21-SYSUSERS/inline.expected-group b/test/test-sysusers/inline.expected-group
index cc9093f807..cc9093f807 100644
--- a/test/TEST-21-SYSUSERS/inline.expected-group
+++ b/test/test-sysusers/inline.expected-group
diff --git a/test/TEST-21-SYSUSERS/inline.expected-passwd b/test/test-sysusers/inline.expected-passwd
index f50f25c7d7..f50f25c7d7 100644
--- a/test/TEST-21-SYSUSERS/inline.expected-passwd
+++ b/test/test-sysusers/inline.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-1.expected-group b/test/test-sysusers/test-1.expected-group
index cc9093f807..cc9093f807 100644
--- a/test/TEST-21-SYSUSERS/test-1.expected-group
+++ b/test/test-sysusers/test-1.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-1.expected-passwd b/test/test-sysusers/test-1.expected-passwd
index f59303b5c9..f59303b5c9 100644
--- a/test/TEST-21-SYSUSERS/test-1.expected-passwd
+++ b/test/test-sysusers/test-1.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-1.input b/test/test-sysusers/test-1.input
index 297bbe3503..297bbe3503 100644
--- a/test/TEST-21-SYSUSERS/test-1.input
+++ b/test/test-sysusers/test-1.input
diff --git a/test/TEST-21-SYSUSERS/test-10.expected-group b/test/test-sysusers/test-10.expected-group
index 1c92158720..1c92158720 100644
--- a/test/TEST-21-SYSUSERS/test-10.expected-group
+++ b/test/test-sysusers/test-10.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-10.expected-passwd b/test/test-sysusers/test-10.expected-passwd
index ca2d764ea0..ca2d764ea0 100644
--- a/test/TEST-21-SYSUSERS/test-10.expected-passwd
+++ b/test/test-sysusers/test-10.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-10.input b/test/test-sysusers/test-10.input
index 8e18a00a63..8e18a00a63 100644
--- a/test/TEST-21-SYSUSERS/test-10.input
+++ b/test/test-sysusers/test-10.input
diff --git a/test/TEST-21-SYSUSERS/test-11.expected-group b/test/test-sysusers/test-11.expected-group
index 815a6c5940..815a6c5940 100644
--- a/test/TEST-21-SYSUSERS/test-11.expected-group
+++ b/test/test-sysusers/test-11.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-11.expected-passwd b/test/test-sysusers/test-11.expected-passwd
index 737e43bf19..737e43bf19 100644
--- a/test/TEST-21-SYSUSERS/test-11.expected-passwd
+++ b/test/test-sysusers/test-11.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-11.initial-group b/test/test-sysusers/test-11.initial-group
index 88d31f2c72..88d31f2c72 100644
--- a/test/TEST-21-SYSUSERS/test-11.initial-group
+++ b/test/test-sysusers/test-11.initial-group
diff --git a/test/TEST-21-SYSUSERS/test-11.initial-passwd b/test/test-sysusers/test-11.initial-passwd
index 45d3ffd5c2..45d3ffd5c2 100644
--- a/test/TEST-21-SYSUSERS/test-11.initial-passwd
+++ b/test/test-sysusers/test-11.initial-passwd
diff --git a/test/TEST-21-SYSUSERS/test-11.input b/test/test-sysusers/test-11.input
index bffc2cd7ea..bffc2cd7ea 100644
--- a/test/TEST-21-SYSUSERS/test-11.input
+++ b/test/test-sysusers/test-11.input
diff --git a/test/TEST-21-SYSUSERS/test-12.expected-group b/test/test-sysusers/test-12.expected-group
index 5d94846ed1..5d94846ed1 100644
--- a/test/TEST-21-SYSUSERS/test-12.expected-group
+++ b/test/test-sysusers/test-12.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-12.expected-passwd b/test/test-sysusers/test-12.expected-passwd
index f076f3d047..f076f3d047 100644
--- a/test/TEST-21-SYSUSERS/test-12.expected-passwd
+++ b/test/test-sysusers/test-12.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-12.initial-group b/test/test-sysusers/test-12.initial-group
index 1dbf9013ee..1dbf9013ee 100644
--- a/test/TEST-21-SYSUSERS/test-12.initial-group
+++ b/test/test-sysusers/test-12.initial-group
diff --git a/test/TEST-21-SYSUSERS/test-12.initial-passwd b/test/test-sysusers/test-12.initial-passwd
index aebc4923f4..aebc4923f4 100644
--- a/test/TEST-21-SYSUSERS/test-12.initial-passwd
+++ b/test/test-sysusers/test-12.initial-passwd
diff --git a/test/TEST-21-SYSUSERS/test-12.input b/test/test-sysusers/test-12.input
index 2913120276..2913120276 100644
--- a/test/TEST-21-SYSUSERS/test-12.input
+++ b/test/test-sysusers/test-12.input
diff --git a/test/TEST-21-SYSUSERS/test-13.expected-group b/test/test-sysusers/test-13.expected-group
index c78ea54bd3..c78ea54bd3 100644
--- a/test/TEST-21-SYSUSERS/test-13.expected-group
+++ b/test/test-sysusers/test-13.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-13.expected-passwd b/test/test-sysusers/test-13.expected-passwd
index ffc20a8193..ffc20a8193 100644
--- a/test/TEST-21-SYSUSERS/test-13.expected-passwd
+++ b/test/test-sysusers/test-13.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-13.input b/test/test-sysusers/test-13.input
index bad2f09505..bad2f09505 100644
--- a/test/TEST-21-SYSUSERS/test-13.input
+++ b/test/test-sysusers/test-13.input
diff --git a/test/TEST-21-SYSUSERS/test-14.expected-group b/test/test-sysusers/test-14.expected-group
index 2e619bc5cd..2e619bc5cd 100644
--- a/test/TEST-21-SYSUSERS/test-14.expected-group
+++ b/test/test-sysusers/test-14.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-14.expected-passwd b/test/test-sysusers/test-14.expected-passwd
index 62ed4f50af..62ed4f50af 100644
--- a/test/TEST-21-SYSUSERS/test-14.expected-passwd
+++ b/test/test-sysusers/test-14.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-14.initial-group b/test/test-sysusers/test-14.initial-group
index 2e619bc5cd..2e619bc5cd 100644
--- a/test/TEST-21-SYSUSERS/test-14.initial-group
+++ b/test/test-sysusers/test-14.initial-group
diff --git a/test/TEST-21-SYSUSERS/test-14.input b/test/test-sysusers/test-14.input
index 0a11a2e325..0a11a2e325 100644
--- a/test/TEST-21-SYSUSERS/test-14.input
+++ b/test/test-sysusers/test-14.input
diff --git a/test/TEST-21-SYSUSERS/test-2.expected-group b/test/test-sysusers/test-2.expected-group
index 8fcc03f4e9..8fcc03f4e9 100644
--- a/test/TEST-21-SYSUSERS/test-2.expected-group
+++ b/test/test-sysusers/test-2.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-2.expected-passwd b/test/test-sysusers/test-2.expected-passwd
index af8068813b..af8068813b 100644
--- a/test/TEST-21-SYSUSERS/test-2.expected-passwd
+++ b/test/test-sysusers/test-2.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-2.input b/test/test-sysusers/test-2.input
index cedea9e401..cedea9e401 100644
--- a/test/TEST-21-SYSUSERS/test-2.input
+++ b/test/test-sysusers/test-2.input
diff --git a/test/TEST-21-SYSUSERS/test-3.expected-group b/test/test-sysusers/test-3.expected-group
index c3a63285c6..c3a63285c6 100644
--- a/test/TEST-21-SYSUSERS/test-3.expected-group
+++ b/test/test-sysusers/test-3.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-3.expected-passwd b/test/test-sysusers/test-3.expected-passwd
index 946303f9ab..946303f9ab 100644
--- a/test/TEST-21-SYSUSERS/test-3.expected-passwd
+++ b/test/test-sysusers/test-3.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-3.input b/test/test-sysusers/test-3.input
index 3257082cee..3257082cee 100644
--- a/test/TEST-21-SYSUSERS/test-3.input
+++ b/test/test-sysusers/test-3.input
diff --git a/test/TEST-21-SYSUSERS/test-4.expected-group b/test/test-sysusers/test-4.expected-group
index 64913a5f50..64913a5f50 100644
--- a/test/TEST-21-SYSUSERS/test-4.expected-group
+++ b/test/test-sysusers/test-4.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-4.expected-passwd b/test/test-sysusers/test-4.expected-passwd
index 99d1048d79..99d1048d79 100644
--- a/test/TEST-21-SYSUSERS/test-4.expected-passwd
+++ b/test/test-sysusers/test-4.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-4.input b/test/test-sysusers/test-4.input
index 557f61c42b..557f61c42b 100644
--- a/test/TEST-21-SYSUSERS/test-4.input
+++ b/test/test-sysusers/test-4.input
diff --git a/test/TEST-21-SYSUSERS/test-5.expected-group b/test/test-sysusers/test-5.expected-group
index e9ef0a7999..e9ef0a7999 100644
--- a/test/TEST-21-SYSUSERS/test-5.expected-group
+++ b/test/test-sysusers/test-5.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-5.expected-passwd b/test/test-sysusers/test-5.expected-passwd
index a83d566b28..a83d566b28 100644
--- a/test/TEST-21-SYSUSERS/test-5.expected-passwd
+++ b/test/test-sysusers/test-5.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-5.input b/test/test-sysusers/test-5.input
index 57519d7c9d..57519d7c9d 100644
--- a/test/TEST-21-SYSUSERS/test-5.input
+++ b/test/test-sysusers/test-5.input
diff --git a/test/TEST-21-SYSUSERS/test-6.expected-group b/test/test-sysusers/test-6.expected-group
index 499c9008ce..499c9008ce 100644
--- a/test/TEST-21-SYSUSERS/test-6.expected-group
+++ b/test/test-sysusers/test-6.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-6.expected-passwd b/test/test-sysusers/test-6.expected-passwd
index ba55a13e18..ba55a13e18 100644
--- a/test/TEST-21-SYSUSERS/test-6.expected-passwd
+++ b/test/test-sysusers/test-6.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-6.input b/test/test-sysusers/test-6.input
index 764f57e825..764f57e825 100644
--- a/test/TEST-21-SYSUSERS/test-6.input
+++ b/test/test-sysusers/test-6.input
diff --git a/test/TEST-21-SYSUSERS/test-7.expected-group b/test/test-sysusers/test-7.expected-group
index ae9539c9a1..ae9539c9a1 100644
--- a/test/TEST-21-SYSUSERS/test-7.expected-group
+++ b/test/test-sysusers/test-7.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-7.expected-passwd b/test/test-sysusers/test-7.expected-passwd
index 0c5d370fd7..0c5d370fd7 100644
--- a/test/TEST-21-SYSUSERS/test-7.expected-passwd
+++ b/test/test-sysusers/test-7.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-7.input b/test/test-sysusers/test-7.input
index 4e10b74227..4e10b74227 100644
--- a/test/TEST-21-SYSUSERS/test-7.input
+++ b/test/test-sysusers/test-7.input
diff --git a/test/TEST-21-SYSUSERS/test-8.expected-group b/test/test-sysusers/test-8.expected-group
index f09b2b6426..f09b2b6426 100644
--- a/test/TEST-21-SYSUSERS/test-8.expected-group
+++ b/test/test-sysusers/test-8.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-8.expected-passwd b/test/test-sysusers/test-8.expected-passwd
index 23e99f0513..23e99f0513 100644
--- a/test/TEST-21-SYSUSERS/test-8.expected-passwd
+++ b/test/test-sysusers/test-8.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-8.input b/test/test-sysusers/test-8.input
index b76dd3e20c..b76dd3e20c 100644
--- a/test/TEST-21-SYSUSERS/test-8.input
+++ b/test/test-sysusers/test-8.input
diff --git a/test/TEST-21-SYSUSERS/test-9.expected-group b/test/test-sysusers/test-9.expected-group
index 33335d4eaa..33335d4eaa 100644
--- a/test/TEST-21-SYSUSERS/test-9.expected-group
+++ b/test/test-sysusers/test-9.expected-group
diff --git a/test/TEST-21-SYSUSERS/test-9.expected-passwd b/test/test-sysusers/test-9.expected-passwd
index 0bffbcd9c7..0bffbcd9c7 100644
--- a/test/TEST-21-SYSUSERS/test-9.expected-passwd
+++ b/test/test-sysusers/test-9.expected-passwd
diff --git a/test/TEST-21-SYSUSERS/test-9.input b/test/test-sysusers/test-9.input
index 4d536472c2..4d536472c2 100644
--- a/test/TEST-21-SYSUSERS/test-9.input
+++ b/test/test-sysusers/test-9.input
diff --git a/test/TEST-21-SYSUSERS/unhappy-1.expected-err b/test/test-sysusers/unhappy-1.expected-err
index d3342402e9..d3342402e9 100644
--- a/test/TEST-21-SYSUSERS/unhappy-1.expected-err
+++ b/test/test-sysusers/unhappy-1.expected-err
diff --git a/test/TEST-21-SYSUSERS/unhappy-1.input b/test/test-sysusers/unhappy-1.input
index b8ed85525b..b8ed85525b 100644
--- a/test/TEST-21-SYSUSERS/unhappy-1.input
+++ b/test/test-sysusers/unhappy-1.input
diff --git a/test/TEST-21-SYSUSERS/unhappy-2.expected-err b/test/test-sysusers/unhappy-2.expected-err
index 5db5c20214..5db5c20214 100644
--- a/test/TEST-21-SYSUSERS/unhappy-2.expected-err
+++ b/test/test-sysusers/unhappy-2.expected-err
diff --git a/test/TEST-21-SYSUSERS/unhappy-2.input b/test/test-sysusers/unhappy-2.input
index 3266b2229b..3266b2229b 100644
--- a/test/TEST-21-SYSUSERS/unhappy-2.input
+++ b/test/test-sysusers/unhappy-2.input
diff --git a/test/TEST-21-SYSUSERS/unhappy-3.expected-err b/test/test-sysusers/unhappy-3.expected-err
index d55b366372..d55b366372 100644
--- a/test/TEST-21-SYSUSERS/unhappy-3.expected-err
+++ b/test/test-sysusers/unhappy-3.expected-err
diff --git a/test/TEST-21-SYSUSERS/unhappy-3.input b/test/test-sysusers/unhappy-3.input
index 64e60dd606..64e60dd606 100644
--- a/test/TEST-21-SYSUSERS/unhappy-3.input
+++ b/test/test-sysusers/unhappy-3.input