]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
tests: fix numeric.at for BSD
authorPavel Raiskup <praiskup@redhat.com>
Thu, 2 Jun 2016 05:28:01 +0000 (07:28 +0200)
committerSergey Poznyakoff <gray@gnu.org>
Mon, 14 Jan 2019 10:54:29 +0000 (12:54 +0200)
While creating file, BSD kernels inherit the group ownership from
parent directory.
http://lists.gnu.org/archive/html/bug-tar/2016-06/msg00000.html

* tests/numeric.at: Attempt to 'chown' the newly created directory
to proper group (at least on affected machines that command is
expected to succeed).

THANKS
tests/numeric.at

diff --git a/THANKS b/THANKS
index 50ae69a57baffcfd5b390c42275934d8b7ecc742..aee0a9241fd9bb35deb20e74940903e603ec6452 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -95,6 +95,7 @@ Christian Laubscher   christian.laubscher@tiscalinet.ch
 Christian T. Dum       ctd@mpe-garching.mpg.de
 Christian von Roques   roques@pond.sub.org
 Christian Wetzel       wetzel@phoenix-pacs.de
+Christian Weisgerber   naddy@mips.inka.de
 Christoph Litauer      litauer@mailhost.uni-koblenz.de
 Christophe Colle       colle@krtkg1.rug.ac.be
 Christophe Kalt                Christophe.Kalt@kbcfp.com
index db99d902fbdc0bb4f63510fb05bb6a33f858c82b..4ef92c7a26b2bddde342590b47da4f75c314a45f 100644 (file)
@@ -27,14 +27,17 @@ tar $1 -vvf a dir |dnl
 ])
 
 AT_TAR_CHECK([
-mkdir dir
-genfile --file dir/file
-
 MYUID=$(id -u) || AT_SKIP_TEST
 MYGID=$(id -g) || AT_SKIP_TEST
 MYUSR=$(id -un) || AT_SKIP_TEST
 MYGRP=$(id -gn) || AT_SKIP_TEST
 
+mkdir dir
+# Ensure correct group id on BSDs.
+chown :$MYGID dir >/dev/null 2>/dev/null
+genfile --file dir/file
+
+
 TESTOP([--create])
 TESTOP([--list])
 TESTOP([--diff])