From: Sergey Poznyakoff Date: Fri, 18 Mar 2016 20:18:58 +0000 (+0200) Subject: Testsuite fixes. X-Git-Tag: release_1_29~13 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=c0fb0740fa2dc3ea4c4c8875d5b8344b7cdb6067;p=debian%2Ftar Testsuite fixes. * paxutils: Update. * src/unlink.c (flush_deferred_unlinks): OpenSolaris sets EEXIST instead of ENOTEMPTY if trying to remove a non-empty directory. * tests/numeric.at: Avoid using awk -v: some older awks don't support that option. Also fix environment variable usage. * tests/onetop05.at: Skip test if unable to set initial directory mode bits. * tests/sparse06.at: Use --quiet option. --- diff --git a/paxutils b/paxutils index 58b8ac11..ec72abd9 160000 --- a/paxutils +++ b/paxutils @@ -1 +1 @@ -Subproject commit 58b8ac114790e2de7992db1a387ec14238783f39 +Subproject commit ec72abd9dd63bbff4534ec77e97b1a6cadfc3cf8 diff --git a/src/unlink.c b/src/unlink.c index 3e50757c..6ae51ce1 100644 --- a/src/unlink.c +++ b/src/unlink.c @@ -124,6 +124,9 @@ flush_deferred_unlinks (bool force) case ENOENT: /* nothing to worry about */ break; + case EEXIST: + /* OpenSolaris >=10 sets EEXIST instead of ENOTEMPTY + if trying to remove a non-empty directory */ case ENOTEMPTY: /* Keep the record in list, in the hope we'll be able to remove it later */ diff --git a/tests/numeric.at b/tests/numeric.at index 6a422e79..2fcd7ea4 100644 --- a/tests/numeric.at +++ b/tests/numeric.at @@ -21,9 +21,9 @@ AT_KEYWORDS([options numeric numeric-owner]) m4_pushdef([TESTOP],[ decho $1 tar $1 -vvf a dir --numeric-owner |dnl - awk -vowner=$MYUID/$MYGID '@S|@2==owner {print "OK"; next} {print}' + awk '@S|@2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' tar $1 -vvf a dir |dnl - awk -vowner=$MYUSR/$MYGRP '@S|@2==owner {print "OK"; next} {print}' + awk '@S|@2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' ]) AT_TAR_CHECK([ diff --git a/tests/onetop05.at b/tests/onetop05.at index bf0163fb..d718f613 100644 --- a/tests/onetop05.at +++ b/tests/onetop05.at @@ -29,6 +29,10 @@ AT_TAR_CHECK([ orig_mode=3702 mkdir d chmod $orig_mode d + +mode=$(genfile --stat=mode.7777 d) +test $mode = $orig_mode || AT_SKIP_TEST + genfile --file d/file tar -cf d.tar -C d . rm -rf d @@ -43,7 +47,7 @@ if test 700 = $mode; then else echo "CWD: mode changed: 700 != $mode" fi - + mkdir d2 chmod 700 d2 tar -C d2 --one-top-level=top -xpf d.tar diff --git a/tests/sparse06.at b/tests/sparse06.at index 7d35ceec..b18bf826 100644 --- a/tests/sparse06.at +++ b/tests/sparse06.at @@ -23,7 +23,7 @@ AT_KEYWORDS([sparse sparse06]) m4_define([check_pattern],[ rm -rf out archive.tar smallsparse && mkdir out -genfile --sparse --file smallsparse $1 +genfile --sparse --quiet --file smallsparse $1 tar -cSf archive.tar smallsparse tar -xf archive.tar -C out cmp smallsparse out/smallsparse @@ -50,7 +50,6 @@ check_pattern([10M DEF 20M GHI 30M JKL 40M]) ], [0],, -[genfile: created file is not sparse -],,,[posix]) +[],,,[posix]) AT_CLEANUP