tests: fix numeric.at for BSD

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).
This commit is contained in:
Pavel Raiskup
2019-01-14 12:54:29 +02:00
committed by Sergey Poznyakoff
parent b0930da045
commit c697d62598
2 changed files with 7 additions and 3 deletions
+6 -3
View 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])