summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-05 10:59:44 +0100
committerLennart Poettering <lennart@poettering.net>2017-12-06 13:40:50 +0100
commit66d73cc7284b7a9b2c54d2cc1977d0c28237a20c (patch)
treeb98ad30b30d1d91e39097af7bf7bfb63da875040 /test
parentjournal,coredump: do not do ACL magic for "nobody" user either (diff)
downloadsystemd-66d73cc7284b7a9b2c54d2cc1977d0c28237a20c.tar.xz
systemd-66d73cc7284b7a9b2c54d2cc1977d0c28237a20c.zip
test-execute: use the "nogroup" group if it exists for testing
We currently look for "nobody" and "nfsnobody" when testing groups, both of which do not exist on Ubuntu, our main testing environment. Let's extend the tests slightly to also use "nogroup" if it exists.
Diffstat (limited to 'test')
-rw-r--r--test/meson.build1
-rw-r--r--test/test-execute/exec-group-nogroup.service7
2 files changed, 8 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
index 750f5c0379..5c533f4833 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -68,6 +68,7 @@ test_data_files = '''
test-execute/exec-environment.service
test-execute/exec-environmentfile.service
test-execute/exec-group-nfsnobody.service
+ test-execute/exec-group-nogroup.service
test-execute/exec-group.service
test-execute/exec-ignoresigpipe-no.service
test-execute/exec-ignoresigpipe-yes.service
diff --git a/test/test-execute/exec-group-nogroup.service b/test/test-execute/exec-group-nogroup.service
new file mode 100644
index 0000000000..cf0773229e
--- /dev/null
+++ b/test/test-execute/exec-group-nogroup.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Test for Group
+
+[Service]
+ExecStart=/bin/sh -x -c 'test "$$(id -n -g)" = "nogroup"'
+Type=oneshot
+Group=nogroup