]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: make test-execute pass on openSUSE
authorFranck Bui <fbui@suse.com>
Fri, 4 Nov 2022 11:24:10 +0000 (12:24 +0100)
committerFranck Bui <fbui@suse.com>
Fri, 4 Nov 2022 11:39:56 +0000 (12:39 +0100)
In my understanding user group "3" (aka "sys") is kept for historical reasons
but not really useful these days. That's probably explained why this group
isn't defined on openSUSE.

Hence let's drop reference to this user group, this shouldn't lessen the
revelance of the test since SupplementaryGroups= is still tested with 2 other
groups.

test/test-execute/exec-dynamicuser-supplementarygroups.service
test/test-execute/exec-supplementarygroups-multiple-groups-default-group-user.service
test/test-execute/exec-supplementarygroups-multiple-groups-withgid.service
test/test-execute/exec-supplementarygroups-multiple-groups-withuid.service

index fb0b57bc00b2a55ed8407e3baf7310d94514c70e..53ba0ec7cb3ecf9ef032b490dad2b1d93dc75486 100644 (file)
@@ -5,7 +5,6 @@ Description=Test DynamicUser with SupplementaryGroups=
 [Service]
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "1" && HAVE=1; done; test "$$HAVE" -eq 1'
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "2" && HAVE=1; done; test "$$HAVE" -eq 1'
-ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "3" && HAVE=1; done; test "$$HAVE" -eq 1'
 Type=oneshot
 DynamicUser=yes
-SupplementaryGroups=1 2 3
+SupplementaryGroups=1 2
index 362e539287cdb34fe12745e52445cc261b61e3c1..4cb032632096eedd6ad757b2d7d56b02c93099ad 100644 (file)
@@ -6,7 +6,6 @@ Description=Test for Supplementary Group with multiple groups without Group and
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "%G" && HAVE=1; done; test "$$HAVE" -eq 1'
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "1" && HAVE=1; done; test "$$HAVE" -eq 1'
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "2" && HAVE=1; done; test "$$HAVE" -eq 1'
-ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "3" && HAVE=1; done; test "$$HAVE" -eq 1'
 ExecStart=/bin/sh -x -c 'test "$$(id -g)" = "%G" && test "$$(id -u)" = "%U"'
 Type=oneshot
-SupplementaryGroups=1 2 3
+SupplementaryGroups=1 2
index ff3fdc814253b9d5af2dd7118c5393b351bed902..e11743d7546280c403c3f46a5bc6c695f4b9535e 100644 (file)
@@ -5,8 +5,7 @@ Description=Test for Supplementary Group with multiple groups and Group=1
 [Service]
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "1" && HAVE=1; done; test "$$HAVE" -eq 1'
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "2" && HAVE=1; done; test "$$HAVE" -eq 1'
-ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "3" && HAVE=1; done; test "$$HAVE" -eq 1'
 ExecStart=/bin/sh -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "%U"'
 Type=oneshot
 Group=1
-SupplementaryGroups=1 2 3
+SupplementaryGroups=1 2
index f35ff8476579a223fd83248d34b84d7873980a4f..3efbbfb0f9a5b6d7336d997524072211f6325012 100644 (file)
@@ -5,7 +5,6 @@ Description=Test for Supplementary Group with multiple groups and Uid=1
 [Service]
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "1" && HAVE=1; done; test "$$HAVE" -eq 1'
 ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "2" && HAVE=1; done; test "$$HAVE" -eq 1'
-ExecStart=/bin/sh -x -c 'HAVE=0; for g in $$(id -G); do test "$$g" = "3" && HAVE=1; done; test "$$HAVE" -eq 1'
 Type=oneshot
 User=1
-SupplementaryGroups=1 2 3
+SupplementaryGroups=1 2