Import upstream version 1.29
[debian/tar] / tests / listed03.at
index c2cf52f72e50887e1b8cc179ebcd87ecf26794c2..07bd1c8e9854d12a5293aac3b2ee73a007c34e41 100644 (file)
@@ -1,7 +1,7 @@
 # Process this file with autom4te to create testsuite. -*- Autotest -*-
 
 # Test suite for GNU tar.
-# Copyright 2010, 2013-2014 Free Software Foundation, Inc.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
 
 # This file is part of GNU tar.
 
@@ -25,6 +25,7 @@ AT_SETUP([incremental dump when the parent directory is unreadable])
 AT_KEYWORDS([listed incremental listed03])
 
 AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
 AT_UNPRIVILEGED_PREREQ
 
 mkdir dir
@@ -34,9 +35,13 @@ genfile --file dir/sub/a/file
 cd dir/sub
 
 chmod a-r ..
-tar -c -f archive.tar --listed-incremental=db.1 -v a
+tar -c -f archive.tar --listed-incremental=db.1 -v a 2>err
 status=$?
 chmod a+r ..
+if test $status -eq 2; then
+  grep '^tar: \.: Cannot getcwd' err >/dev/null 2>&1 && AT_SKIP_TEST
+fi
+cat err >&2
 exit $status
 ],
 [0],