]> git.gag.com Git - debian/tar/commitdiff
Testsuite fixes.
authorSergey Poznyakoff <gray@gnu.org.ua>
Fri, 18 Mar 2016 20:18:58 +0000 (22:18 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Fri, 18 Mar 2016 20:18:58 +0000 (22:18 +0200)
* 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.

paxutils
src/unlink.c
tests/numeric.at
tests/onetop05.at
tests/sparse06.at

index 58b8ac114790e2de7992db1a387ec14238783f39..ec72abd9dd63bbff4534ec77e97b1a6cadfc3cf8 160000 (submodule)
--- a/paxutils
+++ b/paxutils
@@ -1 +1 @@
-Subproject commit 58b8ac114790e2de7992db1a387ec14238783f39
+Subproject commit ec72abd9dd63bbff4534ec77e97b1a6cadfc3cf8
index 3e50757ce03fd4a9684034e21b11752175bfeb58..6ae51ce1fc1e575cb5dc4c57da865cc42c2f5628 100644 (file)
@@ -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 */
index 6a422e799da4482d3fb07b3274b9af20a6149ddb..2fcd7ea4942bf78d0e01056ed84c7793e47bc105 100644 (file)
@@ -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([
index bf0163fb6f4c35b2348bc757413c0efefdae1c6c..d718f613118e63316c3562c555f0cfbc5f25bc20 100644 (file)
@@ -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
index 7d35ceec808dda3a8fb06d4e8c296f0aa4e3ce8f..b18bf826cf436c6505cddd39b326727787f2940a 100644 (file)
@@ -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