diff options
author | Julian Andres Klode <jak@debian.org> | 2016-08-24 16:05:37 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-08-26 22:17:55 +0200 |
commit | 71e22da91ff888cf645e5083fbac7839846111d2 (patch) | |
tree | 963c557bda5a3d6c0fd7321543b138efb8da98e2 | |
parent | 8a362893a18eca569f8b93c572aaf966572b9546 (diff) |
test: Use a file to determine TEST_DEFAULT_GROUP
This is more safe against sticky bits. For example, in FreeBSD
all files created in /tmp have the group set to wheel.
Gbp-Dch: ignore
-rw-r--r-- | test/integration/framework | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/integration/framework b/test/integration/framework index 9dce3dc11..677c40711 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -451,11 +451,8 @@ EOF # create some files in /tmp and look at user/group to get what this means TEST_DEFAULT_USER="$(id -un)" - if [ "$(uname)" = 'GNU/kFreeBSD' ]; then - TEST_DEFAULT_GROUP='root' - else - TEST_DEFAULT_GROUP="$(id -gn)" - fi + touch "${TMPWORKINGDIRECTORY}/test-file" + TEST_DEFAULT_GROUP=$(stat --format '%G' "${TMPWORKINGDIRECTORY}/test-file") # cleanup the environment a bit # prefer our apt binaries over the system apt binaries |