summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am297
-rw-r--r--tests/Makefile.in1746
-rw-r--r--tests/T-cd.at44
-rw-r--r--tests/T-dir00.at46
-rw-r--r--tests/T-dir01.at46
-rw-r--r--tests/T-empty.at51
-rw-r--r--tests/T-mult.at46
-rw-r--r--tests/T-nest.at46
-rw-r--r--tests/T-nonl.at62
-rw-r--r--tests/T-null.at46
-rw-r--r--tests/T-null2.at43
-rw-r--r--tests/T-rec.at46
-rw-r--r--tests/T-recurse.at90
-rw-r--r--tests/T-zfile.at52
-rw-r--r--tests/acls01.at55
-rw-r--r--tests/acls02.at61
-rw-r--r--tests/acls03.at131
-rw-r--r--tests/append.at35
-rw-r--r--tests/append01.at48
-rw-r--r--tests/append02.at90
-rw-r--r--tests/append03.at45
-rw-r--r--tests/append04.at60
-rw-r--r--tests/append05.at96
-rw-r--r--tests/argcv.c400
-rw-r--r--tests/argcv.h50
-rw-r--r--tests/atlocal.in64
-rw-r--r--tests/backup01.at50
-rw-r--r--tests/capabs_raw01.at53
-rw-r--r--tests/checkseekhole.c92
-rw-r--r--tests/chtype.at73
-rw-r--r--tests/ckmtime.c69
-rw-r--r--tests/comperr.at39
-rw-r--r--tests/comprec.at42
-rw-r--r--tests/delete01.at37
-rw-r--r--tests/delete02.at45
-rw-r--r--tests/delete03.at49
-rw-r--r--tests/delete04.at54
-rw-r--r--tests/delete05.at49
-rw-r--r--tests/exclude.at163
-rw-r--r--tests/exclude01.at71
-rw-r--r--tests/exclude02.at79
-rw-r--r--tests/exclude03.at75
-rw-r--r--tests/exclude04.at75
-rw-r--r--tests/exclude05.at61
-rw-r--r--tests/exclude06.at50
-rw-r--r--tests/exclude07.at36
-rw-r--r--tests/exclude08.at54
-rw-r--r--tests/exclude09.at57
-rw-r--r--tests/exclude10.at73
-rw-r--r--tests/exclude11.at53
-rw-r--r--tests/exclude12.at56
-rw-r--r--tests/exclude13.at73
-rw-r--r--tests/exclude14.at52
-rw-r--r--tests/exclude15.at54
-rw-r--r--tests/exclude16.at71
-rw-r--r--tests/extrac01.at34
-rw-r--r--tests/extrac02.at38
-rw-r--r--tests/extrac03.at37
-rw-r--r--tests/extrac04.at48
-rw-r--r--tests/extrac05.at62
-rw-r--r--tests/extrac06.at73
-rw-r--r--tests/extrac07.at59
-rw-r--r--tests/extrac08.at52
-rw-r--r--tests/extrac09.at60
-rw-r--r--tests/extrac10.at46
-rw-r--r--tests/extrac11.at86
-rw-r--r--tests/extrac12.at41
-rw-r--r--tests/extrac13.at55
-rw-r--r--tests/extrac14.at38
-rw-r--r--tests/extrac15.at46
-rw-r--r--tests/extrac16.at38
-rw-r--r--tests/extrac17.at48
-rw-r--r--tests/extrac18.at62
-rw-r--r--tests/extrac19.at46
-rw-r--r--tests/filerem01.at102
-rw-r--r--tests/filerem02.at51
-rw-r--r--tests/genfile.c986
-rw-r--r--tests/grow.at39
-rw-r--r--tests/gzip.at43
-rw-r--r--tests/ignfail.at78
-rw-r--r--tests/incr01.at55
-rw-r--r--tests/incr02.at78
-rw-r--r--tests/incr03.at82
-rw-r--r--tests/incr04.at69
-rw-r--r--tests/incr05.at50
-rw-r--r--tests/incr06.at80
-rw-r--r--tests/incr07.at113
-rw-r--r--tests/incr08.at87
-rw-r--r--tests/incr09.at68
-rw-r--r--tests/incr10.at65
-rw-r--r--tests/incr11.at76
-rw-r--r--tests/incremental.at65
-rw-r--r--tests/indexfile.at47
-rw-r--r--tests/label01.at37
-rw-r--r--tests/label02.at40
-rw-r--r--tests/label03.at89
-rw-r--r--tests/label04.at53
-rw-r--r--tests/label05.at50
-rw-r--r--tests/link01.at56
-rw-r--r--tests/link02.at51
-rw-r--r--tests/link03.at55
-rw-r--r--tests/link04.at69
-rw-r--r--tests/listed01.at65
-rw-r--r--tests/listed02.at159
-rw-r--r--tests/listed03.at54
-rw-r--r--tests/listed04.at49
-rw-r--r--tests/listed05.at79
-rw-r--r--tests/long01.at50
-rw-r--r--tests/longv7.at50
-rw-r--r--tests/lustar01.at38
-rw-r--r--tests/lustar02.at46
-rw-r--r--tests/lustar03.at45
-rw-r--r--tests/map.at71
-rw-r--r--tests/multiv01.at64
-rw-r--r--tests/multiv02.at50
-rw-r--r--tests/multiv03.at70
-rw-r--r--tests/multiv04.at66
-rw-r--r--tests/multiv05.at65
-rw-r--r--tests/multiv06.at51
-rw-r--r--tests/multiv07.at47
-rw-r--r--tests/multiv08.at50
-rw-r--r--tests/multiv09.at48
-rw-r--r--tests/numeric.at74
-rw-r--r--tests/old.at37
-rw-r--r--tests/onetop01.at42
-rw-r--r--tests/onetop02.at45
-rw-r--r--tests/onetop03.at42
-rw-r--r--tests/onetop04.at38
-rw-r--r--tests/onetop05.at73
-rw-r--r--tests/opcomp01.at34
-rw-r--r--tests/opcomp02.at34
-rw-r--r--tests/opcomp03.at34
-rw-r--r--tests/opcomp04.at38
-rw-r--r--tests/opcomp05.at34
-rw-r--r--tests/opcomp06.at36
-rw-r--r--tests/options.at37
-rw-r--r--tests/options02.at39
-rw-r--r--tests/owner.at44
-rw-r--r--tests/package.m46
-rw-r--r--tests/pipe.at54
-rw-r--r--tests/recurs02.at54
-rw-r--r--tests/recurse.at34
-rw-r--r--tests/remfiles01.at72
-rw-r--r--tests/remfiles02.at59
-rw-r--r--tests/remfiles03.at43
-rw-r--r--tests/remfiles04a.at45
-rw-r--r--tests/remfiles04b.at53
-rw-r--r--tests/remfiles04c.at62
-rw-r--r--tests/remfiles05a.at64
-rw-r--r--tests/remfiles05b.at55
-rw-r--r--tests/remfiles05c.at67
-rw-r--r--tests/remfiles06a.at56
-rw-r--r--tests/remfiles06b.at56
-rw-r--r--tests/remfiles06c.at68
-rw-r--r--tests/remfiles07a.at56
-rw-r--r--tests/remfiles07b.at56
-rw-r--r--tests/remfiles07c.at68
-rw-r--r--tests/remfiles08a.at55
-rw-r--r--tests/remfiles08b.at60
-rw-r--r--tests/remfiles08c.at67
-rw-r--r--tests/remfiles09a.at48
-rw-r--r--tests/remfiles09b.at53
-rw-r--r--tests/remfiles09c.at58
-rw-r--r--tests/remfiles10.at46
-rw-r--r--tests/rename01.at91
-rw-r--r--tests/rename02.at106
-rw-r--r--tests/rename03.at130
-rw-r--r--tests/rename04.at81
-rw-r--r--tests/rename05.at79
-rw-r--r--tests/same-order01.at47
-rw-r--r--tests/same-order02.at52
-rw-r--r--tests/selacl01.at66
-rw-r--r--tests/selnx01.at98
-rw-r--r--tests/shortfile.at40
-rw-r--r--tests/shortrec.at40
-rw-r--r--tests/shortupd.at40
-rw-r--r--tests/sigpipe.at44
-rw-r--r--tests/sparse01.at52
-rw-r--r--tests/sparse02.at42
-rw-r--r--tests/sparse03.at56
-rw-r--r--tests/sparse04.at48
-rw-r--r--tests/sparse05.at47
-rw-r--r--tests/sparse06.at54
-rw-r--r--tests/sparsemv.at66
-rw-r--r--tests/sparsemvp.at60
-rw-r--r--tests/spmvp00.at26
-rw-r--r--tests/spmvp01.at26
-rw-r--r--tests/spmvp10.at26
-rw-r--r--tests/star/README91
-rw-r--r--tests/star/gtarfail.at41
-rw-r--r--tests/star/gtarfail2.at44
-rw-r--r--tests/star/multi-fail.at89
-rw-r--r--tests/star/pax-big-10g.at42
-rwxr-xr-xtests/star/quicktest.sh109
-rw-r--r--tests/star/ustar-big-2g.at42
-rw-r--r--tests/star/ustar-big-8g.at42
-rwxr-xr-xtests/testsuite53456
-rw-r--r--tests/testsuite.at468
-rw-r--r--tests/time01.at70
-rw-r--r--tests/time02.at43
-rw-r--r--tests/truncate.at52
-rw-r--r--tests/update.at51
-rw-r--r--tests/update01.at57
-rw-r--r--tests/update02.at54
-rw-r--r--tests/verbose.at44
-rw-r--r--tests/verify.at37
-rw-r--r--tests/version.at36
-rw-r--r--tests/volsize.at59
-rw-r--r--tests/volume.at58
-rw-r--r--tests/xattr01.at49
-rw-r--r--tests/xattr02.at57
-rw-r--r--tests/xattr03.at58
-rw-r--r--tests/xattr04.at50
-rw-r--r--tests/xattr05.at51
-rw-r--r--tests/xform-h.at61
-rw-r--r--tests/xform01.at43
-rw-r--r--tests/xform02.at36
217 files changed, 69424 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..3e94276
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,297 @@
+# Makefile for GNU tar regression tests.
+
+# Copyright 1996-1997, 1999-2001, 2003-2007, 2009, 2012-2015 Free Software
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 star/README star/quicktest.sh
+DISTCLEANFILES = atconfig $(check_SCRIPTS)
+MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
+
+## ------------ ##
+## package.m4. ##
+## ------------ ##
+
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >$(srcdir)/package.m4
+
+#
+
+## ------------ ##
+## Test suite. ##
+## ------------ ##
+
+TESTSUITE_AT = \
+ T-cd.at\
+ T-dir00.at\
+ T-dir01.at\
+ T-empty.at\
+ T-null.at\
+ T-null2.at\
+ T-rec.at\
+ T-recurse.at\
+ T-zfile.at\
+ T-nonl.at\
+ T-mult.at\
+ T-nest.at\
+ testsuite.at\
+ append.at\
+ append01.at\
+ append02.at\
+ append03.at\
+ append04.at\
+ append05.at\
+ backup01.at\
+ chtype.at\
+ comprec.at\
+ comperr.at\
+ delete01.at\
+ delete02.at\
+ delete03.at\
+ delete04.at\
+ delete05.at\
+ exclude.at\
+ exclude01.at\
+ exclude02.at\
+ exclude03.at\
+ exclude04.at\
+ exclude05.at\
+ exclude06.at\
+ exclude07.at\
+ exclude08.at\
+ exclude09.at\
+ exclude10.at\
+ exclude11.at\
+ exclude12.at\
+ exclude13.at\
+ exclude14.at\
+ exclude15.at\
+ exclude16.at\
+ extrac01.at\
+ extrac02.at\
+ extrac03.at\
+ extrac04.at\
+ extrac05.at\
+ extrac06.at\
+ extrac07.at\
+ extrac08.at\
+ extrac09.at\
+ extrac10.at\
+ extrac11.at\
+ extrac12.at\
+ extrac13.at\
+ extrac14.at\
+ extrac15.at\
+ extrac16.at\
+ extrac17.at\
+ extrac18.at\
+ extrac19.at\
+ filerem01.at\
+ filerem02.at\
+ gzip.at\
+ grow.at\
+ incremental.at\
+ incr01.at\
+ incr02.at\
+ incr03.at\
+ incr04.at\
+ incr05.at\
+ incr06.at\
+ incr07.at\
+ incr08.at\
+ incr09.at\
+ incr10.at\
+ incr11.at\
+ indexfile.at\
+ ignfail.at\
+ label01.at\
+ label02.at\
+ label03.at\
+ label04.at\
+ label05.at\
+ link01.at\
+ link02.at\
+ link03.at\
+ link04.at\
+ listed01.at\
+ listed02.at\
+ listed03.at\
+ listed04.at\
+ listed05.at\
+ long01.at\
+ longv7.at\
+ lustar01.at\
+ lustar02.at\
+ lustar03.at\
+ map.at\
+ multiv01.at\
+ multiv02.at\
+ multiv03.at\
+ multiv04.at\
+ multiv05.at\
+ multiv06.at\
+ multiv07.at\
+ multiv08.at\
+ multiv09.at\
+ numeric.at\
+ old.at\
+ onetop01.at\
+ onetop02.at\
+ onetop03.at\
+ onetop04.at\
+ onetop05.at\
+ opcomp01.at\
+ opcomp02.at\
+ opcomp03.at\
+ opcomp04.at\
+ opcomp05.at\
+ opcomp06.at\
+ options.at\
+ options02.at\
+ owner.at\
+ pipe.at\
+ recurse.at\
+ recurs02.at\
+ rename01.at\
+ rename02.at\
+ rename03.at\
+ rename04.at\
+ rename05.at\
+ remfiles01.at\
+ remfiles02.at\
+ remfiles03.at\
+ remfiles04a.at\
+ remfiles04b.at\
+ remfiles04c.at\
+ remfiles05a.at\
+ remfiles05b.at\
+ remfiles05c.at\
+ remfiles06a.at\
+ remfiles06b.at\
+ remfiles06c.at\
+ remfiles07a.at\
+ remfiles07b.at\
+ remfiles07c.at\
+ remfiles08a.at\
+ remfiles08b.at\
+ remfiles08c.at\
+ remfiles09a.at\
+ remfiles09b.at\
+ remfiles09c.at\
+ remfiles10.at\
+ same-order01.at\
+ same-order02.at\
+ shortfile.at\
+ shortupd.at\
+ shortrec.at\
+ sigpipe.at\
+ sparse01.at\
+ sparse02.at\
+ sparse03.at\
+ sparse04.at\
+ sparse05.at\
+ sparse06.at\
+ sparsemv.at\
+ sparsemvp.at\
+ spmvp00.at\
+ spmvp01.at\
+ spmvp10.at\
+ time01.at\
+ time02.at\
+ truncate.at\
+ update.at\
+ update01.at\
+ update02.at\
+ volsize.at\
+ volume.at\
+ verbose.at\
+ verify.at\
+ version.at\
+ xform-h.at\
+ xform01.at\
+ xform02.at\
+ star/gtarfail.at\
+ star/gtarfail2.at\
+ star/multi-fail.at\
+ star/ustar-big-2g.at\
+ star/ustar-big-8g.at\
+ star/pax-big-10g.at\
+ xattr01.at\
+ xattr02.at\
+ xattr03.at\
+ xattr04.at\
+ xattr05.at\
+ acls01.at\
+ acls02.at\
+ acls03.at\
+ selnx01.at\
+ selacl01.at\
+ capabs_raw01.at
+
+distclean-local:
+ -rm -rf download
+
+TESTSUITE = $(srcdir)/testsuite
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): package.m4 $(TESTSUITE_AT)
+ $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
+ mv $@.tmp $@
+
+atconfig: $(top_builddir)/config.status
+ cd $(top_builddir) && ./config.status tests/$@
+
+clean-local:
+ test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
+
+check-local: atconfig atlocal $(TESTSUITE)
+ $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS)
+
+check-full:
+ FULL_TEST=1 $(MAKE) check
+
+#check_SCRIPTS = tar
+
+# Run the test suite on the *installed* tree.
+installcheck-local: $(check_PROGRAMS)
+ $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS) AUTOTEST_PATH=$(exec_prefix)/bin
+
+
+## ------------ ##
+## genfile ##
+## ------------ ##
+
+check_PROGRAMS = genfile checkseekhole ckmtime
+
+genfile_SOURCES = genfile.c argcv.c argcv.h
+checkseekhole_SOURCES = checkseekhole.c
+
+localedir = $(datadir)/locale
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/gnu\
+ -I../gnu\
+ -I$(top_srcdir)/gnu\
+ -I$(top_srcdir)/lib\
+ -DLOCALEDIR=\"$(localedir)\"
+
+LDADD = ../gnu/libgnu.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..f3e83fd
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,1746 @@
+# Makefile.in generated by automake 1.14 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Makefile for GNU tar regression tests.
+
+# Copyright 1996-1997, 1999-2001, 2003-2007, 2009, 2012-2015 Free Software
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = genfile$(EXEEXT) checkseekhole$(EXEEXT) \
+ ckmtime$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(srcdir)/atlocal.in $(top_srcdir)/build-aux/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/acl.m4 \
+ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/argp.m4 \
+ $(top_srcdir)/m4/backupfile.m4 $(top_srcdir)/m4/bison.m4 \
+ $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/canonicalize.m4 \
+ $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/chown.m4 \
+ $(top_srcdir)/m4/clock_time.m4 \
+ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \
+ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent-safer.m4 \
+ $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirfd.m4 \
+ $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
+ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/euidaccess.m4 \
+ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/extern-inline.m4 \
+ $(top_srcdir)/m4/faccessat.m4 $(top_srcdir)/m4/fchdir.m4 \
+ $(top_srcdir)/m4/fchmodat.m4 $(top_srcdir)/m4/fchownat.m4 \
+ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \
+ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \
+ $(top_srcdir)/m4/fileblocks.m4 $(top_srcdir)/m4/filenamecat.m4 \
+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \
+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \
+ $(top_srcdir)/m4/futimens.m4 \
+ $(top_srcdir)/m4/getcwd-abort-bug.m4 \
+ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \
+ $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/getline.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 \
+ $(top_srcdir)/m4/group-member.m4 $(top_srcdir)/m4/human.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+ $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lchown.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libunistring-base.m4 \
+ $(top_srcdir)/m4/link-follow.m4 $(top_srcdir)/m4/link.m4 \
+ $(top_srcdir)/m4/linkat.m4 $(top_srcdir)/m4/localcharset.m4 \
+ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
+ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
+ $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/longlong.m4 \
+ $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
+ $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
+ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \
+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \
+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mkdir.m4 \
+ $(top_srcdir)/m4/mkdirat.m4 $(top_srcdir)/m4/mkdtemp.m4 \
+ $(top_srcdir)/m4/mkfifo.m4 $(top_srcdir)/m4/mkfifoat.m4 \
+ $(top_srcdir)/m4/mknod.m4 $(top_srcdir)/m4/mktime.m4 \
+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
+ $(top_srcdir)/m4/modechange.m4 $(top_srcdir)/m4/msvc-inval.m4 \
+ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/obstack.m4 \
+ $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \
+ $(top_srcdir)/m4/parse-datetime.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/paxutils.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/priv-set.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \
+ $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read.m4 \
+ $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/readlinkat.m4 $(top_srcdir)/m4/realloc.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
+ $(top_srcdir)/m4/renameat.m4 $(top_srcdir)/m4/rewinddir.m4 \
+ $(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/rmt.m4 \
+ $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/rtapelib.m4 \
+ $(top_srcdir)/m4/safe-read.m4 $(top_srcdir)/m4/safe-write.m4 \
+ $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/savedir.m4 \
+ $(top_srcdir)/m4/secure_getenv.m4 \
+ $(top_srcdir)/m4/selinux-context-h.m4 \
+ $(top_srcdir)/m4/selinux-selinux-h.m4 \
+ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/ssize_t.m4 \
+ $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \
+ $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
+ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
+ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+ $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strcase.m4 \
+ $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strftime.m4 \
+ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \
+ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \
+ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \
+ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \
+ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/symlinkat.m4 \
+ $(top_srcdir)/m4/sys_socket_h.m4 \
+ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sysexits.m4 \
+ $(top_srcdir)/m4/system.m4 $(top_srcdir)/m4/tempname.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
+ $(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
+ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+ $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlink.m4 \
+ $(top_srcdir)/m4/unlinkat.m4 $(top_srcdir)/m4/unlinkdir.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/utimbuf.m4 \
+ $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimensat.m4 \
+ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
+ $(top_srcdir)/m4/vsnprintf.m4 $(top_srcdir)/m4/warn-on-use.m4 \
+ $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
+ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
+ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \
+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/write.m4 \
+ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
+ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \
+ $(top_srcdir)/m4/xstrtol.m4 $(top_srcdir)/m4/xvasprintf.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = atlocal
+CONFIG_CLEAN_VPATH_FILES =
+am_checkseekhole_OBJECTS = checkseekhole.$(OBJEXT)
+checkseekhole_OBJECTS = $(am_checkseekhole_OBJECTS)
+checkseekhole_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+checkseekhole_DEPENDENCIES = ../gnu/libgnu.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ckmtime_SOURCES = ckmtime.c
+ckmtime_OBJECTS = ckmtime.$(OBJEXT)
+ckmtime_LDADD = $(LDADD)
+ckmtime_DEPENDENCIES = ../gnu/libgnu.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_genfile_OBJECTS = genfile.$(OBJEXT) argcv.$(OBJEXT)
+genfile_OBJECTS = $(am_genfile_OBJECTS)
+genfile_LDADD = $(LDADD)
+genfile_DEPENDENCIES = ../gnu/libgnu.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(checkseekhole_SOURCES) ckmtime.c $(genfile_SOURCES)
+DIST_SOURCES = $(checkseekhole_SOURCES) ckmtime.c $(genfile_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOM4TE = @AUTOM4TE@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BACKUP_LIBEXEC_SCRIPTS = @BACKUP_LIBEXEC_SCRIPTS@
+BACKUP_SBIN_SCRIPTS = @BACKUP_SBIN_SCRIPTS@
+BACKUP_SED_COND = @BACKUP_SED_COND@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_ARCHIVE = @DEFAULT_ARCHIVE@
+DEFAULT_ARCHIVE_FORMAT = @DEFAULT_ARCHIVE_FORMAT@
+DEFAULT_BLOCKING = @DEFAULT_BLOCKING@
+DEFAULT_QUOTING_STYLE = @DEFAULT_QUOTING_STYLE@
+DEFAULT_RMT_COMMAND = @DEFAULT_RMT_COMMAND@
+DEFAULT_RMT_DIR = @DEFAULT_RMT_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+EXEEXT = @EXEEXT@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFS = @GNULIB_FFS@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSCANF = @GNULIB_FSCANF@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
+GNULIB_STRNCAT = @GNULIB_STRNCAT@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRPTIME = @GNULIB_STRPTIME@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
+GNULIB_TMPFILE = @GNULIB_TMPFILE@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
+GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
+GNULIB_WRITE = @GNULIB_WRITE@
+GNULIB__EXIT = @GNULIB__EXIT@
+GREP = @GREP@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
+HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
+HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
+HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFS = @HAVE_FFS@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWBLANK = @HAVE_ISWBLANK@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
+HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMP = @HAVE_MKSTEMP@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
+HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRINGS_H = @HAVE_STRINGS_H@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRPTIME = @HAVE_STRPTIME@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
+LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
+LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
+LIB_ACL = @LIB_ACL@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_EACCESS = @LIB_EACCESS@
+LIB_HAS_ACL = @LIB_HAS_ACL@
+LIB_SELINUX = @LIB_SELINUX@
+LIB_SETSOCKOPT = @LIB_SETSOCKOPT@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
+NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_DIRENT_H = @NEXT_DIRENT_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
+NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
+NEXT_STDARG_H = @NEXT_STDARG_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
+NEXT_TIME_H = @NEXT_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+PU_RMT_PROG = @PU_RMT_PROG@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
+REPLACE_ISATTY = @REPLACE_ISATTY@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
+REPLACE_STRNCAT = @REPLACE_STRNCAT@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+RSH = @RSH@
+SED = @SED@
+SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYSEXITS_H = @SYSEXITS_H@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_ACL = @USE_ACL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WERROR_CFLAGS = @WERROR_CFLAGS@
+WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
+WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
+gltests_WITNESS = @gltests_WITNESS@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+lispdir = @lispdir@
+localedir = $(datadir)/locale
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 star/README star/quicktest.sh
+DISTCLEANFILES = atconfig $(check_SCRIPTS)
+MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
+
+#
+TESTSUITE_AT = \
+ T-cd.at\
+ T-dir00.at\
+ T-dir01.at\
+ T-empty.at\
+ T-null.at\
+ T-null2.at\
+ T-rec.at\
+ T-recurse.at\
+ T-zfile.at\
+ T-nonl.at\
+ T-mult.at\
+ T-nest.at\
+ testsuite.at\
+ append.at\
+ append01.at\
+ append02.at\
+ append03.at\
+ append04.at\
+ append05.at\
+ backup01.at\
+ chtype.at\
+ comprec.at\
+ comperr.at\
+ delete01.at\
+ delete02.at\
+ delete03.at\
+ delete04.at\
+ delete05.at\
+ exclude.at\
+ exclude01.at\
+ exclude02.at\
+ exclude03.at\
+ exclude04.at\
+ exclude05.at\
+ exclude06.at\
+ exclude07.at\
+ exclude08.at\
+ exclude09.at\
+ exclude10.at\
+ exclude11.at\
+ exclude12.at\
+ exclude13.at\
+ exclude14.at\
+ exclude15.at\
+ exclude16.at\
+ extrac01.at\
+ extrac02.at\
+ extrac03.at\
+ extrac04.at\
+ extrac05.at\
+ extrac06.at\
+ extrac07.at\
+ extrac08.at\
+ extrac09.at\
+ extrac10.at\
+ extrac11.at\
+ extrac12.at\
+ extrac13.at\
+ extrac14.at\
+ extrac15.at\
+ extrac16.at\
+ extrac17.at\
+ extrac18.at\
+ extrac19.at\
+ filerem01.at\
+ filerem02.at\
+ gzip.at\
+ grow.at\
+ incremental.at\
+ incr01.at\
+ incr02.at\
+ incr03.at\
+ incr04.at\
+ incr05.at\
+ incr06.at\
+ incr07.at\
+ incr08.at\
+ incr09.at\
+ incr10.at\
+ incr11.at\
+ indexfile.at\
+ ignfail.at\
+ label01.at\
+ label02.at\
+ label03.at\
+ label04.at\
+ label05.at\
+ link01.at\
+ link02.at\
+ link03.at\
+ link04.at\
+ listed01.at\
+ listed02.at\
+ listed03.at\
+ listed04.at\
+ listed05.at\
+ long01.at\
+ longv7.at\
+ lustar01.at\
+ lustar02.at\
+ lustar03.at\
+ map.at\
+ multiv01.at\
+ multiv02.at\
+ multiv03.at\
+ multiv04.at\
+ multiv05.at\
+ multiv06.at\
+ multiv07.at\
+ multiv08.at\
+ multiv09.at\
+ numeric.at\
+ old.at\
+ onetop01.at\
+ onetop02.at\
+ onetop03.at\
+ onetop04.at\
+ onetop05.at\
+ opcomp01.at\
+ opcomp02.at\
+ opcomp03.at\
+ opcomp04.at\
+ opcomp05.at\
+ opcomp06.at\
+ options.at\
+ options02.at\
+ owner.at\
+ pipe.at\
+ recurse.at\
+ recurs02.at\
+ rename01.at\
+ rename02.at\
+ rename03.at\
+ rename04.at\
+ rename05.at\
+ remfiles01.at\
+ remfiles02.at\
+ remfiles03.at\
+ remfiles04a.at\
+ remfiles04b.at\
+ remfiles04c.at\
+ remfiles05a.at\
+ remfiles05b.at\
+ remfiles05c.at\
+ remfiles06a.at\
+ remfiles06b.at\
+ remfiles06c.at\
+ remfiles07a.at\
+ remfiles07b.at\
+ remfiles07c.at\
+ remfiles08a.at\
+ remfiles08b.at\
+ remfiles08c.at\
+ remfiles09a.at\
+ remfiles09b.at\
+ remfiles09c.at\
+ remfiles10.at\
+ same-order01.at\
+ same-order02.at\
+ shortfile.at\
+ shortupd.at\
+ shortrec.at\
+ sigpipe.at\
+ sparse01.at\
+ sparse02.at\
+ sparse03.at\
+ sparse04.at\
+ sparse05.at\
+ sparse06.at\
+ sparsemv.at\
+ sparsemvp.at\
+ spmvp00.at\
+ spmvp01.at\
+ spmvp10.at\
+ time01.at\
+ time02.at\
+ truncate.at\
+ update.at\
+ update01.at\
+ update02.at\
+ volsize.at\
+ volume.at\
+ verbose.at\
+ verify.at\
+ version.at\
+ xform-h.at\
+ xform01.at\
+ xform02.at\
+ star/gtarfail.at\
+ star/gtarfail2.at\
+ star/multi-fail.at\
+ star/ustar-big-2g.at\
+ star/ustar-big-8g.at\
+ star/pax-big-10g.at\
+ xattr01.at\
+ xattr02.at\
+ xattr03.at\
+ xattr04.at\
+ xattr05.at\
+ acls01.at\
+ acls02.at\
+ acls03.at\
+ selnx01.at\
+ selacl01.at\
+ capabs_raw01.at
+
+TESTSUITE = $(srcdir)/testsuite
+AUTOTEST = $(AUTOM4TE) --language=autotest
+genfile_SOURCES = genfile.c argcv.c argcv.h
+checkseekhole_SOURCES = checkseekhole.c
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/gnu\
+ -I../gnu\
+ -I$(top_srcdir)/gnu\
+ -I$(top_srcdir)/lib\
+ -DLOCALEDIR=\"$(localedir)\"
+
+LDADD = ../gnu/libgnu.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+atlocal: $(top_builddir)/config.status $(srcdir)/atlocal.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+checkseekhole$(EXEEXT): $(checkseekhole_OBJECTS) $(checkseekhole_DEPENDENCIES) $(EXTRA_checkseekhole_DEPENDENCIES)
+ @rm -f checkseekhole$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(checkseekhole_OBJECTS) $(checkseekhole_LDADD) $(LIBS)
+
+ckmtime$(EXEEXT): $(ckmtime_OBJECTS) $(ckmtime_DEPENDENCIES) $(EXTRA_ckmtime_DEPENDENCIES)
+ @rm -f ckmtime$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ckmtime_OBJECTS) $(ckmtime_LDADD) $(LIBS)
+
+genfile$(EXEEXT): $(genfile_OBJECTS) $(genfile_DEPENDENCIES) $(EXTRA_genfile_DEPENDENCIES)
+ @rm -f genfile$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(genfile_OBJECTS) $(genfile_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argcv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkseekhole.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckmtime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genfile.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-local mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am: installcheck-local
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
+ clean-checkPROGRAMS clean-generic clean-local cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-local distclean-tags distdir dvi dvi-am html html-am \
+ info info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installcheck-local installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >$(srcdir)/package.m4
+
+distclean-local:
+ -rm -rf download
+$(TESTSUITE): package.m4 $(TESTSUITE_AT)
+ $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
+ mv $@.tmp $@
+
+atconfig: $(top_builddir)/config.status
+ cd $(top_builddir) && ./config.status tests/$@
+
+clean-local:
+ test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
+
+check-local: atconfig atlocal $(TESTSUITE)
+ $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS)
+
+check-full:
+ FULL_TEST=1 $(MAKE) check
+
+#check_SCRIPTS = tar
+
+# Run the test suite on the *installed* tree.
+installcheck-local: $(check_PROGRAMS)
+ $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS) AUTOTEST_PATH=$(exec_prefix)/bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/T-cd.at b/tests/T-cd.at
new file mode 100644
index 0000000..4d798d1
--- /dev/null
+++ b/tests/T-cd.at
@@ -0,0 +1,44 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([-C in file lists])
+AT_KEYWORDS([files-from T-cd])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+>file1
+mkdir dir
+>dir/file2
+>dir/file3
+AT_DATA([F1],[file1
+-C dir
+.
+])
+tar cf archive -T F1
+tar tf archive | sort
+],
+[0],
+[./
+./file2
+./file3
+file1
+],[],[],[],[ustar])
+
+AT_CLEANUP
diff --git a/tests/T-dir00.at b/tests/T-dir00.at
new file mode 100644
index 0000000..872861a
--- /dev/null
+++ b/tests/T-dir00.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.27 and 1.28 did not extract files under directory members listed
+# in the file read by --file-from.
+#
+# Reported-by: Jean-Louis Martineau <martineau@zmanda.com>
+# References: <541AE02C.2050008@zmanda.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2014-09/msg00006.html
+
+AT_SETUP([recursive extraction from --files-from])
+AT_KEYWORDS([files-from extract T-dir T-dir00])
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+],
+[0],
+[dir/
+dir/file1
+dir/file2
+])
+AT_CLEANUP
+
diff --git a/tests/T-dir01.at b/tests/T-dir01.at
new file mode 100644
index 0000000..0629080
--- /dev/null
+++ b/tests/T-dir01.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.27 and 1.28 did not remove trailing slashes from file names
+# obtained with the --file-from option.
+#
+# Reported-by: Jean-Louis Martineau <martineau@zmanda.com>
+# References: <541AE02C.2050008@zmanda.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2014-09/msg00006.html
+
+AT_SETUP([trailing slash in --files-from])
+AT_KEYWORDS([files-from extract T-dir T-dir01])
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+],
+[0],
+[dir/
+dir/file1
+dir/file2
+])
+AT_CLEANUP
+
diff --git a/tests/T-empty.at b/tests/T-empty.at
new file mode 100644
index 0000000..b5cbb90
--- /dev/null
+++ b/tests/T-empty.at
@@ -0,0 +1,51 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.16 coredumped if a filelist file contained empty (zero-length)
+# entries
+# Reported by: Karl Berry <karl@freefriends.org>
+# References: <200610301353.k9UDr1O30680@f7.net>
+
+AT_SETUP([empty entries])
+AT_KEYWORDS([files-from empty-line])
+
+AT_DATA([file-list],
+[jeden
+dwa
+
+trzy
+])
+
+AT_TAR_CHECK([
+
+genfile --file jeden
+genfile --file dwa
+genfile --file trzy
+
+tar cfvT archive ../file-list
+],
+[0],
+[jeden
+dwa
+trzy
+],
+[],[],[],[ustar]) # Testing one format is enough
+
+AT_CLEANUP
diff --git a/tests/T-mult.at b/tests/T-mult.at
new file mode 100644
index 0000000..d3e367d
--- /dev/null
+++ b/tests/T-mult.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([multiple file lists])
+AT_KEYWORDS([files-from T-mult])
+
+AT_TAR_CHECK([
+>file1
+>file2
+>file3
+>file4
+AT_DATA([F1],[file1
+file2
+])
+AT_DATA([F2],[file3
+file4
+])
+tar cf archive -T F1 -T F2
+tar tf archive
+],
+[0],
+[file1
+file2
+file3
+file4
+],[],[],[],[ustar])
+
+AT_CLEANUP
+
diff --git a/tests/T-nest.at b/tests/T-nest.at
new file mode 100644
index 0000000..88bd8d2
--- /dev/null
+++ b/tests/T-nest.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([nested file lists])
+AT_KEYWORDS([files-from T-nest])
+
+AT_TAR_CHECK([
+>file1
+>file2
+>file3
+>file4
+AT_DATA([F1],[file1
+-T F2
+file2
+])
+AT_DATA([F2],[file3
+file4
+])
+tar cf archive -T F1
+tar tf archive
+],
+[0],
+[file1
+file3
+file4
+file2
+],[],[],[],[ustar])
+
+AT_CLEANUP
diff --git a/tests/T-nonl.at b/tests/T-nonl.at
new file mode 100644
index 0000000..d6258d3
--- /dev/null
+++ b/tests/T-nonl.at
@@ -0,0 +1,62 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar malfunctioned when given a file list with the last line not ending
+# in a newline.
+#
+# Reported by: Michal Žejdl <zejdl@suas.cz>
+# References: <http://lists.gnu.org/archive/html/bug-tar/2013-07/msg00009.html>
+
+AT_SETUP([entries with missing newlines])
+AT_KEYWORDS([files-from nonewline nonl T-nonl])
+
+AT_TAR_CHECK([
+genfile --length=0 --file empty
+AS_ECHO_N(c) > 1.nonl
+echo d > 2.nonl
+AS_ECHO_N(e) >> 2.nonl
+touch a b c d e
+AT_DATA([filelist],[a
+b
+])
+
+tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
+tar tf archive
+echo ==
+tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
+tar tf archive
+],
+[0],
+[c
+d
+e
+a
+b
+==
+d
+e
+a
+b
+c
+],
+[],[],[],[ustar])
+
+AT_CLEANUP
+
diff --git a/tests/T-null.at b/tests/T-null.at
new file mode 100644
index 0000000..2c15afe
--- /dev/null
+++ b/tests/T-null.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([0-separated file without -0])
+AT_KEYWORDS([files-from null T-null])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+echo jeden > temp
+echo dwa >> temp
+echo trzy >> temp
+cat temp | tr '\n' '\0' > file-list
+
+genfile -f jeden
+genfile -f dwa
+genfile -f trzy
+
+tar cfTv archive file-list
+],
+[0],
+[jeden
+dwa
+trzy
+],
+[tar: file-list: file name read contains nul character
+],[],[],[ustar]) # Testing one format is enough
+
+AT_CLEANUP
diff --git a/tests/T-null2.at b/tests/T-null2.at
new file mode 100644
index 0000000..e9f1d8a
--- /dev/null
+++ b/tests/T-null2.at
@@ -0,0 +1,43 @@
+# This file is part of test suite for GNU tar. -*- Autotest -*-
+# Copyright 2015-2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([--null enables verbatim reading])
+AT_KEYWORDS([files-from null T-null2 T-verbatim])
+
+# According to the docs, --null should read each line from the file
+# list verbatim. This feature was broken by commit 26538c9b (tar version
+# 1.27).
+
+AT_TAR_CHECK([
+AT_DATA([file-list],[a
+-b
+--c d
+])
+
+genfile -f a
+genfile -f -b
+genfile -f '--c d'
+
+cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T -
+],
+[0],
+[a
+-b
+--c d
+],
+[],[],[],[ustar]) # Testing one format is enough
+
+AT_CLEANUP
diff --git a/tests/T-rec.at b/tests/T-rec.at
new file mode 100644
index 0000000..5b60c46
--- /dev/null
+++ b/tests/T-rec.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([recursive file lists])
+AT_KEYWORDS([files-from T-rec])
+
+AT_TAR_CHECK([
+>file1
+>file2
+AT_DATA([F1],[file1
+-T F2
+])
+AT_DATA([F2],[file2
+-T F1
+])
+tar cf archive -T F1
+echo $?
+tar tf archive
+],
+[0],
+[2
+file1
+file2
+],
+[tar: F1: file list requested from F2 already read from command line
+tar: Exiting with failure status due to previous errors
+],[],[],[ustar])
+
+AT_CLEANUP
diff --git a/tests/T-recurse.at b/tests/T-recurse.at
new file mode 100644
index 0000000..4c88024
--- /dev/null
+++ b/tests/T-recurse.at
@@ -0,0 +1,90 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2015-2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Test interaction of --recursion and --no-recursion options
+# together with --files-from option. This is complementary to recurs02.at test
+# case. References:
+# <alpine.LSU.2.11.1502201029580.29773@nerf60.vanv.qr>
+# http://lists.gnu.org/archive/html/bug-tar/2015-06/msg00006.html
+
+AT_SETUP([files-from & recurse: toggle])
+AT_KEYWORDS([recurse T-recurse files-from])
+
+AT_TAR_CHECK([
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+AT_DATA([F1],[--no-recursion
+directory1/
+--recursion
+directory2/
+])
+
+AT_DATA([F2A],[directory1/
+])
+
+AT_DATA([F2B],[directory2/
+])
+
+a=archive
+tar cf "$a" --files-from F1
+tar tf "$a"
+
+a=archive2
+tar cf "$a" --no-recursion -T F2A --recursion -T F2B
+tar tf "$a"
+],
+[0],
+[directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+])
+
+AT_CLEANUP
+
+
+AT_SETUP([toggle --recursion (not) from -T])
+AT_KEYWORDS([recurse T-recurse T-recurse2 files-from])
+
+AT_TAR_CHECK([
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+AT_DATA([F1],[--no-recursion
+directory1/
+])
+
+AT_DATA([F2],[directory2/
+])
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+],
+[0],
+[directory1/
+directory2/
+directory2/file
+])
+
+AT_CLEANUP
diff --git a/tests/T-zfile.at b/tests/T-zfile.at
new file mode 100644
index 0000000..931d69b
--- /dev/null
+++ b/tests/T-zfile.at
@@ -0,0 +1,52 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar malfunctioned when given empty file as an argument to -T.
+#
+# Reported by: Michal Žejdl <zejdl@suas.cz>
+# References: <http://lists.gnu.org/archive/html/bug-tar/2013-07/msg00009.html>
+
+AT_SETUP([empty file])
+AT_KEYWORDS([files-from empty-file])
+
+AT_TAR_CHECK([
+genfile --length=0 --file empty
+genfile --file a
+genfile --file b
+AT_DATA([valid],[a
+b
+])
+
+tar cf archive -T empty -T valid
+tar tf archive
+echo "=="
+tar cf archive -T valid -T empty
+tar tf archive
+],
+[0],
+[a
+b
+==
+a
+b
+],
+[],[],[],[ustar]) # Testing one format is enough
+
+AT_CLEANUP
diff --git a/tests/acls01.at b/tests/acls01.at
new file mode 100644
index 0000000..68e979a
--- /dev/null
+++ b/tests/acls01.at
@@ -0,0 +1,55 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2011, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description:
+#
+# This is basic test for acl support.
+
+AT_SETUP([acls: basic functionality])
+AT_KEYWORDS([xattrs acls acls01])
+
+AT_TAR_CHECK([
+AT_XATTRS_UTILS_PREREQ
+AT_ACLS_PREREQ
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/file
+setfacl -m u:$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test "$?" = 0
+],
+[0],
+[])
+
+AT_CLEANUP
diff --git a/tests/acls02.at b/tests/acls02.at
new file mode 100644
index 0000000..21f1894
--- /dev/null
+++ b/tests/acls02.at
@@ -0,0 +1,61 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2011, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description:
+#
+# This is basic test for acl support.
+
+AT_SETUP([acls: work with -C])
+AT_KEYWORDS([xattrs acls acls02])
+
+AT_TAR_CHECK([
+AT_XATTRS_UTILS_PREREQ
+AT_ACLS_PREREQ
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/subdir
+setfacl -m u:$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test "$?" = 0
+],
+[0],
+[])
+
+AT_CLEANUP
diff --git a/tests/acls03.at b/tests/acls03.at
new file mode 100644
index 0000000..19b8073
--- /dev/null
+++ b/tests/acls03.at
@@ -0,0 +1,131 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description:
+#
+# Check the storing/restoring with/without default ACLs. When --acls is passed,
+# restored directory tree should always match archive contents (even when the
+# archive does not contain any ACLs).
+#
+# References:
+# http://www.mail-archive.com/bug-tar@gnu.org/msg04355.html
+
+AT_SETUP([acls: default ACLs])
+AT_KEYWORDS([xattrs acls acls03])
+
+m4_define([ACL_LISTDIR], [
+ cd $1
+ $1="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+])
+
+m4_define([ACL_ASSERT], [
+ echo "$$1" > $1.log
+ echo "$$2" > $2.log
+ if test ! "$$1" "$3" "$$2"; then
+ echo "bad '$1' against '$2' output"
+ fi
+])
+
+AT_TAR_CHECK([
+AT_XATTRS_UTILS_PREREQ
+AT_ACLS_PREREQ
+AT_SORT_PREREQ
+
+MYNAME=$( id -un )
+MYGROUP=$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:$MYGROUP:r-x pure/d1
+setfacl -d -m g:$MYGROUP:rwx pure/d1
+setfacl -d -m u:$MYNAME:rwx pure/d1
+# "*a" files have "some" additional ACLs
+setfacl -m u:$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on "how the files were extracted from
+# archive". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+ACL_LISTDIR(pure)
+
+ACL_LISTDIR(sacl_def_optacl)
+ACL_LISTDIR(sacl_def_optnoacl)
+ACL_LISTDIR(sacl_nodef_optacl)
+ACL_LISTDIR(sacl_nodef_optnoacl)
+ACL_LISTDIR(nosacl_def_optacl)
+ACL_LISTDIR(nosacl_def_optnoacl)
+ACL_LISTDIR(nosacl_nodef_optacl)
+ACL_LISTDIR(nosacl_nodef_optnoacl)
+
+ACL_ASSERT(pure, sacl_def_optacl, =)
+
+ACL_ASSERT(sacl_def_optacl, sacl_nodef_optacl, =)
+ACL_ASSERT(sacl_def_optnoacl, nosacl_def_optnoacl, =)
+ACL_ASSERT(sacl_nodef_optnoacl, nosacl_nodef_optnoacl, =)
+ACL_ASSERT(nosacl_def_optacl, nosacl_nodef_optacl, =)
+ACL_ASSERT(nosacl_def_optacl, nosacl_nodef_optnoacl, =)
+
+ACL_ASSERT(sacl_def_optacl, sacl_def_optnoacl, !=)
+ACL_ASSERT(sacl_def_optacl, nosacl_def_optnoacl, !=)
+ACL_ASSERT(nosacl_def_optnoacl, nosacl_nodef_optnoacl, !=)
+],
+[0],
+[],
+[])
+
+AT_CLEANUP
diff --git a/tests/append.at b/tests/append.at
new file mode 100644
index 0000000..6fa587e
--- /dev/null
+++ b/tests/append.at
@@ -0,0 +1,35 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([append])
+AT_KEYWORDS([append append00])
+
+AT_TAR_CHECK([touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive],
+ [0],
+[file1
+file2
+])
+
+AT_CLEANUP
diff --git a/tests/append01.at b/tests/append01.at
new file mode 100644
index 0000000..f847c61
--- /dev/null
+++ b/tests/append01.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# When decoding a header tar was assigning 0 to oldgnu_header.isextended,
+# which destroyed name prefix. When updating archive, modified prefix
+# could have been written to disk thus producing invalid archive member.
+# Reported by Adye, TJ (Tim), <T.J.Adye@rl.ac.uk>
+# References:
+# <7231C15EAC2F164CA6DC326D97493C8B36C25D@exchange35.fed.cclrc.ac.uk>
+# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00032.html
+
+AT_SETUP([appending files with long names])
+AT_KEYWORDS([append append01])
+
+m4_pushdef([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX])
+
+AT_TAR_CHECK([
+mkdir PREFIX
+touch PREFIX/file1 PREFIX/file2
+tar cf archive PREFIX/file1
+tar rf archive PREFIX/file2
+tar tf archive
+],
+[0],
+[PREFIX/file1
+PREFIX/file2
+],
+[],[],[],[oldgnu, ustar, posix, gnu])
+
+m4_popdef([PREFIX])
+AT_CLEANUP
diff --git a/tests/append02.at b/tests/append02.at
new file mode 100644
index 0000000..3ca4d4c
--- /dev/null
+++ b/tests/append02.at
@@ -0,0 +1,90 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Using tar 1.15.x the following equivalent command sets:
+#
+# 1. tar cf archive file1 file2
+# and
+# 2. tar cfT archive /dev/null
+# tar rf archive file1
+# tar rt archive file2
+#
+# produced different archives (GNU format is assumed). It was reported
+# by TAMUKI Shoichi on 2006-07-21 [1].
+#
+# The bug was due to tar being unable to discern between GNU and OLDGNU
+# formats and always assuming the latter. The main difference between
+# the two is that OLDGNU preserves all bits in the mode field, whereas
+# GNU format keeps only the lower 9 ones (mode & 0777).
+#
+# This was fixed on 2006-07-24 (commit f4e4adea80a) by making tar truncate
+# the mode field even in OLDGNU format. Obviously, the fix broke the
+# format backward compatibility, but it went unnoticed until 2009-10-03
+# (after all, the OLDGNU format is not in much use nowadays), when
+# Igor Zhbanov reported it [2].
+#
+# The final fix was applied on 2009-10-04.
+#
+# References:
+# [1] <200607210526.AA03440@tamuki.linet.gr.jp>
+# http://lists.gnu.org/archive/html/bug-tar/2006-07/msg00029.html
+# [2] <f44001920910020335v4cadfesf54f6593d5124814@mail.gmail.com>
+# http://lists.gnu.org/archive/html/bug-tar/2009-10/msg00006.html
+
+# The test case below verifies that the equivalent create and append commands
+# produce binary equivalent archives for all formats.
+
+AT_SETUP([append vs. create])
+AT_KEYWORDS([append append02 append-gnu])
+
+AT_TAR_CHECK([
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME="--mtime=@0"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test $[]TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
+fi
+
+echo Creating archive.1
+tar $MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar $MTIME -cf archive.2 -T /dev/null
+tar $MTIME -rf archive.2 file1
+tar $MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+],
+[0],
+[Creating archive.1
+Creating archive.2
+Comparing archives
+])
+
+AT_CLEANUP
+
+# End of append02.at
diff --git a/tests/append03.at b/tests/append03.at
new file mode 100644
index 0000000..c746301
--- /dev/null
+++ b/tests/append03.at
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([append with name transformation])
+AT_KEYWORDS([append append03])
+
+# Description: Make sure filenames are transformed during append.
+
+AT_TAR_CHECK([
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+],
+[0],
+[Appending
+plik.1
+Testing
+plik.1
+plik.2
+plik.1
+])
+
+AT_CLEANUP
diff --git a/tests/append04.at b/tests/append04.at
new file mode 100644
index 0000000..a543d0d
--- /dev/null
+++ b/tests/append04.at
@@ -0,0 +1,60 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# When called with --append and --verify options, tar would rewrite the
+# archive instead of appending to it.
+#
+# Last-Affected-Version: 1.26
+# Reported-by: Jivko Angelov <jivko@siteground.com>
+# References: <51D6983C.3060404@siteground.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-07/msg00003.html
+
+AT_SETUP([append with verify])
+AT_KEYWORDS([append append04 verify append-verify])
+
+AT_TAR_CHECK([
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+],
+[0],
+[file1
+file2
+==
+file1
+file2
+file3
+])
+
+AT_CLEANUP
diff --git a/tests/append05.at b/tests/append05.at
new file mode 100644
index 0000000..865831a
--- /dev/null
+++ b/tests/append05.at
@@ -0,0 +1,96 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Adding files to an archive with a blocking factor different from the one
+# used when creating it would produce a malformed archive.
+#
+# Last-Affected-Version: 1.28.90 (da7845c6563e7337bf3e8364046a7989091f190e)
+# Reported-by: Initial report by Renate Pyhel <rpyhel@google.com>. Explained
+# in detail by Tim Kientzle. This test case is based on his posting.
+# References: <CALyyU7QJRQEQWMqZ=J=ppu-nwOH6R58Ci2ZkV32+CeZKsWsz7Q@mail.gmail.com>,
+# <50202013-27F2-4EFF-98C8-2DD112C5B956@kientzle.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2016-03/msg00002.html,
+# http://lists.gnu.org/archive/html/bug-tar/2016-03/msg00004.html
+
+AT_SETUP([append after changed blocking])
+AT_KEYWORDS([append append05 blocking])
+
+AT_TAR_CHECK([
+for f in a b c d e f g h i
+do
+ echo $f > $f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+],
+[0],
+[creating archive
+a
+b
+c
+adding d e f
+d
+e
+f
+==
+a
+b
+c
+d
+e
+f
+adding g h i
+g
+h
+i
+resulting archive
+a
+b
+c
+d
+e
+f
+g
+h
+i
+],
+[creating archive
+adding d e f
+adding g h i
+resulting archive
+])
+
+AT_CLEANUP
+
+
diff --git a/tests/argcv.c b/tests/argcv.c
new file mode 100644
index 0000000..dfde2ff
--- /dev/null
+++ b/tests/argcv.c
@@ -0,0 +1,400 @@
+/* argcv.c - simple functions for parsing input based on whitespace
+ Copyright (C) 1999, 2000, 2001, 2007, 2009, 2010 Free Software
+ Foundation, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include <ctype.h>
+
+#include <argcv.h>
+
+/*
+ * takes a string and splits it into several strings, breaking at ' '
+ * command is the string to split
+ * the number of strings is placed into argc
+ * the split strings are put into argv
+ * returns 0 on success, nonzero on failure
+ */
+
+#define isws(c) ((c)==' '||(c)=='\t'||(c)=='\n')
+#define isdelim(c,delim) ((c)=='"'||strchr(delim,(c))!=NULL)
+
+static int
+argcv_scan (int len, const char *command, const char *delim, const char* cmnt,
+ int *start, int *end, int *save)
+{
+ int i = 0;
+
+ for (;;)
+ {
+ i = *save;
+
+ if (i >= len)
+ return i + 1;
+
+ /* Skip initial whitespace */
+ while (i < len && isws (command[i]))
+ i++;
+ *start = i;
+
+ switch (command[i])
+ {
+ case '"':
+ case '\'':
+ while (++i < len
+ && (command[i] != command[*start]
+ || command[i-1] == '\\'))
+ ;
+ if (i < len) /* found matching quote */
+ break;
+ /*FALLTHRU*/ default:
+ if (isdelim (command[i], delim))
+ break;
+ /* Skip until next whitespace character or end of line. Honor
+ escaped whitespace. */
+ while (++i < len &&
+ !((isws (command[i]) && command[i-1] != '\\')
+ || isdelim (command[i], delim)));
+ i--;
+ break;
+ }
+
+ *end = i;
+ *save = i + 1;
+
+ /* If we have a token, and it starts with a comment character, skip
+ to the newline and restart the token search. */
+ if (*save <= len)
+ {
+ if (cmnt && strchr (cmnt, command[*start]) != NULL)
+ {
+ i = *save;
+ while (i < len && command[i] != '\n')
+ i++;
+
+ *save = i;
+ continue;
+ }
+ }
+ break;
+ }
+ return *save;
+}
+
+static char escape_transtab[] = "\\\\a\ab\bf\fn\nr\rt\t";
+
+int
+argcv_unescape_char (int c)
+{
+ char *p;
+
+ for (p = escape_transtab; *p; p += 2)
+ {
+ if (*p == c)
+ return p[1];
+ }
+ return c;
+}
+
+int
+argcv_escape_char (int c)
+{
+ char *p;
+
+ for (p = escape_transtab + sizeof(escape_transtab) - 2;
+ p > escape_transtab; p -= 2)
+ {
+ if (*p == c)
+ return p[-1];
+ }
+ return -1;
+}
+
+
+static int
+xtonum (const char *src, int base, size_t cnt)
+{
+ int val;
+ char *p;
+ char tmp[4]; /* At most three characters + zero */
+
+ /* Notice: No use to check `cnt'. It should be either 2 or 3 */
+ memcpy (tmp, src, cnt);
+ tmp[cnt] = 0;
+ val = strtoul (tmp, &p, base);
+ return (*p == 0) ? val : -1;
+}
+
+static size_t
+escaped_length (const char *str, int *quote)
+{
+ size_t len = 0;
+
+ for (; *str; str++)
+ {
+ if (*str == ' ')
+ {
+ len++;
+ *quote = 1;
+ }
+ else if (*str == '"')
+ {
+ len += 2;
+ *quote = 1;
+ }
+ else if (isprint ((unsigned char) *str))
+ len++;
+ else if (argcv_escape_char (*str) != -1)
+ len += 2;
+ else
+ len += 4;
+ }
+ return len;
+}
+
+static void
+unescape_copy (char *dst, const char *src, size_t n)
+{
+ int c;
+
+ while (n > 0)
+ {
+ n--;
+ if (*src == '\\')
+ {
+ switch (*++src)
+ {
+ case 'x':
+ case 'X':
+ ++src;
+ --n;
+ if (n == 0)
+ {
+ *dst++ = '\\';
+ *dst++ = src[-1];
+ }
+ else
+ {
+ c = xtonum(src, 16, 2);
+ if (c == -1)
+ {
+ *dst++ = '\\';
+ *dst++ = src[-1];
+ }
+ else
+ {
+ *dst++ = c;
+ src += 2;
+ n -= 2;
+ }
+ }
+ break;
+
+ case '0':
+ ++src;
+ --n;
+ if (n == 0)
+ {
+ *dst++ = '\\';
+ *dst++ = src[-1];
+ }
+ else
+ {
+ c = xtonum(src, 8, 3);
+ if (c == -1)
+ {
+ *dst++ = '\\';
+ *dst++ = src[-1];
+ }
+ else
+ {
+ *dst++ = c;
+ src += 3;
+ n -= 3;
+ }
+ }
+ break;
+
+ default:
+ *dst++ = argcv_unescape_char (*src++);
+ n--;
+ }
+ }
+ else
+ {
+ *dst++ = *src++;
+ }
+ }
+ *dst = 0;
+}
+
+static void
+escape_copy (char *dst, const char *src)
+{
+ for (; *src; src++)
+ {
+ if (*src == '"')
+ {
+ *dst++ = '\\';
+ *dst++ = '"';
+ }
+ else if (*src != '\t' && isprint ((unsigned char) *src))
+ *dst++ = *src;
+ else
+ {
+ int c = argcv_escape_char (*src);
+ *dst++ = '\\';
+ if (c != -1)
+ *dst++ = c;
+ else
+ {
+ char tmp[4];
+ snprintf (tmp, sizeof tmp, "%03o", *(unsigned char*)src);
+ memcpy (dst, tmp, 3);
+ dst += 3;
+ }
+ }
+ }
+}
+
+int
+argcv_get (const char *command, const char *delim, const char* cmnt,
+ int *argc, char ***argv)
+{
+ int len = strlen (command);
+ int i = 0;
+ int start, end, save;
+
+ *argv = NULL;
+
+ /* Count number of arguments */
+ *argc = 0;
+ save = 0;
+
+ while (argcv_scan (len, command, delim, cmnt, &start, &end, &save) <= len)
+ (*argc)++;
+
+ *argv = calloc ((*argc + 1), sizeof (char *));
+
+ i = 0;
+ save = 0;
+ for (i = 0; i < *argc; i++)
+ {
+ int n;
+ argcv_scan (len, command, delim, cmnt, &start, &end, &save);
+
+ if ((command[start] == '"' || command[end] == '\'')
+ && command[end] == command[start])
+ {
+ start++;
+ end--;
+ }
+ n = end - start + 1;
+ (*argv)[i] = calloc (n+1, sizeof (char));
+ if ((*argv)[i] == NULL)
+ return 1;
+ unescape_copy ((*argv)[i], &command[start], n);
+ (*argv)[i][n] = 0;
+ }
+ (*argv)[i] = NULL;
+ return 0;
+}
+
+/*
+ * frees all elements of an argv array
+ * argc is the number of elements
+ * argv is the array
+ */
+int
+argcv_free (int argc, char **argv)
+{
+ while (--argc >= 0)
+ if (argv[argc])
+ free (argv[argc]);
+ free (argv);
+ return 1;
+}
+
+/* Take a argv an make string separated by ' '. */
+
+int
+argcv_string (int argc, char **argv, char **pstring)
+{
+ size_t i, j, len;
+ char *buffer;
+
+ /* No need. */
+ if (pstring == NULL)
+ return 1;
+
+ buffer = malloc (1);
+ if (buffer == NULL)
+ return 1;
+ *buffer = '\0';
+
+ for (len = i = j = 0; i < argc; i++)
+ {
+ int quote = 0;
+ int toklen;
+
+ toklen = escaped_length (argv[i], &quote);
+
+ len += toklen + 2;
+ if (quote)
+ len += 2;
+
+ buffer = realloc (buffer, len);
+ if (buffer == NULL)
+ return 1;
+
+ if (i != 0)
+ buffer[j++] = ' ';
+ if (quote)
+ buffer[j++] = '"';
+ escape_copy (buffer + j, argv[i]);
+ j += toklen;
+ if (quote)
+ buffer[j++] = '"';
+ }
+
+ for (; j > 0 && isspace ((unsigned char) buffer[j - 1]); j--)
+ ;
+ buffer[j] = 0;
+ if (pstring)
+ *pstring = buffer;
+ return 0;
+}
+
+#if 0
+char *command = "set prompt=\"& \a\\\"\" \\x25\\0145\\098\\ta";
+
+main(int xargc, char **xargv)
+{
+ int i, argc;
+ char **argv;
+ char *s;
+
+ argcv_get (xargv[1] ? xargv[1]:command, "=", "#", &argc, &argv);
+ printf ("%d args:\n", argc);
+ for (i = 0; i < argc; i++)
+ printf ("%s\n", argv[i]);
+ printf ("===\n");
+ argcv_string (argc, argv, &s);
+ printf ("%s\n", s);
+}
+#endif
diff --git a/tests/argcv.h b/tests/argcv.h
new file mode 100644
index 0000000..48637fb
--- /dev/null
+++ b/tests/argcv.h
@@ -0,0 +1,50 @@
+/* GNU Mailutils -- a suite of utilities for electronic mail
+ Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _ARGCV_H
+#define _ARGCV_H 1
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __P
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define __P(args) args
+# else
+# define __P(args) ()
+# endif
+#endif /*__P */
+
+extern int argcv_get __P ((const char *command, const char *delim,
+ const char* cmnt,
+ int *argc, char ***argv));
+extern int argcv_string __P ((int argc, char **argv, char **string));
+extern int argcv_free __P ((int argc, char **argv));
+extern int argcv_unescape_char __P((int c));
+extern int argcv_escape_char __P((int c));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ARGCV_H */
diff --git a/tests/atlocal.in b/tests/atlocal.in
new file mode 100644
index 0000000..21c6ef7
--- /dev/null
+++ b/tests/atlocal.in
@@ -0,0 +1,64 @@
+# @configure_input@ -*- shell-script -*-
+# Configurable variable values for tar test suite.
+# Copyright 2004, 2006, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH
+
+XFAILFILE=$abs_builddir/.badversion
+
+trap "test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15
+
+TEST_DATA_URL=ftp://download.gnu.org.ua/pub/tests/tar
+if test -z "$TEST_DATA_DIR"; then
+ TEST_DATA_DIR=$abs_builddir/download
+fi
+
+STAR_DATA_URL=$TEST_DATA_URL/star
+if test -z "$STAR_TESTSCRIPTS"; then
+ STAR_TESTSCRIPTS=$TEST_DATA_DIR
+fi
+
+# tarball_prereq file sum dir url
+tarball_prereq() {
+ if ! test -d "$3"; then
+ mkdir "$3"
+ cat > "$3/README" <<EOF
+This directory contains test data downloaded during full check.
+You can remove it, if you wish.
+EOF
+ fi
+ if test -r $3/$1; then
+ :
+ elif test -n "$FULL_TEST"; then
+ wget -q -O $3/$1 $4/$1
+ fi
+ echo "$2 $3/$1" | md5sum --status --check - >/dev/null 2>&1
+}
+
+decho() {
+ echo $*
+ echo >&2 $*
+}
+
+mkexcltest() {
+ mkdir $1 $1/subdir
+ genfile --file=$1/top-level-file
+ genfile --file=$1/subdir/excludeme
+ genfile --file=$1/subdir/subdir-file
+}
+
diff --git a/tests/backup01.at b/tests/backup01.at
new file mode 100644
index 0000000..09051c6
--- /dev/null
+++ b/tests/backup01.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009-2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description:
+# When extracting, tar (<1.22) sometimes renamed a backup back to the
+# original name (overwriting the newly-extracted file) for no good reason.
+#
+# Reported by: Carl Worth <cworth@cworth.org>,
+# Eric Lammerts <eric@lammerts.org>
+#
+# References: <1249419998.4905.84.camel@yoom.home.cworth.org>
+# http://lists.gnu.org/archive/html/bug-tar/2009-08/msg00005.html
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508199
+#
+
+AT_SETUP([extracting existing dir with --backup])
+AT_KEYWORDS([extract backup backup01])
+
+AT_TAR_CHECK([
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+],
+[0],
+[dir1/
+dir1/file1
+Renaming 'dir1/file1' to 'dir1/file1~'
+dir2/
+])
+
+AT_CLEANUP
diff --git a/tests/capabs_raw01.at b/tests/capabs_raw01.at
new file mode 100644
index 0000000..a498dd5
--- /dev/null
+++ b/tests/capabs_raw01.at
@@ -0,0 +1,53 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2012-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description: Test if file capabilities are archived/restored correctly
+# using just the default xattr support (capabilities are stored/restored in
+# binary format -> system dependant).
+
+AT_SETUP([capabilities: binary store/restore])
+AT_KEYWORDS([xattrs capabilities capabs_raw01])
+
+AT_TAR_CHECK([
+AT_PRIVILEGED_PREREQ
+AT_XATTRS_PREREQ
+AT_CAPABILITIES_UTILS_PREREQ
+
+mkdir dir
+genfile --file dir/file
+
+setcap "= cap_chown=ei" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+],
+[0],
+[dir/file = cap_chown+ei
+])
+
+AT_CLEANUP
diff --git a/tests/checkseekhole.c b/tests/checkseekhole.c
new file mode 100644
index 0000000..c7d6204
--- /dev/null
+++ b/tests/checkseekhole.c
@@ -0,0 +1,92 @@
+/* Test suite for GNU tar - SEEK_HOLE detector.
+
+ Copyright 2015-2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Description: detect whether it is possible to work with SEEK_HOLE on
+ particular operating system and file system. */
+
+#include "config.h"
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+
+enum {
+ EX_OK = 0, /* SEEK_HOLE support */
+ EX_FAIL, /* test failed - no SEEK_HOLE support */
+ EX_BAD, /* test is not relevant */
+};
+
+int
+check_seek_hole (int fd)
+{
+#ifdef SEEK_HOLE
+ struct stat stat;
+ off_t offset;
+
+ /* hole of 100MB */
+ if (lseek (fd, 100*1024*1024, SEEK_END) < 0)
+ return EX_BAD;
+
+ /* piece of data */
+ if (write (fd, "data\n", 5) != 5)
+ return EX_BAD;
+
+ /* another hole */
+ if (lseek (fd, 100*1024*1024, SEEK_END) < 0)
+ return EX_BAD;
+
+ /* piece of data */
+ if (write (fd, "data\n", 5) != 5)
+ return EX_BAD;
+
+ if (fstat (fd, &stat))
+ return EX_BAD;
+
+ offset = lseek (fd, 0, SEEK_DATA);
+ if (offset == (off_t)-1)
+ return EX_FAIL;
+
+ offset = lseek (fd, offset, SEEK_HOLE);
+ if (offset == (off_t)-1 || offset == stat.st_size)
+ return EX_FAIL;
+
+ return EX_OK;
+#else
+ return EX_BAD;
+#endif
+}
+
+int
+main ()
+{
+#ifdef SEEK_HOLE
+ int rc;
+ char template[] = "testseekhole-XXXXXX";
+ int fd = mkstemp (template);
+ if (fd == -1)
+ return EX_BAD;
+ rc = check_seek_hole (fd);
+ close (fd);
+ unlink (template);
+
+ return rc;
+#else
+ return EX_FAIL;
+#endif
+}
diff --git a/tests/chtype.at b/tests/chtype.at
new file mode 100644
index 0000000..eda52ea
--- /dev/null
+++ b/tests/chtype.at
@@ -0,0 +1,73 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Incremental restore malfunctions if an archive member
+# changes type before restoration, e.g. from directory to file or vice
+# versa.
+# Reported by: Wolfram Kleff <bugreport@wkleff.intergenia.de>
+# References: <200605101232.25031.bugreport@wkleff.intergenia.de>
+
+AT_SETUP([changed file types in incrementals])
+AT_KEYWORDS([incremental listed chtype])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+AT_TAR_MKHIER([directory/b/c],[x])
+mkdir directory/a
+genfile --file directory/a/a
+
+echo First backup
+tar --create --file=archive.1 --listed-incremental=db.1 directory
+
+sleep 2
+
+# Remove directory b and create a file with this name.
+# Previous versions were not able to restore over this file.
+rm -r directory/b
+genfile --file directory/b
+genfile --file directory/a/b
+
+echo Second backup
+tar --create --file=archive.2 --listed-incremental=db.2 directory
+
+# Delete a
+rm -r directory
+
+echo Restore archive.1
+tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
+find directory | sort
+],
+[0],
+[First backup
+Second backup
+Restore archive.1
+Restore archive.2
+directory
+directory/a
+directory/a/a
+directory/a/b
+directory/b
+],[],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of chtype.at
diff --git a/tests/ckmtime.c b/tests/ckmtime.c
new file mode 100644
index 0000000..9fde42d
--- /dev/null
+++ b/tests/ckmtime.c
@@ -0,0 +1,69 @@
+/* Check if filesystem timestamps are consistent with the system time.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <config.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stat-time.h>
+#include <timespec.h>
+
+#define TEMPLATE "ckmtime.XXXXXX"
+#define BILLION 1000000000
+
+/* Some filesystems can slightly offset the timestamps of newly created files.
+ To compensate for it, tar testsuite waits at least 1 second before creating
+ next level of incremental backups.
+
+ However, NFS mounts can offset the timestamps by bigger amounts.
+
+ This program returns with success (0) if a newly created file is assigned
+ mtime matching the system time to the nearest second.
+*/
+int
+main (int argc, char **argv)
+{
+ int fd;
+ char name[sizeof(TEMPLATE)];
+ struct stat st;
+ struct timespec ts, td;
+ double diff;
+
+ gettime (&ts);
+
+ strcpy (name, TEMPLATE);
+ umask (077);
+ fd = mkstemp (name);
+ assert (fd != -1);
+ unlink (name);
+ assert (fstat (fd, &st) == 0);
+ close (fd);
+
+ td = timespec_sub (get_stat_mtime (&st), ts);
+ diff = td.tv_sec * BILLION + td.tv_nsec;
+ if (diff < 0)
+ diff = - diff;
+ if (diff / BILLION >= 1)
+ {
+ fprintf (stderr, "file timestamp unreliable\n");
+ return 1;
+ }
+ return 0;
+}
diff --git a/tests/comperr.at b/tests/comperr.at
new file mode 100644
index 0000000..65576e7
--- /dev/null
+++ b/tests/comperr.at
@@ -0,0 +1,39 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2015-2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([compressor program failure])
+AT_KEYWORDS([compress comperr])
+
+# Description: If the --use-compress-program fails, then it is unsafe
+# to assume that the created archive is OK. Tar should fail with a
+# prominent error message.
+# Reported by: Ole Tange <tange@gnu.org>
+# References: <CA+4vN7wLZ-+LK1t7WMkM_b9f3mV9JTnSuPamPn2ciX5PTN=9Xw@mail.gmail.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2015-03/msg00002.html
+
+AT_TAR_CHECK([
+tar --use-compress-program false -cf a.tar . 2>err
+rc=$?
+sed -n '$p' err
+exit $rc
+],
+[2],
+[tar: Error is not recoverable: exiting now
+])
+
+AT_CLEANUP
+
diff --git a/tests/comprec.at b/tests/comprec.at
new file mode 100644
index 0000000..0cb4175
--- /dev/null
+++ b/tests/comprec.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([compressed format recognition])
+
+AT_KEYWORDS([comprec])
+
+AT_TAR_CHECK([
+AT_GZIP_PREREQ
+genfile --length 10240 --file file1
+echo "separator"
+tar cfz archive file1
+echo "separator"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+],
+[0],
+[separator
+separator
+file1
+])
+
+AT_CLEANUP
diff --git a/tests/delete01.at b/tests/delete01.at
new file mode 100644
index 0000000..8b5263e
--- /dev/null
+++ b/tests/delete01.at
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Deleting a member after a big one was destroying the archive.
+
+AT_SETUP([deleting a member after a big one])
+AT_KEYWORDS([delete delete01])
+
+AT_TAR_CHECK([
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive],
+[0],
+[file1
+])
+
+AT_CLEANUP
diff --git a/tests/delete02.at b/tests/delete02.at
new file mode 100644
index 0000000..637a316
--- /dev/null
+++ b/tests/delete02.at
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004-2005, 2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Deleting a member with the archive from stdin was not working correctly.
+
+AT_SETUP([deleting a member from stdin archive])
+AT_KEYWORDS([delete delete02])
+
+AT_TAR_CHECK([
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2],
+[0],
+[1
+2
+3
+separator
+1
+3
+])
+
+AT_CLEANUP
diff --git a/tests/delete03.at b/tests/delete03.at
new file mode 100644
index 0000000..f33eeba
--- /dev/null
+++ b/tests/delete03.at
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([deleting members with long names])
+AT_KEYWORDS([delete delete03])
+
+m4_pushdef([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX])
+
+AT_TAR_CHECK([
+
+prefix=PREFIX
+rm -f $prefix*
+for i in 1 2 3 4 5 6 7 8 9
+do touch $prefix$i
+done
+tar -cf archive ./$prefix* &&
+ tar --delete -f archive ./${prefix}5 &&
+ tar -tf archive
+],
+[0],
+[./PREFIX[]1
+./PREFIX[]2
+./PREFIX[]3
+./PREFIX[]4
+./PREFIX[]6
+./PREFIX[]7
+./PREFIX[]8
+./PREFIX[]9
+],[],[],[],[gnu, oldgnu, posix])
+
+m4_popdef([PREFIX])
+AT_CLEANUP
diff --git a/tests/delete04.at b/tests/delete04.at
new file mode 100644
index 0000000..177888a
--- /dev/null
+++ b/tests/delete04.at
@@ -0,0 +1,54 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Deleting a large last member was destroying earlier members.
+
+AT_SETUP([deleting a large last member])
+AT_KEYWORDS([delete delete04])
+
+AT_TAR_CHECK([
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+],
+[0],
+[file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+])
+
+AT_CLEANUP
diff --git a/tests/delete05.at b/tests/delete05.at
new file mode 100644
index 0000000..56a483b
--- /dev/null
+++ b/tests/delete05.at
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# When attempted to delete a non-existing member, tar used to destroy
+# last blocking_factor blocks.
+# References:
+# <Pine.LNX.4.10.10412160956460.30933-100000@electra.znyx.com>
+# http://lists.gnu.org/archive/html/bug-tar/2004-12/msg00016.html
+
+AT_SETUP([deleting non-existing member])
+AT_KEYWORDS([delete delete05])
+
+AT_TAR_CHECK([
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+],
+[0],
+[en
+to
+],
+[tar: tre: Not found in archive
+tar: Exiting with failure status due to previous errors
+])
+
+AT_CLEANUP
diff --git a/tests/exclude.at b/tests/exclude.at
new file mode 100644
index 0000000..a29cdd1
--- /dev/null
+++ b/tests/exclude.at
@@ -0,0 +1,163 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test the functioning of --exclude-caches and --exclude-tag option families
+
+AT_SETUP([exclude])
+AT_KEYWORDS([exclude])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+mkdir dir
+echo blues > dir/blues
+echo jazz > dir/jazz
+mkdir dir/folk
+echo tagfile > dir/folk/tagfile
+echo sanjuan > dir/folk/sanjuan
+mkdir dir/rock
+echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
+echo "test" > dir/rock/file
+
+for option in exclude-caches exclude-caches-under exclude-caches-all
+do
+ echo OPTION $option
+ tar -cf archive.tar --$option -v dir 2>err | sort
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar | sort
+done
+
+for option in exclude-tag exclude-tag-under exclude-tag-all
+do
+ echo OPTION $option
+ tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar | sort
+done
+],
+[0],
+[OPTION exclude-caches
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+OPTION exclude-caches-under
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+OPTION exclude-caches-all
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+OPTION exclude-tag
+dir/
+dir/blues
+dir/folk/
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+OPTION exclude-tag-under
+dir/
+dir/blues
+dir/folk/
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+OPTION exclude-tag-all
+dir/
+dir/blues
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+],
+[],[],[],[ustar])
+
+AT_CLEANUP
diff --git a/tests/exclude01.at b/tests/exclude01.at
new file mode 100644
index 0000000..c3cd10b
--- /dev/null
+++ b/tests/exclude01.at
@@ -0,0 +1,71 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([exclude wildcards])
+AT_KEYWORDS([exclude exclude01])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude=testdir/dir1/\* \
+ --no-wildcards \
+ --exclude=testdir/dir2/\* \
+ --wildcards \
+ --exclude=testdir/dir3/\* \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir/dir1
+tar t --no-wildcards "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards "testdir/dir1/*" -f archive | sort
+
+rm -rf testdir
+],
+[0],
+[testdir/
+testdir/dir1/
+testdir/dir2/
+testdir/dir2/file2
+testdir/dir3/
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+testdir/dir1/file1
+])
+
+AT_CLEANUP
diff --git a/tests/exclude02.at b/tests/exclude02.at
new file mode 100644
index 0000000..84f83d5
--- /dev/null
+++ b/tests/exclude02.at
@@ -0,0 +1,79 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([exclude: anchoring])
+AT_KEYWORDS([exclude exclude02])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive --no-anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 2"
+tar cf archive --anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 3"
+tar cf archive testdir file1.txt
+tar t "file1.txt" -f archive | sort
+
+echo "SUB 4"
+tar t --no-anchored "file1.txt" -f archive | sort
+
+echo "SUB 5"
+tar t --anchored "file1.txt" -f archive | sort
+
+rm -rf testdir file1.txt
+
+],
+[0],
+[testdir/
+testdir/file2
+SUB 1
+testdir/
+testdir/file2
+SUB 2
+testdir/
+testdir/file1.txt
+testdir/file2
+SUB 3
+file1.txt
+SUB 4
+file1.txt
+testdir/file1.txt
+SUB 5
+file1.txt
+])
+
+AT_CLEANUP
diff --git a/tests/exclude03.at b/tests/exclude03.at
new file mode 100644
index 0000000..d55d3cc
--- /dev/null
+++ b/tests/exclude03.at
@@ -0,0 +1,75 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([exclude: wildcards match slash])
+AT_KEYWORDS([exclude exclude03])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\*f\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude='testdir*f*1' \
+ --no-wildcards-match-slash \
+ --exclude='testdir*f*2' \
+ --wildcards-match-slash \
+ --exclude='testdir*f*3' \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+],
+[0],
+[testdir/
+testdir/dir1/
+testdir/dir1/*
+testdir/dir2/
+testdir/dir2/*
+testdir/dir2/file2
+testdir/dir3/
+testdir/dir3/*
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+NEXT
+testdir/*f*1
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+])
+
+AT_CLEANUP
diff --git a/tests/exclude04.at b/tests/exclude04.at
new file mode 100644
index 0000000..17c759d
--- /dev/null
+++ b/tests/exclude04.at
@@ -0,0 +1,75 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([exclude: case insensitive])
+AT_KEYWORDS([exclude exclude04])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \
+ --exclude=file1 \
+ --ignore-case \
+ --exclude=file3 \
+ --no-ignore-case \
+ --exclude=FILE2 \
+ --exclude=file4 \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo "SUB 2"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo "SUB 3"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+],
+[0],
+[testdir/
+testdir/dir/
+testdir/dir/File1
+testdir/dir/File2
+testdir/dir/File4
+testdir/file2
+SUB 1
+testdir/dir/File2
+SUB 2
+testdir/dir/File2
+testdir/file2
+SUB 3
+testdir/dir/File2
+])
+
+AT_CLEANUP
diff --git a/tests/exclude05.at b/tests/exclude05.at
new file mode 100644
index 0000000..1b6f66f
--- /dev/null
+++ b/tests/exclude05.at
@@ -0,0 +1,61 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright 2009-2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test the functioning of many items in an exclude list (should run quickly)
+
+AT_SETUP([exclude: lots of excludes])
+AT_KEYWORDS([exclude exclude05])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
+ while read name
+ do
+ genfile --file $name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+],
+[0],
+[testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+NEXT
+testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+])
+
+AT_CLEANUP
diff --git a/tests/exclude06.at b/tests/exclude06.at
new file mode 100644
index 0000000..ebadebe
--- /dev/null
+++ b/tests/exclude06.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.23 would fail to exclude names longer that 100 characters from
+# pax format archives.
+#
+# Reported-by: Matthew Peterson <mrpeterson2@gmail.com>
+# References: <AANLkTin0teb1dcl0HCNquHxvN4HQnJmP6aK7CJCqy0sd@mail.gmail.com>
+# http://lists.gnu.org/archive/html/help-tar/2010-06/msg00000.html
+
+AT_SETUP([exclude: long files in pax archives])
+AT_KEYWORDS([exclude exclude06])
+
+m4_pushdef([test_base_dir],[one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen])
+
+AT_TAR_CHECK([
+AT_TAR_MKHIER(test_base_dir)
+genfile --length 20 -f test_base_dir[/1.txt]
+genfile --length 20 -f test_base_dir[/1.c]
+
+tar cf archive.tar test_base_dir
+mkdir out
+tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
+find out -type f
+],
+[0],
+[[out/]test_base_dir[/1.c]
+],
+[],
+[],
+[],
+[pax])
+
+m4_popdef([test_base_dir])
+AT_CLEANUP
diff --git a/tests/exclude07.at b/tests/exclude07.at
new file mode 100644
index 0000000..cb99d33
--- /dev/null
+++ b/tests/exclude07.at
@@ -0,0 +1,36 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([exclude: --exclude-backups option])
+AT_KEYWORDS([exclude exclude07])
+
+AT_TAR_CHECK([
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file "dir/.#file"
+genfile --file "dir/#file#"
+
+tar -v -c -f archive --exclude-backups dir
+],
+[0],
+[dir/
+dir/file
+])
+
+AT_CLEANUP
diff --git a/tests/exclude08.at b/tests/exclude08.at
new file mode 100644
index 0000000..e9595dd
--- /dev/null
+++ b/tests/exclude08.at
@@ -0,0 +1,54 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies whether the --exclude-tag option alone works
+# as expected, i.e. excludes the contents of the directory containing
+# the tag, but preserves the directory and the tag itself.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag option])
+AT_KEYWORDS([exclude exclude-tag exclude08])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+],
+[0],
+[etest/
+etest/subdir/
+etest/subdir/excludeme
+etest/top-level-file
+],
+[tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+])
+
+AT_CLEANUP
+
diff --git a/tests/exclude09.at b/tests/exclude09.at
new file mode 100644
index 0000000..4a0fe7a
--- /dev/null
+++ b/tests/exclude09.at
@@ -0,0 +1,57 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies whether the --exclude-tag option works
+# as expected whe used together with --listed-incremental, i.e. excludes
+# the contents of the directory containing the tag, but preserves the
+# directory and the tag itself.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag option and --listed-incremental])
+AT_KEYWORDS([exclude exclude-tag listed incremental exclude09])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
+],
+[0],
+[etest/
+etest/subdir/
+etest/subdir/excludeme
+etest/top-level-file
+],
+[tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
+],[],[],[gnu])
+
+AT_CLEANUP
+
diff --git a/tests/exclude10.at b/tests/exclude10.at
new file mode 100644
index 0000000..2b7ac32
--- /dev/null
+++ b/tests/exclude10.at
@@ -0,0 +1,73 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies whether the --exclude-tag option works
+# as expected when used in conjunction with --listed-incremental.
+# If the exclusion tag is created after the level 0 dump, the level
+# 1 dump must skip the affected subdirectory and any previously-included
+# files within it, but preserve the directory and the tag itself.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag option in incremental pass])
+AT_KEYWORDS([exclude exclude-tag listed incremental exclude10])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+rm etest/subdir/excludeme
+decho "# Level 0"
+tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho "# Level 1"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
+],
+[0],
+[# Level 0
+etest/
+etest/subdir/
+etest/subdir/subdir-file
+etest/top-level-file
+# Level 1
+etest/
+etest/subdir/
+etest/subdir/excludeme
+],
+[# Level 0
+tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+# Level 1
+tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
+],[],[],[gnu])
+
+AT_CLEANUP
+
diff --git a/tests/exclude11.at b/tests/exclude11.at
new file mode 100644
index 0000000..258a3d3
--- /dev/null
+++ b/tests/exclude11.at
@@ -0,0 +1,53 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies that the --exclude-tag-under option alone works
+# as expected, i.e. excludes the contents of the directory containing
+# the tag and the tag itself, but preserves the directory.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag-under option])
+AT_KEYWORDS([exclude exclude-tag exclude-tag-under exclude11])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+],
+[0],
+[etest/
+etest/subdir/
+etest/top-level-file
+],
+[tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+])
+
+AT_CLEANUP
+
diff --git a/tests/exclude12.at b/tests/exclude12.at
new file mode 100644
index 0000000..f61d211
--- /dev/null
+++ b/tests/exclude12.at
@@ -0,0 +1,56 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies whether the --exclude-tag-under option works
+# as expected whe used together with --listed-incremental, i.e. excludes
+# the contents of the directory containing the tag and the tag file, but
+# preserves the directory itself.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag-under and --listed-incremental])
+AT_KEYWORDS([exclude exclude-tag exclude-tag-under listed incremental exclude12])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
+],
+[0],
+[etest/
+etest/subdir/
+etest/top-level-file
+],
+[tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
+],[],[],[gnu])
+
+AT_CLEANUP
+
diff --git a/tests/exclude13.at b/tests/exclude13.at
new file mode 100644
index 0000000..0bca131
--- /dev/null
+++ b/tests/exclude13.at
@@ -0,0 +1,73 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies whether the --exclude-tag-under option works
+# as expected when used in conjunction with --listed-incremental.
+# If the exclusion tag is created after the level 0 dump, the level
+# 1 dump must skip the affected subdirectory and any previously-included
+# files within it, including the tag file, but preserve the directory
+# itself.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag-under option in incremental pass])
+AT_KEYWORDS([exclude exclude-tag exclude-tag-under listed incremental exclude13])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+rm etest/subdir/excludeme
+decho "# Level 0"
+tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho "# Level 1"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
+],
+[0],
+[# Level 0
+etest/
+etest/subdir/
+etest/subdir/subdir-file
+etest/top-level-file
+# Level 1
+etest/
+etest/subdir/
+],
+[# Level 0
+tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+# Level 1
+tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
+],[],[],[gnu])
+
+AT_CLEANUP
+
diff --git a/tests/exclude14.at b/tests/exclude14.at
new file mode 100644
index 0000000..8ac5358
--- /dev/null
+++ b/tests/exclude14.at
@@ -0,0 +1,52 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies whether the --exclude-tag-all option alone works
+# as expected, i.e. excludes entire directory containing the tag, including
+# any files located under it.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag-all option])
+AT_KEYWORDS([exclude exclude-tag exclude-tag-all exclude14])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+],
+[0],
+[etest/
+etest/top-level-file
+],
+[tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
+])
+
+AT_CLEANUP
+
diff --git a/tests/exclude15.at b/tests/exclude15.at
new file mode 100644
index 0000000..a53d38c
--- /dev/null
+++ b/tests/exclude15.at
@@ -0,0 +1,54 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies whether the --exclude-tag-all option works
+# as expected whe used together with --listed-incremental, i.e. excludes
+# excludes entire directory containing the tag.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag-all and --listed-incremental])
+AT_KEYWORDS([exclude exclude-tag exclude-tag-all listed incremental exclude15])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
+],
+[0],
+[etest/
+etest/top-level-file
+],
+[tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
+],[],[],[gnu])
+
+AT_CLEANUP
+
diff --git a/tests/exclude16.at b/tests/exclude16.at
new file mode 100644
index 0000000..9cc2f9a
--- /dev/null
+++ b/tests/exclude16.at
@@ -0,0 +1,71 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The --exclude-tag options interacted incorrectly with --listed-incremental
+# since their very inception. The testcases exclude08 through exclude16
+# verify that --exclude-tag operates consistently whether or not
+# --listed-incremental option is given.
+#
+# This testcase verifies whether the --exclude-tag-all option works
+# as expected whe used together with --listed-incremental. If the
+# exclusion tag is created after the level 0 dump, the level 1 dump
+# must skip the entire affected subdirectory and any previously-included
+# files within it.
+#
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120528140419.GT2654@shire.ontko.com>,
+# <20130311210006.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
+
+AT_SETUP([--exclude-tag-all option in incremental pass])
+AT_KEYWORDS([exclude exclude-tag exclude-tag-all listed incremental exclude16])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkexcltest etest
+rm etest/subdir/excludeme
+decho "# Level 0"
+tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho "# Level 1"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
+],
+[0],
+[# Level 0
+etest/
+etest/subdir/
+etest/subdir/subdir-file
+etest/top-level-file
+# Level 1
+etest/
+],
+[# Level 0
+tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+# Level 1
+tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
+],[],[],[gnu])
+
+AT_CLEANUP
+
diff --git a/tests/extrac01.at b/tests/extrac01.at
new file mode 100644
index 0000000..2247598
--- /dev/null
+++ b/tests/extrac01.at
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# There was a diagnostic when directory already exists.
+
+AT_SETUP([extract over an existing directory])
+AT_KEYWORDS([extract extract01])
+
+AT_TAR_CHECK([
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+])
+
+AT_CLEANUP
diff --git a/tests/extrac02.at b/tests/extrac02.at
new file mode 100644
index 0000000..4e1131f
--- /dev/null
+++ b/tests/extrac02.at
@@ -0,0 +1,38 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Could not extract symlinks over an existing file.
+
+AT_SETUP([extracting symlinks over an existing file])
+AT_KEYWORDS([extract extract02 symlink])
+
+# FIXME: Skip if symlinks are not supported on the system
+
+AT_TAR_CHECK([
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+])
+
+AT_CLEANUP
diff --git a/tests/extrac03.at b/tests/extrac03.at
new file mode 100644
index 0000000..11d377a
--- /dev/null
+++ b/tests/extrac03.at
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Paths going up and down were inducing extraction loops.
+
+AT_SETUP([extraction loops])
+AT_KEYWORDS([extract extract03])
+
+AT_TAR_CHECK([
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp],
+[0],
+[directory/../directory/
+separator
+directory/../directory/
+])
+
+AT_CLEANUP
diff --git a/tests/extrac04.at b/tests/extrac04.at
new file mode 100644
index 0000000..21a1df2
--- /dev/null
+++ b/tests/extrac04.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check for fnmatch problems in glibc 2.1.95.
+
+AT_SETUP([extract + fnmatch])
+AT_KEYWORDS([extract extract04 fnmatch])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \
+ --exclude='./*1' \
+ --exclude='d*/*1' \
+ --exclude='d*/s*/*2' | sort
+],
+[0],
+[directory/
+directory/file2
+directory/subdirectory/
+])
+
+AT_CLEANUP
diff --git a/tests/extrac05.at b/tests/extrac05.at
new file mode 100644
index 0000000..380c9da
--- /dev/null
+++ b/tests/extrac05.at
@@ -0,0 +1,62 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Problem: when extracting selected members from a PAX archive,
+# tar 1.14 incorrectly deemed all members to be sparse and
+# therefore was not able to properly skip them.
+#
+# Reported by: Luca Fibbi <fibbi@lamma.rete.toscana.it>
+#
+# References: <3.0.6.32.20040809113727.00a30e50@localhost>
+# http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00008.html
+
+AT_SETUP([extracting selected members from pax])
+AT_KEYWORDS([extract extract05])
+
+AT_DATA([list],
+[jeden
+cztery
+])
+
+AT_TAR_CHECK([
+genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST
+genfile --length 118 --file jeden
+genfile --length 223 --file dwa
+genfile --length 517 --file trzy
+genfile --length 110 --file cztery
+
+tar cf archive jeden dwa trzy cztery || exit 1
+
+mkdir dir
+cd dir
+
+tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
+
+cd ..
+],
+[0],
+[jeden
+cztery
+],
+[],[],[],
+[posix])
+
+AT_CLEANUP
diff --git a/tests/extrac06.at b/tests/extrac06.at
new file mode 100644
index 0000000..68c460f
--- /dev/null
+++ b/tests/extrac06.at
@@ -0,0 +1,73 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The bug occurs when extracting from a tarfile a directory when the directory
+# already exists and the version in the tarfile has more permissive
+# permissions than your umask. In this case, the permissions of the
+# existing directory will toggle between the version which complies with
+# your umask (which would be correct, without -p) and the version from the
+# tarfile.
+#
+# Reported by: Ian Jackson <iwj@ubuntu.com>
+#
+# References: <17461.519.640947.664400@davenant.relativity.greenend.org.uk>
+#
+
+AT_SETUP([mode of extracted directories])
+AT_KEYWORDS([extract extract06 directory mode])
+
+AT_TAR_CHECK([
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+],
+[0],
+[777
+755
+755
+755
+])
+
+AT_CLEANUP
diff --git a/tests/extrac07.at b/tests/extrac07.at
new file mode 100644
index 0000000..fbd6278
--- /dev/null
+++ b/tests/extrac07.at
@@ -0,0 +1,59 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.16 failed to extract archives that have symlinks
+# in read-only directories.
+#
+# Reported-by: Eelco Dolstra <eelco@cs.uu.nl>
+# References: <45475D78.8050708@cs.uu.nl>
+
+AT_SETUP([extracting symlinks to a read-only dir])
+AT_KEYWORDS([extract extract07 read-only symlink])
+
+AT_TAR_CHECK([
+AT_UNPRIVILEGED_PREREQ
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod a-w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+chmod +w dir
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+],
+[0],
+[Prepare the directory
+Create the archive
+Extract
+dir/
+dir/foo
+],
+[],[],[],[ustar]) # Testing one format is enough
+
+AT_CLEANUP
diff --git a/tests/extrac08.at b/tests/extrac08.at
new file mode 100644
index 0000000..91454f3
--- /dev/null
+++ b/tests/extrac08.at
@@ -0,0 +1,52 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description:
+# When extracting, tar (<1.22) did not restore directory permissions on
+# existing directories.
+# This was discovered when fixing debian bug #508199. See also backup01.at.
+#
+# Reported by: Carl Worth <cworth@cworth.org>,
+#
+# References: <1249419998.4905.84.camel@yoom.home.cworth.org>
+# http://lists.gnu.org/archive/html/bug-tar/2009-08/msg00005.html
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508199
+#
+
+AT_SETUP([restoring mode on existing directory])
+AT_KEYWORDS([extract extrac08])
+
+AT_TAR_CHECK([
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+],
+[0],
+[dir/
+dir/file
+755
+])
+
+AT_CLEANUP
diff --git a/tests/extrac09.at b/tests/extrac09.at
new file mode 100644
index 0000000..496c5fd
--- /dev/null
+++ b/tests/extrac09.at
@@ -0,0 +1,60 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This attempts to cause xgetcwd() to fail, and then checks to see if
+# such failure causes tar to abort even in a case where the results of
+# the call aren't actually needed.
+#
+# (xgetcwd() may fail e.g. on Solaris 10 when "." or ".." are unreadable.
+# On most systems xgetcwd() won't fail even in that situation, but
+# on those systems this test will simply succeed without actually testing
+# anything within tar.)
+#
+# http://lists.gnu.org/archive/html/bug-tar/2010-07/msg00045.html
+#
+# (See also 'listed03.at'.)
+
+AT_SETUP([extracting even when . and .. are unreadable])
+AT_KEYWORDS([extract extrac09])
+
+AT_TAR_CHECK([
+AT_UNPRIVILEGED_PREREQ
+
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/extract
+genfile --file dir/sub/f
+cd dir/sub
+
+tar -cf archive.tar f
+
+chmod a-r . ..
+tar -xvf archive.tar -C extract f
+status=$?
+chmod a+r . ..
+cmp f extract/f || status=$?
+exit $status
+],
+[0],
+[f
+],
+[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/extrac10.at b/tests/extrac10.at
new file mode 100644
index 0000000..03b4947
--- /dev/null
+++ b/tests/extrac10.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+# Check that delayed setting of directory metadata does not collide
+# with the -C option. When setting a directory's permissions, time
+# stamps, etc., tar should apply the -C option that was in effect when
+# the directory was extracted, not the -C option that happens to be in
+# effect when the metadata are later set.
+
+AT_SETUP([-C and delayed setting of metadata])
+AT_KEYWORDS([extract extrac10])
+
+AT_TAR_CHECK([
+mkdir d x x/y
+echo foo >d/d1
+echo bar >e
+
+tar -cf archive.tar d e &&
+tar -xf archive.tar -C x d -C y e &&
+diff -r d x/d &&
+diff e x/y/e
+],
+[0],
+[],
+[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/extrac11.at b/tests/extrac11.at
new file mode 100644
index 0000000..bcee2d0
--- /dev/null
+++ b/tests/extrac11.at
@@ -0,0 +1,86 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+# Check that 'tar' works even in a file-descriptor-limited environment.
+
+AT_SETUP([scarce file descriptors])
+AT_KEYWORDS([extract extrac11])
+
+AT_TAR_CHECK([
+exec </dev/null
+dirs='a
+ a/b
+ a/b/c
+ a/b/c/d
+ a/b/c/d/e
+ a/b/c/d/e/f
+ a/b/c/d/e/f/g
+ a/b/c/d/e/f/g/h
+ a/b/c/d/e/f/g/h/i
+ a/b/c/d/e/f/g/h/i/j
+ a/b/c/d/e/f/g/h/i/j/k
+'
+files=
+mkdir $dirs dest1 dest2 dest3 || exit
+for dir in $dirs; do
+ for file in X Y Z; do
+ echo $file >$dir/$file || exit
+ files="$files $file"
+ done
+done
+
+# Check that "ulimit" itself works. Close file descriptors before
+# invoking ulimit, to work around a bug (or a "feature") in some shells,
+# where they squirrel away dups of file descriptors into FD 10 and up
+# before closing the originals.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 100 &&
+ tar -cf archive1.tar a &&
+ tar -xf archive1.tar -C dest1 a
+ ) &&
+ diff -r a dest1/a
+) >/dev/null 2>&1 ||
+ AT_SKIP_TEST
+
+# Another test that "ulimit" itself works:
+# tar should fail when completely starved of file descriptors.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 4 &&
+ tar -cf archive2.tar a &&
+ tar -xf archive2.tar -C dest2 a
+ ) &&
+ diff -r a dest2/a
+) >/dev/null 2>&1 &&
+ AT_SKIP_TEST
+
+# Tar should work when there are few, but enough, file descriptors.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 10 &&
+ tar -cf archive3.tar a &&
+ tar -xf archive3.tar -C dest3 a
+ ) &&
+ diff -r a dest3/a >/dev/null 2>&1
+) || { diff -r a dest3/a; exit 1; }
+],
+[0],[],[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/extrac12.at b/tests/extrac12.at
new file mode 100644
index 0000000..0dc5929
--- /dev/null
+++ b/tests/extrac12.at
@@ -0,0 +1,41 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+# Check that 'tar' extracts permissions on the working directory last.
+
+AT_SETUP([extract dot permissions])
+AT_KEYWORDS([extract extrac12])
+
+AT_TAR_CHECK([
+mkdir src dst
+echo file1 >src/file1
+echo file2 >src/file2
+chmod a-w src
+
+tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
+tar -xf archive.tar -C dst &&
+cmp src/file1 dst/file1 &&
+cmp src/file2 dst/file2
+],
+[0],[],[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/extrac13.at b/tests/extrac13.at
new file mode 100644
index 0000000..d115bed
--- /dev/null
+++ b/tests/extrac13.at
@@ -0,0 +1,55 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+# Check that 'tar' normally does follow symbolic links when extracting,
+# unless --dereference is specified.
+
+AT_SETUP([extract over symlinks])
+AT_KEYWORDS([extract extrac13])
+
+AT_TAR_CHECK([
+mkdir src dst1 dst2 dst3
+echo file1 >src/file1
+ln -s target1 dst1/file1
+echo target1 >dst1/target1
+echo target1 >target1
+
+tar -cf archive.tar -C src . &&
+tar -xf archive.tar -C dst1 --warning=no-timestamp &&
+diff src/file1 dst1/file1 &&
+diff target1 dst1/target1
+
+ln -s target1 dst2/file1
+echo target1 >dst2/target1
+tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
+diff src/file1 dst2/file1 &&
+diff target1 dst2/target1
+
+ln -s target1 dst3/file1
+echo target1 >dst3/target1
+tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
+diff src/file1 dst3/file1 &&
+diff src/file1 dst3/target1
+],
+[0],[],[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/extrac14.at b/tests/extrac14.at
new file mode 100644
index 0000000..20bb7fb
--- /dev/null
+++ b/tests/extrac14.at
@@ -0,0 +1,38 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+# Check that 'tar -x -C FOO' follows FOO if FOO is a symbolic link.
+
+AT_SETUP([extract -C symlink])
+AT_KEYWORDS([extract extrac14])
+
+AT_TAR_CHECK([
+mkdir dest
+ln -s dest symlink
+echo foo >foo
+tar -cf archive.tar foo &&
+tar -xf archive.tar -C symlink --warning=no-timestamp &&
+cmp foo dest/foo
+],
+[0],[],[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/extrac15.at b/tests/extrac15.at
new file mode 100644
index 0000000..4331ad2
--- /dev/null
+++ b/tests/extrac15.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+# Check diagnostic of 'tar -x a/b/c' when b cannot be created.
+
+AT_SETUP([extract parent mkdir failure])
+AT_KEYWORDS([extract extrac15])
+
+AT_TAR_CHECK([
+AT_UNPRIVILEGED_PREREQ
+
+mkdir src src/a src/a/b dest dest/a
+touch src/a/b/c
+chmod a-w dest/a
+
+tar -cf archive.tar -C src a/b/c &&
+if tar -xf archive.tar -C dest a/b/c
+then (exit 1)
+else (exit 0)
+fi
+],
+[0],[],[tar: a/b: Cannot mkdir: Permission denied
+tar: a/b/c: Cannot open: No such file or directory
+tar: Exiting with failure status due to previous errors
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/extrac16.at b/tests/extrac16.at
new file mode 100644
index 0000000..1a1ef6b
--- /dev/null
+++ b/tests/extrac16.at
@@ -0,0 +1,38 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert from a bug report by Denis Excoffier
+# <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00034.html>
+
+# Check extraction of empty directory with -C.
+
+AT_SETUP([extract empty directory with -C])
+AT_KEYWORDS([extract extrac16])
+
+AT_TAR_CHECK([
+mkdir src src/a src/a/b dest
+touch src/a/c
+
+tar -cf archive.tar -C src a &&
+tar -xf archive.tar -C dest
+],
+[0],[],[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/extrac17.at b/tests/extrac17.at
new file mode 100644
index 0000000..8537952
--- /dev/null
+++ b/tests/extrac17.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([name matching/transformation ordering])
+AT_KEYWORDS([extract extrac17])
+
+# Description: Tar 1.24 changed the ordering of name matching and
+# name transformation so that the former saw already transformed
+# file names (see commit 9c194c99 and exclude06.at). This reverted
+# ordering made it impossible to match file names in certain cases.
+# In particular, the testcase below would not extract anything.
+#
+# Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
+# References: <x6r5fd9jye@gzp>, <20101026175126.29028@Pirx.gnu.org.ua>
+# http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
+
+AT_TAR_CHECK([
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
+ dir/subdir1/
+],
+[0],
+[dir/subdir1/file1
+])
+
+AT_CLEANUP
diff --git a/tests/extrac18.at b/tests/extrac18.at
new file mode 100644
index 0000000..5b85d0b
--- /dev/null
+++ b/tests/extrac18.at
@@ -0,0 +1,62 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2011, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Check the functionality of the --keep-old-files option.
+# It should report an error and cause tar to exit with status 2.
+#
+# There was a regression in versions 1.23 to 1.26 inclusive, where
+# this option silently skipped such files.
+# Reported by: Doug McLaren <dougmc@frenzied.us>,
+# Gary Partis <gary@partis.co.uk>,
+# Jim Meyering <jim@meyering.net>
+#
+# References: <20111117045433.GA8245@algol.frenzied.us>,
+# <4F3D824717847C4487F77228F83329A3514CBB@server.Partis.local>,
+# <87wrar6zzz.fsf@rho.meyering.net>
+
+AT_SETUP([keep-old-files])
+AT_KEYWORDS([extract extrac18 old-files keep-old-files])
+
+AT_TAR_CHECK([
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=$?
+
+cat a
+],
+[0],
+[status=2
+File a
+],
+[tar: ./a: Cannot open: File exists
+tar: Exiting with failure status due to previous errors
+])
+
+AT_CLEANUP
+
diff --git a/tests/extrac19.at b/tests/extrac19.at
new file mode 100644
index 0000000..9d918d6
--- /dev/null
+++ b/tests/extrac19.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2011, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([skip-old-files])
+AT_KEYWORDS([extract extrac19 old-files skip-old-files])
+
+AT_TAR_CHECK([
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=$?
+
+cat a
+],
+[0],
+[status=0
+File a
+])
+
+AT_CLEANUP
+
diff --git a/tests/filerem01.at b/tests/filerem01.at
new file mode 100644
index 0000000..4b42ebd
--- /dev/null
+++ b/tests/filerem01.at
@@ -0,0 +1,102 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: when a file in a deep directory disappeared during creation
+# of incremental dump, tar v. <1.23 would exit with TAREXIT_FAILURE (2).
+# However, such events are quite common and don't necessarily constitute
+# an error. Exiting with code 2 in such cases makes it impossible to
+# distinguish serious errors from benign ones.
+#
+# Starting from tar 1.22.90, tar exits with TAREXIT_DIFFERS (1)
+# instead.
+#
+# Reported by: Solar Designer <solar@openwall.com>
+#
+# References: <20090228235820.GA13362@openwall.com>
+# http://lists.gnu.org/archive/html/bug-tar/2009-03/msg00000.html
+#
+
+AT_SETUP([file removed as we read it (ca. 22 seconds)])
+AT_KEYWORDS([create incremental listed filechange filerem filerem01])
+
+AT_TAR_CHECK([
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+genfile --run --checkpoint=3 --unlink dir/file1 -- \
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
+ --checkpoint-action='echo' -c -f archive.tar \
+ --listed-incremental db -v dir >/dev/null
+],
+[1],
+[ignore],
+[tar: dir: Directory is new
+tar: dir/sub: Directory is new
+tar: dir/file1: File removed before we read it
+],[],[],[gnu, posix])
+
+# Timing information:
+#
+# For -Hgnu the above command line takes about 8 seconds to execute and
+# produces:
+#
+# tar: dir: Directory is new
+# tar: dir/sub: Directory is new
+# dir/
+# tar: Write checkpoint 1
+# tar: Write checkpoint 2
+# dir/sub/
+# tar: Write checkpoint 3
+# tar: Write checkpoint 4
+# dir/file1
+# tar: Write checkpoint 5
+# dir/sub/file2
+# tar: Write checkpoint 6
+# tar: Write checkpoint 7
+# tar: Write checkpoint 8
+#
+# For -Hposix the above command line takes about 14 seconds to execute and
+# produces:
+#
+# ./tar: dir: Directory is new
+# ./tar: dir/sub: Directory is new
+# dir/
+# ./tar: Write checkpoint 1
+# ./tar: Write checkpoint 2
+# ./tar: Write checkpoint 3
+# dir/sub/
+# ./tar: Write checkpoint 4
+# ./tar: Write checkpoint 5
+# ./tar: Write checkpoint 6
+# dir/file1
+# ./tar: Write checkpoint 7
+# ./tar: Write checkpoint 8
+# ./tar: Write checkpoint 9
+# dir/sub/file2
+# ./tar: Write checkpoint 10
+# ./tar: Write checkpoint 11
+# ./tar: Write checkpoint 12
+# ./tar: Write checkpoint 13
+# ./tar: Write checkpoint 14
+
+
+AT_CLEANUP
diff --git a/tests/filerem02.at b/tests/filerem02.at
new file mode 100644
index 0000000..b6f9d75
--- /dev/null
+++ b/tests/filerem02.at
@@ -0,0 +1,51 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: see filerem01.at
+# This test case checks if the tar exit code is still 2 if a
+# file or directory disappears that is explicitly mentioned
+# in the command line.
+
+AT_SETUP([toplevel file removed (ca. 24 seconds)])
+AT_KEYWORDS([create incremental listed filechange filerem filerem02])
+
+AT_TAR_CHECK([
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+mkdir dir2
+genfile --file dir2/file1
+
+genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
+ --checkpoint-action='echo' -c -f archive.tar \
+ --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
+],
+[2],
+[ignore],
+[ignore],[],[],[gnu, posix])
+
+# Ignore stdout and stderr because their contents depend on
+# the file system implementation.
+
+# Timing information: see filerem01.at
+
+AT_CLEANUP
diff --git a/tests/genfile.c b/tests/genfile.c
new file mode 100644
index 0000000..219fb5e
--- /dev/null
+++ b/tests/genfile.c
@@ -0,0 +1,986 @@
+/* Generate a file containing some preset patterns.
+ Print statistics for existing files.
+
+ Copyright (C) 1995, 1996, 1997, 2001, 2003, 2004, 2005, 2006, 2007,
+ 2008, 2009, 2016 Free Software Foundation, Inc.
+
+ François Pinard <pinard@iro.umontreal.ca>, 1995.
+ Sergey Poznyakoff <gray@mirddin.farlep.net>, 2004, 2005, 2006, 2007, 2008.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include <system.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <argmatch.h>
+#include <argp.h>
+#include <argcv.h>
+#include <parse-datetime.h>
+#include <inttostr.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <c-ctype.h>
+#define obstack_chunk_alloc malloc
+#define obstack_chunk_free free
+#include <obstack.h>
+
+#ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+#endif
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+#if ! defined SIGCHLD && defined SIGCLD
+# define SIGCHLD SIGCLD
+#endif
+
+enum pattern
+{
+ DEFAULT_PATTERN,
+ ZEROS_PATTERN
+};
+
+/* The name this program was run with. */
+const char *program_name;
+
+/* Name of file to generate */
+static char *file_name;
+
+/* Name of the file-list file: */
+static char *files_from;
+static char filename_terminator = '\n';
+
+/* Length of file to generate. */
+static off_t file_length = 0;
+static off_t seek_offset = 0;
+
+/* Pattern to generate. */
+static enum pattern pattern = DEFAULT_PATTERN;
+
+/* Next checkpoint number */
+size_t checkpoint;
+
+enum genfile_mode
+ {
+ mode_generate,
+ mode_sparse,
+ mode_stat,
+ mode_exec
+ };
+
+enum genfile_mode mode = mode_generate;
+
+#define DEFAULT_STAT_FORMAT \
+ "name,dev,ino,mode,nlink,uid,gid,size,blksize,blocks,atime,mtime,ctime"
+
+/* Format for --stat option */
+static char *stat_format = DEFAULT_STAT_FORMAT;
+
+/* Size of a block for sparse file */
+size_t block_size = 512;
+
+/* Block buffer for sparse file */
+char *buffer;
+
+/* Number of arguments and argument vector for mode == mode_exec */
+int exec_argc;
+char **exec_argv;
+char *checkpoint_option;
+
+/* Time for --touch option */
+struct timespec touch_time;
+
+/* Verbose mode */
+int verbose;
+
+/* Quiet mode */
+int quiet;
+
+const char *argp_program_version = "genfile (" PACKAGE ") " VERSION;
+const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
+static char doc[] = N_("genfile manipulates data files for GNU paxutils test suite.\n"
+"OPTIONS are:\n");
+
+#define OPT_CHECKPOINT 256
+#define OPT_TOUCH 257
+#define OPT_APPEND 258
+#define OPT_TRUNCATE 259
+#define OPT_EXEC 260
+#define OPT_DATE 261
+#define OPT_VERBOSE 262
+#define OPT_SEEK 263
+#define OPT_UNLINK 264
+
+static struct argp_option options[] = {
+#define GRP 0
+ {NULL, 0, NULL, 0,
+ N_("File creation options:"), GRP},
+ {"length", 'l', N_("SIZE"), 0,
+ N_("Create file of the given SIZE"), GRP+1 },
+ {"file", 'f', N_("NAME"), 0,
+ N_("Write to file NAME, instead of standard output"), GRP+1},
+ {"files-from", 'T', N_("FILE"), 0,
+ N_("Read file names from FILE"), GRP+1},
+ {"null", '0', NULL, 0,
+ N_("-T reads null-terminated names"), GRP+1},
+ {"pattern", 'p', N_("PATTERN"), 0,
+ N_("Fill the file with the given PATTERN. PATTERN is 'default' or 'zeros'"),
+ GRP+1 },
+ {"block-size", 'b', N_("SIZE"), 0,
+ N_("Size of a block for sparse file"), GRP+1},
+ {"sparse", 's', NULL, 0,
+ N_("Generate sparse file. Rest of the command line gives the file map."),
+ GRP+1 },
+ {"seek", OPT_SEEK, N_("OFFSET"), 0,
+ N_("Seek to the given offset before writing data"),
+ GRP+1 },
+ {"quiet", 'q', NULL, 0,
+ N_("Suppress non-fatal diagnostic messages") },
+#undef GRP
+#define GRP 10
+ {NULL, 0, NULL, 0,
+ N_("File statistics options:"), GRP},
+
+ {"stat", 'S', N_("FORMAT"), OPTION_ARG_OPTIONAL,
+ N_("Print contents of struct stat for each given file. Default FORMAT is: ")
+ DEFAULT_STAT_FORMAT,
+ GRP+1 },
+
+#undef GRP
+#define GRP 20
+ {NULL, 0, NULL, 0,
+ N_("Synchronous execution options:"), GRP},
+
+ {"run", 'r', N_("OPTION"), OPTION_ARG_OPTIONAL,
+ N_("Execute ARGS. Useful with --checkpoint and one of --cut, --append, --touch, --unlink"),
+ GRP+1 },
+ {"checkpoint", OPT_CHECKPOINT, N_("NUMBER"), 0,
+ N_("Perform given action (see below) upon reaching checkpoint NUMBER"),
+ GRP+1 },
+ {"date", OPT_DATE, N_("STRING"), 0,
+ N_("Set date for next --touch option"),
+ GRP+1 },
+ {"verbose", OPT_VERBOSE, NULL, 0,
+ N_("Display executed checkpoints and exit status of COMMAND"),
+ GRP+1 },
+#undef GRP
+#define GRP 30
+ {NULL, 0, NULL, 0,
+ N_("Synchronous execution actions. These are executed when checkpoint number given by --checkpoint option is reached."), GRP},
+
+ {"cut", OPT_TRUNCATE, N_("FILE"), 0,
+ N_("Truncate FILE to the size specified by previous --length option (or 0, if it is not given)"),
+ GRP+1 },
+ {"truncate", 0, NULL, OPTION_ALIAS, NULL, GRP+1 },
+ {"append", OPT_APPEND, N_("FILE"), 0,
+ N_("Append SIZE bytes to FILE. SIZE is given by previous --length option."),
+ GRP+1 },
+ {"touch", OPT_TOUCH, N_("FILE"), 0,
+ N_("Update the access and modification times of FILE"),
+ GRP+1 },
+ {"exec", OPT_EXEC, N_("COMMAND"), 0,
+ N_("Execute COMMAND"),
+ GRP+1 },
+ {"unlink", OPT_UNLINK, N_("FILE"), 0,
+ N_("Unlink FILE"),
+ GRP+1 },
+#undef GRP
+ { NULL, }
+};
+
+static char const * const pattern_args[] = { "default", "zeros", 0 };
+static enum pattern const pattern_types[] = {DEFAULT_PATTERN, ZEROS_PATTERN};
+
+static int
+xlat_suffix (off_t *vp, const char *p)
+{
+ off_t val = *vp;
+
+ if (p[1])
+ return 1;
+ switch (p[0])
+ {
+ case 'g':
+ case 'G':
+ *vp *= 1024;
+
+ case 'm':
+ case 'M':
+ *vp *= 1024;
+
+ case 'k':
+ case 'K':
+ *vp *= 1024;
+ break;
+
+ default:
+ return 1;
+ }
+ return *vp <= val;
+}
+
+static off_t
+get_size (const char *str, int allow_zero)
+{
+ const char *p;
+ off_t v = 0;
+
+ for (p = str; *p; p++)
+ {
+ int digit = *p - '0';
+ off_t x = v * 10;
+ if (9 < (unsigned) digit)
+ {
+ if (xlat_suffix (&v, p))
+ error (EXIT_FAILURE, 0, _("Invalid size: %s"), str);
+ else
+ break;
+ }
+ else if (x / 10 != v)
+ error (EXIT_FAILURE, 0, _("Number out of allowed range: %s"), str);
+ v = x + digit;
+ if (v < 0)
+ error (EXIT_FAILURE, 0, _("Negative size: %s"), str);
+ }
+ return v;
+}
+
+void
+verify_file (char *file_name)
+{
+ if (file_name)
+ {
+ struct stat st;
+
+ if (stat (file_name, &st))
+ error (0, errno, _("stat(%s) failed"), file_name);
+
+ if (st.st_size != file_length + seek_offset)
+ error (EXIT_FAILURE, 0, _("requested file length %lu, actual %lu"),
+ (unsigned long)st.st_size, (unsigned long)file_length);
+
+ if (!quiet && mode == mode_sparse && !ST_IS_SPARSE (st))
+ error (EXIT_FAILURE, 0, _("created file is not sparse"));
+ }
+}
+
+struct action
+{
+ struct action *next;
+ size_t checkpoint;
+ int action;
+ char *name;
+ off_t size;
+ enum pattern pattern;
+ struct timespec ts;
+};
+
+static struct action *action_list;
+
+void
+reg_action (int action, char *arg)
+{
+ struct action *act = xmalloc (sizeof (*act));
+ act->checkpoint = checkpoint;
+ act->action = action;
+ act->pattern = pattern;
+ act->ts = touch_time;
+ act->size = file_length;
+ act->name = arg;
+ act->next = action_list;
+ action_list = act;
+}
+
+static error_t
+parse_opt (int key, char *arg, struct argp_state *state)
+{
+ switch (key)
+ {
+ case '0':
+ filename_terminator = 0;
+ break;
+
+ case 'f':
+ file_name = arg;
+ break;
+
+ case 'l':
+ file_length = get_size (arg, 1);
+ break;
+
+ case 'p':
+ pattern = XARGMATCH ("--pattern", arg, pattern_args, pattern_types);
+ break;
+
+ case 'b':
+ block_size = get_size (arg, 0);
+ break;
+
+ case 'q':
+ quiet = 1;
+ break;
+
+ case 's':
+ mode = mode_sparse;
+ break;
+
+ case 'S':
+ mode = mode_stat;
+ if (arg)
+ stat_format = arg;
+ break;
+
+ case 'r':
+ mode = mode_exec;
+ if (arg)
+ {
+ argcv_get (arg, "", NULL, &exec_argc, &exec_argv);
+ checkpoint_option = "--checkpoint";
+ }
+ break;
+
+ case 'T':
+ files_from = arg;
+ break;
+
+ case OPT_SEEK:
+ seek_offset = get_size (arg, 0);
+ break;
+
+ case OPT_CHECKPOINT:
+ {
+ char *p;
+
+ checkpoint = strtoul (arg, &p, 0);
+ if (*p)
+ argp_error (state, _("Error parsing number near `%s'"), p);
+ }
+ break;
+
+ case OPT_DATE:
+ if (! parse_datetime (&touch_time, arg, NULL))
+ argp_error (state, _("Unknown date format"));
+ break;
+
+ case OPT_APPEND:
+ case OPT_TRUNCATE:
+ case OPT_TOUCH:
+ case OPT_EXEC:
+ case OPT_UNLINK:
+ reg_action (key, arg);
+ break;
+
+ case OPT_VERBOSE:
+ verbose++;
+ break;
+
+ default:
+ return ARGP_ERR_UNKNOWN;
+ }
+ return 0;
+}
+
+static struct argp argp = {
+ options,
+ parse_opt,
+ N_("[ARGS...]"),
+ doc,
+ NULL,
+ NULL,
+ NULL
+};
+
+
+void
+fill (FILE *fp, off_t length, enum pattern pattern)
+{
+ off_t i;
+
+ switch (pattern)
+ {
+ case DEFAULT_PATTERN:
+ for (i = 0; i < length; i++)
+ fputc (i & 255, fp);
+ break;
+
+ case ZEROS_PATTERN:
+ for (i = 0; i < length; i++)
+ fputc (0, fp);
+ break;
+ }
+}
+
+/* Generate Mode: usual files */
+static void
+generate_simple_file (char *filename)
+{
+ FILE *fp;
+
+ if (filename)
+ {
+ fp = fopen (filename, seek_offset ? "rb+" : "wb");
+ if (!fp)
+ error (EXIT_FAILURE, errno, _("cannot open `%s'"), filename);
+ }
+ else
+ fp = stdout;
+
+ if (fseeko (fp, seek_offset, 0))
+ error (EXIT_FAILURE, errno, "%s", _("cannot seek"));
+
+ fill (fp, file_length, pattern);
+
+ fclose (fp);
+}
+
+/* A simplified version of the same function from tar */
+int
+read_name_from_file (FILE *fp, struct obstack *stk)
+{
+ int c;
+ size_t counter = 0;
+
+ for (c = getc (fp); c != EOF && c != filename_terminator; c = getc (fp))
+ {
+ if (c == 0)
+ error (EXIT_FAILURE, 0, _("file name contains null character"));
+ obstack_1grow (stk, c);
+ counter++;
+ }
+
+ obstack_1grow (stk, 0);
+
+ return (counter == 0 && c == EOF);
+}
+
+void
+generate_files_from_list ()
+{
+ FILE *fp = strcmp (files_from, "-") ? fopen (files_from, "rb") : stdin;
+ struct obstack stk;
+
+ if (!fp)
+ error (EXIT_FAILURE, errno, _("cannot open `%s'"), files_from);
+
+ obstack_init (&stk);
+ while (!read_name_from_file (fp, &stk))
+ {
+ char *name = obstack_finish (&stk);
+ generate_simple_file (name);
+ verify_file (name);
+ obstack_free (&stk, name);
+ }
+ fclose (fp);
+ obstack_free (&stk, NULL);
+}
+
+
+/* Generate Mode: sparse files */
+
+static void
+mkhole (int fd, off_t displ)
+{
+ off_t offset = lseek (fd, displ, SEEK_CUR);
+ if (offset < 0)
+ error (EXIT_FAILURE, errno, "lseek");
+ if (ftruncate (fd, offset) != 0)
+ error (EXIT_FAILURE, errno, "ftruncate");
+}
+
+static void
+mksparse (int fd, off_t displ, char *marks)
+{
+ if (lseek (fd, displ, SEEK_CUR) == -1)
+ error (EXIT_FAILURE, errno, "lseek");
+
+ for (; *marks; marks++)
+ {
+ memset (buffer, *marks, block_size);
+ if (write (fd, buffer, block_size) != block_size)
+ error (EXIT_FAILURE, errno, "write");
+ }
+}
+
+static int
+make_fragment (int fd, char *offstr, char *mapstr)
+{
+ int i;
+ off_t displ = get_size (offstr, 1);
+
+ file_length += displ;
+
+ if (!mapstr || !*mapstr)
+ {
+ mkhole (fd, displ);
+ return 1;
+ }
+ else if (*mapstr == '=')
+ {
+ off_t n = get_size (mapstr + 1, 1);
+
+ switch (pattern)
+ {
+ case DEFAULT_PATTERN:
+ for (i = 0; i < block_size; i++)
+ buffer[i] = i & 255;
+ break;
+
+ case ZEROS_PATTERN:
+ memset (buffer, 0, block_size);
+ break;
+ }
+
+ if (lseek (fd, displ, SEEK_CUR) == -1)
+ error (EXIT_FAILURE, errno, "lseek");
+
+ for (; n; n--)
+ {
+ if (write (fd, buffer, block_size) != block_size)
+ error (EXIT_FAILURE, errno, "write");
+ file_length += block_size;
+ }
+ }
+ else
+ {
+ file_length += block_size * strlen (mapstr);
+ mksparse (fd, displ, mapstr);
+ }
+ return 0;
+}
+
+static void
+generate_sparse_file (int argc, char **argv)
+{
+ int fd;
+ int flags = O_CREAT | O_RDWR | O_BINARY;
+
+ if (!file_name)
+ error (EXIT_FAILURE, 0,
+ _("cannot generate sparse files on standard output, use --file option"));
+ if (!seek_offset)
+ flags |= O_TRUNC;
+ fd = open (file_name, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ if (fd < 0)
+ error (EXIT_FAILURE, errno, _("cannot open `%s'"), file_name);
+
+ buffer = xmalloc (block_size);
+
+ file_length = 0;
+
+ while (argc)
+ {
+ if (argv[0][0] == '-' && argv[0][1] == 0)
+ {
+ char buf[256];
+ while (fgets (buf, sizeof (buf), stdin))
+ {
+ size_t n = strlen (buf);
+
+ while (n > 0 && c_isspace (buf[n-1]))
+ buf[--n] = 0;
+
+ n = strcspn (buf, " \t");
+ buf[n++] = 0;
+ while (buf[n] && c_isblank (buf[n]))
+ ++n;
+ make_fragment (fd, buf, buf + n);
+ }
+ ++argv;
+ --argc;
+ }
+ else
+ {
+ if (make_fragment (fd, argv[0], argv[1]))
+ break;
+ argc -= 2;
+ argv += 2;
+ }
+ }
+
+ close (fd);
+}
+
+
+/* Status Mode */
+
+void
+print_time (time_t t)
+{
+ char buf[20]; /* ccyy-mm-dd HH:MM:SS\0 */
+ strftime (buf, sizeof buf, "%Y-%m-%d %H:%M:%S", gmtime (&t));
+ printf ("%s ", buf);
+}
+
+void
+print_stat (const char *name)
+{
+ char *fmt, *p;
+ struct stat st;
+ char buf[UINTMAX_STRSIZE_BOUND];
+
+ if (stat (name, &st))
+ {
+ error (0, errno, _("stat(%s) failed"), name);
+ return;
+ }
+
+ fmt = strdup (stat_format);
+ for (p = strtok (fmt, ","); p; )
+ {
+ if (memcmp (p, "st_", 3) == 0)
+ p += 3;
+ if (strcmp (p, "name") == 0)
+ printf ("%s", name);
+ else if (strcmp (p, "dev") == 0)
+ printf ("%lu", (unsigned long) st.st_dev);
+ else if (strcmp (p, "ino") == 0)
+ printf ("%lu", (unsigned long) st.st_ino);
+ else if (strncmp (p, "mode", 4) == 0)
+ {
+ unsigned val = st.st_mode;
+
+ if (ispunct ((unsigned char) p[4]))
+ {
+ char *q;
+
+ val &= strtoul (p + 5, &q, 8);
+ if (*q)
+ {
+ printf ("\n");
+ error (EXIT_FAILURE, 0, _("incorrect mask (near `%s')"), q);
+ }
+ }
+ else if (p[4])
+ {
+ printf ("\n");
+ error (EXIT_FAILURE, 0, _("Unknown field `%s'"), p);
+ }
+ printf ("%0o", val);
+ }
+ else if (strcmp (p, "nlink") == 0)
+ printf ("%lu", (unsigned long) st.st_nlink);
+ else if (strcmp (p, "uid") == 0)
+ printf ("%ld", (long unsigned) st.st_uid);
+ else if (strcmp (p, "gid") == 0)
+ printf ("%lu", (unsigned long) st.st_gid);
+ else if (strcmp (p, "size") == 0)
+ printf ("%s", umaxtostr (st.st_size, buf));
+ else if (strcmp (p, "blksize") == 0)
+ printf ("%s", umaxtostr (st.st_blksize, buf));
+ else if (strcmp (p, "blocks") == 0)
+ printf ("%s", umaxtostr (st.st_blocks, buf));
+ else if (strcmp (p, "atime") == 0)
+ printf ("%lu", (unsigned long) st.st_atime);
+ else if (strcmp (p, "atimeH") == 0)
+ print_time (st.st_atime);
+ else if (strcmp (p, "mtime") == 0)
+ printf ("%lu", (unsigned long) st.st_mtime);
+ else if (strcmp (p, "mtimeH") == 0)
+ print_time (st.st_mtime);
+ else if (strcmp (p, "ctime") == 0)
+ printf ("%lu", (unsigned long) st.st_ctime);
+ else if (strcmp (p, "ctimeH") == 0)
+ print_time (st.st_ctime);
+ else if (strcmp (p, "sparse") == 0)
+ printf ("%d", ST_IS_SPARSE (st));
+ else
+ {
+ printf ("\n");
+ error (EXIT_FAILURE, 0, _("Unknown field `%s'"), p);
+ }
+ p = strtok (NULL, ",");
+ if (p)
+ printf (" ");
+ }
+ printf ("\n");
+ free (fmt);
+}
+
+
+/* Exec Mode */
+
+void
+exec_checkpoint (struct action *p)
+{
+ if (verbose)
+ printf ("processing checkpoint %lu\n", (unsigned long) p->checkpoint);
+ switch (p->action)
+ {
+ case OPT_TOUCH:
+ {
+ struct timespec ts[2];
+
+ ts[0] = ts[1] = p->ts;
+ if (utimensat (AT_FDCWD, p->name, ts, 0) != 0)
+ {
+ error (0, errno, _("cannot set time on `%s'"), p->name);
+ break;
+ }
+ }
+ break;
+
+ case OPT_APPEND:
+ {
+ FILE *fp = fopen (p->name, "ab");
+ if (!fp)
+ {
+ error (0, errno, _("cannot open `%s'"), p->name);
+ break;
+ }
+
+ fill (fp, p->size, p->pattern);
+ fclose (fp);
+ }
+ break;
+
+ case OPT_TRUNCATE:
+ {
+ int fd = open (p->name, O_RDWR | O_BINARY);
+ if (fd == -1)
+ {
+ error (0, errno, _("cannot open `%s'"), p->name);
+ break;
+ }
+ if (ftruncate (fd, p->size) != 0)
+ {
+ error (0, errno, _("cannot truncate `%s'"), p->name);
+ break;
+ }
+ close (fd);
+ }
+ break;
+
+ case OPT_EXEC:
+ if (system (p->name) != 0)
+ error (0, 0, _("command failed: %s"), p->name);
+ break;
+
+ case OPT_UNLINK:
+ if (unlink (p->name))
+ error (0, errno, _("cannot unlink `%s'"), p->name);
+ break;
+
+ default:
+ abort ();
+ }
+}
+
+void
+process_checkpoint (size_t n)
+{
+ struct action *p, *prev = NULL;
+
+ for (p = action_list; p; )
+ {
+ struct action *next = p->next;
+
+ if (p->checkpoint <= n)
+ {
+ exec_checkpoint (p);
+ /* Remove the item from the list */
+ if (prev)
+ prev->next = next;
+ else
+ action_list = next;
+ free (p);
+ }
+ else
+ prev = p;
+
+ p = next;
+ }
+}
+
+#define CHECKPOINT_TEXT "Write checkpoint"
+
+void
+exec_command (void)
+{
+ int status;
+ pid_t pid;
+ int fd[2];
+ char *p;
+ FILE *fp;
+ char buf[128];
+
+ /* Insert --checkpoint option.
+ FIXME: This assumes that exec_argv does not use traditional tar options
+ (without dash).
+ FIXME: There is no way to set checkpoint argument (granularity).
+ */
+ if (checkpoint_option)
+ {
+ exec_argc++;
+ exec_argv = xrealloc (exec_argv, (exec_argc + 1) * sizeof (*exec_argv));
+ memmove (exec_argv+2, exec_argv+1,
+ (exec_argc - 1) * sizeof (*exec_argv));
+ exec_argv[1] = checkpoint_option;
+ }
+
+#ifdef SIGCHLD
+ /* System V fork+wait does not work if SIGCHLD is ignored. */
+ signal (SIGCHLD, SIG_DFL);
+#endif
+
+ if (pipe (fd) != 0)
+ error (EXIT_FAILURE, errno, "pipe");
+
+ pid = fork ();
+ if (pid == -1)
+ error (EXIT_FAILURE, errno, "fork");
+
+ if (pid == 0)
+ {
+ /* Child */
+
+ /* Pipe stderr */
+ if (fd[1] != 2)
+ dup2 (fd[1], 2);
+ close (fd[0]);
+
+ /* Make sure POSIX locale is used */
+ setenv ("LC_ALL", "POSIX", 1);
+
+ execvp (exec_argv[0], exec_argv);
+ error (EXIT_FAILURE, errno, "execvp %s", exec_argv[0]);
+ }
+
+ /* Master */
+ close (fd[1]);
+ fp = fdopen (fd[0], "rb");
+ if (fp == NULL)
+ error (EXIT_FAILURE, errno, "fdopen");
+
+ while ((p = fgets (buf, sizeof buf, fp)))
+ {
+ while (*p && !isspace ((unsigned char) *p) && *p != ':')
+ p++;
+
+ if (*p == ':')
+ {
+ for (p++; *p && isspace ((unsigned char) *p); p++)
+ ;
+
+ if (*p
+ && memcmp (p, CHECKPOINT_TEXT, sizeof CHECKPOINT_TEXT - 1) == 0)
+ {
+ char *end;
+ size_t n = strtoul (p + sizeof CHECKPOINT_TEXT - 1, &end, 10);
+ if (!(*end && !isspace ((unsigned char) *end)))
+ {
+ process_checkpoint (n);
+ continue;
+ }
+ }
+ }
+ fprintf (stderr, "%s", buf);
+ }
+
+ /* Collect exit status */
+ waitpid (pid, &status, 0);
+
+ if (verbose)
+ {
+ if (WIFEXITED (status))
+ {
+ if (WEXITSTATUS (status) == 0)
+ printf (_("Command exited successfully\n"));
+ else
+ printf (_("Command failed with status %d\n"),
+ WEXITSTATUS (status));
+ }
+ else if (WIFSIGNALED (status))
+ printf (_("Command terminated on signal %d\n"), WTERMSIG (status));
+ else if (WIFSTOPPED (status))
+ printf (_("Command stopped on signal %d\n"), WSTOPSIG (status));
+#ifdef WCOREDUMP
+ else if (WCOREDUMP (status))
+ printf (_("Command dumped core\n"));
+#endif
+ else
+ printf(_("Command terminated\n"));
+ }
+
+ if (WIFEXITED (status))
+ exit (WEXITSTATUS (status));
+ exit (EXIT_FAILURE);
+}
+
+int
+main (int argc, char **argv)
+{
+ int index;
+
+ program_name = argv[0];
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ parse_datetime (&touch_time, "now", NULL);
+
+ /* Decode command options. */
+
+ if (argp_parse (&argp, argc, argv, 0, &index, NULL))
+ exit (EXIT_FAILURE);
+
+ argc -= index;
+ argv += index;
+
+ switch (mode)
+ {
+ case mode_stat:
+ if (argc == 0)
+ error (EXIT_FAILURE, 0, _("--stat requires file names"));
+
+ while (argc--)
+ print_stat (*argv++);
+ break;
+
+ case mode_sparse:
+ generate_sparse_file (argc, argv);
+ verify_file (file_name);
+ break;
+
+ case mode_generate:
+ if (argc)
+ error (EXIT_FAILURE, 0, _("too many arguments"));
+ if (files_from)
+ generate_files_from_list ();
+ else
+ {
+ generate_simple_file (file_name);
+ verify_file (file_name);
+ }
+ break;
+
+ case mode_exec:
+ if (!checkpoint_option)
+ {
+ exec_argc = argc;
+ exec_argv = argv;
+ }
+ else if (argc)
+ error (EXIT_FAILURE, 0, _("too many arguments"));
+ exec_command ();
+ break;
+
+ default:
+ /* Just in case */
+ abort ();
+ }
+ exit (EXIT_SUCCESS);
+}
diff --git a/tests/grow.at b/tests/grow.at
new file mode 100644
index 0000000..4bd1c0e
--- /dev/null
+++ b/tests/grow.at
@@ -0,0 +1,39 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar should exit with error code 1 (file differs) if any files have
+# changed during archiving.
+
+AT_SETUP([grow])
+AT_KEYWORDS([grow filechange])
+
+AT_TAR_CHECK([
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+],
+[1],
+[foo
+baz
+],
+[tar: foo: file changed as we read it
+])
+
+AT_CLEANUP
diff --git a/tests/gzip.at b/tests/gzip.at
new file mode 100644
index 0000000..81cfb06
--- /dev/null
+++ b/tests/gzip.at
@@ -0,0 +1,43 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2007, 2009-2010, 2013-2014, 2016 Free Software
+# Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# tar should detect that its gzip child failed.
+
+AT_SETUP([gzip])
+AT_KEYWORDS([gzip])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_GZIP_PREREQ
+tar xfvz /dev/null 2>err
+RC=$?
+sed -n '/^tar:/p' err >&2
+exit $RC
+],
+[2],
+[],
+[tar: Child returned status 1
+tar: Error is not recoverable: exiting now
+],
+[],[])
+
+AT_CLEANUP
diff --git a/tests/ignfail.at b/tests/ignfail.at
new file mode 100644
index 0000000..4eef985
--- /dev/null
+++ b/tests/ignfail.at
@@ -0,0 +1,78 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Unreadable directories yielded error despite --ignore-failed-read.
+
+AT_SETUP([ignfail])
+AT_KEYWORDS([ignfail])
+
+AT_TAR_CHECK([
+# The test is meaningless for super-user.
+AT_UNPRIVILEGED_PREREQ
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=$?
+chmod 600 file
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=$?
+chmod 600 file
+test $status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=$?
+chmod 700 directory
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=$?
+chmod 700 directory
+test $status = 0
+],
+[0],
+[],
+[
+-----
+tar: file: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+])
+
+AT_CLEANUP
diff --git a/tests/incr01.at b/tests/incr01.at
new file mode 100644
index 0000000..1af6ec6
--- /dev/null
+++ b/tests/incr01.at
@@ -0,0 +1,55 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005, 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description:
+# Check if restore from incremental backups does not choke on dangling
+# symlinks.
+# References: <20050821163500.2772914828A@blake.inputplus.co.uk>
+# http://lists.gnu.org/archive/html/bug-tar/2005-08/msg00023.html
+
+AT_SETUP([restore broken symlinks from incremental])
+AT_KEYWORDS([incremental incr01])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+
+mkdir directory
+$as_ln_s foo directory/bar
+
+tar -cf archive.0 -g db directory
+rm directory/bar
+tar -cf archive.1 -g db directory
+
+mv directory orig
+
+tar xvfg archive.0 /dev/null --warning=no-timestamp
+echo separator
+tar xvfg archive.1 /dev/null --warning=no-timestamp
+],
+[0],
+[directory/
+directory/bar
+separator
+directory/
+tar: Deleting 'directory/bar'
+],
+[],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
diff --git a/tests/incr02.at b/tests/incr02.at
new file mode 100644
index 0000000..7396f6c
--- /dev/null
+++ b/tests/incr02.at
@@ -0,0 +1,78 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005, 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description:
+# Restoring of directory modes and timestamps works correctly only
+# if the archive has normal member ordering, i.e. each directory
+# member is immediately followed by members located under that directory.
+# This is not true for incremental archives, where directory members
+# precede the non-directory ones. Due to this, GNU tar up to version 1.15.2
+# failed to correctly restore directory timestamps from an incremental
+# archive if this directory contained some files in it.
+#
+# References: <200511291228.47081.karaman@dssgmbh.de>
+
+AT_SETUP([restoring timestamps from incremental])
+AT_KEYWORDS([incremental timestamp restore incr02])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+# Create directory structure
+mkdir dir
+mkdir dir/subdir1
+mkdir dir/subdir2
+genfile --length 10 --file dir/subdir1/file
+
+# Save mtime for later comparison
+genfile --stat=mtime dir/subdir1 > ts
+
+# Create an archive. Using incremental mode makes sure the
+# archive will have a directory-first member ordering,
+# i.e.:
+# dir/
+# dir/subdir1/
+# dir/subdir2/
+# dir/subdir1/foofile
+#
+# When restoring from this directory structure, 'dir/subdir2/' used to
+# trigger apply_nonancestor_delayed_set_stat() which restored stats for
+# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
+# latter clobbered the directory timestamp.
+
+tar -cf archive -g db dir
+
+# Move away the directory
+mv dir orig
+
+# Wait enough time for timestamps to differ in case of failure.
+sleep 5
+
+# Restore the directory
+tar -xf archive dir
+
+# Check the timestamp
+genfile --stat=mtime dir/subdir1 | diff ts -
+],
+[0],
+[],[],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of incr02.at
diff --git a/tests/incr03.at b/tests/incr03.at
new file mode 100644
index 0000000..d6301a7
--- /dev/null
+++ b/tests/incr03.at
@@ -0,0 +1,82 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description:
+# Previous versions checked only mtime/ctime of directories during
+# incremental backups. As a result, it sufficed to rename a single file
+# to get full dump of the directory where it resided. Since v.1.15.91
+# tar checks directory contents as well, so in this case only the renamed
+# file is dumped.
+
+AT_SETUP([renamed files in incrementals])
+AT_KEYWORDS([incremental incr03 rename])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+AT_SORT_PREREQ
+mkdir directory
+genfile --file=directory/x
+genfile --file=directory/y
+
+sleep 1
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+cp db db.old
+tar -cf archive.2 -g db directory
+
+mv directory orig
+
+echo Listing of archive.1
+tar -tf archive.1 | sort
+echo Listing of archive.2
+tar -tf archive.2 | sort
+
+echo Directory after first restore
+tar -xf archive.1 -g db --warning=no-timestamp
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db --warning=no-timestamp
+find directory | sort
+],
+[0],
+[Listing of archive.1
+directory/
+directory/x
+directory/y
+Listing of archive.2
+directory/
+directory/z
+Directory after first restore
+directory
+directory/x
+directory/y
+Directory after second restore
+directory
+directory/y
+directory/z
+],[],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of incr03.at
diff --git a/tests/incr04.at b/tests/incr04.at
new file mode 100644
index 0000000..0d1305d
--- /dev/null
+++ b/tests/incr04.at
@@ -0,0 +1,69 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Rewritten incremental backup support (2006-05-08)
+# missed initialization of all struct directory members in make_directory,
+# which lead to random core dumps.
+# Reported by Sergey Myasnikov <tigra@sw.ru>. This testcase uses original
+# script provided by him.
+# References: <1148669592.5127.81.camel@tigra.sw.ru>
+# http://lists.gnu.org/archive/html/bug-tar/2006-05/msg00038.html
+
+AT_SETUP([proper icontents initialization])
+AT_KEYWORDS([incremental incr04 icontents])
+
+m4_pushdef([NAME_PREFIX],[a/b/one_31_chars_long_file_name_])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+AT_TAR_MKHIER(a/b)
+awk 'BEGIN {
+ for (i=1;i<=142;i++)
+ printf("NAME_PREFIX[%03d]\n", i);
+ }' < /dev/null | genfile --files-from -
+
+sleep 1
+
+echo "Initial dump"
+tar cvf a0.tar -g a.sna a
+mv a/b a/c
+echo "Incremental dump"
+tar cvf a1.tar -g a.sna a
+],
+[0],
+[Initial dump
+a/
+a/b/
+m4_for(I,1,142,1,[NAME_PREFIX[]m4_if(m4_len(I),1,00,m4_len(I),2,0)I
+])dnl
+Incremental dump
+a/
+a/c/
+],
+[tar: a: Directory is new
+tar: a/b: Directory is new
+tar: a/c: Directory has been renamed from 'a/b'
+],[],[],[gnu, oldgnu, posix])
+
+m4_popdef([NAME_PREFIX])
+AT_CLEANUP
+
+# End of incr04.at
diff --git a/tests/incr05.at b/tests/incr05.at
new file mode 100644
index 0000000..fbb4ac4
--- /dev/null
+++ b/tests/incr05.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([incremental dumps with -C])
+AT_KEYWORDS([incremental incr05])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+echo Level 0
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+
+genfile --file dir/file3
+echo Level 1
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+],
+[0],
+[Level 0
+./
+./sub/
+./file1
+./sub/file2
+Level 1
+./
+./sub/
+./file3
+],[],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
diff --git a/tests/incr06.at b/tests/incr06.at
new file mode 100644
index 0000000..2509461
--- /dev/null
+++ b/tests/incr06.at
@@ -0,0 +1,80 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([incremental dumps of nested directories])
+AT_KEYWORDS([incremental incr06])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+mkdir dir/sub/b
+genfile --file dir/file1
+genfile --file dir/sub/file2
+genfile --file dir/sub/a/file3
+
+echo Level 0 . sub
+tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 0 sub .
+tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+
+mkdir dir/c
+genfile --file dir/sub/b/file4
+
+echo Level 1 . sub
+tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 1 sub .
+tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+],
+[0],
+[Level 0 . sub
+./
+sub/
+sub/a/
+sub/b/
+./file1
+sub/file2
+sub/a/file3
+Level 0 sub .
+./
+sub/
+sub/a/
+sub/b/
+./file1
+sub/file2
+sub/a/file3
+Level 1 . sub
+./
+./c/
+sub/
+sub/a/
+sub/b/
+sub/b/file4
+Level 1 sub .
+./
+./c/
+sub/
+sub/a/
+sub/b/
+sub/b/file4
+],[],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
diff --git a/tests/incr07.at b/tests/incr07.at
new file mode 100644
index 0000000..a5b8867
--- /dev/null
+++ b/tests/incr07.at
@@ -0,0 +1,113 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([incremental restores with -C])
+AT_KEYWORDS([incremental extract incr07])
+
+# Tar 1.26 had problems extracting from incremental restores when given
+# the -C option. The code in incremen.c:try_purge_directory and
+# misc.c:remove_any_file was using savedir(), which ignored eventual changes
+# in the current working directory and caused the malfunctioning.
+#
+# The problem was reported by Piotr Rotter on 2013-03-22.
+#
+# This testcase is based on scripts provided by Piotr Rotter and Nathan
+# Stratton Treadway.
+#
+# References: <514C8F56.90900@active24.pl>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00036.html,
+# <20130326181922.GZ3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00042.html,
+# <20130327051828.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00043.html,
+# <20130327054957.GB3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00044.html
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+mkdir dirA
+echo 'a' > dirA/a
+echo 'a' > dirA/b
+
+decho C0
+tar -g test.snar -vcf test.0.tar dirA
+
+echo 'a' > dirA/c
+decho C1
+tar -g test.snar -vcf test.1.tar dirA
+
+rm -f dirA/a
+decho C2
+tar -g test.snar -vcf test.2.tar dirA
+
+mkdir ext
+rm -rf dirA
+
+decho E0
+tar -g test.snar -vxf test.0.tar -C ext/
+decho E1
+tar -g test.snar -vxf test.1.tar -C ext/
+
+decho E2
+tar -g test.snar -vxf test.2.tar -C ext/
+
+mkdir ext/dirA/dirB
+touch ext/dirA/dirB/file
+
+decho E3
+tar -g test.snar -vxf test.2.tar -C ext/
+
+echo FIN
+test -d dirA && echo >&2 "toplevel dirA exists"
+exit 0
+],
+[0],
+[C0
+dirA/
+dirA/a
+dirA/b
+C1
+dirA/
+dirA/c
+C2
+dirA/
+E0
+dirA/
+dirA/a
+dirA/b
+E1
+dirA/
+dirA/c
+E2
+dirA/
+tar: Deleting 'dirA/a'
+E3
+dirA/
+tar: Deleting 'dirA/dirB'
+FIN
+],
+[C0
+tar: dirA: Directory is new
+C1
+C2
+E0
+E1
+E2
+E3
+],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
diff --git a/tests/incr08.at b/tests/incr08.at
new file mode 100644
index 0000000..e74be3d
--- /dev/null
+++ b/tests/incr08.at
@@ -0,0 +1,87 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: In tar 1.26 listed-incremental with -C and absolute path
+# would malfunction under certain conditions due to buggy filename
+# normalization.
+#
+# The value returned by normalize_filename() is used to populate the "caname"
+# field in both the "directory" structure in incremen.c and the "name"
+# structure in names.c, and in both cases that field is then used in the
+# "hash" and "compare" functions for the related hash tables. Thus, the
+# fact that the returned value doesn't reflect the operation of previous
+# "-C" options means that it's possible for two different directories to
+# be given the same "caname" value in the hashed structure and thus end up
+# being confused with each other.
+#
+# The bug is triggered when dumping both relative paths after -C and
+# absolute paths that match the process' current working directory.
+#
+# Reported by: Nathan Stratton Treadway <nathanst@ontko.com>
+# References: <20130922192135.GJ32256@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00034.html
+
+AT_SETUP([filename normalization])
+AT_KEYWORDS([incremental create incr08])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+AT_SORT_PREREQ
+mkdir tartest
+cd tartest
+mkdir foo
+mkdir foo/subdir
+mkdir foo/subdir/dir1
+mkdir subdir
+mkdir subdir/dir2
+decho A
+find .|sort
+
+decho B
+DIR=`pwd`
+tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . $DIR 2>../err |\
+ sed "s|$DIR|ABSPATH|"
+sed "s|$DIR|ABSPATH|" ../err >&2
+],
+[0],
+[A
+.
+./foo
+./foo/subdir
+./foo/subdir/dir1
+./subdir
+./subdir/dir2
+B
+./
+./subdir/
+./subdir/dir1/
+ABSPATH/
+ABSPATH/subdir/
+ABSPATH/subdir/dir2/
+],
+[A
+B
+tar: .: Directory is new
+tar: ./subdir: Directory is new
+tar: ./subdir/dir1: Directory is new
+tar: ABSPATH: Directory is new
+tar: ABSPATH/subdir: Directory is new
+tar: ABSPATH/subdir/dir2: Directory is new
+tar: Removing leading `/' from member names
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/incr09.at b/tests/incr09.at
new file mode 100644
index 0000000..983bdc2
--- /dev/null
+++ b/tests/incr09.at
@@ -0,0 +1,68 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: For some intermediate versions of tar 1.26.90,
+# tar would fail to correctly cannonicalize archive member names
+# in incremental mode if there was a -C options with an absolute path
+# on the command line without any archive members specified within that
+# directory. (In that case, the canonical name generated for
+# members specified after later -C options wouldn't correctly reflect the
+# previous absolute path.)
+
+AT_SETUP([incremental with alternating -C])
+AT_KEYWORDS([incremental create incr09])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+AT_SORT_PREREQ
+mkdir foo bar middle
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+echo middle/file > middle/middle_file
+decho A
+tar -cvf foo.tar --incremental -C foo . -C `pwd` middle -C bar .
+
+rm foo.tar
+>toplevel_file
+decho B
+tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file -C bar .
+],
+[0],
+[A
+./
+./
+middle/
+./bar_file
+./foo_file
+middle/middle_file
+B
+./
+./
+toplevel_file
+./bar_file
+./foo_file
+],
+[A
+tar: .: Directory is new
+tar: middle: Directory is new
+tar: .: Directory is new
+B
+tar: .: Directory is new
+tar: .: Directory is new
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/incr10.at b/tests/incr10.at
new file mode 100644
index 0000000..cc77d49
--- /dev/null
+++ b/tests/incr10.at
@@ -0,0 +1,65 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2015-2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([concatenated incremental archives (deletes)])
+AT_KEYWORDS([incremental concat cat incr10])
+
+# Description: Extraction from concatenated incremental archives
+# produced spurious error messages when trying to set file ownership
+# and permissions on deleted directories.
+# Reported by: Alex Efros <powerman@powerman.name>
+# References: <20150411224008.GO24600@home.power>
+# http://lists.gnu.org/archive/html/bug-tar/2015-04/msg00003.html
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+mkdir in
+mkdir in/dir
+decho Level 0
+tar -cvf 1.tar -g snap -C in .
+rmdir in/dir
+decho Level 1
+tar -cvf 2.tar -g snap -C in .
+cp 1.tar full.tar
+decho Concat
+tar -A 2.tar -f full.tar -g /dev/null
+decho Extract
+mkdir out
+tar -xvf full.tar -g /dev/null -C out
+],
+[0],
+[Level 0
+./
+./dir/
+Level 1
+./
+Concat
+Extract
+./
+./dir/
+./
+tar: Deleting './dir'
+],
+[Level 0
+tar: .: Directory is new
+tar: ./dir: Directory is new
+Level 1
+Concat
+Extract
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/incr11.at b/tests/incr11.at
new file mode 100644
index 0000000..061a8db
--- /dev/null
+++ b/tests/incr11.at
@@ -0,0 +1,76 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2015-2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Extraction from concatenated incremental archives
+# produced spurious error messages when trying to set file ownership
+# and permissions on renamed directories
+# Reported by: Alex Efros <powerman@powerman.name>
+# References: <20151129094003.GD18347@home.power>
+# http://lists.gnu.org/archive/html/bug-tar/2015-11/msg00033.html
+
+AT_SETUP([concatenated incremental archives (renames)])
+AT_KEYWORDS([incremental concat cat incr11])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+AT_SORT_PREREQ
+AT_TAR_MKHIER([data/dir],[file])
+decho Level 0
+tar -cvf full.tar -g snap -C data .
+decho Level 1
+mv data/dir data/dir2
+tar -cvf incr.tar -g snap -C data .
+decho Concat
+cp full.tar full2.tar
+tar -A -f full2.tar incr.tar
+decho Extract
+mkdir out
+tar -xvf full2.tar -g /dev/null -C out
+decho List
+find out | sort
+],
+[0],
+[Level 0
+./
+./dir/
+./dir/file
+Level 1
+./
+./dir2/
+Concat
+Extract
+./
+./dir/
+./dir/file
+./
+./dir2/
+List
+out
+out/dir2
+out/dir2/file
+],
+[Level 0
+tar: .: Directory is new
+tar: ./dir: Directory is new
+Level 1
+tar: ./dir2: Directory has been renamed from './dir'
+Concat
+Extract
+List
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/incremental.at b/tests/incremental.at
new file mode 100644
index 0000000..0b8a977
--- /dev/null
+++ b/tests/incremental.at
@@ -0,0 +1,65 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# A directory older than the listed entry was skipped completely.
+
+AT_SETUP([incremental])
+AT_KEYWORDS([incremental listed incr00])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+
+mkdir structure
+echo x >structure/file
+
+# On Nextstep (and perhaps other 4.3BSD systems),
+# a newly created file's ctime isn't updated
+# until the next sync or stat operation on the file.
+ls -l structure/file >/dev/null
+
+# If the time of an initial backup and the creation time of a file contained
+# in that backup are the same, the file will be backed up again when an
+# incremental backup is done, because the incremental backup backs up
+# files created "on or after" the initial backup time. Without the sleep
+# command, behaviour of tar becomes variable, depending whether the system
+# clock ticked over to the next second between creating the file and
+# backing it up.
+sleep 1
+
+tar cf archive --listed=list structure
+tar cfv archive --listed=list structure
+echo separator
+# ReiserFS often offsets the timestamps of newly created files
+# 1 second to the past. Try to compensate for it, until a better
+# solution is found.
+sleep 2
+echo y >structure/file
+tar cfv archive --listed=list structure
+],
+[0],
+[
+structure/
+separator
+structure/
+structure/file
+],
+[],[],[],[gnu,oldgnu,posix])
+
+AT_CLEANUP
diff --git a/tests/indexfile.at b/tests/indexfile.at
new file mode 100644
index 0000000..15083b6
--- /dev/null
+++ b/tests/indexfile.at
@@ -0,0 +1,47 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# tar --index-file=FILE --file=- sent the archive to FILE, and
+# the listing to stderr.
+# Reported by Marcin Gryszkalis <mg@fork.pl>
+# References: <200607061943.06645.mg@fork.pl>
+
+AT_SETUP([tar --index-file=FILE --file=-])
+AT_KEYWORDS([stdout indexfile])
+
+AT_TAR_CHECK([
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo "Creating the archive"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo "Testing the archive"
+tar -tf archive
+],
+[0],
+[Creating the archive
+Testing the archive
+directory/
+directory/a
+])
+
+AT_CLEANUP
diff --git a/tests/label01.at b/tests/label01.at
new file mode 100644
index 0000000..a601ab4
--- /dev/null
+++ b/tests/label01.at
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([single-volume label])
+AT_KEYWORDS([label label01])
+
+AT_TAR_CHECK([
+genfile --file foo
+genfile --file bar
+tar -cf archive --label=Test foo bar
+tar tf archive
+],
+[0],
+[Test
+foo
+bar
+],
+[],[],[],[gnu,oldgnu,posix])
+
+AT_CLEANUP
diff --git a/tests/label02.at b/tests/label02.at
new file mode 100644
index 0000000..af47da1
--- /dev/null
+++ b/tests/label02.at
@@ -0,0 +1,40 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([multi-volume label])
+AT_KEYWORDS([label label02 multi-label multivolume multiv])
+
+AT_TAR_CHECK([
+exec <&-
+genfile --length 0 --file foo
+genfile --length 12288 --file bar
+genfile --length 12288 --file baz
+tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
+tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
+],
+[0],
+[Test Volume 1
+foo
+bar
+baz
+],
+[],[],[],[gnu,oldgnu,posix])
+
+AT_CLEANUP
diff --git a/tests/label03.at b/tests/label03.at
new file mode 100644
index 0000000..5e44288
--- /dev/null
+++ b/tests/label03.at
@@ -0,0 +1,89 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Test the functionality of the --test-label option.
+# In versions up to 1.23 it did not match the documentation. This
+# test case follows the examples from "9.7 Including a Label in the Archive".
+# References: <15929_1268069389_4B95340D_15929_35_1_D621E31C29598A43AF7B4BBD30CCDDFD0838294A@fr0-mailmb04.res.airbus.corp>
+#
+
+AT_SETUP([test-label option])
+AT_KEYWORDS([label label03 test-label])
+
+AT_TAR_CHECK([
+exec <&-
+genfile --file file
+tar -c --label='iamalabel' --file iamanarchive file
+tar -c --file unlabeled.tar file
+decho "# Display label"
+tar --test-label --file=iamanarchive; echo $?
+decho "# Display label: unlabeled"
+tar --test-label --file=unlabeled.tar; echo $?
+decho "# Test label: success"
+tar --test-label --file=iamanarchive 'iamalabel'; echo $?
+decho "# Test label: failure"
+tar --test-label --file=iamanarchive 'amalabel'; echo $?
+decho "# Test label: unlabeled"
+tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
+decho "# Test label, verbose: success"
+tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
+decho "# Test label, verbose: failure"
+tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
+decho "# Test label: multiple arguments"
+tar --test-label --file=iamanarchive a iamalabel b; echo $?
+decho "# Test label: wildcards"
+tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
+],
+[0],
+[# Display label
+iamalabel
+0
+# Display label: unlabeled
+0
+# Test label: success
+0
+# Test label: failure
+1
+# Test label: unlabeled
+1
+# Test label, verbose: success
+iamalabel
+0
+# Test label, verbose: failure
+iamalabel
+1
+# Test label: multiple arguments
+0
+# Test label: wildcards
+0
+],
+[# Display label
+# Display label: unlabeled
+# Test label: success
+# Test label: failure
+# Test label: unlabeled
+# Test label, verbose: success
+# Test label, verbose: failure
+tar: Archive label mismatch
+# Test label: multiple arguments
+# Test label: wildcards
+],[],[],[gnu,oldgnu,posix])
+
+AT_CLEANUP
diff --git a/tests/label04.at b/tests/label04.at
new file mode 100644
index 0000000..aa71f54
--- /dev/null
+++ b/tests/label04.at
@@ -0,0 +1,53 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Test the functionality of the --label option used in
+# conjunction with an operation, other than create. It was broken
+# in versions up to 1.23.
+# References: <15929_1268069389_4B95340D_15929_35_1_D621E31C29598A43AF7B4BBD30CCDDFD0838294A@fr0-mailmb04.res.airbus.corp>
+#
+
+AT_SETUP([label with non-create option])
+AT_KEYWORDS([label label04])
+
+AT_TAR_CHECK([
+exec <&-
+genfile --file file
+decho "# Create volume"
+tar -c -f archive --label='New volume' file
+decho "# Update: wrong label"
+tar -rf archive --label='My volume' file; echo $?
+decho "# Update: right label"
+tar -rf archive --label='New volume' file
+],
+[0],
+[# Create volume
+# Update: wrong label
+2
+# Update: right label
+],
+[# Create volume
+# Update: wrong label
+tar: Volume 'New volume' does not match 'My volume'
+tar: Error is not recoverable: exiting now
+# Update: right label
+],[],[],[gnu,oldgnu,posix])
+
+AT_CLEANUP
diff --git a/tests/label05.at b/tests/label05.at
new file mode 100644
index 0000000..5cc2368
--- /dev/null
+++ b/tests/label05.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: See label04. This testcase uses an unlabeled archive
+# volume.
+
+AT_SETUP([label with non-create option])
+AT_KEYWORDS([label label05])
+
+AT_TAR_CHECK([
+exec <&-
+genfile --file file
+decho "# Create volume"
+tar -c -f archive file
+decho "# Update: wrong label"
+tar -rf archive --label='My volume' file; echo $?
+decho "# Update: right label"
+tar -rf archive file
+],
+[0],
+[# Create volume
+# Update: wrong label
+2
+# Update: right label
+],
+[# Create volume
+# Update: wrong label
+tar: Archive not labeled to match 'My volume'
+tar: Error is not recoverable: exiting now
+# Update: right label
+],[],[],[gnu,oldgnu,posix])
+
+AT_CLEANUP
diff --git a/tests/link01.at b/tests/link01.at
new file mode 100644
index 0000000..b00047e
--- /dev/null
+++ b/tests/link01.at
@@ -0,0 +1,56 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Problem: If a member with link count > 2 was stored in the archive twice,
+# previous versions of tar were not able to extract it, since they
+# were trying to link the file to itself, which always failed and
+# lead to removing the already extracted copy. This script tests
+# the workaround by Paul Eggert that leaves the extracted copy
+# untouched.
+#
+# Reported by: Toby Peterson <toby@apple.com>
+#
+# References: <2330D503-D20A-11D8-A0CF-00039391EECE@apple.com>
+# http://lists.gnu.org/archive/html/bug-tar/2004-07/msg00009.html
+
+AT_SETUP([link count gt 2])
+AT_KEYWORDS([hardlinks link01])
+
+AT_TAR_CHECK([
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || AT_SKIP_TEST
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+],
+[0],
+[test.txt
+])
+
+AT_CLEANUP
diff --git a/tests/link02.at b/tests/link02.at
new file mode 100644
index 0000000..f69f28c
--- /dev/null
+++ b/tests/link02.at
@@ -0,0 +1,51 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.22 failed to recognize last hard link when creating an archive with
+# the --remove-files option.
+#
+# Reported by: "Theodore Y. Ts'o" <tytso@mit.edu>,
+# Carl Worth <cworth@cworth.org>
+# References:
+# <E194EAe-0001lE-00@think.thunk.org>
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=188663
+# <1248955024.1545.1.camel@yoom.home.cworth.org>
+# http://lists.gnu.org/archive/html/bug-tar/2009-07/msg00015.html
+
+AT_SETUP([preserve hard links with --remove-files])
+AT_KEYWORDS([hardlinks link02])
+
+AT_TAR_CHECK([
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[[2-4]] link to //p'
+],
+[0],
+[file1
+file1
+file1
+])
+
+AT_CLEANUP
+
+# End of link02.at
diff --git a/tests/link03.at b/tests/link03.at
new file mode 100644
index 0000000..c21e5c9
--- /dev/null
+++ b/tests/link03.at
@@ -0,0 +1,55 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure -l option works correctly in conjunction with --remove-files
+# See also link02.at
+
+AT_SETUP([working -l with --remove-files])
+AT_KEYWORDS([hardlinks link03])
+
+m4_pushdef([create_files],[
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+])
+
+AT_TAR_CHECK([
+create_files
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+create_files
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[[2-3]] link to //p'
+],
+[0],
+[archive.1
+archive.2
+testing archive.2
+file1
+file1
+],
+[tar: Missing links to 'file1'.
+])
+
+m4_popdef([create_files])
+AT_CLEANUP
diff --git a/tests/link04.at b/tests/link04.at
new file mode 100644
index 0000000..46d1b12
--- /dev/null
+++ b/tests/link04.at
@@ -0,0 +1,69 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+# Make sure that tar -c correctly handles the case where a file is
+# encountered multiple times, even though it has a link count of 1.
+# This can occur when "tar -c FOO FOO" is used; it can also occur when
+# "tar -ch FOO" is used, if FOO contains symbolic links that point to
+# the same file.
+
+AT_SETUP([link count is 1 but multiple occurrences])
+AT_KEYWORDS([hardlinks link04])
+
+AT_TAR_CHECK([
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || AT_SKIP_TEST
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[[0-9]] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[[0-9]] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+],
+[0],
+[dir/
+dir/
+dir/file
+dir/file link to dir/file
+dir/symlink -> file
+dir/symlink link to dir/symlink
+--
+==
+dir/
+dir/FOO
+dir/FOO link to dir/FOO
+])
+
+AT_CLEANUP
diff --git a/tests/listed01.at b/tests/listed01.at
new file mode 100644
index 0000000..fc0a356
--- /dev/null
+++ b/tests/listed01.at
@@ -0,0 +1,65 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004-2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check if listed-incremental backups work for individual files.
+# Script proposed by Andreas Schuldei <andreas@schuldei.org>
+# References: <20040215014223.GA9699@lukas.schuldei.com>
+# http://lists.gnu.org/archive/html/bug-tar/2004-02/msg00011.html
+
+AT_SETUP([--listed for individual files])
+AT_KEYWORDS([listed incremental listed01])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+# Let the things settle
+sleep 1
+
+tar --create \
+ --file=archive.1 \
+ --listed-incremental=listing \
+ directory/file*
+
+tar tf archive.1 || exit 1
+
+sleep 2
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo "separator"
+cp listing listing.old
+tar --create \
+ --file=archive.2 \
+ --listed-incremental=listing \
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+],
+[0],
+[directory/file1
+separator
+directory/file2
+],
+[],[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/listed02.at b/tests/listed02.at
new file mode 100644
index 0000000..153644b
--- /dev/null
+++ b/tests/listed02.at
@@ -0,0 +1,159 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004-2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check if listed-incremental backups work for files moved from one directory
+# to another.
+# Based on a script by Martin Simmons <ZYHYLCRMZPRP@spammotel.com>
+# References:
+# <20040626230315.163AA1D148@cpc5-cmbg1-6-0-cust208.cmbg.cable.ntl.com>
+# http://lists.gnu.org/archive/html/bug-tar/2004-06/msg00028.html
+
+AT_SETUP([working --listed])
+AT_KEYWORDS([listed incremental listed02])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+AT_SORT_PREREQ
+echo Create directories
+
+mkdir tart
+sleep 1
+mkdir tart/c0
+sleep 1
+mkdir tart/c1
+sleep 1
+
+for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
+do
+ echo File $file > $file
+ sleep 1
+done
+
+sleep 1
+echo Creating main archive
+echo >&2 "Creating main archive"
+tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
+
+# The above prints two lines to stderr announcing the new directories c0 and c1.
+# Ensure that they appear in this script's stderr in sorted order.
+sort err 1>&2; rm -f err
+
+sleep 1
+echo Modifying filesystem
+rm tart/a1
+
+mv tart/b1 tart/b2
+mv tart/c1 tart/c2
+touch tart/c2/ca3
+
+echo Directory contents
+find tart -print | sort 2>/dev/null
+
+sleep 1
+echo Creating incremental archive
+echo >&2 "Creating incremental archive"
+cp -p tart.incr1 tart.incr2
+tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
+
+sleep 1
+
+rm -rf tart/*
+echo Extracting main archive
+echo >&2 "Extracting main archive"
+tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
+echo Extracting incremental archive
+# This command should produce three messages about deletion
+# of the existing files, that may appear in any order. Piping
+# to sort makes sure we don't depend on any particular ordering.
+tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
+
+echo Final files:
+find tart -print | sort 2>/dev/null
+],
+[0],
+[Create directories
+Creating main archive
+tart/
+tart/c0/
+tart/c1/
+tart/a1
+tart/b1
+tart/c0/cq1
+tart/c0/cq2
+tart/c1/ca1
+tart/c1/ca2
+Modifying filesystem
+Directory contents
+tart
+tart/b2
+tart/c0
+tart/c0/cq1
+tart/c0/cq2
+tart/c2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+Creating incremental archive
+tart/
+tart/c0/
+tart/c2/
+tart/b2
+tart/c2/ca3
+Extracting main archive
+tart/
+tart/c0/
+tart/c1/
+tart/a1
+tart/b1
+tart/c0/cq1
+tart/c0/cq2
+tart/c1/ca1
+tart/c1/ca2
+Extracting incremental archive
+tar: Deleting 'tart/a1'
+tar: Deleting 'tart/b1'
+tart/
+tart/b2
+tart/c0/
+tart/c2/
+tart/c2/ca3
+Final files:
+tart
+tart/b2
+tart/c0
+tart/c0/cq1
+tart/c0/cq2
+tart/c2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+],
+[Creating main archive
+tar: tart/c0: Directory is new
+tar: tart/c1: Directory is new
+tar: tart: Directory is new
+Creating incremental archive
+tar: tart/c2: Directory has been renamed from 'tart/c1'
+Extracting main archive
+],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/listed03.at b/tests/listed03.at
new file mode 100644
index 0000000..07bd1c8
--- /dev/null
+++ b/tests/listed03.at
@@ -0,0 +1,54 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This checks for the --listed-incremental bug reported by J Chapman Flack at
+# http://lists.gnu.org/archive/html/bug-tar/2010-06/msg00000.html
+
+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
+mkdir dir/sub
+mkdir dir/sub/a
+genfile --file dir/sub/a/file
+cd dir/sub
+
+chmod a-r ..
+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],
+[a/
+a/file
+],
+[tar: a: Directory is new
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/listed04.at b/tests/listed04.at
new file mode 100644
index 0000000..ea8450f
--- /dev/null
+++ b/tests/listed04.at
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This checks for the bug reported by Martin Weigel
+# <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00071.html>.
+# The test is derived from the ideas in Jean-Louis Martineau's followup email
+# <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00087.html>.
+
+AT_SETUP([--listed-incremental and --one-file-system])
+AT_KEYWORDS([listed incremental listed04])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+mkdir dir
+echo a >dir/a
+echo b >dir/b
+
+tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
+tar -tf archive.tar || exit
+],
+[0],
+[dir/
+dir/a
+dir/b
+dir/
+dir/a
+dir/b
+],
+[tar: dir: Directory is new
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/listed05.at b/tests/listed05.at
new file mode 100644
index 0000000..13ac42a
--- /dev/null
+++ b/tests/listed05.at
@@ -0,0 +1,79 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar up to 1.26 was unable to cope with directories that had once
+# been part of the dumped system and became separate mount points
+# afterwards. The bug has been reported by Nathan Stratton Treadway,
+# who also proposed a fix and a testcase, on which the present one is
+# built.
+# Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
+# Last-Affected-Version: 1.26
+# References: <20120527212417.GR2654@shire.ontko.com>
+# http://lists.gnu.org/archive/html/bug-tar/2012-05/msg00022.html
+
+# This testcase is Linux-specific and requires root privileges.
+
+AT_SETUP([--listed-incremental and remounted directories])
+AT_KEYWORDS([listed incremental listed05])
+
+AT_TAR_CHECK([
+AT_CHECK_TIMESTAMP
+AT_PRIVILEGED_PREREQ
+options="-C tartest --create --one-file-system --verbose"
+rm -rf archive-[01].snar archive-[01].tar tartest subdir
+
+# Create initial structure
+mkdir tartest
+echo "hi" > tartest/top-level-file
+mkdir tartest/subdir
+echo "hi" > tartest/subdir/subdir-file
+
+echo "# Level 0"
+tar $options --file archive-0.tar --listed-incremental=archive-0.snar .
+
+echo "# Remount"
+mv tartest/subdir .
+mkdir tartest/subdir
+mount -t ramfs none tartest/subdir || AT_SKIP_TEST
+tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
+
+echo "# Level 1"
+cp archive-0.snar archive-1.snar
+tar $options --file archive-1.tar --listed-incremental=archive-1.snar .
+
+umount tartest/subdir
+],
+[0],
+[# Level 0
+./
+./subdir/
+./top-level-file
+./subdir/subdir-file
+# Remount
+# Level 1
+./
+./subdir/
+],
+[tar: .: Directory is new
+tar: ./subdir: Directory is new
+tar: ./subdir: directory is on a different filesystem; not dumped
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/long01.at b/tests/long01.at
new file mode 100644
index 0000000..d823d81
--- /dev/null
+++ b/tests/long01.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# In GNU format, when extracting or listing a file member with a name
+# whose length is divisible by block size (512) tar used to read an
+# extra block of data. In consequence the following file was not extracted.
+# Reported by Josef Bauer
+# References: <200501122145.j0CLjGhl006070@uhu.mchp.siemens.de>
+# http://lists.gnu.org/archive/html/bug-tar/2005-01/msg00038.html
+
+AT_SETUP([long file names divisible by block size])
+AT_KEYWORDS([longname long512])
+
+dnl Create a directory structure with maximum directory name length 512-16
+m4_pushdef([NAME],[0123456789abcde])
+m4_pushdef([FULLNAME],NAME)
+m4_for([N],0,29,,[m4_define([FULLNAME],FULLNAME/NAME)])
+
+AT_TAR_CHECK([
+AT_TAR_MKHIER(FULLNAME,NAME)
+echo test > endfile
+
+tar cf archive FULLNAME/NAME endfile
+tar tf archive],
+[0],
+[FULLNAME/NAME
+endfile
+],
+[],[],[],[gnu,oldgnu])
+
+m4_popdef([NAME])
+m4_popdef([FULLNAME])
+AT_CLEANUP
diff --git a/tests/longv7.at b/tests/longv7.at
new file mode 100644
index 0000000..885085c
--- /dev/null
+++ b/tests/longv7.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Old format (V7) archives should not accept file names longer than
+# 99 characters
+
+AT_SETUP([long names in V7 archives])
+AT_KEYWORDS([longname longv7])
+
+m4_pushdef([DIR],[this_is_a_very_long_name_for_a_directory_which_causes_problems])
+m4_pushdef([FILE],[this_is_a_very_long_file_name_which_raises_issues.c])
+
+AT_TAR_CHECK([
+mkdir DIR
+touch DIR/FILE
+
+tar cf archive DIR
+echo separator
+tar tf archive
+],
+[0],
+[separator
+DIR/
+],
+[tar: DIR/FILE: file name is too long (max 99); not dumped
+tar: Exiting with failure status due to previous errors
+],
+[],[],[v7])
+
+m4_popdef([FILE])
+m4_popdef([DIR])
+AT_CLEANUP
diff --git a/tests/lustar01.at b/tests/lustar01.at
new file mode 100644
index 0000000..dcf5e31
--- /dev/null
+++ b/tests/lustar01.at
@@ -0,0 +1,38 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([ustar: unsplittable file name])
+AT_KEYWORDS([longname ustar lustar01])
+
+m4_pushdef([LONGNAME],
+ [this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix])
+
+AT_TAR_CHECK([
+genfile --file=LONGNAME || AT_SKIP_TEST
+tar cf archive LONGNAME
+],
+[2],
+[],
+[tar: LONGNAME: file name is too long (cannot be split); not dumped
+tar: Exiting with failure status due to previous errors
+],[],[],[ustar])
+
+m4_popdef([LONGNAME])
+AT_CLEANUP
diff --git a/tests/lustar02.at b/tests/lustar02.at
new file mode 100644
index 0000000..23c7c97
--- /dev/null
+++ b/tests/lustar02.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([ustar: unsplittable path name])
+AT_KEYWORDS([longname ustar lustar02])
+
+m4_pushdef([PREFIX_155],
+ [this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be])
+
+m4_pushdef([DIR_155],
+ [this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be])
+
+m4_pushdef([NAME], [tween_name_and_prefix])
+
+AT_TAR_CHECK([
+AT_TAR_MKHIER(PREFIX_155,NAME)
+tar cf archive PREFIX_155
+],
+[2],
+[],
+[tar: PREFIX_155/: file name is too long (cannot be split); not dumped
+tar: Exiting with failure status due to previous errors
+],[],[],[ustar])
+
+m4_popdef([NAME])
+m4_popdef([DIR_155])
+m4_popdef([PREFIX_155])
+
+AT_CLEANUP
diff --git a/tests/lustar03.at b/tests/lustar03.at
new file mode 100644
index 0000000..3ab2307
--- /dev/null
+++ b/tests/lustar03.at
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([ustar: splitting long names])
+AT_KEYWORDS([longname ustar lustar03])
+
+m4_pushdef([DIR_155],
+ [this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be])
+
+m4_pushdef([NAME], [file])
+
+AT_TAR_CHECK([
+AT_TAR_MKHIER(DIR_155,NAME)
+echo "Create archive"
+tar cf archive DIR_155
+echo "List archive"
+tar tf archive],
+[0],
+[Create archive
+List archive
+DIR_155/
+DIR_155/NAME
+],
+[],[],[],[ustar])
+
+m4_popdef([NAME])
+m4_popdef([DIR_155])
+AT_CLEANUP
diff --git a/tests/map.at b/tests/map.at
new file mode 100644
index 0000000..4060bab
--- /dev/null
+++ b/tests/map.at
@@ -0,0 +1,71 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2015-2016 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check the --owner-map and --group-map options.
+
+AT_SETUP([--owner-map and --group-map])
+AT_KEYWORDS([owner map])
+
+AT_TAR_CHECK([
+export TZ=UTC0
+
+genfile --file a
+set -- `genfile --stat=uid,gid a`
+cat > uid.map <<EOT
+# Owner mapping
++$1 "Joe the Plumber:1234"
+EOT
+# Group mapping
+cat > gid.map <<EOT
++$2 "Plumber's Union:5678"
+EOT
+
+tar --owner-map=uid.map\
+ --group-map=gid.map\
+ --owner="Fallback Owner:4321" \
+ --group="Fallback Group:8765" \
+ --mtime='@0' \
+ --mode='u=rw,go=r' \
+ -cf 1.tar a
+
+tar -tvf 1.tar
+tar --numeric-owner -tvf 1.tar
+
+> uid.map
+> gid.map
+
+tar --owner-map=uid.map\
+ --group-map=gid.map\
+ --owner="Fallback Owner:4321" \
+ --group="Fallback Group:8765" \
+ --mtime='@0' \
+ --mode='u=rw,go=r' \
+ -cf 2.tar a
+
+tar -tvf 2.tar
+tar --numeric-owner -tvf 2.tar
+],
+[0],
+[-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
+-rw-r--r-- 1234/5678 0 1970-01-01 00:00 a
+-rw-r--r-- Fallback Owner/Fallback Group 0 1970-01-01 00:00 a
+-rw-r--r-- 4321/8765 0 1970-01-01 00:00 a
+],
+[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/multiv01.at b/tests/multiv01.at
new file mode 100644
index 0000000..c7a1f09
--- /dev/null
+++ b/tests/multiv01.at
@@ -0,0 +1,64 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2009, 2013-2014, 2016 Free Software
+# Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test multivolume dumps from pipes.
+
+AT_SETUP([multivolume dumps from pipes])
+AT_KEYWORDS([multivolume multiv multiv01])
+
+# Fixme: should be configurable
+# TRUSS=truss -o /tmp/tr
+# TRUSS=strace
+
+AT_TAR_CHECK([
+exec <&-
+genfile --length 7168 --file file1
+
+for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
+ " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
+ echo "file2 block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+ for count in 2 3 4 5 6 7 8 ; do
+ echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+ done
+done >file2
+
+if test $TEST_TAR_FORMAT = pax; then
+ TAPE_LENGTH=11
+else
+ TAPE_LENGTH=10
+fi
+
+tar -c --multi-volume --tape-length=$TAPE_LENGTH \
+ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
+
+mkdir extract-dir-pipe
+dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
+PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
+ -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
+ --tape-length=$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+],
+[0],
+[],[],[],[],[gnu, oldgnu, pax])
+
+AT_CLEANUP
diff --git a/tests/multiv02.at b/tests/multiv02.at
new file mode 100644
index 0000000..5e81427
--- /dev/null
+++ b/tests/multiv02.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Previous versions of tar were not able to skip a member straddling
+# the multivolume archive boundary. Reported by Mads Martin Joergensen
+# <mmj@suse.de>
+#
+# References: <20040402144254.GC4409@suse.de>
+# http://lists.gnu.org/archive/html/bug-tar/2004-04/msg00002.html
+
+AT_SETUP([skipping a straddling member])
+AT_KEYWORDS([multivolume multiv multiv02])
+
+AT_TAR_CHECK([
+genfile --length 10240 --file en
+genfile --length 20000 --file to
+genfile --length 20000 --file tre
+genfile --length 10240 --file fire
+
+exec <&-
+
+tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
+],
+[0],
+[separator
+en
+],
+[],[],[],[gnu, oldgnu, pax])
+
+AT_CLEANUP
diff --git a/tests/multiv03.at b/tests/multiv03.at
new file mode 100644
index 0000000..56937c1
--- /dev/null
+++ b/tests/multiv03.at
@@ -0,0 +1,70 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Problem: GNU multivolume archives are not able to continue on members
+# with filenames longer than 100 characters. Versions of tar <= 1.14
+# were not checking filename lengths and produced malformed multivolume
+# headers.
+# References: <20040809214854.GB32706@suse.de>
+# http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html
+# <200604270859.47241.Juergen.Vollmer@informatik-vollmer.de>
+#
+
+AT_SETUP([MV archive & long filenames])
+AT_KEYWORDS([multivolume multiv multiv03])
+
+AT_TAR_CHECK([
+AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
+BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
+
+cat > ../experr <<EOF
+tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
+tar: '$BFILE' is possibly continued on this volume: header contains truncated name
+EOF
+
+cat > ../expout <<EOF
+$AFILE
+separator-1
+separator-2
+EOF
+
+genfile --length 15360 --file $AFILE
+
+exec <&-
+
+tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
+tar -tM -f arch.1 -f arch.2 || exit 1
+
+echo separator-1
+
+genfile --length 15360 --file $BFILE
+tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
+
+echo separator-2
+mv $BFILE bfile
+tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
+cmp $BFILE bfile
+],
+[0],
+[expout],
+[experr],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/multiv04.at b/tests/multiv04.at
new file mode 100644
index 0000000..9c99c9e
--- /dev/null
+++ b/tests/multiv04.at
@@ -0,0 +1,66 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Problem: Tar was not able to match directory name if the directory
+# member was split between two volumes
+# References: Jörg Schilling pretends to have reported this two
+# years ago (<42551FF2.nail98011FRAT@burner>).
+
+# Test idea:
+# 1. Create a listed-incremental archive of a directory containing
+# a cetrain number of zero-length files.
+# 2. Using the same snapshot file, create a *multivolume* listed-incremental
+# archive. Number of files created in the directory and volume size should
+# be selected so that the first volume ends in the midst of the directory
+# member. The files are zero-length so that their member records are
+# sufficiently small, in order for the entire archive to fit in two volumes.
+# 3. Test the created multi-volume archive.
+
+AT_SETUP([split directory members in a MV archive])
+AT_KEYWORDS([multivolume multiv incremental listed multiv04])
+
+AT_TAR_CHECK([
+
+mkdir directory
+awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
+
+exec <&-
+
+sleep 2
+
+tar --listed-incremental=list -c -f archive.a directory
+
+sleep 2
+
+tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
+
+echo separator
+
+tar -MRt -f arc.1 -f arc.2],
+[0],
+[directory/
+separator
+block 0: directory/
+block 35: ** Block of NULs **
+],
+[],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/multiv05.at b/tests/multiv05.at
new file mode 100644
index 0000000..0b12bf9
--- /dev/null
+++ b/tests/multiv05.at
@@ -0,0 +1,65 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2008, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Up to version 1.15.91 tar was unable to recognize all volumes
+# given after an out-of-sync volume.
+# Reported by: Joerg Weilbier <gnu@weilbier.net>
+# References: <200610011952.29880.gnu@weilbier.net>
+
+AT_SETUP([Restoring after an out of sync volume])
+AT_KEYWORDS([multivolume multiv multiv05 sync])
+m4_pushdef([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc])
+
+AT_TAR_CHECK([
+exec <&-
+
+m4_foreach([f],
+ [FILELIST],
+ [genfile --length 250k --file f
+])
+
+echo Creating archive
+tar -c -M -L 502 -f a.tar -f b.tar -f c.tar m4_foreach([f],[FILELIST],f )
+echo separator
+mkdir bak
+mv m4_foreach([f],[FILELIST],f )bak
+tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
+m4_foreach([f],
+ [FILELIST],
+ [echo Diffing f
+ cmp bak/f f || exit 1
+])],
+[0],
+[Creating archive
+separator]
+m4_foreach([file],
+ [FILELIST],
+ [file
+])dnl
+m4_foreach([file],
+ [FILELIST],
+ [Diffing file
+])dnl
+,
+[tar: 'trzy' is not continued on this volume
+],[],[], [gnu])
+
+m4_popdef([FILELIST])
+AT_CLEANUP
diff --git a/tests/multiv06.at b/tests/multiv06.at
new file mode 100644
index 0000000..ebdfd50
--- /dev/null
+++ b/tests/multiv06.at
@@ -0,0 +1,51 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2008, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# When volume size equals record size, swapping buffers in
+# new_volume triggers a call to flush_archive. The size left variables
+# must be corrected after that, which was not done in versions <= 1.20.
+# Reported by: Marek Kielar <mkielar@go2.pl>
+# References: <1907cbb6.79e32b49.48887f09.fd55@o2.pl>
+
+AT_SETUP([Multivolumes with L=record_size])
+AT_KEYWORDS([multivolume multiv multiv06])
+
+AT_TAR_CHECK([
+exec <&-
+decho Creating file
+genfile --length 20139 --file file
+decho Creating archive
+tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
+decho Testing archive
+tar -t -M -farc.1 -farc.2 -farc.3],
+[0],
+[Creating file
+Creating archive
+Testing archive
+file
+],
+[Creating file
+Creating archive
+Testing archive
+],
+[],[],
+[gnu, pax])
+
+AT_CLEANUP
diff --git a/tests/multiv07.at b/tests/multiv07.at
new file mode 100644
index 0000000..a82e271
--- /dev/null
+++ b/tests/multiv07.at
@@ -0,0 +1,47 @@
+# Test suite for GNU tar. -*- Autotest -*-
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: When creating POSIX multivolume archives, tar may in
+# some cases write an extended header at the end of one volume, and
+# the corresponding ustar header at the beginning of the next volume.
+# Such archives do not fully comply with the POSIX specs, but tar must
+# be able to read them anyway. This is what this script tests.
+#
+# See function try_new_volume, in file src/buffer.c near line 1227
+# for additional details.
+
+AT_SETUP([volumes split at an extended header])
+AT_KEYWORDS([multivolume multiv multiv07 xsplit])
+
+AT_CHECK([
+AT_XFAIL_IF(test -f $[]XFAILFILE)
+AT_TARBALL_PREREQ([xsplit-1.tar],[0e008c84c517e48fbf23ca6a7033cde6])
+AT_TARBALL_PREREQ([xsplit-2.tar],[03150b9852d285458f43734e9e0b9a45])
+
+exec <&-
+
+cd $TEST_DATA_DIR
+tar -t -M -fxsplit-1.tar -fxsplit-2.tar
+],
+[0],
+[Archive volumes split at an extended header Volume 1
+foo
+bar
+])
+
+AT_CLEANUP
diff --git a/tests/multiv08.at b/tests/multiv08.at
new file mode 100644
index 0000000..8b5bd23
--- /dev/null
+++ b/tests/multiv08.at
@@ -0,0 +1,50 @@
+# Test suite for GNU tar. -*- Autotest -*-
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Tar 1.23 would in some cases silently fail to create
+# a continuation header in multivolume archives.
+#
+# In this testcase, the file 'a' is 18.5 blocks long and the file 'b'
+# is 19.5 blocks long.
+
+AT_SETUP([multivolume header creation])
+AT_KEYWORDS([multivolume multiv multiv08])
+
+AT_TAR_CHECK([
+genfile --length 9472 --file a
+genfile --length 9984 --file b
+decho Creating
+tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
+decho Testing
+tar -tMR -f A.tar -f B.tar -f C.tar
+],
+[0],
+[Creating
+Testing
+block 0: a
+block 21: b
+block 43: ** Block of NULs **
+],
+[Creating
+Testing
+],
+[],
+[],
+[gnu])
+
+AT_CLEANUP
diff --git a/tests/multiv09.at b/tests/multiv09.at
new file mode 100644
index 0000000..e6a05b7
--- /dev/null
+++ b/tests/multiv09.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2015-2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Tar <=1.28 would segfault extracting from a multi-volume
+# archive containging filenames >= 100 characters if the subsequent volume
+# was not set properly.
+# Reported by: Pavel Raiskup <praiskup@redhat.com>
+# References: https://bugzilla.redhat.com/show_bug.cgi?id=866071,
+# <1351863945-31192-3-git-send-email-praiskup@redhat.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2012-11/msg00009.html
+
+AT_SETUP([bad next volume])
+AT_KEYWORDS([multivolume multiv multiv09])
+
+# filename of length 100 characters
+m4_pushdef([FILENAME],[dnl
+m4_for([N],1,100,,[a])])
+
+AT_TAR_CHECK([
+genfile --length 2000000 --file FILENAME
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar FILENAME || exit $?
+echo "created"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+],
+[2],
+[created
+])
+
+AT_CLEANUP
+
+m4_popdef([FILENAME])
diff --git a/tests/numeric.at b/tests/numeric.at
new file mode 100644
index 0000000..2fcd7ea
--- /dev/null
+++ b/tests/numeric.at
@@ -0,0 +1,74 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2015-2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([--numeric-owner basic tests])
+AT_KEYWORDS([options numeric numeric-owner])
+
+m4_pushdef([TESTOP],[
+decho $1
+tar $1 -vvf a dir --numeric-owner |dnl
+ awk '@S|@2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar $1 -vvf a dir |dnl
+ awk '@S|@2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+])
+
+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
+
+TESTOP([--create])
+TESTOP([--list])
+TESTOP([--diff])
+TESTOP([--extract])
+],
+[0],
+[--create
+OK
+OK
+OK
+OK
+--list
+OK
+OK
+OK
+OK
+--diff
+OK
+OK
+OK
+OK
+--extract
+OK
+OK
+OK
+OK
+],
+[--create
+--list
+--diff
+--extract
+],[],[],[posix,gnu,ustar,oldgnu])
+
+AT_CLEANUP
+
+m4_popdef([TESTOP])
+
diff --git a/tests/old.at b/tests/old.at
new file mode 100644
index 0000000..34bbda6
--- /dev/null
+++ b/tests/old.at
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# An old archive was not receiving directories.
+
+AT_SETUP([old archives])
+AT_KEYWORDS([old])
+
+unset TAR_OPTIONS
+AT_CHECK([
+mkdir directory
+tar cfvo archive directory || exit 1
+tar tf archive
+],
+[0],
+[directory/
+directory/
+])
+
+AT_CLEANUP
diff --git a/tests/onetop01.at b/tests/onetop01.at
new file mode 100644
index 0000000..daa03e8
--- /dev/null
+++ b/tests/onetop01.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014-2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+AT_SETUP([tar --one-top-level])
+AT_KEYWORDS([extract onetop onetop01])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+],
+[0],
+[.
+./a
+./a/b
+./a/c
+])
+
+AT_CLEANUP
diff --git a/tests/onetop02.at b/tests/onetop02.at
new file mode 100644
index 0000000..a38d452
--- /dev/null
+++ b/tests/onetop02.at
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014-2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+AT_SETUP([tar --one-top-level --show-transformed])
+AT_KEYWORDS([extract onetop onetop02])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+],
+[0],
+[a/
+a/b
+a/c
+.
+./a
+./a/b
+./a/c
+])
+
+AT_CLEANUP
diff --git a/tests/onetop03.at b/tests/onetop03.at
new file mode 100644
index 0000000..ed9f667
--- /dev/null
+++ b/tests/onetop03.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014-2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+AT_SETUP([tar --one-top-level --transform])
+AT_KEYWORDS([extract onetop onetop03])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+],
+[0],
+[.
+./a
+./a/b
+./a/d
+])
+
+AT_CLEANUP
diff --git a/tests/onetop04.at b/tests/onetop04.at
new file mode 100644
index 0000000..c76ff80
--- /dev/null
+++ b/tests/onetop04.at
@@ -0,0 +1,38 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014-2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+AT_SETUP([tar --one-top-level --transform])
+AT_KEYWORDS([extract onetop onetop04])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+],
+[0],
+[a/
+a/b
+a/d
+])
+
+AT_CLEANUP
diff --git a/tests/onetop05.at b/tests/onetop05.at
new file mode 100644
index 0000000..d718f61
--- /dev/null
+++ b/tests/onetop05.at
@@ -0,0 +1,73 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2015-2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU tar.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+AT_SETUP([tar --one-top-level restoring permissions])
+AT_KEYWORDS([extract onetop onetop05])
+
+# When extracting an archive that contains ./ with the --one-top-level option,
+# the mode and ownership of ./ would be incorrectly applied to the current
+# working directory, instead of the requested top-level directory.
+
+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
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=$(genfile --stat=mode.777 d1)
+if test 700 = $mode; then
+ echo "CWD: OK"
+else
+ echo "CWD: mode changed: 700 != $mode"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=$(genfile --stat=mode.777 d2)
+if test 700 = $mode; then
+ echo "DIR: OK"
+else
+ echo "DIR: mode changed: 700 != $mode"
+fi
+mode=$(genfile --stat=mode.7777 d2/top)
+if test $mode = $orig_mode; then
+ echo "TOP: OK"
+else
+ echo "TOP: mode changed: $orig_mode != $mode"
+fi
+],
+[0],
+[CWD: OK
+DIR: OK
+TOP: OK
+])
+
+AT_CLEANUP
diff --git a/tests/opcomp01.at b/tests/opcomp01.at
new file mode 100644
index 0000000..da6c367
--- /dev/null
+++ b/tests/opcomp01.at
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([occurrence compatibility])
+AT_KEYWORDS([opcomp opcomp01])
+
+AT_CHECK([
+tar --occurrence=1 -cf test.tar .
+],
+[2],
+[],
+[tar: '--occurrence' cannot be used with '-c'
+Try 'tar --help' or 'tar --usage' for more information.
+])
+
+AT_CLEANUP
+
diff --git a/tests/opcomp02.at b/tests/opcomp02.at
new file mode 100644
index 0000000..b2dfb5e
--- /dev/null
+++ b/tests/opcomp02.at
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([occurrence compatibility])
+AT_KEYWORDS([opcomp opcomp02])
+
+AT_CHECK([
+tar --occurrence=1 -tf test.tar
+],
+[2],
+[],
+[tar: --occurrence is meaningless without a file list
+Try 'tar --help' or 'tar --usage' for more information.
+])
+
+AT_CLEANUP
+
diff --git a/tests/opcomp03.at b/tests/opcomp03.at
new file mode 100644
index 0000000..5d293cf
--- /dev/null
+++ b/tests/opcomp03.at
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([--verify compatibility])
+AT_KEYWORDS([opcomp opcomp03])
+
+AT_CHECK([
+tar -tWf test.tar .
+],
+[2],
+[],
+[tar: '--verify' cannot be used with '-t'
+Try 'tar --help' or 'tar --usage' for more information.
+])
+
+AT_CLEANUP
+
diff --git a/tests/opcomp04.at b/tests/opcomp04.at
new file mode 100644
index 0000000..053bbfc
--- /dev/null
+++ b/tests/opcomp04.at
@@ -0,0 +1,38 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([compress option compatibility])
+AT_KEYWORDS([opcomp opcomp04])
+
+AT_CHECK([
+AT_GZIP_PREREQ
+genfile --file file
+tar czf test.tar file
+genfile --file newfile
+tar rzf test.tar newfile
+],
+[2],
+[],
+[tar: Cannot update compressed archives
+Try 'tar --help' or 'tar --usage' for more information.
+])
+
+AT_CLEANUP
+
diff --git a/tests/opcomp05.at b/tests/opcomp05.at
new file mode 100644
index 0000000..873e34b
--- /dev/null
+++ b/tests/opcomp05.at
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([--pax-option compatibility])
+AT_KEYWORDS([opcomp opcomp05])
+
+AT_CHECK([
+tar -Hgnu -cf test.tar --pax-option user:=root .
+],
+[2],
+[],
+[tar: --pax-option can be used only on POSIX archives
+Try 'tar --help' or 'tar --usage' for more information.
+])
+
+AT_CLEANUP
+
diff --git a/tests/opcomp06.at b/tests/opcomp06.at
new file mode 100644
index 0000000..9d51936
--- /dev/null
+++ b/tests/opcomp06.at
@@ -0,0 +1,36 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([--pax-option compatibility])
+AT_KEYWORDS([opcomp opcomp06])
+
+AT_CHECK([
+AT_ACLS_PREREQ
+genfile --file file
+tar -cf test.tar --acls -Hgnu file
+],
+[2],
+[],
+[tar: --acls can be used only on POSIX archives
+Try 'tar --help' or 'tar --usage' for more information.
+])
+
+AT_CLEANUP
+
diff --git a/tests/options.at b/tests/options.at
new file mode 100644
index 0000000..e5ff8ad
--- /dev/null
+++ b/tests/options.at
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure that TAR_OPTIONS works in conjunction with old-style options.
+
+unset TAR_OPTIONS
+AT_SETUP([mixing options])
+AT_KEYWORDS([options options00])
+
+AT_CHECK([
+echo > file1
+TAR_OPTIONS=--numeric-owner tar chof archive file1
+tar tf archive
+],
+[0],
+[file1
+])
+
+AT_CLEANUP
diff --git a/tests/options02.at b/tests/options02.at
new file mode 100644
index 0000000..9f3175f
--- /dev/null
+++ b/tests/options02.at
@@ -0,0 +1,39 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure that tar correctly handles non-option arguments interspersed with
+# options.
+# References: <200501051042.46223.vapier@gentoo.org>
+# http://lists.gnu.org/archive/html/bug-tar/2005-01/msg00011.html
+
+AT_SETUP([interspersed options])
+AT_KEYWORDS([options options02])
+
+AT_CHECK([
+echo > file1
+tar c file1 -f archive
+tar tf archive
+],
+[0],
+[file1
+])
+
+AT_CLEANUP
diff --git a/tests/owner.at b/tests/owner.at
new file mode 100644
index 0000000..87458e9
--- /dev/null
+++ b/tests/owner.at
@@ -0,0 +1,44 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2011, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check the --owner and --group options.
+
+AT_SETUP([--owner and --group])
+AT_KEYWORDS([owner])
+
+AT_TAR_CHECK([
+export TZ=UTC0
+
+genfile --file a
+
+tar --owner="Joe the Plumber:1234" \
+ --group="Plumber's Union:5678" \
+ --mtime='@0' \
+ --mode='u=rw,go=r' \
+ -cf arc a
+
+tar -tvf arc
+tar --numeric-owner -tvf arc
+],
+[0],
+[-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
+-rw-r--r-- 1234/5678 0 1970-01-01 00:00 a
+],
+[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/package.m4 b/tests/package.m4
new file mode 100644
index 0000000..396ad8b
--- /dev/null
+++ b/tests/package.m4
@@ -0,0 +1,6 @@
+# Signature of the current package.
+m4_define([AT_PACKAGE_NAME], [GNU tar])
+m4_define([AT_PACKAGE_TARNAME], [tar])
+m4_define([AT_PACKAGE_VERSION], [1.29])
+m4_define([AT_PACKAGE_STRING], [GNU tar 1.29])
+m4_define([AT_PACKAGE_BUGREPORT], [bug-tar@gnu.org])
diff --git a/tests/pipe.at b/tests/pipe.at
new file mode 100644
index 0000000..6ba9644
--- /dev/null
+++ b/tests/pipe.at
@@ -0,0 +1,54 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004-2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Recognition of compressed formats, introduced with tar 1.15, broke
+# untarring of archives from standard input.
+# References:
+# 1) <20041221040834.GA9635@tigers-lfs.nsw.bigpond.net.au>
+# http://lists.gnu.org/archive/html/bug-tar/2004-12/msg00031.html
+# 2) <20041221093801.GA55537@engelschall.com>
+# http://lists.gnu.org/archive/html/bug-tar/2004-12/msg00026.html
+
+AT_SETUP([decompressing from stdin])
+
+AT_KEYWORDS([pipe])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2],
+[0],
+[directory/
+directory/file1
+directory/file2
+separator
+separator
+])
+
+AT_CLEANUP
diff --git a/tests/recurs02.at b/tests/recurs02.at
new file mode 100644
index 0000000..adc8f30
--- /dev/null
+++ b/tests/recurs02.at
@@ -0,0 +1,54 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Test interaction of --recursion and --no-recursion options.
+# Each of them remains in effect until cancelled by the next ocurrence
+# of its counterpart. This didn't work in v.1.27.1 and was fixed by
+# commit 2bd9c153.
+# Reported by: Kai <hellsy22@mail.ru>
+# References: <1389166145.829001090@f341.i.mail.ru>,
+# <20140108231826.16453@ulysses.gnu.org.ua>,
+# https://lists.gnu.org/archive/html/bug-tar/2014-01/msg00019.html
+
+AT_SETUP([recurse: toggle])
+AT_KEYWORDS([recurse options recurse02])
+
+AT_TAR_CHECK([
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+],
+[0],
+[directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+])
+
+AT_CLEANUP
diff --git a/tests/recurse.at b/tests/recurse.at
new file mode 100644
index 0000000..e847a16
--- /dev/null
+++ b/tests/recurse.at
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([recurse])
+AT_KEYWORDS([recurse])
+
+AT_TAR_CHECK([
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+],
+[0],
+[directory/
+])
+
+AT_CLEANUP
diff --git a/tests/remfiles01.at b/tests/remfiles01.at
new file mode 100644
index 0000000..e257b9a
--- /dev/null
+++ b/tests/remfiles01.at
@@ -0,0 +1,72 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: When called with --create --remove-files and a compression
+# options tar (v. <= 1.22.90) would remove files even if it had failed
+# to store them in the archive.
+#
+# References: <77cb99c00910020940k6ce15da4wb564d2418ec52cfb@mail.gmail.com>
+# http://lists.gnu.org/archive/html/bug-tar/2009-10/msg00005.html
+
+AT_SETUP([remove-files with compression])
+AT_KEYWORDS([create remove-files remfiles01 gzip])
+
+unset TAR_OPTIONS
+AT_CHECK([
+AT_UNPRIVILEGED_PREREQ
+AT_GZIP_PREREQ
+AT_SIGPIPE_PREREQ
+AT_SORT_PREREQ
+
+mkdir dir
+cd dir
+genfile --file a --length 0
+chmod 0 a
+genfile --file b
+mkdir c
+
+# Depending on when the SIGPIPE gets delivered, the invocation below
+# may finish with either
+# tar: a: Cannot write: Broken pipe
+# or
+# tar: Child returned status 2
+
+# Discard diagnostics that some shells generate about broken pipes,
+# and discard all of tar's diagnostics except for the ones saying "(child)".
+# Gzip's exit code is propagated to the shell. Usually it is 141.
+# Convert all non-zero exits to 2 to make it predictable.
+(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
+EC=$?
+sed -n '/(child)/p' err >&2
+rm err
+find . | sort
+exit $EC
+],
+[2],
+[.
+./a
+./b
+./c
+],
+[tar (child): a: Cannot open: Permission denied
+tar (child): Error is not recoverable: exiting now
+])
+
+AT_CLEANUP
diff --git a/tests/remfiles02.at b/tests/remfiles02.at
new file mode 100644
index 0000000..87fc44a
--- /dev/null
+++ b/tests/remfiles02.at
@@ -0,0 +1,59 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: When called with --create --remove-files and a compression
+# options tar (v. <= 1.22.90) would remove files even if it had failed
+# to store them in the archive.
+#
+# References: <77cb99c00910020940k6ce15da4wb564d2418ec52cfb@mail.gmail.com>
+# http://lists.gnu.org/archive/html/bug-tar/2009-10/msg00005.html
+
+AT_SETUP([remove-files with compression: grand-child])
+AT_KEYWORDS([create remove-files remfiles02 gzip])
+
+unset TAR_OPTIONS
+AT_CHECK([
+AT_GZIP_PREREQ
+AT_SORT_PREREQ
+
+mkdir dir
+cd dir
+mkdir a
+genfile --file b
+mkdir c
+
+tar -c -f a -z --remove-files b c 2>err
+EC=$?
+sed -n '/(child)/p' err >&2
+rm err
+find . | sort
+exit $EC
+],
+[2],
+[.
+./a
+./b
+./c
+],
+[tar (child): a: Cannot open: Is a directory
+tar (child): Error is not recoverable: exiting now
+])
+
+AT_CLEANUP
diff --git a/tests/remfiles03.at b/tests/remfiles03.at
new file mode 100644
index 0000000..b0c810d
--- /dev/null
+++ b/tests/remfiles03.at
@@ -0,0 +1,43 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Called with --remove-files, tar 1.23 failed
+# to remove a directory if it contained symlinks to another files
+# within that directory.
+# Reported-by: Alexander Kozlov <akozlov@nada.kth.se>
+# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00028.html
+# <Pine.SOC.4.64.1003150951060.28948@faun.nada.kth.se>
+
+AT_SETUP([remove-files with symbolic links])
+AT_KEYWORDS([create remove-files remfiles03])
+
+AT_CHECK([
+mkdir a
+mkdir a/b
+ln -s b a/c || AT_SKIP_TEST
+tar --remove-files -cf a.tar a
+genfile --stat a
+],
+[0],
+[],
+[genfile: stat(a) failed: No such file or directory
+])
+
+AT_CLEANUP
diff --git a/tests/remfiles04a.at b/tests/remfiles04a.at
new file mode 100644
index 0000000..8d7dc63
--- /dev/null
+++ b/tests/remfiles04a.at
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of a single relative-path -C option,
+# in --create/non-incremental mode.
+#
+
+AT_SETUP([remove-files with -C:rel in -c/non-incr. mode])
+AT_KEYWORDS([create remove-files remfiles04 remfiles04a])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar --remove-files -C foo bar
+echo A
+find . | sort
+],
+[0],
+[A
+.
+./bar
+./foo
+./foo.tar
+],[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles04b.at b/tests/remfiles04b.at
new file mode 100644
index 0000000..b075cf4
--- /dev/null
+++ b/tests/remfiles04b.at
@@ -0,0 +1,53 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of a single relative-path -C option,
+# in --create/incremental mode.
+#
+# (Tar 1.26 would remove files in original working directory when called in
+# this manner. [It would follow the -C for archiving the files, but ignore it
+# for removing them afterwards.]
+#
+# Reported by: Nathan Stratton Treadway <nathanst@ontko.com>
+# References: <20130921171234.GG32256@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00028.html
+# )
+
+AT_SETUP([remove-files with -C:rel in -c/incr. mode])
+AT_KEYWORDS([create incremental remove-files remfiles04 remfiles04b])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar --incremental --remove-files -C foo bar
+echo A
+find . | sort
+],
+[0],
+[A
+.
+./bar
+./foo
+./foo.tar
+],[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles04c.at b/tests/remfiles04c.at
new file mode 100644
index 0000000..fd47d91
--- /dev/null
+++ b/tests/remfiles04c.at
@@ -0,0 +1,62 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of a single relative-path -C option,
+# in --append mode.
+#
+# (Tar 1.26 would remove files in original working directory when called in
+# this manner. [It would follow the -C for archiving the files, but ignore it
+# for removing them afterwards.]
+#
+# Reported by: Jörgen Strand <Jorgen.Strand@sonymobile.com>
+# References: <9FC79E5CB90CEC47B9647DCAB7BD327A01AD83B452EE@seldmbx02.corpusers.net>
+# http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00024.html
+# )
+
+AT_SETUP([remove-files with -C:rel in -r mode])
+AT_KEYWORDS([create append remove-files remfiles04 remfiles04c])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar -C foo bar
+echo A
+find . | sort
+tar -rf foo.tar --remove-files -C foo bar
+echo B
+find . | sort
+],
+[0],
+[A
+.
+./bar
+./foo
+./foo.tar
+./foo/bar
+B
+.
+./bar
+./foo
+./foo.tar
+],[],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles05a.at b/tests/remfiles05a.at
new file mode 100644
index 0000000..cc952ba
--- /dev/null
+++ b/tests/remfiles05a.at
@@ -0,0 +1,64 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of two relative-path -C options,
+# in --create/non-incremental mode.
+#
+# (This specific case failed during development of tar 1.26.90:
+# There was a leftover call to chdir in name_next_elt() in
+# tar 1.26. After commit e3d28d84 this call would confuse the
+# tar_getcwd function.
+#
+# Reported by: Nathan Stratton Treadway <nathanst@ontko.com>
+# References: <20130924145657.GM32256@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00045.html
+# )
+
+AT_SETUP([remove-files with -C:rel,rel in -c/non-incr. mode])
+AT_KEYWORDS([create remove-files remfiles05 remfiles05a])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+decho A
+tar -cvf foo.tar --remove-files -C foo file -C ../bar file
+decho B
+find . | sort
+],
+[0],
+[A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles05b.at b/tests/remfiles05b.at
new file mode 100644
index 0000000..140e481
--- /dev/null
+++ b/tests/remfiles05b.at
@@ -0,0 +1,55 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of two relative-path -C options,
+# in --create/incremental mode.
+#
+
+AT_SETUP([remove-files with -C:rel,rel in -c/incr. mode])
+AT_KEYWORDS([create incremental remove-files remfiles05 remfiles05b])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
+decho B
+find . | sort
+],
+[0],
+[A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles05c.at b/tests/remfiles05c.at
new file mode 100644
index 0000000..00ab706
--- /dev/null
+++ b/tests/remfiles05c.at
@@ -0,0 +1,67 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of two relative-path -C options,
+# in --append mode.
+#
+
+AT_SETUP([remove-files with -C:rel,rel in -r mode])
+AT_KEYWORDS([create append remove-files remfiles05 remfiles05c])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+tar -cf foo.tar -C foo file -C ../bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo file -C ../bar file
+decho C
+find . | sort
+],
+[0],
+[A
+.
+./bar
+./bar/file
+./file
+./foo
+./foo.tar
+./foo/file
+B
+file
+file
+C
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+C
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles06a.at b/tests/remfiles06a.at
new file mode 100644
index 0000000..2054826
--- /dev/null
+++ b/tests/remfiles06a.at
@@ -0,0 +1,56 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of a relative -C option followed by an absolute -C,
+# in --create/non-incremental mode.
+#
+
+AT_SETUP([remove-files with -C:rel,abs in -c/non-incr. mode])
+AT_KEYWORDS([create remove-files remfiles06 remfiles06a])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+decho A
+tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file
+decho B
+find . | sort
+],
+[0],
+[A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles06b.at b/tests/remfiles06b.at
new file mode 100644
index 0000000..3671761
--- /dev/null
+++ b/tests/remfiles06b.at
@@ -0,0 +1,56 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of a relative -C option followed by an absolute -C,
+# in --create/incremental mode.
+#
+
+AT_SETUP([remove-files with -C:rel,abs in -c/incr. mode])
+AT_KEYWORDS([create incremental remove-files remfiles06 remfiles06b])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file
+decho B
+find . | sort
+],
+[0],
+[A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles06c.at b/tests/remfiles06c.at
new file mode 100644
index 0000000..4c5694b
--- /dev/null
+++ b/tests/remfiles06c.at
@@ -0,0 +1,68 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of a relative -C option followed by an absolute -C,
+# in --append mode.
+#
+
+AT_SETUP([remove-files with -C:rel,abs in -r mode])
+AT_KEYWORDS([create append remove-files remfiles06 remfiles06c])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+tar -cf foo.tar -C foo file -C $DIR/bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file
+decho C
+find . | sort
+],
+[0],
+[A
+.
+./bar
+./bar/file
+./file
+./foo
+./foo.tar
+./foo/file
+B
+file
+file
+C
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+C
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles07a.at b/tests/remfiles07a.at
new file mode 100644
index 0000000..b11aee1
--- /dev/null
+++ b/tests/remfiles07a.at
@@ -0,0 +1,56 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of an absolute -C option followed by a relative -C,
+# in --create/non-incremental mode.
+#
+
+AT_SETUP([remove-files with -C:abs,rel in -c/non-incr. mode])
+AT_KEYWORDS([create remove-files remfiles07 remfiles07a])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+decho A
+tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
+decho B
+find . | sort
+],
+[0],
+[A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles07b.at b/tests/remfiles07b.at
new file mode 100644
index 0000000..694a437
--- /dev/null
+++ b/tests/remfiles07b.at
@@ -0,0 +1,56 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of an absolute -C option followed by a relative -C,
+# in --create/incremental mode.
+#
+
+AT_SETUP([remove-files with -C:abs,rel in -c/incr. mode])
+AT_KEYWORDS([create incremental remove-files remfiles07 remfiles07b])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+decho A
+tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file
+decho B
+find . | sort
+],
+[0],
+[A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles07c.at b/tests/remfiles07c.at
new file mode 100644
index 0000000..21b7ae2
--- /dev/null
+++ b/tests/remfiles07c.at
@@ -0,0 +1,68 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of an absolute -C option followed by a relative -C,
+# in --append mode.
+#
+
+AT_SETUP([remove-files with -C:abs,rel in -r mode])
+AT_KEYWORDS([create append remove-files remfiles07 remfiles07c])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+tar -cf foo.tar -C $DIR/foo file -C ../bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
+decho C
+find . | sort
+],
+[0],
+[A
+.
+./bar
+./bar/file
+./file
+./foo
+./foo.tar
+./foo/file
+B
+file
+file
+C
+.
+./bar
+./file
+./foo
+./foo.tar
+],
+[A
+B
+C
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles08a.at b/tests/remfiles08a.at
new file mode 100644
index 0000000..39bb992
--- /dev/null
+++ b/tests/remfiles08a.at
@@ -0,0 +1,55 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: If tar 1.26 was called with the --remove-files option and told
+# to archive (and thus delete) two subdirectories where the second was
+# specified relative to the first, it would be unable to delete the
+# second directory (and its contents), since the relative path would no
+# longer be valid once the first directory was deleted.
+#
+# This case checks for successful deletion of all archived items
+# in --create/non-incremental mode.
+#
+
+AT_SETUP([remove-files deleting two subdirs in -c/non-incr. mode])
+AT_KEYWORDS([create remove-files remfiles08 remfiles08a])
+
+AT_TAR_CHECK([
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+decho A
+tar -cvf foo.tar --remove-files -C foo . -C ../bar .
+decho B
+find .
+],
+[0],
+[A
+./
+./foo_file
+./
+./bar_file
+B
+.
+./foo.tar
+],
+[A
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles08b.at b/tests/remfiles08b.at
new file mode 100644
index 0000000..cb7750e
--- /dev/null
+++ b/tests/remfiles08b.at
@@ -0,0 +1,60 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: If tar 1.26 was called with the --remove-files option and told
+# to archive (and thus delete) two subdirectories where the second was
+# specified relative to the first, it would be unable to delete the
+# second directory (and its contents), since the relative path would no
+# longer be valid once the first directory was deleted.
+#
+# This case checks for successful deletion of all archived items
+# in --create/incremental mode.
+#
+# Note: tar 1.27 fails this test case due to a more general issue
+# archving-and-removing a full directory tree when run in incremental
+# mode; see remfiles09b.at for that specific test case.
+
+AT_SETUP([remove-files deleting two subdirs in -c/incr. mode])
+AT_KEYWORDS([create incremental remove-files remfiles08 remfiles08b])
+
+AT_TAR_CHECK([
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
+decho B
+find .
+],
+[0],
+[A
+./
+./
+./foo_file
+./bar_file
+B
+.
+./foo.tar
+],
+[A
+tar: .: Directory is new
+tar: .: Directory is new
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles08c.at b/tests/remfiles08c.at
new file mode 100644
index 0000000..ef65b49
--- /dev/null
+++ b/tests/remfiles08c.at
@@ -0,0 +1,67 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: If tar 1.26 was called with the --remove-files option and told
+# to archive (and thus delete) two subdirectories where the second was
+# specified relative to the first, it would be unable to delete the
+# second directory (and its contents), since the relative path would no
+# longer be valid once the first directory was deleted.
+#
+# This case checks for successful deletion of all archived items
+# in --append mode.
+#
+
+AT_SETUP([remove-files deleting two subdirs in -r mode])
+AT_KEYWORDS([create append remove-files remfiles08 remfiles08c])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+tar -cf foo.tar -C foo . -C ../bar .
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo . -C ../bar .
+decho C
+find .
+],
+[0],
+[A
+.
+./bar
+./bar/bar_file
+./foo
+./foo.tar
+./foo/foo_file
+B
+./
+./foo_file
+./
+./bar_file
+C
+.
+./foo.tar
+],
+[A
+B
+C
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles09a.at b/tests/remfiles09a.at
new file mode 100644
index 0000000..79ef30a
--- /dev/null
+++ b/tests/remfiles09a.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: check --remove-files operation when archiving/deleting
+# directory trees.
+#
+# This case checks the operation
+# in --create/non-incremental mode.
+#
+
+AT_SETUP([remove-files on full directory in -c/non-incr. mode])
+AT_KEYWORDS([create remove-files remfiles09 remfiles09a])
+
+AT_TAR_CHECK([
+mkdir foo
+echo foo/file > foo/file
+decho A
+tar -cvf foo.tar --remove-files foo
+decho B
+find .
+],
+[0],
+[A
+foo/
+foo/file
+B
+.
+./foo.tar
+],
+[A
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles09b.at b/tests/remfiles09b.at
new file mode 100644
index 0000000..ac506be
--- /dev/null
+++ b/tests/remfiles09b.at
@@ -0,0 +1,53 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: check --remove-files operation when archiving/deleting
+# directory trees.
+#
+# This case checks the operation
+# in --create/incremental mode.
+#
+# Note: in tar 1.27, when run in incremental mode tar will attempt to remove
+# the directory before removing the files within that directory, and thus
+# the --remove-files operation will cause tar to abort with an error status.
+# This issue will be fixed in a later version of tar.
+
+AT_SETUP([remove-files on full directory in -c/incr. mode])
+AT_KEYWORDS([create incremental remove-files remfiles09 remfiles09b])
+
+AT_TAR_CHECK([
+mkdir foo
+echo foo/file > foo/file
+decho A
+tar -cvf foo.tar --incremental --remove-files foo
+decho B
+find .
+],
+[0],
+[A
+foo/
+foo/file
+B
+.
+./foo.tar
+],
+[A
+tar: foo: Directory is new
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles09c.at b/tests/remfiles09c.at
new file mode 100644
index 0000000..ebc2e01
--- /dev/null
+++ b/tests/remfiles09c.at
@@ -0,0 +1,58 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2013-2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: check --remove-files operation when archiving/deleting
+# directory trees.
+#
+# This case checks the operation
+# in --append mode.
+#
+
+AT_SETUP([remove-files on full directory in -r mode])
+AT_KEYWORDS([create append remove-files remfiles09 remfiles09c])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+echo foo/file > foo/file
+tar -cf foo.tar foo
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files foo
+decho C
+find . | sort
+],
+[0],
+[A
+.
+./foo
+./foo.tar
+./foo/file
+B
+foo/
+foo/file
+C
+.
+./foo.tar
+],
+[A
+B
+C
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/remfiles10.at b/tests/remfiles10.at
new file mode 100644
index 0000000..ddd631b
--- /dev/null
+++ b/tests/remfiles10.at
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Test suite for GNU tar.
+# Copyright 2014, 2016 Free Software Foundation, Inc.
+#
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check --remove-files with .
+
+AT_SETUP([remove-files])
+AT_KEYWORDS([create remove-files remfiles10])
+
+AT_TAR_CHECK([
+mkdir foo
+echo foo/file > foo/file
+decho A
+(cd foo && tar -cvf ../foo.tar --remove-files .)
+tar_status=$?
+decho B
+find foo
+exit $tar_status
+],
+[2],
+[A
+./
+./file
+B
+foo
+],
+[A
+tar: .: Cannot rmdir: Invalid argument
+tar: Exiting with failure status due to previous errors
+B
+],[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/rename01.at b/tests/rename01.at
new file mode 100644
index 0000000..5275b7d
--- /dev/null
+++ b/tests/rename01.at
@@ -0,0 +1,91 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Test basic handling of renamed directory in the incremental
+# archives.
+
+AT_SETUP([renamed dirs in incrementals])
+AT_KEYWORDS([incremental rename rename01])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file
+
+echo "Creating base archive"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar foo/baz
+
+echo "Creating incremental archive"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfg arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+],
+[0],
+[Creating base archive
+foo/
+foo/bar/
+foo/file1
+foo/file2
+foo/bar/file
+Creating incremental archive
+foo/
+foo/baz/
+Begin directory listing 1
+foo
+foo/bar
+foo/bar/file
+foo/file1
+foo/file2
+End directory listing 1
+Begin directory listing 2
+foo
+foo/baz
+foo/baz/file
+foo/file1
+foo/file2
+End directory listing 2
+],
+[tar: foo: Directory is new
+tar: foo/bar: Directory is new
+tar: foo/baz: Directory has been renamed from 'foo/bar'
+],
+[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of rename01.at
diff --git a/tests/rename02.at b/tests/rename02.at
new file mode 100644
index 0000000..9bf8000
--- /dev/null
+++ b/tests/rename02.at
@@ -0,0 +1,106 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Incremental archives should be able to handle directories
+# moved between directory hierarchies.
+
+AT_SETUP([move between hierarchies])
+AT_KEYWORDS([incremental rename rename02])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+sleep 1
+
+echo "Creating base archive"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar/baz foo
+
+echo "Creating incremental archive"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+],
+[0],
+[Creating base archive
+foo/
+foo/bar/
+foo/bar/baz/
+foo/file1
+foo/file2
+foo/bar/file.r
+foo/bar/baz/file.z
+Creating incremental archive
+foo/
+foo/bar/
+foo/baz/
+Begin directory listing 1
+foo
+foo/bar
+foo/bar/baz
+foo/bar/baz/file.z
+foo/bar/file.r
+foo/file1
+foo/file2
+End directory listing 1
+foo/
+foo/bar/
+foo/baz/
+Begin directory listing 2
+foo
+foo/bar
+foo/bar/file.r
+foo/baz
+foo/baz/file.z
+foo/file1
+foo/file2
+End directory listing 2
+],
+[tar: foo: Directory is new
+tar: foo/bar: Directory is new
+tar: foo/bar/baz: Directory is new
+tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
+],
+[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of rename02.at
diff --git a/tests/rename03.at b/tests/rename03.at
new file mode 100644
index 0000000..a7d932d
--- /dev/null
+++ b/tests/rename03.at
@@ -0,0 +1,130 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Handling of cyclic renames in incremental archives.
+
+AT_SETUP([cyclic renames])
+AT_KEYWORDS([incremental rename rename03 cyclic-rename])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+
+mkdir foo/a
+genfile --file foo/a/filea
+
+mkdir foo/b
+genfile --file foo/b/fileb
+
+mkdir foo/c
+genfile --file foo/c/filec
+
+sleep 1
+
+echo "First dump"
+echo "First dump">&2
+tar -g incr -cf arch.1 -v foo 2>tmperr
+sort tmperr >&2
+
+# Shuffle directories:
+(cd foo
+mv a $$
+mv c a
+mv b c
+mv $$ b)
+
+echo "Second dump"
+echo "Second dump" >&2
+tar -g incr -cf arch.2 -v foo 2>tmperr
+sort tmperr >&2
+
+tar xfg arch.1 /dev/null --warning=no-timestamp
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+],
+[0],
+[First dump
+foo/
+foo/a/
+foo/b/
+foo/c/
+foo/file1
+foo/file2
+foo/a/filea
+foo/b/fileb
+foo/c/filec
+Second dump
+foo/
+foo/a/
+foo/b/
+foo/c/
+Begin directory listing 1
+foo
+foo/a
+foo/a/filea
+foo/b
+foo/b/fileb
+foo/c
+foo/c/filec
+foo/file1
+foo/file2
+End directory listing 1
+foo/
+foo/a/
+foo/b/
+foo/c/
+Begin directory listing 2
+foo
+foo/a
+foo/a/filec
+foo/b
+foo/b/filea
+foo/c
+foo/c/fileb
+foo/file1
+foo/file2
+End directory listing 2
+],
+[First dump
+tar: foo/a: Directory is new
+tar: foo/b: Directory is new
+tar: foo/c: Directory is new
+tar: foo: Directory is new
+Second dump
+tar: foo/a: Directory has been renamed from 'foo/c'
+tar: foo/b: Directory has been renamed from 'foo/a'
+tar: foo/c: Directory has been renamed from 'foo/b'
+],
+[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of rename03.at
diff --git a/tests/rename04.at b/tests/rename04.at
new file mode 100644
index 0000000..c31dfdf
--- /dev/null
+++ b/tests/rename04.at
@@ -0,0 +1,81 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2008, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: Up to version 1.20, when storing a record for renamed
+# directory in an incremental archive, tar incorrectly flagged all its
+# subdirectories as renamed, which led to problems at archive extraction.
+# References: <00a401c8ecc0$56b7ef30$6a17a8c0@inti.com>
+# Reported by: Enric Hernandez <ehernandez@notariado.org>
+
+AT_SETUP([renamed directory containing subdirectories])
+AT_KEYWORDS([incremental rename04 rename])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2
+find dir | sort
+],
+[0],
+[Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+directory
+directory/file
+directory/subdir
+Second restore
+dir
+dir/subdir
+],
+[Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+Second restore
+],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of rename04.at
diff --git a/tests/rename05.at b/tests/rename05.at
new file mode 100644
index 0000000..25a2666
--- /dev/null
+++ b/tests/rename05.at
@@ -0,0 +1,79 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2008, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: A continuation of rename04.at, that checks additionally if
+# renamed subdirectories are restored correctly.
+
+AT_SETUP([renamed subdirectories])
+AT_KEYWORDS([incremental rename05 rename])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory/subdir directory/subdir.0
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1 --warning=no-timestamp
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2 --warning=no-timestamp
+find dir | sort
+],
+[0],
+[Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+directory
+directory/file
+directory/subdir
+Second restore
+dir
+dir/subdir.0
+],
+[Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+Second restore
+],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of rename05.at
diff --git a/tests/same-order01.at b/tests/same-order01.at
new file mode 100644
index 0000000..f50e923
--- /dev/null
+++ b/tests/same-order01.at
@@ -0,0 +1,47 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Problem: -C dir did not work with --same-order
+# Reported by: Karl-Michael Schneider <schneide@phil.uni-passau.de>
+# References: <20040507122613.GB12457@pike.phil.uni-passau.de>
+# http://lists.gnu.org/archive/html/bug-tar/2004-05/msg00008.html
+
+AT_SETUP([working -C with --same-order])
+AT_KEYWORDS([same-order same-order01])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+],
+[0],
+[file1
+file2
+])
+
+AT_CLEANUP
diff --git a/tests/same-order02.at b/tests/same-order02.at
new file mode 100644
index 0000000..18ce8a0
--- /dev/null
+++ b/tests/same-order02.at
@@ -0,0 +1,52 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# In previous versions a single -C option did not work with --same-order
+# (see same-order01.sh). However, multiple -C options worked OK.
+# Test if we did not break the correct behavior.
+
+AT_SETUP([multiple -C options])
+AT_KEYWORDS([same-order same-order02])
+
+AT_TAR_CHECK([
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=`pwd`
+tar -xf archive --same-order --warning=no-timestamp \
+ -C $HERE/en file1 \
+ -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+],
+[0],
+[file1
+separator
+file2
+])
+
+AT_CLEANUP
diff --git a/tests/selacl01.at b/tests/selacl01.at
new file mode 100644
index 0000000..72d21c8
--- /dev/null
+++ b/tests/selacl01.at
@@ -0,0 +1,66 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2011, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description:
+#
+# This is basic test for support of extended attributes.
+
+AT_SETUP([acls/selinux: special files & fifos])
+AT_KEYWORDS([xattrs selinux acls selacls01])
+
+AT_TAR_CHECK([
+AT_PRIVILEGED_PREREQ
+AT_XATTRS_UTILS_PREREQ
+AT_SELINUX_PREREQ
+AT_ACLS_PREREQ
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=$( stat /dev/urandom --printf="%t" )
+MINOR=$( stat /dev/urandom --printf="%T" )
+mknod dir/chartype c $MAJOR $MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:$UID:--- dir/fifo
+setfacl -m u:$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+],
+[0],
+[separator
+])
+
+AT_CLEANUP
diff --git a/tests/selnx01.at b/tests/selnx01.at
new file mode 100644
index 0000000..7485cc8
--- /dev/null
+++ b/tests/selnx01.at
@@ -0,0 +1,98 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2012-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description:
+#
+# This is basic test for selinux support (store & restore).
+
+AT_SETUP([selinux: basic store/restore])
+AT_KEYWORDS([xattrs selinux selnx01])
+
+AT_TAR_CHECK([
+AT_XATTRS_UTILS_PREREQ
+AT_SELINUX_PREREQ
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
+ grep -v -e '^#' -e ^$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test "$?" -eq "0"; then
+ echo "selinux contexts probably restored while --selinux is off"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test "$?" -ne "0"; then
+ echo "bad result"
+fi
+
+],
+[0],
+[security.selinux="system_u
+security.selinux="unconfined_u
+security.selinux="system_u
+])
+
+AT_CLEANUP
diff --git a/tests/shortfile.at b/tests/shortfile.at
new file mode 100644
index 0000000..543173d
--- /dev/null
+++ b/tests/shortfile.at
@@ -0,0 +1,40 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.18 in reading mode silently ignored any invalid files smaller than 512
+# Reported by: Ian <isoboroff@gmail.com> on Thu, 23 Aug 2007 15:15:51 -0400
+# References: <ebd55800708231215l5f8f52c0i9018fdb60bb202b@mail.gmail.com>
+# http://lists.gnu.org/archive/html/bug-tar/2007-08/msg00038.html
+
+AT_SETUP([short input files])
+AT_KEYWORDS([shortfile shortfile0])
+
+AT_TAR_CHECK([
+genfile --length 511 --file foo || exit 5
+tar tf foo
+],
+[2],
+[],
+[tar: This does not look like a tar archive
+tar: Exiting with failure status due to previous errors
+],
+[],[],[gnu])
+
+AT_CLEANUP
diff --git a/tests/shortrec.at b/tests/shortrec.at
new file mode 100644
index 0000000..07b0af3
--- /dev/null
+++ b/tests/shortrec.at
@@ -0,0 +1,40 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005, 2007-2009, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that tar doesn't complain when reading short records.
+# This can happen when the input blocksize differs from the blocksize
+# used to create the archive.
+
+AT_SETUP([short records])
+AT_KEYWORDS([shortrec])
+
+AT_TAR_CHECK([
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+])
+
+AT_CLEANUP
diff --git a/tests/shortupd.at b/tests/shortupd.at
new file mode 100644
index 0000000..d5f93a4
--- /dev/null
+++ b/tests/shortupd.at
@@ -0,0 +1,40 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Fixing improper small file recognition in version 1.18 (see shortfile.at
+# and ChangeLog:2007-08-24), introduced another bug: when updating a
+# non-existing archive, tar-1.19 complained about its not being a tar archive
+# and exited immediately, leaving the created zero-sized file after it.
+#
+# This bug was fixed on 2007-12-05.
+#
+# Reported by: Ozan @,{C}a@v{g}layan <ozancag@gmail.com>
+# References: <4755A82A.9060607@gmail.com>
+
+AT_SETUP([updating short archives])
+AT_KEYWORDS([shortfile shortfile1 shortupd])
+
+AT_TAR_CHECK([
+touch foo
+tar uf archive foo
+],
+[0])
+
+AT_CLEANUP
diff --git a/tests/sigpipe.at b/tests/sigpipe.at
new file mode 100644
index 0000000..825b72b
--- /dev/null
+++ b/tests/sigpipe.at
@@ -0,0 +1,44 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([sigpipe handling])
+AT_KEYWORDS([sigpipe])
+
+# Description: Tar 1.23 ignored sigpipe which lead to spurious "write
+# error" diagnostics when piping output to another programs.
+# Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
+# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html
+# <20100319184141.GC30047@wo.int.altlinux.org>
+
+AT_CHECK([
+AT_SIGPIPE_PREREQ
+
+genfile --length 2048 --file first
+genfile --length 2048 --file second
+genfile --length 2049 --file third
+
+tar cf archive first second third
+
+# Discard diagnostics that some shells generate about broken pipes.
+(tar tf archive 2>&3 | :) 3>&2 2>/dev/null
+],
+[0])
+
+AT_CLEANUP
diff --git a/tests/sparse01.at b/tests/sparse01.at
new file mode 100644
index 0000000..bf0e08c
--- /dev/null
+++ b/tests/sparse01.at
@@ -0,0 +1,52 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([sparse files])
+AT_KEYWORDS([sparse sparse01])
+
+AT_TAR_CHECK([
+genfile --length 1000 -f begin
+genfile --length 1000 -f end
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive --warning=no-timestamp
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+],
+[0],
+[stdout],
+[],[],[],[posix, gnu, oldgnu])
+
+RE_CHECK([stdout],
+[separator
+-rw-r--r-- [^ ][^ ]* *1000 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] begin
+-rw-r--r-- [^ ][^ ]* *10344448 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] sparsefile
+-rw-r--r-- [^ ][^ ]* *1000 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] end
+separator
+sparsefile 10344448
+])
+
+AT_CLEANUP
diff --git a/tests/sparse02.at b/tests/sparse02.at
new file mode 100644
index 0000000..a4ac62e
--- /dev/null
+++ b/tests/sparse02.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([extracting sparse file over a pipe])
+AT_KEYWORDS([sparse sparse02])
+
+# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
+# References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
+# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
+
+AT_TAR_CHECK([
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST
+tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+],
+[0],
+[separator
+],
+[],[],[],[posix, gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/sparse03.at b/tests/sparse03.at
new file mode 100644
index 0000000..30f381c
--- /dev/null
+++ b/tests/sparse03.at
@@ -0,0 +1,56 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([storing sparse files > 8G])
+AT_KEYWORDS([sparse sparse03])
+
+# Tar 1.15.1 incorrectly computed sparse member size if the extended
+# PAX header contained size keyword.
+# References: <87vf46nb36.fsf@penguin.cs.ucla.edu>
+# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
+
+AT_TAR_CHECK([
+genfile --length 1000 --file begin
+genfile --length 1000 --file end
+genfile --sparse --file sparsefile --block-size 512 8G A || AT_SKIP_TEST
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+],
+[0],
+[stdout],
+[],[],[],[posix])
+
+RE_CHECK([stdout],
+[separator
+-rw-r--r-- [^ ][^ ]* *1000 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] begin
+-rw-r--r-- [^ ][^ ]* *8589935104 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] sparsefile
+-rw-r--r-- [^ ][^ ]* *1000 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] end
+separator
+sparsefile 8589935104
+])
+
+AT_CLEANUP
diff --git a/tests/sparse04.at b/tests/sparse04.at
new file mode 100644
index 0000000..833cbf7
--- /dev/null
+++ b/tests/sparse04.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([storing long sparse file names])
+AT_KEYWORDS([sparse sparse04])
+
+# Description: Tar versions from 1.15.92 to 1.25 would incorrectly
+# store sparse file names longer than 100 characters in pax mode.
+# Namely, the 'path' keyword of the produced PAX header would contain the
+# crafted name of the header itself, instead of that of the file.
+# Reported by: Kamil Dudka <kdudka@redhat.com>
+# References: <201011250026.44908.kdudka@redhat.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html
+
+m4_pushdef([NAME_111],
+ [123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960])
+
+AT_TAR_CHECK([
+genfile --sparse --file NAME_111 --block-size 512 8M A || AT_SKIP_TEST
+tar -f - -c --sparse --posix NAME_111 | tar tf -
+],
+[0],
+[NAME_111
+],
+[],
+[],
+[],
+[pax])
+
+m4_popdef([NAME_111])
+AT_CLEANUP
diff --git a/tests/sparse05.at b/tests/sparse05.at
new file mode 100644
index 0000000..0c7a037
--- /dev/null
+++ b/tests/sparse05.at
@@ -0,0 +1,47 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([listing sparse files bigger than 2^33 B])
+AT_KEYWORDS([sparse sparse05])
+
+# Description: If an archive in POSIX.1-2001 archive contained a sparse file
+# member whose real size (excluding zero blocks) is bigger than 2^33 bytes,
+# tar 1.28 would incorrectly list the real member size.
+# Reported by: Pavel Raiskup <praiskup@redhat.com>
+# References: <1359119879.15037.4.camel@raiskup>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html
+
+AT_TAR_CHECK([
+AT_DATA([mapfile],
+[0 =2560
+m4_for([i], 1, 999, 1, [10M =2560
+])])
+genfile --sparse --file BIGFILE --block-size 4K - < mapfile || AT_SKIP_TEST
+tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print $3, $(NF) }'
+],
+[0],
+[20961034240 BIGFILE
+],
+[],
+[],
+[],
+[pax])
+
+AT_CLEANUP
diff --git a/tests/sparse06.at b/tests/sparse06.at
new file mode 100644
index 0000000..7014125
--- /dev/null
+++ b/tests/sparse06.at
@@ -0,0 +1,54 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([storing sparse file using seek method])
+AT_KEYWORDS([sparse sparse06])
+
+m4_define([check_pattern],[
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse $1
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+])
+
+AT_TAR_CHECK([
+AT_SEEKHOLE_PREREQ
+
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=seek"
+genfile --sparse --file bigsparse 0 ABC 8G DEF
+tar -cSf a bigsparse
+test $? -eq 0 || exit 1
+
+check_pattern([0 ABC])
+check_pattern([0 ABC 10M])
+check_pattern([0 ABC 10M DEF])
+
+check_pattern([10M])
+check_pattern([10M ABC])
+check_pattern([10M ABC 20M])
+
+check_pattern([10M DEF 20M GHI 30M JKL 40M])
+
+],
+[0],,
+[],,,[posix])
+
+AT_CLEANUP
diff --git a/tests/sparsemv.at b/tests/sparsemv.at
new file mode 100644
index 0000000..3d642fe
--- /dev/null
+++ b/tests/sparsemv.at
@@ -0,0 +1,66 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005-2008, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([sparse files in MV archives])
+AT_KEYWORDS([sparse multiv sparsemv])
+
+# Check if sparse files are correctly split between GNU multi-volume
+# archives.
+# There are two cases: the file can be split within an empty (null) block,
+# or within a data block. Since null blocks are not archived, the first
+# case means the file is split between two consecutive data blocks.
+#
+
+AT_TAR_CHECK([
+exec <&-
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || AT_SKIP_TEST
+echo "Pass 1: Split between data blocks"
+echo "Create archive"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo "Test archive"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+
+echo "Pass 2: Split within a data block"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || AT_SKIP_TEST
+echo "Create archive"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo "Test archive"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+],
+[0],
+[Pass 1: Split between data blocks
+Create archive
+Test archive
+sparsefile
+Compare archive
+Pass 2: Split within a data block
+Create archive
+Test archive
+sparsefile
+Compare archive
+],
+[],[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/sparsemvp.at b/tests/sparsemvp.at
new file mode 100644
index 0000000..9a0e1f5
--- /dev/null
+++ b/tests/sparsemvp.at
@@ -0,0 +1,60 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005-2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check if sparse files are correctly split between PAX multi-volume
+# archives.
+# See comment in sparsemv.at for the description.
+
+dnl TAR_MVP_TEST version map1 map2
+m4_define([TAR_MVP_TEST],[
+AT_TAR_CHECK([
+exec <&-
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
+genfile --sparse --file sparsefile $2 || AT_SKIP_TEST
+echo "Pass 1: Split between data blocks"
+echo "Create archive"
+tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo "Test archive"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+
+echo "Pass 2: Split within a data block"
+genfile --sparse --file sparsefile $3 || AT_SKIP_TEST
+echo "Create archive"
+tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo "Test archive"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+],
+[0],
+[Pass 1: Split between data blocks
+Create archive
+Test archive
+sparsefile
+Compare archive
+Pass 2: Split within a data block
+Create archive
+Test archive
+sparsefile
+Compare archive
+],
+[],[],[],[pax])])
diff --git a/tests/spmvp00.at b/tests/spmvp00.at
new file mode 100644
index 0000000..c053117
--- /dev/null
+++ b/tests/spmvp00.at
@@ -0,0 +1,26 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([sparse files in PAX MV archives, v.0.0])
+AT_KEYWORDS([sparse multivolume multiv sparsemvp sparsemvp00])
+
+TAR_MVP_TEST(0.0, [0 ABCDEFGHI 1M ABCDEFGHI], [0 ABCDEFGH 1M ABCDEFGHI])
+
+AT_CLEANUP
diff --git a/tests/spmvp01.at b/tests/spmvp01.at
new file mode 100644
index 0000000..b1fc1e3
--- /dev/null
+++ b/tests/spmvp01.at
@@ -0,0 +1,26 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([sparse files in PAX MV archives, v.0.1])
+AT_KEYWORDS([sparse multiv sparsemvp sparsemvp01])
+
+TAR_MVP_TEST(0.1, [0 ABCDEFGHIJK 1M ABCDEFGHI], [0 ABCDEFGHIJ 1M ABCDEFGHI])
+
+AT_CLEANUP
diff --git a/tests/spmvp10.at b/tests/spmvp10.at
new file mode 100644
index 0000000..a637367
--- /dev/null
+++ b/tests/spmvp10.at
@@ -0,0 +1,26 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([sparse files in PAX MV archives, v.1.0])
+AT_KEYWORDS([sparse multivolume multiv sparsemvp sparsemvp10])
+
+TAR_MVP_TEST(1.0, [0 ABCDEFGH 1M ABCDEFGHI], [0 ABCDEFG 1M ABCDEFGHI])
+
+AT_CLEANUP
diff --git a/tests/star/README b/tests/star/README
new file mode 100644
index 0000000..57a6609
--- /dev/null
+++ b/tests/star/README
@@ -0,0 +1,91 @@
+This directory contains scripts for testing GNU tar using
+star "test archives". The archives themselves can be obtained
+from ftp://ftp.berlios.de/pub/star/testscripts.
+
+These tests are disabled by default. There are two ways to run
+them. The simplest is by 'make check-full' command. It requires wget
+and GNU md5sum to be installed. If you don't have these utilities,
+download the test archives manually and set the environment variable
+STAR_TESTSCRIPTS to point to the directory where they reside, for
+example:
+
+ make STAR_TESTSCRIPTS=testdir check
+or
+ make TESTS_ENVIRONMENT='STAR_TESTSCRIPTS=testdir' check
+
+The file 'quicktest.sh' is a separate test. It is never executed
+within 'make check' command, you will need to run it manually.
+Please, carefully read section 'quicktest.sh' below before running
+it.
+
+Following is a short description of the tests:
+
+* gtarfail.at and gtarfail2.at
+
+These tests require gtarfile.tar and gtarfile2.tar, respectively.
+These files are POSIX compliant tar archives that were not accepted
+by previous versions of GNU tar.
+
+* multi-fail.at
+
+Requires gnu-multi-fail-volume1.gtar and gnu-multi-fail-volume2.gtar.
+These are two parts of a multi-volume archive that previous versions
+of tar refused to read (at least, without -B option).
+
+* ustar-big-2g.at
+
+Requires ustar-big-2g.tar.bz2. It is a tar archive containing a file with
+the largest size that a historic tar implementation is able to understand.
+
+* ustar-big-8g.at
+
+Requires ustar-big-8g.tar.bz2. This is a test for reading an archive containing
+files with the largest size that may be used with ustar (POSIX.1-1990)
+format.
+
+* pax-big-10g.at
+
+Requires pax-big-10g.tar.bz2. It tests handling pax (POSIX.1-2001) archves
+containing very large files (in this case -- 10 GB).
+
+* quicktest.sh
+
+This is a test for compliance to POSIX.1-1990 tar specification. It
+requires two files: ustar-all-quicktest.tar and quicktest.filelist,
+(they usually reside in star/testscripts directory), and 'tartest' program
+(also part of star distribution). The test must be run only with root
+privileges, so it is a good idea to verify the contents of
+ustar-all-quicktest.tar before running it.
+
+If 'tartest' is not in your PATH, use TARTEST variable to specify its
+full file name. You may pass both STAR_TESTSCRIPTS and TARTEST
+variables as command line arguments to quicktest.sh, as shown in
+the example below:
+
+ ./quicktest.sh STAR_TESTSCRIPTS=testdir TARTEST=/path/to/tartest
+
+
+* Copying
+
+Copyright 2004, 2006-2008, 2010, 2012-2014, 2016 Free Software
+Foundation, Inc.
+
+This file is part of GNU tar.
+
+GNU tar is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+GNU tar is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Local variables:
+mode: outline
+paragraph-separate: "[ ]*$"
+end:
diff --git a/tests/star/gtarfail.at b/tests/star/gtarfail.at
new file mode 100644
index 0000000..3fc661b
--- /dev/null
+++ b/tests/star/gtarfail.at
@@ -0,0 +1,41 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([gtarfail])
+AT_KEYWORDS([star gtarfail])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([gtarfail.tar],[bf7612e401aaa679edbb07ae1183811b])
+
+tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
+],
+[0],
+[-rw-r--r-- jes/glone 518 2001-05-25 14:41 vedpowered.gif
+-rw-r--r-- jes/glone 6825 1997-04-29 00:19 cd.gif
+-rw-r--r-- jes/glone 33354 1999-06-22 12:17 DSCN0049c.JPG
+-rw-r--r-- jes/glone 86159 2001-06-05 18:16 Window1.jpg
+-rw-r--r-- jes/glone 1310 2001-05-25 13:05 vipower.gif
+-rw-rw-rw- jes/glone 148753 1998-09-15 13:08 billyboy.jpg
+])
+
+AT_CLEANUP
diff --git a/tests/star/gtarfail2.at b/tests/star/gtarfail2.at
new file mode 100644
index 0000000..9ab5fbe
--- /dev/null
+++ b/tests/star/gtarfail2.at
@@ -0,0 +1,44 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([gtarfail2])
+AT_KEYWORDS([star gtarfail2])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([gtarfail2.tar],[6b607d1faec14b82f69525d9c5b66e53])
+tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
+],
+[0],
+[-rwxr-xr-x jes/glone 214 2001-09-21 14:08 .clean
+lrwxrwxrwx jes/cats 0 1998-05-07 12:39 RULES -> makefiles/RULES
+drwxr-sr-x jes/glone 0 2001-12-10 00:00 build/
+-rw-r--r-- jes/glone 312019 2001-12-10 00:00 build/smake-1.2.tar.gz
+drwxr-sr-x jes/glone 0 2001-11-09 18:20 build/psmake/
+-rwxr-xr-x jes/glone 259 2000-01-09 16:36 build/psmake/MAKE
+-rwxr-xr-x jes/glone 4820 2001-02-25 22:45 build/psmake/MAKE.sh
+-rw-r--r-- jes/glone 647 2001-02-25 23:50 build/psmake/Makefile
+lrwxrwxrwx jes/glone 0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c
+lrwxrwxrwx jes/glone 0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c
+])
+
+AT_CLEANUP
diff --git a/tests/star/multi-fail.at b/tests/star/multi-fail.at
new file mode 100644
index 0000000..07df54e
--- /dev/null
+++ b/tests/star/multi-fail.at
@@ -0,0 +1,89 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([multi-fail])
+AT_KEYWORDS([star multivolume multiv multi-fail])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([gnu-multi-fail-volume1.gtar],[7c28663dd98b0bd91ceb4be7af55254e])
+AT_STAR_PREREQ([gnu-multi-fail-volume2.gtar],[b5d41c4c3ec440687d4a44957b5079a8])
+
+tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
+ -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
+],
+[0],
+[drwxrwsr-x joerg/bs 0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/
+-rw-r--r-- joerg/bs 1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull
+-rw-r--r-- joerg/bs 1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d
+-rw-r--r-- joerg/bs 1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d
+-rw-r--r-- joerg/bs 1540 2003-10-10 18:06 OBJ/i386-sunos5-gcc/cpiohdr.d
+-rw-r--r-- joerg/bs 2245 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xheader.d
+-rw-r--r-- joerg/bs 1254 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xattr.d
+-rw-r--r-- joerg/bs 1330 2003-10-10 18:06 OBJ/i386-sunos5-gcc/list.d
+-rw-r--r-- joerg/bs 1745 2003-10-10 18:06 OBJ/i386-sunos5-gcc/extract.d
+-rw-r--r-- joerg/bs 1518 2003-10-10 18:06 OBJ/i386-sunos5-gcc/create.d
+-rw-r--r-- joerg/bs 1235 2003-10-10 18:06 OBJ/i386-sunos5-gcc/append.d
+-rw-r--r-- joerg/bs 1368 2003-10-10 18:06 OBJ/i386-sunos5-gcc/diff.d
+-rw-r--r-- joerg/bs 1423 2003-10-10 18:06 OBJ/i386-sunos5-gcc/remove.d
+-rw-r--r-- joerg/bs 1493 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.d
+-rw-r--r-- joerg/bs 1572 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.d
+-rw-r--r-- joerg/bs 1453 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.d
+-rw-r--r-- joerg/bs 2257 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.d
+-rw-r--r-- joerg/bs 969 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.d
+-rw-r--r-- joerg/bs 1308 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.d
+-rw-r--r-- joerg/bs 1287 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.d
+-rw-r--r-- joerg/bs 1105 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.d
+-rw-r--r-- joerg/bs 1230 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.d
+-rw-r--r-- joerg/bs 1091 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.d
+-rw-r--r-- joerg/bs 961 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.d
+-rw-r--r-- joerg/bs 1113 2003-10-10 18:07 OBJ/i386-sunos5-gcc/props.d
+-rw-r--r-- joerg/bs 2146 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fetchdir.d
+-rw-r--r-- joerg/bs 1093 2003-10-10 18:07 OBJ/i386-sunos5-gcc/unicode.d
+-rw-r--r-- joerg/bs 1211 2003-10-10 18:07 OBJ/i386-sunos5-gcc/subst.d
+-rw-r--r-- joerg/bs 2076 2003-10-11 11:53 OBJ/i386-sunos5-gcc/volhdr.d
+-rw-r--r-- joerg/bs 1480 2003-10-10 18:07 OBJ/i386-sunos5-gcc/chdir.d
+-rw-r--r-- joerg/bs 42460 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star.o
+-rw-r--r-- joerg/bs 22564 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.o
+-rw-r--r-- joerg/bs 7880 2003-10-10 18:07 OBJ/i386-sunos5-gcc/cpiohdr.o
+-rw-r--r-- joerg/bs 14624 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xheader.o
+-rw-r--r-- joerg/bs 924 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xattr.o
+-rw-r--r-- joerg/bs 6120 2003-10-10 18:07 OBJ/i386-sunos5-gcc/list.o
+-rw-r--r-- joerg/bs 12764 2003-10-10 18:07 OBJ/i386-sunos5-gcc/extract.o
+-rw-r--r-- joerg/bs 14668 2003-10-10 18:07 OBJ/i386-sunos5-gcc/create.o
+-rw-r--r-- joerg/bs 2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/append.o
+-rw-r--r-- joerg/bs 7636 2003-10-10 18:07 OBJ/i386-sunos5-gcc/diff.o
+-rw-r--r-- joerg/bs 3072 2003-10-10 18:07 OBJ/i386-sunos5-gcc/remove.o
+-rw-r--r-- joerg/bs 5612 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.o
+-rw-r--r-- joerg/bs 6220 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.o
+-rw-r--r-- joerg/bs 1092 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.o
+-rw-r--r-- joerg/bs 20996 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.o
+-rw-r--r-- joerg/bs 2060 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.o
+-rw-r--r-- joerg/bs 1664 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.o
+-rw-r--r-- joerg/bs 10564 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.o
+-rw-r--r-- joerg/bs 3864 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.o
+-rw-r--r-- joerg/bs 2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o
+-rw-r--r-- joerg/bs 952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o
+-rw-r--r-- joerg/bs 2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o
+])
+
+AT_CLEANUP
diff --git a/tests/star/pax-big-10g.at b/tests/star/pax-big-10g.at
new file mode 100644
index 0000000..9693e7d
--- /dev/null
+++ b/tests/star/pax-big-10g.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([pax-big-10g])
+AT_KEYWORDS([star pax-big-10g])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_GZIP_PREREQ([bzip2])
+AT_STAR_PREREQ([pax-big-10g.tar.bz2],[ca15c23acc8d8bb1f27e60113a5f8bff])
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
+],
+[0],
+[-rw------- jes/glone 10737418240 2002-06-15 21:18 10g
+-rw-r--r-- jes/glone 0 2002-06-15 14:53 file
+],
+[stderr])
+
+RE_CHECK([stderr],[tar: Record size = .*
+])
+
+AT_CLEANUP
diff --git a/tests/star/quicktest.sh b/tests/star/quicktest.sh
new file mode 100755
index 0000000..1cb0158
--- /dev/null
+++ b/tests/star/quicktest.sh
@@ -0,0 +1,109 @@
+#! /bin/sh
+# This file is part of GNU tar testsuite.
+# Copyright 2004-2005, 2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PWD=`pwd`
+P=`expr $0 : '\(.*\)/.*'`
+DIR=`cd $P; pwd`/../../src
+if [ -d $DIR ]; then
+ PATH=`cd $DIR;pwd`:$PATH
+fi
+
+# Usage: quicktest FILELIST ARCHIVE-NAME
+quicktest() {
+ DIR=quicktest.$$
+ mkdir $DIR
+ cd $DIR
+
+ TAR_OPTIONS=""
+ export TAR_OPTIONS
+
+ tar xf $2
+ tar -cf ../archive -H ustar -T $1
+ cd ..
+
+ ${TARTEST:-tartest} -v < $2 > $DIR/old.out
+ ${TARTEST:-tartest} -v < archive > $DIR/new.out
+
+ if cmp $DIR/old.out $DIR/new.out; then
+ echo "PASS"
+ rm -r $DIR
+ exit 0
+ else
+ echo "FAIL. Examine $DIR for details"
+ exit 1
+ fi
+}
+
+test_access() {
+ if [ -r $1 ]; then
+ :
+ else
+ echo "$1 does not exist or is unreadable"
+ echo 77
+ fi
+}
+
+check_environ() {
+ if [ "$STAR_TESTSCRIPTS" = "" ]; then
+ echo "STAR_TESTSCRIPTS not set"
+ exit 77
+ fi
+
+ if [ -d $STAR_TESTSCRIPTS ]; then
+ :
+ else
+ echo "STAR_TESTSCRIPTS is not a directory"
+ exit 77
+ fi
+
+ ARCHIVE=$STAR_TESTSCRIPTS/ustar-all-quicktest.tar
+ test_access $ARCHIVE
+ FILELIST=$STAR_TESTSCRIPTS/quicktest.filelist
+ test_access $FILELIST
+
+ ${TARTEST:-tartest} < /dev/null > /dev/null 2>&1
+ if [ $? -eq 127 ]; then
+ echo "tartest not in your path"
+ exit 77
+ fi
+ tar --version
+}
+
+getargs() {
+ for option
+ do
+ case $option in
+ *=*) eval $option;;
+ *) echo "Unknown option: $option" >&2
+ exit 77;;
+ esac
+ done
+}
+
+if [ -w / ]; then
+ getargs $*
+ check_environ
+ quicktest $FILELIST $ARCHIVE
+else
+ echo "You need to be root to run this test"
+ exit 77
+fi
+
+# End of quicktest.sh
diff --git a/tests/star/ustar-big-2g.at b/tests/star/ustar-big-2g.at
new file mode 100644
index 0000000..a3fadb3
--- /dev/null
+++ b/tests/star/ustar-big-2g.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([ustar-big-2g])
+AT_KEYWORDS([star ustar-big-2g])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_GZIP_PREREQ([bzip2])
+AT_STAR_PREREQ([ustar-big-2g.tar.bz2],[b63979733629c8fcdf40b60065422767])
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
+],
+[0],
+[-rw------- jes/glone 2147483647 2002-06-15 14:53 big
+-rw-r--r-- jes/glone 0 2002-06-15 14:53 file
+],
+[stderr])
+
+RE_CHECK([stderr],[tar: Record size = .*
+])
+
+AT_CLEANUP
diff --git a/tests/star/ustar-big-8g.at b/tests/star/ustar-big-8g.at
new file mode 100644
index 0000000..7c3498a
--- /dev/null
+++ b/tests/star/ustar-big-8g.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([ustar-big-8g])
+AT_KEYWORDS([star ustar-big-8g])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_GZIP_PREREQ([bzip2])
+AT_STAR_PREREQ([ustar-big-8g.tar.bz2],[60ff503fa4b8288bef7ada89e9c91b0f])
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
+],
+[0],
+[-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1
+-rw-r--r-- jes/glone 0 2002-06-15 14:53 file
+],
+[stderr])
+
+RE_CHECK([stderr],[tar: Record size = .*
+])
+
+AT_CLEANUP
diff --git a/tests/testsuite b/tests/testsuite
new file mode 100755
index 0000000..4c0d7be
--- /dev/null
+++ b/tests/testsuite
@@ -0,0 +1,53456 @@
+#! /bin/sh
+# Generated from testsuite.at by GNU Autoconf 2.69.
+#
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+#
+# This test suite is free software; the Free Software Foundation gives
+# unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# How were we run?
+at_cli_args="$@"
+
+
+# Not all shells have the 'times' builtin; the subshell is needed to make
+# sure we discard the 'times: not found' message from the shell.
+at_times_p=false
+(times) >/dev/null 2>&1 && at_times_p=:
+
+# CLI Arguments to pass to the debugging scripts.
+at_debug_args=
+# -e sets to true
+at_errexit_p=false
+# Shall we be verbose? ':' means no, empty means yes.
+at_verbose=:
+at_quiet=
+# Running several jobs in parallel, 0 means as many as test groups.
+at_jobs=1
+at_traceon=:
+at_trace_echo=:
+at_check_filter_trace=:
+
+# Shall we keep the debug scripts? Must be `:' when the suite is
+# run by a debug script, so that the script doesn't remove itself.
+at_debug_p=false
+# Display help message?
+at_help_p=false
+# Display the version message?
+at_version_p=false
+# List test groups?
+at_list_p=false
+# --clean
+at_clean=false
+# Test groups to run
+at_groups=
+# Whether to rerun failed tests.
+at_recheck=
+# Whether a write failure occurred
+at_write_fail=0
+
+# The directory we run the suite in. Default to . if no -C option.
+at_dir=`pwd`
+# An absolute reference to this testsuite script.
+case $as_myself in
+ [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
+ * ) at_myself=$at_dir/$as_myself ;;
+esac
+# Whether -C is in effect.
+at_change_dir=false
+
+# Whether to enable colored test results.
+at_color=no
+# List of the tested programs.
+at_tested='tar'
+# As many question marks as there are digits in the last test group number.
+# Used to normalize the test group numbers so that `ls' lists them in
+# numerical order.
+at_format='???'
+# Description of all the test groups.
+at_help_all="1;version.at:20;tar version;;
+2;pipe.at:29;decompressing from stdin;pipe;
+3;options.at:25;mixing options;options options00;
+4;options02.at:27;interspersed options;options options02;
+5;opcomp01.at:21;occurrence compatibility;opcomp opcomp01;
+6;opcomp02.at:21;occurrence compatibility;opcomp opcomp02;
+7;opcomp03.at:21;--verify compatibility;opcomp opcomp03;
+8;opcomp04.at:21;compress option compatibility;opcomp opcomp04;
+9;opcomp05.at:21;--pax-option compatibility;opcomp opcomp05;
+10;opcomp06.at:21;--pax-option compatibility;opcomp opcomp06;
+11;T-mult.at:21;multiple file lists;files-from t-mult;
+12;T-nest.at:21;nested file lists;files-from t-nest;
+13;T-rec.at:21;recursive file lists;files-from t-rec;
+14;T-recurse.at:27;files-from & recurse: toggle;recurse t-recurse files-from;
+15;T-recurse.at:66;toggle --recursion (not) from -T;recurse t-recurse t-recurse2 files-from;
+16;T-cd.at:21;-C in file lists;files-from t-cd;
+17;T-empty.at:26;empty entries;files-from empty-line;
+18;T-null.at:21;0-separated file without -0;files-from null t-null;
+19;T-null2.at:17;--null enables verbatim reading;files-from null t-null2 t-verbatim;
+20;T-zfile.at:26;empty file;files-from empty-file;
+21;T-nonl.at:27;entries with missing newlines;files-from nonewline nonl t-nonl;
+22;T-dir00.at:28;recursive extraction from --files-from;files-from extract t-dir t-dir00;
+23;T-dir01.at:28;trailing slash in --files-from;files-from extract t-dir t-dir01;
+24;indexfile.at:26;tar --index-file=FILE --file=-;stdout indexfile;
+25;verbose.at:26;tar cvf -;stdout verbose;
+26;gzip.at:24;gzip;gzip;
+27;recurse.at:21;recurse;recurse;
+28;recurs02.at:30;recurse: toggle;recurse options recurse02;
+29;shortrec.at:26;short records;shortrec;
+30;numeric.at:18;--numeric-owner basic tests;options numeric numeric-owner;
+31;same-order01.at:27;working -C with --same-order;same-order same-order01;
+32;same-order02.at:26;multiple -C options;same-order same-order02;
+33;append.at:22;append;append append00;
+34;append01.at:29;appending files with long names;append append01;
+35;append02.at:55;append vs. create;append append02 append-gnu;
+36;append03.at:21;append with name transformation;append append03;
+37;append04.at:29;append with verify;append append04 verify append-verify;
+38;append05.at:32;append after changed blocking;append append05 blocking;
+39;xform-h.at:30;transforming hard links on create;transform xform xform-h;
+40;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume;
+41;xform02.at:21;transforming escaped delimiters on create;transform xform delimiter;
+42;exclude.at:23;exclude;exclude;
+43;exclude01.at:19;exclude wildcards;exclude exclude01;
+44;exclude02.at:19;exclude: anchoring;exclude exclude02;
+45;exclude03.at:19;exclude: wildcards match slash;exclude exclude03;
+46;exclude04.at:19;exclude: case insensitive;exclude exclude04;
+47;exclude05.at:21;exclude: lots of excludes;exclude exclude05;
+48;exclude06.at:26;exclude: long files in pax archives;exclude exclude06;
+49;exclude07.at:19;exclude: --exclude-backups option;exclude exclude07;
+50;exclude08.at:36;--exclude-tag option;exclude exclude-tag exclude08;
+51;exclude09.at:37;--exclude-tag option and --listed-incremental;exclude exclude-tag listed incremental exclude09;
+52;exclude10.at:38;--exclude-tag option in incremental pass;exclude exclude-tag listed incremental exclude10;
+53;exclude11.at:36;--exclude-tag-under option;exclude exclude-tag exclude-tag-under exclude11;
+54;exclude12.at:37;--exclude-tag-under and --listed-incremental;exclude exclude-tag exclude-tag-under listed incremental exclude12;
+55;exclude13.at:39;--exclude-tag-under option in incremental pass;exclude exclude-tag exclude-tag-under listed incremental exclude13;
+56;exclude14.at:36;--exclude-tag-all option;exclude exclude-tag exclude-tag-all exclude14;
+57;exclude15.at:36;--exclude-tag-all and --listed-incremental;exclude exclude-tag exclude-tag-all listed incremental exclude15;
+58;exclude16.at:38;--exclude-tag-all option in incremental pass;exclude exclude-tag exclude-tag-all listed incremental exclude16;
+59;delete01.at:24;deleting a member after a big one;delete delete01;
+60;delete02.at:24;deleting a member from stdin archive;delete delete02;
+61;delete03.at:21;deleting members with long names;delete delete03;
+62;delete04.at:24;deleting a large last member;delete delete04;
+63;delete05.at:28;deleting non-existing member;delete delete05;
+64;extrac01.at:24;extract over an existing directory;extract extract01;
+65;extrac02.at:24;extracting symlinks over an existing file;extract extract02 symlink;
+66;extrac03.at:23;extraction loops;extract extract03;
+67;extrac04.at:24;extract + fnmatch;extract extract04 fnmatch;
+68;extrac05.at:31;extracting selected members from pax;extract extract05;
+69;extrac06.at:34;mode of extracted directories;extract extract06 directory mode;
+70;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink;
+71;extrac08.at:33;restoring mode on existing directory;extract extrac08;
+72;extrac09.at:34;extracting even when . and .. are unreadable;extract extrac09;
+73;extrac10.at:29;-C and delayed setting of metadata;extract extrac10;
+74;extrac11.at:25;scarce file descriptors;extract extrac11;
+75;extrac12.at:25;extract dot permissions;extract extrac12;
+76;extrac13.at:26;extract over symlinks;extract extrac13;
+77;extrac14.at:25;extract -C symlink;extract extrac14;
+78;extrac15.at:25;extract parent mkdir failure;extract extrac15;
+79;extrac16.at:26;extract empty directory with -C;extract extrac16;
+80;extrac17.at:21;name matching/transformation ordering;extract extrac17;
+81;extrac18.at:34;keep-old-files;extract extrac18 old-files keep-old-files;
+82;extrac19.at:21;skip-old-files;extract extrac19 old-files skip-old-files;
+83;backup01.at:33;extracting existing dir with --backup;extract backup backup01;
+84;label01.at:21;single-volume label;label label01;
+85;label02.at:21;multi-volume label;label label02 multi-label multivolume multiv;
+86;label03.at:27;test-label option;label label03 test-label;
+87;label04.at:27;label with non-create option;label label04;
+88;label05.at:24;label with non-create option;label label05;
+89;incremental.at:23;incremental;incremental listed incr00;
+90;incr01.at:27;restore broken symlinks from incremental;incremental incr01;
+91;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02;
+92;listed01.at:27;--listed for individual files;listed incremental listed01;
+93;listed02.at:29;working --listed;listed incremental listed02;
+94;listed03.at:24;incremental dump when the parent directory is unreadable;listed incremental listed03;
+95;listed04.at:26;--listed-incremental and --one-file-system;listed incremental listed04;
+96;listed05.at:33;--listed-incremental and remounted directories;listed incremental listed05;
+97;incr03.at:29;renamed files in incrementals;incremental incr03 rename;
+98;incr04.at:30;proper icontents initialization;incremental incr04 icontents;
+99;incr05.at:21;incremental dumps with -C;incremental incr05;
+100;incr06.at:21;incremental dumps of nested directories;incremental incr06;
+101;incr07.at:18;incremental restores with -C;incremental extract incr07;
+102;incr08.at:38;filename normalization;incremental create incr08;
+103;incr09.at:26;incremental with alternating -C;incremental create incr09;
+104;incr10.at:18;concatenated incremental archives (deletes);incremental concat cat incr10;
+105;incr11.at:25;concatenated incremental archives (renames);incremental concat cat incr11;
+106;filerem01.at:36;file removed as we read it (ca. 22 seconds);create incremental listed filechange filerem filerem01;
+107;filerem02.at:26;toplevel file removed (ca. 24 seconds);create incremental listed filechange filerem filerem02;
+108;rename01.at:25;renamed dirs in incrementals;incremental rename rename01;
+109;rename02.at:25;move between hierarchies;incremental rename rename02;
+110;rename03.at:24;cyclic renames;incremental rename rename03 cyclic-rename;
+111;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename;
+112;rename05.at:24;renamed subdirectories;incremental rename05 rename;
+113;chtype.at:27;changed file types in incrementals;incremental listed chtype;
+114;ignfail.at:24;ignfail;ignfail;
+115;link01.at:34;link count gt 2;hardlinks link01;
+116;link02.at:32;preserve hard links with --remove-files;hardlinks link02;
+117;link03.at:24;working -l with --remove-files;hardlinks link03;
+118;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04;
+119;longv7.at:25;long names in V7 archives;longname longv7;
+120;long01.at:28;long file names divisible by block size;longname long512;
+121;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01;
+122;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02;
+123;lustar03.at:21;ustar: splitting long names;longname ustar lustar03;
+124;old.at:23;old archives;old;
+125;time01.at:20;time: tricky time stamps;time time01;
+126;time02.at:20;time: clamping mtime;time time02;
+127;multiv01.at:24;multivolume dumps from pipes;multivolume multiv multiv01;
+128;multiv02.at:29;skipping a straddling member;multivolume multiv multiv02;
+129;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03;
+130;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental listed multiv04;
+131;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync;
+132;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06;
+133;multiv07.at:28;volumes split at an extended header;multivolume multiv multiv07 xsplit;
+134;multiv08.at:25;multivolume header creation;multivolume multiv multiv08;
+135;multiv09.at:26;bad next volume;multivolume multiv multiv09;
+136;owner.at:21;--owner and --group;owner;
+137;map.at:21;--owner-map and --group-map;owner map;
+138;sparse01.at:22;sparse files;sparse sparse01;
+139;sparse02.at:22;extracting sparse file over a pipe;sparse sparse02;
+140;sparse03.at:21;storing sparse files > 8G;sparse sparse03;
+141;sparse04.at:21;storing long sparse file names;sparse sparse04;
+142;sparse05.at:21;listing sparse files bigger than 2^33 B;sparse sparse05;
+143;sparse06.at:21;storing sparse file using seek method;sparse sparse06;
+144;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv;
+145;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00;
+146;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01;
+147;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10;
+148;update.at:28;update unchanged directories;update update00;
+149;update01.at:29;update directories;update update01;
+150;update02.at:26;update changed files;update update02;
+151;verify.at:25;verify;verify;
+152;volume.at:24;volume;volume volcheck;
+153;volsize.at:29;volume header size;volume volsize;
+154;comprec.at:22;compressed format recognition;comprec;
+155;shortfile.at:26;short input files;shortfile shortfile0;
+156;shortupd.at:31;updating short archives;shortfile shortfile1 shortupd;
+157;truncate.at:29;truncate;truncate filechange;
+158;grow.at:24;grow;grow filechange;
+159;sigpipe.at:21;sigpipe handling;sigpipe;
+160;comperr.at:18;compressor program failure;compress comperr;
+161;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip;
+162;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip;
+163;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03;
+164;remfiles04a.at:25;remove-files with -C:rel in -c/non-incr. mode;create remove-files remfiles04 remfiles04a;
+165;remfiles04b.at:33;remove-files with -C:rel in -c/incr. mode;create incremental remove-files remfiles04 remfiles04b;
+166;remfiles04c.at:33;remove-files with -C:rel in -r mode;create append remove-files remfiles04 remfiles04c;
+167;remfiles05a.at:34;remove-files with -C:rel,rel in -c/non-incr. mode;create remove-files remfiles05 remfiles05a;
+168;remfiles05b.at:25;remove-files with -C:rel,rel in -c/incr. mode;create incremental remove-files remfiles05 remfiles05b;
+169;remfiles05c.at:25;remove-files with -C:rel,rel in -r mode;create append remove-files remfiles05 remfiles05c;
+170;remfiles06a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles06 remfiles06a;
+171;remfiles06b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles06 remfiles06b;
+172;remfiles06c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles06 remfiles06c;
+173;remfiles07a.at:25;remove-files with -C:abs,rel in -c/non-incr. mode;create remove-files remfiles07 remfiles07a;
+174;remfiles07b.at:25;remove-files with -C:abs,rel in -c/incr. mode;create incremental remove-files remfiles07 remfiles07b;
+175;remfiles07c.at:25;remove-files with -C:abs,rel in -r mode;create append remove-files remfiles07 remfiles07c;
+176;remfiles08a.at:28;remove-files deleting two subdirs in -c/non-incr. mode;create remove-files remfiles08 remfiles08a;
+177;remfiles08b.at:31;remove-files deleting two subdirs in -c/incr. mode;create incremental remove-files remfiles08 remfiles08b;
+178;remfiles08c.at:28;remove-files deleting two subdirs in -r mode;create append remove-files remfiles08 remfiles08c;
+179;remfiles09a.at:25;remove-files on full directory in -c/non-incr. mode;create remove-files remfiles09 remfiles09a;
+180;remfiles09b.at:29;remove-files on full directory in -c/incr. mode;create incremental remove-files remfiles09 remfiles09b;
+181;remfiles09c.at:25;remove-files on full directory in -r mode;create append remove-files remfiles09 remfiles09c;
+182;remfiles10.at:20;remove-files;create remove-files remfiles10;
+183;xattr01.at:25;xattrs: basic functionality;xattrs xattr01;
+184;xattr02.at:25;xattrs: change directory with -C option;xattrs xattr02;
+185;xattr03.at:25;xattrs: trusted.* attributes;xattrs xattr03;
+186;xattr04.at:26;xattrs: s/open/openat/ regression;xattrs xattr04;
+187;xattr05.at:28;xattrs: keywords with '=' and '%';xattrs xattr05;
+188;acls01.at:25;acls: basic functionality;xattrs acls acls01;
+189;acls02.at:25;acls: work with -C;xattrs acls acls02;
+190;acls03.at:30;acls: default ACLs;xattrs acls acls03;
+191;selnx01.at:25;selinux: basic store/restore;xattrs selinux selnx01;
+192;selacl01.at:25;acls/selinux: special files & fifos;xattrs selinux acls selacls01;
+193;capabs_raw01.at:25;capabilities: binary store/restore;xattrs capabilities capabs_raw01;
+194;onetop01.at:21;tar --one-top-level;extract onetop onetop01;
+195;onetop02.at:21;tar --one-top-level --show-transformed;extract onetop onetop02;
+196;onetop03.at:21;tar --one-top-level --transform;extract onetop onetop03;
+197;onetop04.at:21;tar --one-top-level --transform;extract onetop onetop04;
+198;onetop05.at:21;tar --one-top-level restoring permissions;extract onetop onetop05;
+199;gtarfail.at:22;gtarfail;star gtarfail;
+200;gtarfail2.at:22;gtarfail2;star gtarfail2;
+201;multi-fail.at:22;multi-fail;star multivolume multiv multi-fail;
+202;ustar-big-2g.at:22;ustar-big-2g;star ustar-big-2g;
+203;ustar-big-8g.at:22;ustar-big-8g;star ustar-big-8g;
+204;pax-big-10g.at:22;pax-big-10g;star pax-big-10g;
+"
+# List of the all the test groups.
+at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
+
+# at_fn_validate_ranges NAME...
+# -----------------------------
+# Validate and normalize the test group number contained in each variable
+# NAME. Leading zeroes are treated as decimal.
+at_fn_validate_ranges ()
+{
+ for at_grp
+ do
+ eval at_value=\$$at_grp
+ if test $at_value -lt 1 || test $at_value -gt 204; then
+ $as_echo "invalid test group: $at_value" >&2
+ exit 1
+ fi
+ case $at_value in
+ 0*) # We want to treat leading 0 as decimal, like expr and test, but
+ # AS_VAR_ARITH treats it as octal if it uses $(( )).
+ # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
+ # expr fork, but it is not worth the effort to determine if the
+ # shell supports XSI when the user can just avoid leading 0.
+ eval $at_grp='`expr $at_value + 0`' ;;
+ esac
+ done
+}
+
+at_prev=
+for at_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$at_prev"; then
+ at_option=$at_prev=$at_option
+ at_prev=
+ fi
+
+ case $at_option in
+ *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
+ *) at_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $at_option in
+ --help | -h )
+ at_help_p=:
+ ;;
+
+ --list | -l )
+ at_list_p=:
+ ;;
+
+ --version | -V )
+ at_version_p=:
+ ;;
+
+ --clean | -c )
+ at_clean=:
+ ;;
+
+ --color )
+ at_color=always
+ ;;
+ --color=* )
+ case $at_optarg in
+ no | never | none) at_color=never ;;
+ auto | tty | if-tty) at_color=auto ;;
+ always | yes | force) at_color=always ;;
+ *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
+ as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
+ esac
+ ;;
+
+ --debug | -d )
+ at_debug_p=:
+ ;;
+
+ --errexit | -e )
+ at_debug_p=:
+ at_errexit_p=:
+ ;;
+
+ --verbose | -v )
+ at_verbose=; at_quiet=:
+ ;;
+
+ --trace | -x )
+ at_traceon='set -x'
+ at_trace_echo=echo
+ at_check_filter_trace=at_fn_filter_trace
+ ;;
+
+ [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
+ at_fn_validate_ranges at_option
+ as_fn_append at_groups "$at_option$as_nl"
+ ;;
+
+ # Ranges
+ [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
+ at_range_start=`echo $at_option |tr -d X-`
+ at_fn_validate_ranges at_range_start
+ at_range=`$as_echo "$at_groups_all" | \
+ sed -ne '/^'$at_range_start'$/,$p'`
+ as_fn_append at_groups "$at_range$as_nl"
+ ;;
+
+ -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
+ at_range_end=`echo $at_option |tr -d X-`
+ at_fn_validate_ranges at_range_end
+ at_range=`$as_echo "$at_groups_all" | \
+ sed -ne '1,/^'$at_range_end'$/p'`
+ as_fn_append at_groups "$at_range$as_nl"
+ ;;
+
+ [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
+ [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
+ [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
+ [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
+ [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
+ [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
+ at_range_start=`expr $at_option : '\(.*\)-'`
+ at_range_end=`expr $at_option : '.*-\(.*\)'`
+ if test $at_range_start -gt $at_range_end; then
+ at_tmp=$at_range_end
+ at_range_end=$at_range_start
+ at_range_start=$at_tmp
+ fi
+ at_fn_validate_ranges at_range_start at_range_end
+ at_range=`$as_echo "$at_groups_all" | \
+ sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
+ as_fn_append at_groups "$at_range$as_nl"
+ ;;
+
+ # Directory selection.
+ --directory | -C )
+ at_prev=--directory
+ ;;
+ --directory=* )
+ at_change_dir=:
+ at_dir=$at_optarg
+ if test x- = "x$at_dir" ; then
+ at_dir=./-
+ fi
+ ;;
+
+ # Parallel execution.
+ --jobs | -j )
+ at_jobs=0
+ ;;
+ --jobs=* | -j[0-9]* )
+ if test -n "$at_optarg"; then
+ at_jobs=$at_optarg
+ else
+ at_jobs=`expr X$at_option : 'X-j\(.*\)'`
+ fi
+ case $at_jobs in *[!0-9]*)
+ at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
+ as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
+ esac
+ ;;
+
+ # Keywords.
+ --keywords | -k )
+ at_prev=--keywords
+ ;;
+ --keywords=* )
+ at_groups_selected=$at_help_all
+ at_save_IFS=$IFS
+ IFS=,
+ set X $at_optarg
+ shift
+ IFS=$at_save_IFS
+ for at_keyword
+ do
+ at_invert=
+ case $at_keyword in
+ '!'*)
+ at_invert="-v"
+ at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
+ ;;
+ esac
+ # It is on purpose that we match the test group titles too.
+ at_groups_selected=`$as_echo "$at_groups_selected" |
+ grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
+ done
+ # Smash the keywords.
+ at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
+ as_fn_append at_groups "$at_groups_selected$as_nl"
+ ;;
+ --recheck)
+ at_recheck=:
+ ;;
+
+ *=*)
+ at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $at_envvar in
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
+ esac
+ at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ # Export now, but save eval for later and for debug scripts.
+ export $at_envvar
+ as_fn_append at_debug_args " $at_envvar='$at_value'"
+ ;;
+
+ *) $as_echo "$as_me: invalid option: $at_option" >&2
+ $as_echo "Try \`$0 --help' for more information." >&2
+ exit 1
+ ;;
+ esac
+done
+
+# Verify our last option didn't require an argument
+if test -n "$at_prev"; then :
+ as_fn_error $? "\`$at_prev' requires an argument"
+fi
+
+# The file containing the suite.
+at_suite_log=$at_dir/$as_me.log
+
+# Selected test groups.
+if test -z "$at_groups$at_recheck"; then
+ at_groups=$at_groups_all
+else
+ if test -n "$at_recheck" && test -r "$at_suite_log"; then
+ at_oldfails=`sed -n '
+ /^Failed tests:$/,/^Skipped tests:$/{
+ s/^[ ]*\([1-9][0-9]*\):.*/\1/p
+ }
+ /^Unexpected passes:$/,/^## Detailed failed tests/{
+ s/^[ ]*\([1-9][0-9]*\):.*/\1/p
+ }
+ /^## Detailed failed tests/q
+ ' "$at_suite_log"`
+ as_fn_append at_groups "$at_oldfails$as_nl"
+ fi
+ # Sort the tests, removing duplicates.
+ at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
+fi
+
+if test x"$at_color" = xalways \
+ || { test x"$at_color" = xauto && test -t 1; }; then
+ at_red=`printf '\033[0;31m'`
+ at_grn=`printf '\033[0;32m'`
+ at_lgn=`printf '\033[1;32m'`
+ at_blu=`printf '\033[1;34m'`
+ at_std=`printf '\033[m'`
+else
+ at_red= at_grn= at_lgn= at_blu= at_std=
+fi
+
+# Help message.
+if $at_help_p; then
+ cat <<_ATEOF || at_write_fail=1
+Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
+
+Run all the tests, or the selected TESTS, given by numeric ranges, and
+save a detailed log file. Upon failure, create debugging scripts.
+
+Do not change environment variables directly. Instead, set them via
+command line arguments. Set \`AUTOTEST_PATH' to select the executables
+to exercise. Each relative directory is expanded as build and source
+directories relative to the top level of this distribution.
+E.g., from within the build directory /tmp/foo-1.0, invoking this:
+
+ $ $0 AUTOTEST_PATH=bin
+
+is equivalent to the following, assuming the source directory is /src/foo-1.0:
+
+ PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
+_ATEOF
+cat <<_ATEOF || at_write_fail=1
+
+Operation modes:
+ -h, --help print the help message, then exit
+ -V, --version print version number, then exit
+ -c, --clean remove all the files this test suite might create and exit
+ -l, --list describes all the tests, or the selected TESTS
+_ATEOF
+cat <<_ATEOF || at_write_fail=1
+
+Execution tuning:
+ -C, --directory=DIR
+ change to directory DIR before starting
+ --color[=never|auto|always]
+ enable colored test results on terminal, or always
+ -j, --jobs[=N]
+ Allow N jobs at once; infinite jobs with no arg (default 1)
+ -k, --keywords=KEYWORDS
+ select the tests matching all the comma-separated KEYWORDS
+ multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+ --recheck select all tests that failed or passed unexpectedly last time
+ -e, --errexit abort as soon as a test fails; implies --debug
+ -v, --verbose force more detailed output
+ default for debugging scripts
+ -d, --debug inhibit clean up and top-level logging
+ default for debugging scripts
+ -x, --trace enable tests shell tracing
+_ATEOF
+cat <<_ATEOF || at_write_fail=1
+
+Report bugs to <bug-tar@gnu.org>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+_ATEOF
+ exit $at_write_fail
+fi
+
+# List of tests.
+if $at_list_p; then
+ cat <<_ATEOF || at_write_fail=1
+GNU tar 1.29 test suite test groups:
+
+ NUM: FILE-NAME:LINE TEST-GROUP-NAME
+ KEYWORDS
+
+_ATEOF
+ # Pass an empty line as separator between selected groups and help.
+ $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
+ awk 'NF == 1 && FS != ";" {
+ selected[$ 1] = 1
+ next
+ }
+ /^$/ { FS = ";" }
+ NF > 0 {
+ if (selected[$ 1]) {
+ printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
+ if ($ 4) {
+ lmax = 79
+ indent = " "
+ line = indent
+ len = length (line)
+ n = split ($ 4, a, " ")
+ for (i = 1; i <= n; i++) {
+ l = length (a[i]) + 1
+ if (i > 1 && len + l > lmax) {
+ print line
+ line = indent " " a[i]
+ len = length (line)
+ } else {
+ line = line " " a[i]
+ len += l
+ }
+ }
+ if (n)
+ print line
+ }
+ }
+ }' || at_write_fail=1
+ exit $at_write_fail
+fi
+if $at_version_p; then
+ $as_echo "$as_me (GNU tar 1.29)" &&
+ cat <<\_ATEOF || at_write_fail=1
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This test suite is free software; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+_ATEOF
+ exit $at_write_fail
+fi
+
+# Should we print banners? Yes if more than one test is run.
+case $at_groups in #(
+ *$as_nl* )
+ at_print_banners=: ;; #(
+ * ) at_print_banners=false ;;
+esac
+# Text for banner N, set to a single space once printed.
+# Banner 1. testsuite.at:208
+# Category starts at test group 5.
+at_banner_text_1="Option compatibility"
+# Banner 2. testsuite.at:216
+# Category starts at test group 11.
+at_banner_text_2="The -T option"
+# Banner 3. testsuite.at:230
+# Category starts at test group 24.
+at_banner_text_3="Various options"
+# Banner 4. testsuite.at:239
+# Category starts at test group 31.
+at_banner_text_4="The --same-order option"
+# Banner 5. testsuite.at:243
+# Category starts at test group 33.
+at_banner_text_5="Append"
+# Banner 6. testsuite.at:251
+# Category starts at test group 39.
+at_banner_text_6="Transforms"
+# Banner 7. testsuite.at:256
+# Category starts at test group 42.
+at_banner_text_7="Exclude"
+# Banner 8. testsuite.at:275
+# Category starts at test group 59.
+at_banner_text_8="Deletions"
+# Banner 9. testsuite.at:282
+# Category starts at test group 64.
+at_banner_text_9="Extracting"
+# Banner 10. testsuite.at:304
+# Category starts at test group 84.
+at_banner_text_10="Volume label operations"
+# Banner 11. testsuite.at:311
+# Category starts at test group 89.
+at_banner_text_11="Incremental archives"
+# Banner 12. testsuite.at:330
+# Category starts at test group 106.
+at_banner_text_12="Files removed while archiving"
+# Banner 13. testsuite.at:334
+# Category starts at test group 108.
+at_banner_text_13="Renames"
+# Banner 14. testsuite.at:342
+# Category starts at test group 114.
+at_banner_text_14="Ignore failing reads"
+# Banner 15. testsuite.at:345
+# Category starts at test group 115.
+at_banner_text_15="Link handling"
+# Banner 16. testsuite.at:351
+# Category starts at test group 119.
+at_banner_text_16="Specific archive formats"
+# Banner 17. testsuite.at:362
+# Category starts at test group 127.
+at_banner_text_17="Multivolume archives"
+# Banner 18. testsuite.at:373
+# Category starts at test group 136.
+at_banner_text_18="Owner and Groups"
+# Banner 19. testsuite.at:377
+# Category starts at test group 138.
+at_banner_text_19="Sparse files"
+# Banner 20. testsuite.at:389
+# Category starts at test group 148.
+at_banner_text_20="Updates"
+# Banner 21. testsuite.at:394
+# Category starts at test group 151.
+at_banner_text_21="Verifying the archive"
+# Banner 22. testsuite.at:397
+# Category starts at test group 152.
+at_banner_text_22="Volume operations"
+# Banner 23. testsuite.at:401
+# Category starts at test group 154.
+at_banner_text_23=""
+# Banner 24. testsuite.at:411
+# Category starts at test group 161.
+at_banner_text_24="Removing files after archiving"
+# Banner 25. testsuite.at:435
+# Category starts at test group 183.
+at_banner_text_25="Extended attributes"
+# Banner 26. testsuite.at:451
+# Category starts at test group 194.
+at_banner_text_26="One top level"
+# Banner 27. testsuite.at:458
+# Category starts at test group 199.
+at_banner_text_27="Star tests"
+
+# Take any -C into account.
+if $at_change_dir ; then
+ test x != "x$at_dir" && cd "$at_dir" \
+ || as_fn_error $? "unable to change directory"
+ at_dir=`pwd`
+fi
+
+# Load the config files for any default variable assignments.
+for at_file in atconfig atlocal
+do
+ test -r $at_file || continue
+ . ./$at_file || as_fn_error $? "invalid content: $at_file"
+done
+
+# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
+: "${at_top_build_prefix=$at_top_builddir}"
+
+# Perform any assignments requested during argument parsing.
+eval "$at_debug_args"
+
+# atconfig delivers names relative to the directory the test suite is
+# in, but the groups themselves are run in testsuite-dir/group-dir.
+if test -n "$at_top_srcdir"; then
+ builddir=../..
+ for at_dir_var in srcdir top_srcdir top_build_prefix
+ do
+ eval at_val=\$at_$at_dir_var
+ case $at_val in
+ [\\/$]* | ?:[\\/]* ) at_prefix= ;;
+ *) at_prefix=../../ ;;
+ esac
+ eval "$at_dir_var=\$at_prefix\$at_val"
+ done
+fi
+
+## -------------------- ##
+## Directory structure. ##
+## -------------------- ##
+
+# This is the set of directories and files used by this script
+# (non-literals are capitalized):
+#
+# TESTSUITE - the testsuite
+# TESTSUITE.log - summarizes the complete testsuite run
+# TESTSUITE.dir/ - created during a run, remains after -d or failed test
+# + at-groups/ - during a run: status of all groups in run
+# | + NNN/ - during a run: meta-data about test group NNN
+# | | + check-line - location (source file and line) of current AT_CHECK
+# | | + status - exit status of current AT_CHECK
+# | | + stdout - stdout of current AT_CHECK
+# | | + stder1 - stderr, including trace
+# | | + stderr - stderr, with trace filtered out
+# | | + test-source - portion of testsuite that defines group
+# | | + times - timestamps for computing duration
+# | | + pass - created if group passed
+# | | + xpass - created if group xpassed
+# | | + fail - created if group failed
+# | | + xfail - created if group xfailed
+# | | + skip - created if group skipped
+# + at-stop - during a run: end the run if this file exists
+# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
+# + 0..NNN/ - created for each group NNN, remains after -d or failed test
+# | + TESTSUITE.log - summarizes the group results
+# | + ... - files created during the group
+
+# The directory the whole suite works in.
+# Should be absolute to let the user `cd' at will.
+at_suite_dir=$at_dir/$as_me.dir
+# The file containing the suite ($at_dir might have changed since earlier).
+at_suite_log=$at_dir/$as_me.log
+# The directory containing helper files per test group.
+at_helper_dir=$at_suite_dir/at-groups
+# Stop file: if it exists, do not start new jobs.
+at_stop_file=$at_suite_dir/at-stop
+# The fifo used for the job dispatcher.
+at_job_fifo=$at_suite_dir/at-job-fifo
+
+if $at_clean; then
+ test -d "$at_suite_dir" &&
+ find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+ rm -f -r "$at_suite_dir" "$at_suite_log"
+ exit $?
+fi
+
+# Don't take risks: use only absolute directories in PATH.
+#
+# For stand-alone test suites (ie. atconfig was not found),
+# AUTOTEST_PATH is relative to `.'.
+#
+# For embedded test suites, AUTOTEST_PATH is relative to the top level
+# of the package. Then expand it into build/src parts, since users
+# may create executables in both places.
+AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
+at_path=
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $AUTOTEST_PATH $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
+case $as_dir in
+ [\\/]* | ?:[\\/]* )
+ as_fn_append at_path "$as_dir"
+ ;;
+ * )
+ if test -z "$at_top_build_prefix"; then
+ # Stand-alone test suite.
+ as_fn_append at_path "$as_dir"
+ else
+ # Embedded test suite.
+ as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
+ as_fn_append at_path "$at_top_srcdir/$as_dir"
+ fi
+ ;;
+esac
+ done
+IFS=$as_save_IFS
+
+
+# Now build and simplify PATH.
+#
+# There might be directories that don't exist, but don't redirect
+# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
+at_new_path=
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $at_path
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -d "$as_dir" || continue
+case $as_dir in
+ [\\/]* | ?:[\\/]* ) ;;
+ * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
+esac
+case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
+ *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
+ $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
+ *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
+esac
+ done
+IFS=$as_save_IFS
+
+PATH=$at_new_path
+export PATH
+
+# Setting up the FDs.
+
+
+
+# 5 is the log file. Not to be overwritten if `-d'.
+if $at_debug_p; then
+ at_suite_log=/dev/null
+else
+ : >"$at_suite_log"
+fi
+exec 5>>"$at_suite_log"
+
+# Banners and logs.
+$as_echo "## ------------------------ ##
+## GNU tar 1.29 test suite. ##
+## ------------------------ ##"
+{
+ $as_echo "## ------------------------ ##
+## GNU tar 1.29 test suite. ##
+## ------------------------ ##"
+ echo
+
+ $as_echo "$as_me: command line was:"
+ $as_echo " \$ $0 $at_cli_args"
+ echo
+
+ # If ChangeLog exists, list a few lines in case it might help determining
+ # the exact version.
+ if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
+ $as_echo "## ---------- ##
+## ChangeLog. ##
+## ---------- ##"
+ echo
+ sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
+ echo
+ fi
+
+ {
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+}
+ echo
+
+ # Contents of the config files.
+ for at_file in atconfig atlocal
+ do
+ test -r $at_file || continue
+ $as_echo "$as_me: $at_file:"
+ sed 's/^/| /' $at_file
+ echo
+ done
+} >&5
+
+
+## ------------------------- ##
+## Autotest shell functions. ##
+## ------------------------- ##
+
+# at_fn_banner NUMBER
+# -------------------
+# Output banner NUMBER, provided the testsuite is running multiple groups and
+# this particular banner has not yet been printed.
+at_fn_banner ()
+{
+ $at_print_banners || return 0
+ eval at_banner_text=\$at_banner_text_$1
+ test "x$at_banner_text" = "x " && return 0
+ eval "at_banner_text_$1=\" \""
+ if test -z "$at_banner_text"; then
+ $at_first || echo
+ else
+ $as_echo "$as_nl$at_banner_text$as_nl"
+ fi
+} # at_fn_banner
+
+# at_fn_check_prepare_notrace REASON LINE
+# ---------------------------------------
+# Perform AT_CHECK preparations for the command at LINE for an untraceable
+# command; REASON is the reason for disabling tracing.
+at_fn_check_prepare_notrace ()
+{
+ $at_trace_echo "Not enabling shell tracing (command contains $1)"
+ $as_echo "$2" >"$at_check_line_file"
+ at_check_trace=: at_check_filter=:
+ : >"$at_stdout"; : >"$at_stderr"
+}
+
+# at_fn_check_prepare_trace LINE
+# ------------------------------
+# Perform AT_CHECK preparations for the command at LINE for a traceable
+# command.
+at_fn_check_prepare_trace ()
+{
+ $as_echo "$1" >"$at_check_line_file"
+ at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
+ : >"$at_stdout"; : >"$at_stderr"
+}
+
+# at_fn_check_prepare_dynamic COMMAND LINE
+# ----------------------------------------
+# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
+# preparation function.
+at_fn_check_prepare_dynamic ()
+{
+ case $1 in
+ *$as_nl*)
+ at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
+ *)
+ at_fn_check_prepare_trace "$2" ;;
+ esac
+}
+
+# at_fn_filter_trace
+# ------------------
+# Remove the lines in the file "$at_stderr" generated by "set -x" and print
+# them to stderr.
+at_fn_filter_trace ()
+{
+ mv "$at_stderr" "$at_stder1"
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+}
+
+# at_fn_log_failure FILE-LIST
+# ---------------------------
+# Copy the files in the list on stdout with a "> " prefix, and exit the shell
+# with a failure exit code.
+at_fn_log_failure ()
+{
+ for file
+ do $as_echo "$file:"; sed 's/^/> /' "$file"; done
+ echo 1 > "$at_status_file"
+ exit 1
+}
+
+# at_fn_check_skip EXIT-CODE LINE
+# -------------------------------
+# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
+# the test group subshell with that same exit code. Use LINE in any report
+# about test failure.
+at_fn_check_skip ()
+{
+ case $1 in
+ 99) echo 99 > "$at_status_file"; at_failed=:
+ $as_echo "$2: hard failure"; exit 99;;
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ esac
+}
+
+# at_fn_check_status EXPECTED EXIT-CODE LINE
+# ------------------------------------------
+# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
+# Otherwise, if it is 77 or 99, exit the test group subshell with that same
+# exit code; if it is anything else print an error message referring to LINE,
+# and fail the test.
+at_fn_check_status ()
+{
+ case $2 in
+ $1 ) ;;
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 99) echo 99 > "$at_status_file"; at_failed=:
+ $as_echo "$3: hard failure"; exit 99;;
+ *) $as_echo "$3: exit code was $2, expected $1"
+ at_failed=:;;
+ esac
+}
+
+# at_fn_diff_devnull FILE
+# -----------------------
+# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
+# invocations.
+at_fn_diff_devnull ()
+{
+ test -s "$1" || return 0
+ $at_diff "$at_devnull" "$1"
+}
+
+# at_fn_test NUMBER
+# -----------------
+# Parse out test NUMBER from the tail of this file.
+at_fn_test ()
+{
+ eval at_sed=\$at_sed$1
+ sed "$at_sed" "$at_myself" > "$at_test_source"
+}
+
+# at_fn_create_debugging_script
+# -----------------------------
+# Create the debugging script $at_group_dir/run which will reproduce the
+# current test group.
+at_fn_create_debugging_script ()
+{
+ {
+ echo "#! /bin/sh" &&
+ echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
+ $as_echo "cd '$at_dir'" &&
+ $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
+ echo 'exit 1'
+ } >"$at_group_dir/run" &&
+ chmod +x "$at_group_dir/run"
+}
+
+## -------------------------------- ##
+## End of autotest shell functions. ##
+## -------------------------------- ##
+{
+ $as_echo "## ---------------- ##
+## Tested programs. ##
+## ---------------- ##"
+ echo
+} >&5
+
+# Report what programs are being tested.
+for at_program in : $at_tested
+do
+ test "$at_program" = : && continue
+ case $at_program in
+ [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
+ * )
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -f "$as_dir/$at_program" && break
+ done
+IFS=$as_save_IFS
+
+ at_program_=$as_dir/$at_program ;;
+ esac
+ if test -f "$at_program_"; then
+ {
+ $as_echo "$at_srcdir/testsuite.at:197: $at_program_ --version"
+ "$at_program_" --version </dev/null
+ echo
+ } >&5 2>&1
+ else
+ as_fn_error $? "cannot find $at_program" "$LINENO" 5
+ fi
+done
+
+{
+ $as_echo "## ------------------ ##
+## Running the tests. ##
+## ------------------ ##"
+} >&5
+
+at_start_date=`date`
+at_start_time=`date +%s 2>/dev/null`
+$as_echo "$as_me: starting at: $at_start_date" >&5
+
+# Create the master directory if it doesn't already exist.
+as_dir="$at_suite_dir"; as_fn_mkdir_p ||
+ as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
+
+# Can we diff with `/dev/null'? DU 5.0 refuses.
+if diff /dev/null /dev/null >/dev/null 2>&1; then
+ at_devnull=/dev/null
+else
+ at_devnull=$at_suite_dir/devnull
+ >"$at_devnull"
+fi
+
+# Use `diff -u' when possible.
+if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
+then
+ at_diff='diff -u'
+else
+ at_diff=diff
+fi
+
+# Get the last needed group.
+for at_group in : $at_groups; do :; done
+
+# Extract the start and end lines of each test group at the tail
+# of this file
+awk '
+BEGIN { FS="" }
+/^#AT_START_/ {
+ start = NR
+}
+/^#AT_STOP_/ {
+ test = substr ($ 0, 10)
+ print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
+ if (test == "'"$at_group"'") exit
+}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
+. "$at_suite_dir/at-source-lines" ||
+ as_fn_error $? "cannot create test line number cache" "$LINENO" 5
+rm -f "$at_suite_dir/at-source-lines"
+
+# Set number of jobs for `-j'; avoid more jobs than test groups.
+set X $at_groups; shift; at_max_jobs=$#
+if test $at_max_jobs -eq 0; then
+ at_jobs=1
+fi
+if test $at_jobs -ne 1 &&
+ { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
+ at_jobs=$at_max_jobs
+fi
+
+# If parallel mode, don't output banners, don't split summary lines.
+if test $at_jobs -ne 1; then
+ at_print_banners=false
+ at_quiet=:
+fi
+
+# Set up helper dirs.
+rm -rf "$at_helper_dir" &&
+mkdir "$at_helper_dir" &&
+cd "$at_helper_dir" &&
+{ test -z "$at_groups" || mkdir $at_groups; } ||
+as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
+
+# Functions for running a test group. We leave the actual
+# test group execution outside of a shell function in order
+# to avoid hitting zsh 4.x exit status bugs.
+
+# at_fn_group_prepare
+# -------------------
+# Prepare for running a test group.
+at_fn_group_prepare ()
+{
+ # The directory for additional per-group helper files.
+ at_job_dir=$at_helper_dir/$at_group
+ # The file containing the location of the last AT_CHECK.
+ at_check_line_file=$at_job_dir/check-line
+ # The file containing the exit status of the last command.
+ at_status_file=$at_job_dir/status
+ # The files containing the output of the tested commands.
+ at_stdout=$at_job_dir/stdout
+ at_stder1=$at_job_dir/stder1
+ at_stderr=$at_job_dir/stderr
+ # The file containing the code for a test group.
+ at_test_source=$at_job_dir/test-source
+ # The file containing dates.
+ at_times_file=$at_job_dir/times
+
+ # Be sure to come back to the top test directory.
+ cd "$at_suite_dir"
+
+ # Clearly separate the test groups when verbose.
+ $at_first || $at_verbose echo
+
+ at_group_normalized=$at_group
+
+ eval 'while :; do
+ case $at_group_normalized in #(
+ '"$at_format"'*) break;;
+ esac
+ at_group_normalized=0$at_group_normalized
+ done'
+
+
+ # Create a fresh directory for the next test group, and enter.
+ # If one already exists, the user may have invoked ./run from
+ # within that directory; we remove the contents, but not the
+ # directory itself, so that we aren't pulling the rug out from
+ # under the shell's notion of the current directory.
+ at_group_dir=$at_suite_dir/$at_group_normalized
+ at_group_log=$at_group_dir/$as_me.log
+ if test -d "$at_group_dir"; then
+ find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
+ rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
+fi ||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
+$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
+ # Be tolerant if the above `rm' was not able to remove the directory.
+ as_dir="$at_group_dir"; as_fn_mkdir_p
+
+ echo 0 > "$at_status_file"
+
+ # In verbose mode, append to the log file *and* show on
+ # the standard output; in quiet mode only write to the log.
+ if test -z "$at_verbose"; then
+ at_tee_pipe='tee -a "$at_group_log"'
+ else
+ at_tee_pipe='cat >> "$at_group_log"'
+ fi
+}
+
+# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
+# -------------------------------------------------
+# Declare the test group ORDINAL, located at LINE with group description DESC,
+# and residing under BANNER. Use PAD to align the status column.
+at_fn_group_banner ()
+{
+ at_setup_line="$2"
+ test -n "$5" && at_fn_banner $5
+ at_desc="$3"
+ case $1 in
+ [0-9]) at_desc_line=" $1: ";;
+ [0-9][0-9]) at_desc_line=" $1: " ;;
+ *) at_desc_line="$1: " ;;
+ esac
+ as_fn_append at_desc_line "$3$4"
+ $at_quiet $as_echo_n "$at_desc_line"
+ echo "# -*- compilation -*-" >> "$at_group_log"
+}
+
+# at_fn_group_postprocess
+# -----------------------
+# Perform cleanup after running a test group.
+at_fn_group_postprocess ()
+{
+ # Be sure to come back to the suite directory, in particular
+ # since below we might `rm' the group directory we are in currently.
+ cd "$at_suite_dir"
+
+ if test ! -f "$at_check_line_file"; then
+ sed "s/^ */$as_me: WARNING: /" <<_ATEOF
+ A failure happened in a test group before any test could be
+ run. This means that test suite is improperly designed. Please
+ report this failure to <bug-tar@gnu.org>.
+_ATEOF
+ $as_echo "$at_setup_line" >"$at_check_line_file"
+ at_status=99
+ fi
+ $at_verbose $as_echo_n "$at_group. $at_setup_line: "
+ $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
+ case $at_xfail:$at_status in
+ yes:0)
+ at_msg="UNEXPECTED PASS"
+ at_res=xpass
+ at_errexit=$at_errexit_p
+ at_color=$at_red
+ ;;
+ no:0)
+ at_msg="ok"
+ at_res=pass
+ at_errexit=false
+ at_color=$at_grn
+ ;;
+ *:77)
+ at_msg='skipped ('`cat "$at_check_line_file"`')'
+ at_res=skip
+ at_errexit=false
+ at_color=$at_blu
+ ;;
+ no:* | *:99)
+ at_msg='FAILED ('`cat "$at_check_line_file"`')'
+ at_res=fail
+ at_errexit=$at_errexit_p
+ at_color=$at_red
+ ;;
+ yes:*)
+ at_msg='expected failure ('`cat "$at_check_line_file"`')'
+ at_res=xfail
+ at_errexit=false
+ at_color=$at_lgn
+ ;;
+ esac
+ echo "$at_res" > "$at_job_dir/$at_res"
+ # In parallel mode, output the summary line only afterwards.
+ if test $at_jobs -ne 1 && test -n "$at_verbose"; then
+ $as_echo "$at_desc_line $at_color$at_msg$at_std"
+ else
+ # Make sure there is a separator even with long titles.
+ $as_echo " $at_color$at_msg$at_std"
+ fi
+ at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
+ case $at_status in
+ 0|77)
+ # $at_times_file is only available if the group succeeded.
+ # We're not including the group log, so the success message
+ # is written in the global log separately. But we also
+ # write to the group log in case they're using -d.
+ if test -f "$at_times_file"; then
+ at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
+ rm -f "$at_times_file"
+ fi
+ $as_echo "$at_log_msg" >> "$at_group_log"
+ $as_echo "$at_log_msg" >&5
+
+ # Cleanup the group directory, unless the user wants the files
+ # or the success was unexpected.
+ if $at_debug_p || test $at_res = xpass; then
+ at_fn_create_debugging_script
+ if test $at_res = xpass && $at_errexit; then
+ echo stop > "$at_stop_file"
+ fi
+ else
+ if test -d "$at_group_dir"; then
+ find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+ rm -fr "$at_group_dir"
+ fi
+ rm -f "$at_test_source"
+ fi
+ ;;
+ *)
+ # Upon failure, include the log into the testsuite's global
+ # log. The failure message is written in the group log. It
+ # is later included in the global log.
+ $as_echo "$at_log_msg" >> "$at_group_log"
+
+ # Upon failure, keep the group directory for autopsy, and create
+ # the debugging script. With -e, do not start any further tests.
+ at_fn_create_debugging_script
+ if $at_errexit; then
+ echo stop > "$at_stop_file"
+ fi
+ ;;
+ esac
+}
+
+
+## ------------ ##
+## Driver loop. ##
+## ------------ ##
+
+
+if (set -m && set +m && set +b) >/dev/null 2>&1; then
+ set +b
+ at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
+else
+ at_job_control_on=: at_job_control_off=: at_job_group=
+fi
+
+for at_signal in 1 2 15; do
+ trap 'set +x; set +e
+ $at_job_control_off
+ at_signal='"$at_signal"'
+ echo stop > "$at_stop_file"
+ trap "" $at_signal
+ at_pgids=
+ for at_pgid in `jobs -p 2>/dev/null`; do
+ at_pgids="$at_pgids $at_job_group$at_pgid"
+ done
+ test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
+ wait
+ if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
+ echo >&2
+ fi
+ at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
+ set x $at_signame
+ test 0 -gt 2 && at_signame=$at_signal
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
+$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
+ as_fn_arith 128 + $at_signal && exit_status=$as_val
+ as_fn_exit $exit_status' $at_signal
+done
+
+rm -f "$at_stop_file"
+at_first=:
+
+if test $at_jobs -ne 1 &&
+ rm -f "$at_job_fifo" &&
+ test -n "$at_job_group" &&
+ ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
+then
+ # FIFO job dispatcher.
+
+ trap 'at_pids=
+ for at_pid in `jobs -p`; do
+ at_pids="$at_pids $at_job_group$at_pid"
+ done
+ if test -n "$at_pids"; then
+ at_sig=TSTP
+ test "${TMOUT+set}" = set && at_sig=STOP
+ kill -$at_sig $at_pids 2>/dev/null
+ fi
+ kill -STOP $$
+ test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
+
+ echo
+ # Turn jobs into a list of numbers, starting from 1.
+ at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
+
+ set X $at_joblist
+ shift
+ for at_group in $at_groups; do
+ $at_job_control_on 2>/dev/null
+ (
+ # Start one test group.
+ $at_job_control_off
+ if $at_first; then
+ exec 7>"$at_job_fifo"
+ else
+ exec 6<&-
+ fi
+ trap 'set +x; set +e
+ trap "" PIPE
+ echo stop > "$at_stop_file"
+ echo >&7
+ as_fn_exit 141' PIPE
+ at_fn_group_prepare
+ if cd "$at_group_dir" &&
+ at_fn_test $at_group &&
+ . "$at_test_source"
+ then :; else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
+ at_failed=:
+ fi
+ at_fn_group_postprocess
+ echo >&7
+ ) &
+ $at_job_control_off
+ if $at_first; then
+ at_first=false
+ exec 6<"$at_job_fifo" 7>"$at_job_fifo"
+ fi
+ shift # Consume one token.
+ if test $# -gt 0; then :; else
+ read at_token <&6 || break
+ set x $*
+ fi
+ test -f "$at_stop_file" && break
+ done
+ exec 7>&-
+ # Read back the remaining ($at_jobs - 1) tokens.
+ set X $at_joblist
+ shift
+ if test $# -gt 0; then
+ shift
+ for at_job
+ do
+ read at_token
+ done <&6
+ fi
+ exec 6<&-
+ wait
+else
+ # Run serially, avoid forks and other potential surprises.
+ for at_group in $at_groups; do
+ at_fn_group_prepare
+ if cd "$at_group_dir" &&
+ at_fn_test $at_group &&
+ . "$at_test_source"; then :; else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
+ at_failed=:
+ fi
+ at_fn_group_postprocess
+ test -f "$at_stop_file" && break
+ at_first=false
+ done
+fi
+
+# Wrap up the test suite with summary statistics.
+cd "$at_helper_dir"
+
+# Use ?..???? when the list must remain sorted, the faster * otherwise.
+at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
+at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
+at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
+at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
+ echo $f; done | sed '/?/d; s,/xpass,,'`
+at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
+ echo $f; done | sed '/?/d; s,/fail,,'`
+
+set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
+shift; at_group_count=$#
+set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
+set X $at_xfail_list; shift; at_xfail_count=$#
+set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
+set X $at_skip_list; shift; at_skip_count=$#
+
+as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
+as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
+as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
+
+# Back to the top directory.
+cd "$at_dir"
+rm -rf "$at_helper_dir"
+
+# Compute the duration of the suite.
+at_stop_date=`date`
+at_stop_time=`date +%s 2>/dev/null`
+$as_echo "$as_me: ending at: $at_stop_date" >&5
+case $at_start_time,$at_stop_time in
+ [0-9]*,[0-9]*)
+ as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
+ as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
+ as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
+ as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
+ as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
+ at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
+ $as_echo "$as_me: test suite duration: $at_duration" >&5
+ ;;
+esac
+
+echo
+$as_echo "## ------------- ##
+## Test results. ##
+## ------------- ##"
+echo
+{
+ echo
+ $as_echo "## ------------- ##
+## Test results. ##
+## ------------- ##"
+ echo
+} >&5
+
+if test $at_run_count = 1; then
+ at_result="1 test"
+ at_were=was
+else
+ at_result="$at_run_count tests"
+ at_were=were
+fi
+if $at_errexit_p && test $at_unexpected_count != 0; then
+ if test $at_xpass_count = 1; then
+ at_result="$at_result $at_were run, one passed"
+ else
+ at_result="$at_result $at_were run, one failed"
+ fi
+ at_result="$at_result unexpectedly and inhibited subsequent tests."
+ at_color=$at_red
+else
+ # Don't you just love exponential explosion of the number of cases?
+ at_color=$at_red
+ case $at_xpass_count:$at_fail_count:$at_xfail_count in
+ # So far, so good.
+ 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
+ 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
+
+ # Some unexpected failures
+ 0:*:0) at_result="$at_result $at_were run,
+$at_fail_count failed unexpectedly." ;;
+
+ # Some failures, both expected and unexpected
+ 0:*:1) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+ 0:*:*) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
+
+ # No unexpected failures, but some xpasses
+ *:0:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly." ;;
+
+ # No expected failures, but failures and xpasses
+ *:1:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
+ *:*:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
+
+ # All of them.
+ *:*:1) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+ *:*:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
+ esac
+
+ if test $at_skip_count = 0 && test $at_run_count -gt 1; then
+ at_result="All $at_result"
+ fi
+fi
+
+# Now put skips in the mix.
+case $at_skip_count in
+ 0) ;;
+ 1) at_result="$at_result
+1 test was skipped." ;;
+ *) at_result="$at_result
+$at_skip_count tests were skipped." ;;
+esac
+
+if test $at_unexpected_count = 0; then
+ echo "$at_color$at_result$at_std"
+ echo "$at_result" >&5
+else
+ echo "${at_color}ERROR: $at_result$at_std" >&2
+ echo "ERROR: $at_result" >&5
+ {
+ echo
+ $as_echo "## ------------------------ ##
+## Summary of the failures. ##
+## ------------------------ ##"
+
+ # Summary of failed and skipped tests.
+ if test $at_fail_count != 0; then
+ echo "Failed tests:"
+ $SHELL "$at_myself" $at_fail_list --list
+ echo
+ fi
+ if test $at_skip_count != 0; then
+ echo "Skipped tests:"
+ $SHELL "$at_myself" $at_skip_list --list
+ echo
+ fi
+ if test $at_xpass_count != 0; then
+ echo "Unexpected passes:"
+ $SHELL "$at_myself" $at_xpass_list --list
+ echo
+ fi
+ if test $at_fail_count != 0; then
+ $as_echo "## ---------------------- ##
+## Detailed failed tests. ##
+## ---------------------- ##"
+ echo
+ for at_group in $at_fail_list
+ do
+ at_group_normalized=$at_group
+
+ eval 'while :; do
+ case $at_group_normalized in #(
+ '"$at_format"'*) break;;
+ esac
+ at_group_normalized=0$at_group_normalized
+ done'
+
+ cat "$at_suite_dir/$at_group_normalized/$as_me.log"
+ echo
+ done
+ echo
+ fi
+ if test -n "$at_top_srcdir"; then
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## ${at_top_build_prefix}config.log ##
+_ASBOX
+ sed 's/^/| /' ${at_top_build_prefix}config.log
+ echo
+ fi
+ } >&5
+
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## $as_me.log was created. ##
+_ASBOX
+
+ echo
+ if $at_debug_p; then
+ at_msg='per-test log files'
+ else
+ at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
+ fi
+ $as_echo "Please send $at_msg and all information you think might help:
+
+ To: <bug-tar@gnu.org>
+ Subject: [GNU tar 1.29] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
+
+You may investigate any problem if you feel able to do so, in which
+case the test suite provides a good starting point. Its output may
+be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
+"
+ exit 1
+fi
+
+exit 0
+
+## ------------- ##
+## Actual tests. ##
+## ------------- ##
+#AT_START_1
+at_fn_group_banner 1 'version.at:20' \
+ "tar version" " "
+at_xfail=no
+(
+ $as_echo "1. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+{ set +x
+$as_echo "$at_srcdir/version.at:22: tar --version | sed 1q"
+at_fn_check_prepare_notrace 'a shell pipeline' "version.at:22"
+( $at_check_trace; tar --version | sed 1q
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.29
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/version.at:22"
+if $at_failed; then :
+ cat >$XFAILFILE <<'_EOT'
+
+==============================================================
+WARNING: Not using the proper version, *all* checks dubious...
+==============================================================
+_EOT
+
+else
+ rm -f $XFAILFILE
+fi
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_1
+#AT_START_2
+at_fn_group_banner 2 'pipe.at:29' \
+ "decompressing from stdin" " "
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "2. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/pipe.at:33:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/pipe.at:33:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/pipe.at:33:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/pipe.at:33:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/pipe.at:33:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
+tar cf archive directory
+mv directory orig
+cat archive | tar xfv - --warning=no-timestamp | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_2
+#AT_START_3
+at_fn_group_banner 3 'options.at:25' \
+ "mixing options" " "
+at_xfail=no
+(
+ $as_echo "3. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/options.at:28:
+echo > file1
+TAR_OPTIONS=--numeric-owner tar chof archive file1
+tar tf archive
+"
+at_fn_check_prepare_notrace 'an embedded newline' "options.at:28"
+( $at_check_trace;
+echo > file1
+TAR_OPTIONS=--numeric-owner tar chof archive file1
+tar tf archive
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/options.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_3
+#AT_START_4
+at_fn_group_banner 4 'options02.at:27' \
+ "interspersed options" " "
+at_xfail=no
+(
+ $as_echo "4. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/options02.at:30:
+echo > file1
+tar c file1 -f archive
+tar tf archive
+"
+at_fn_check_prepare_notrace 'an embedded newline' "options02.at:30"
+( $at_check_trace;
+echo > file1
+tar c file1 -f archive
+tar tf archive
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/options02.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_4
+#AT_START_5
+at_fn_group_banner 5 'opcomp01.at:21' \
+ "occurrence compatibility" " " 1
+at_xfail=no
+(
+ $as_echo "5. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/opcomp01.at:24:
+tar --occurrence=1 -cf test.tar .
+"
+at_fn_check_prepare_notrace 'an embedded newline' "opcomp01.at:24"
+( $at_check_trace;
+tar --occurrence=1 -cf test.tar .
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: '--occurrence' cannot be used with '-c'
+Try 'tar --help' or 'tar --usage' for more information.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/opcomp01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_5
+#AT_START_6
+at_fn_group_banner 6 'opcomp02.at:21' \
+ "occurrence compatibility" " " 1
+at_xfail=no
+(
+ $as_echo "6. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/opcomp02.at:24:
+tar --occurrence=1 -tf test.tar
+"
+at_fn_check_prepare_notrace 'an embedded newline' "opcomp02.at:24"
+( $at_check_trace;
+tar --occurrence=1 -tf test.tar
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: --occurrence is meaningless without a file list
+Try 'tar --help' or 'tar --usage' for more information.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/opcomp02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_6
+#AT_START_7
+at_fn_group_banner 7 'opcomp03.at:21' \
+ "--verify compatibility" " " 1
+at_xfail=no
+(
+ $as_echo "7. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/opcomp03.at:24:
+tar -tWf test.tar .
+"
+at_fn_check_prepare_notrace 'an embedded newline' "opcomp03.at:24"
+( $at_check_trace;
+tar -tWf test.tar .
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: '--verify' cannot be used with '-t'
+Try 'tar --help' or 'tar --usage' for more information.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/opcomp03.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_7
+#AT_START_8
+at_fn_group_banner 8 'opcomp04.at:21' \
+ "compress option compatibility" " " 1
+at_xfail=no
+(
+ $as_echo "8. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/opcomp04.at:24:
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --file file
+tar czf test.tar file
+genfile --file newfile
+tar rzf test.tar newfile
+"
+at_fn_check_prepare_notrace 'an embedded newline' "opcomp04.at:24"
+( $at_check_trace;
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --file file
+tar czf test.tar file
+genfile --file newfile
+tar rzf test.tar newfile
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: Cannot update compressed archives
+Try 'tar --help' or 'tar --usage' for more information.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/opcomp04.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_8
+#AT_START_9
+at_fn_group_banner 9 'opcomp05.at:21' \
+ "--pax-option compatibility" " " 1
+at_xfail=no
+(
+ $as_echo "9. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/opcomp05.at:24:
+tar -Hgnu -cf test.tar --pax-option user:=root .
+"
+at_fn_check_prepare_notrace 'an embedded newline' "opcomp05.at:24"
+( $at_check_trace;
+tar -Hgnu -cf test.tar --pax-option user:=root .
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: --pax-option can be used only on POSIX archives
+Try 'tar --help' or 'tar --usage' for more information.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/opcomp05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_9
+#AT_START_10
+at_fn_group_banner 10 'opcomp06.at:21' \
+ "--pax-option compatibility" " " 1
+at_xfail=no
+(
+ $as_echo "10. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/opcomp06.at:24:
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+genfile --file file
+tar -cf test.tar --acls -Hgnu file
+"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "opcomp06.at:24"
+( $at_check_trace;
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+genfile --file file
+tar -cf test.tar --acls -Hgnu file
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: --acls can be used only on POSIX archives
+Try 'tar --help' or 'tar --usage' for more information.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/opcomp06.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_10
+#AT_START_11
+at_fn_group_banner 11 'T-mult.at:21' \
+ "multiple file lists" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "11. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-mult.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+>file1
+>file2
+>file3
+>file4
+cat >F1 <<'_ATEOF'
+file1
+file2
+_ATEOF
+
+cat >F2 <<'_ATEOF'
+file3
+file4
+_ATEOF
+
+tar cf archive -T F1 -T F2
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-mult.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+>file1
+>file2
+>file3
+>file4
+cat >F1 <<'_ATEOF'
+file1
+file2
+_ATEOF
+
+cat >F2 <<'_ATEOF'
+file3
+file4
+_ATEOF
+
+tar cf archive -T F1 -T F2
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+file3
+file4
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-mult.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_11
+#AT_START_12
+at_fn_group_banner 12 'T-nest.at:21' \
+ "nested file lists" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "12. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-nest.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+>file1
+>file2
+>file3
+>file4
+cat >F1 <<'_ATEOF'
+file1
+-T F2
+file2
+_ATEOF
+
+cat >F2 <<'_ATEOF'
+file3
+file4
+_ATEOF
+
+tar cf archive -T F1
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-nest.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+>file1
+>file2
+>file3
+>file4
+cat >F1 <<'_ATEOF'
+file1
+-T F2
+file2
+_ATEOF
+
+cat >F2 <<'_ATEOF'
+file3
+file4
+_ATEOF
+
+tar cf archive -T F1
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file3
+file4
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-nest.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_12
+#AT_START_13
+at_fn_group_banner 13 'T-rec.at:21' \
+ "recursive file lists" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "13. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-rec.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+>file1
+>file2
+cat >F1 <<'_ATEOF'
+file1
+-T F2
+_ATEOF
+
+cat >F2 <<'_ATEOF'
+file2
+-T F1
+_ATEOF
+
+tar cf archive -T F1
+echo \$?
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-rec.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+>file1
+>file2
+cat >F1 <<'_ATEOF'
+file1
+-T F2
+_ATEOF
+
+cat >F2 <<'_ATEOF'
+file2
+-T F1
+_ATEOF
+
+tar cf archive -T F1
+echo $?
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: F1: file list requested from F2 already read from command line
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "2
+file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-rec.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_13
+#AT_START_14
+at_fn_group_banner 14 'T-recurse.at:27' \
+ "files-from & recurse: toggle" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "14. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:30:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf \"\$a\" --files-from F1
+tar tf \"\$a\"
+
+a=archive2
+tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
+tar tf \"\$a\"
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf "$a" --files-from F1
+tar tf "$a"
+
+a=archive2
+tar cf "$a" --no-recursion -T F2A --recursion -T F2B
+tar tf "$a"
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf \"\$a\" --files-from F1
+tar tf \"\$a\"
+
+a=archive2
+tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
+tar tf \"\$a\"
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf "$a" --files-from F1
+tar tf "$a"
+
+a=archive2
+tar cf "$a" --no-recursion -T F2A --recursion -T F2B
+tar tf "$a"
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:30:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf \"\$a\" --files-from F1
+tar tf \"\$a\"
+
+a=archive2
+tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
+tar tf \"\$a\"
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf "$a" --files-from F1
+tar tf "$a"
+
+a=archive2
+tar cf "$a" --no-recursion -T F2A --recursion -T F2B
+tar tf "$a"
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf \"\$a\" --files-from F1
+tar tf \"\$a\"
+
+a=archive2
+tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
+tar tf \"\$a\"
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf "$a" --files-from F1
+tar tf "$a"
+
+a=archive2
+tar cf "$a" --no-recursion -T F2A --recursion -T F2B
+tar tf "$a"
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf \"\$a\" --files-from F1
+tar tf \"\$a\"
+
+a=archive2
+tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
+tar tf \"\$a\"
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+--recursion
+directory2/
+_ATEOF
+
+
+cat >F2A <<'_ATEOF'
+directory1/
+_ATEOF
+
+
+cat >F2B <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+a=archive
+tar cf "$a" --files-from F1
+tar tf "$a"
+
+a=archive2
+tar cf "$a" --no-recursion -T F2A --recursion -T F2B
+tar tf "$a"
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_14
+#AT_START_15
+at_fn_group_banner 15 'T-recurse.at:66' \
+ "toggle --recursion (not) from -T" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "15. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:69:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:69:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:69:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:69:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-recurse.at:69:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+
+cat >F1 <<'_ATEOF'
+--no-recursion
+directory1/
+_ATEOF
+
+
+cat >F2 <<'_ATEOF'
+directory2/
+_ATEOF
+
+
+tar cf archive -T F1 --recursion -T F2
+tar tf archive
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_15
+#AT_START_16
+at_fn_group_banner 16 'T-cd.at:21' \
+ "-C in file lists" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "16. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-cd.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+>file1
+mkdir dir
+>dir/file2
+>dir/file3
+cat >F1 <<'_ATEOF'
+file1
+-C dir
+.
+_ATEOF
+
+tar cf archive -T F1
+tar tf archive | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-cd.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+>file1
+mkdir dir
+>dir/file2
+>dir/file3
+cat >F1 <<'_ATEOF'
+file1
+-C dir
+.
+_ATEOF
+
+tar cf archive -T F1
+tar tf archive | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "./
+./file2
+./file3
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-cd.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_16
+#AT_START_17
+at_fn_group_banner 17 'T-empty.at:26' \
+ "empty entries" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "17. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+cat >file-list <<'_ATEOF'
+jeden
+dwa
+
+trzy
+_ATEOF
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-empty.at:36:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile --file jeden
+genfile --file dwa
+genfile --file trzy
+
+tar cfvT archive ../file-list
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-empty.at:36"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile --file jeden
+genfile --file dwa
+genfile --file trzy
+
+tar cfvT archive ../file-list
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "jeden
+dwa
+trzy
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-empty.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ # Testing one format is enough
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_17
+#AT_START_18
+at_fn_group_banner 18 'T-null.at:21' \
+ "0-separated file without -0" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "18. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-null.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+echo jeden > temp
+echo dwa >> temp
+echo trzy >> temp
+cat temp | tr '\\n' '\\0' > file-list
+
+genfile -f jeden
+genfile -f dwa
+genfile -f trzy
+
+tar cfTv archive file-list
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-null.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+echo jeden > temp
+echo dwa >> temp
+echo trzy >> temp
+cat temp | tr '\n' '\0' > file-list
+
+genfile -f jeden
+genfile -f dwa
+genfile -f trzy
+
+tar cfTv archive file-list
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "jeden
+dwa
+trzy
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-null.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ # Testing one format is enough
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_18
+#AT_START_19
+at_fn_group_banner 19 'T-null2.at:17' \
+ "--null enables verbatim reading" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "19. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# According to the docs, --null should read each line from the file
+# list verbatim. This feature was broken by commit 26538c9b (tar version
+# 1.27).
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-null2.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+cat >file-list <<'_ATEOF'
+a
+-b
+--c d
+_ATEOF
+
+
+genfile -f a
+genfile -f -b
+genfile -f '--c d'
+
+cat file-list | tr '\\n' '\\0' | tar -c -f archive -v --null -T -
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-null2.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+cat >file-list <<'_ATEOF'
+a
+-b
+--c d
+_ATEOF
+
+
+genfile -f a
+genfile -f -b
+genfile -f '--c d'
+
+cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T -
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a
+-b
+--c d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-null2.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ # Testing one format is enough
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_19
+#AT_START_20
+at_fn_group_banner 20 'T-zfile.at:26' \
+ "empty file" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "20. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-zfile.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length=0 --file empty
+genfile --file a
+genfile --file b
+cat >valid <<'_ATEOF'
+a
+b
+_ATEOF
+
+
+tar cf archive -T empty -T valid
+tar tf archive
+echo \"==\"
+tar cf archive -T valid -T empty
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-zfile.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length=0 --file empty
+genfile --file a
+genfile --file b
+cat >valid <<'_ATEOF'
+a
+b
+_ATEOF
+
+
+tar cf archive -T empty -T valid
+tar tf archive
+echo "=="
+tar cf archive -T valid -T empty
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a
+b
+==
+a
+b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-zfile.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ # Testing one format is enough
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_20
+#AT_START_21
+at_fn_group_banner 21 'T-nonl.at:27' \
+ "entries with missing newlines" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "21. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-nonl.at:30:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length=0 --file empty
+\$as_echo_n c > 1.nonl
+echo d > 2.nonl
+\$as_echo_n e >> 2.nonl
+touch a b c d e
+cat >filelist <<'_ATEOF'
+a
+b
+_ATEOF
+
+
+tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
+tar tf archive
+echo ==
+tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "T-nonl.at:30"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length=0 --file empty
+$as_echo_n c > 1.nonl
+echo d > 2.nonl
+$as_echo_n e >> 2.nonl
+touch a b c d e
+cat >filelist <<'_ATEOF'
+a
+b
+_ATEOF
+
+
+tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
+tar tf archive
+echo ==
+tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "c
+d
+e
+a
+b
+==
+d
+e
+a
+b
+c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-nonl.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_21
+#AT_START_22
+at_fn_group_banner 22 'T-dir00.at:28' \
+ "recursive extraction from --files-from" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "22. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-dir00.at:30:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-dir00.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-dir00.at:30:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-dir00.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-dir00.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_22
+#AT_START_23
+at_fn_group_banner 23 'T-dir01.at:28' \
+ "trailing slash in --files-from" " " 2
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "23. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/T-dir01.at:30:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-dir01.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-dir01.at:30:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-dir01.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/T-dir01.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file1
+dir/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_23
+#AT_START_24
+at_fn_group_banner 24 'indexfile.at:26' \
+ "tar --index-file=FILE --file=-" " " 3
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "24. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/indexfile.at:29:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo \"Creating the archive\"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo \"Testing the archive\"
+tar -tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo "Creating the archive"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo "Testing the archive"
+tar -tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/indexfile.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo \"Creating the archive\"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo \"Testing the archive\"
+tar -tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo "Creating the archive"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo "Testing the archive"
+tar -tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/indexfile.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo \"Creating the archive\"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo \"Testing the archive\"
+tar -tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo "Creating the archive"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo "Testing the archive"
+tar -tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/indexfile.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo \"Creating the archive\"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo \"Testing the archive\"
+tar -tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo "Creating the archive"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo "Testing the archive"
+tar -tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/indexfile.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo \"Creating the archive\"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo \"Testing the archive\"
+tar -tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+genfile --file=directory/a --length=1035
+
+echo "Creating the archive"
+tar -c -v -f - --index-file=idx directory > archive
+
+echo "Testing the archive"
+tar -tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_24
+#AT_START_25
+at_fn_group_banner 25 'verbose.at:26' \
+ "tar cvf -" " " 3
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "25. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/verbose.at:29:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "file
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/verbose.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "file
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/verbose.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "file
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/verbose.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "file
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/verbose.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "file
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating the archive
+Testing the archive
+file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_25
+#AT_START_26
+at_fn_group_banner 26 'gzip.at:24' \
+ "gzip" " " 3
+at_xfail=no
+(
+ $as_echo "26. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+{ set +x
+$as_echo "$at_srcdir/gzip.at:29:
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+tar xfvz /dev/null 2>err
+RC=\$?
+sed -n '/^tar:/p' err >&2
+exit \$RC
+"
+at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:29"
+( $at_check_trace;
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+tar xfvz /dev/null 2>err
+RC=$?
+sed -n '/^tar:/p' err >&2
+exit $RC
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: Child returned status 1
+tar: Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/gzip.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_26
+#AT_START_27
+at_fn_group_banner 27 'recurse.at:21' \
+ "recurse" " " 3
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "27. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/recurse.at:24:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/recurse.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/recurse.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/recurse.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/recurse.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_27
+#AT_START_28
+at_fn_group_banner 28 'recurs02.at:30' \
+ "recurse: toggle" " " 3
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "28. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/recurs02.at:33:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/recurs02.at:33:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/recurs02.at:33:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/recurs02.at:33:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/recurs02.at:33:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \\
+ --no-recursion directory1 \\
+ --recursion directory2 || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory1 directory2
+touch directory1/file directory2/file
+tar --create --file archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+tar tf archive
+tar cf archive directory1 directory2
+tar tf archive \
+ --no-recursion directory1 \
+ --recursion directory2 || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory1/
+directory2/
+directory2/file
+directory1/
+directory2/
+directory2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_28
+#AT_START_29
+at_fn_group_banner 29 'shortrec.at:26' \
+ "short records" " " 3
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "29. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/shortrec.at:29:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/shortrec.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/shortrec.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/shortrec.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/shortrec.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+(cd directory && touch a b c d e f g h i j k l m n o p q r)
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
+tar -c -b 1 -f archive directory
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
+
+rm -r directory
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_29
+#AT_START_30
+at_fn_group_banner 30 'numeric.at:18' \
+ "--numeric-owner basic tests" " " 3
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "30. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/numeric.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+
+MYUID=\$(id -u) || exit 77
+MYGID=\$(id -g) || exit 77
+MYUSR=\$(id -un) || exit 77
+MYGRP=\$(id -gn) || exit 77
+
+
+decho --create
+tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --list
+tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --diff
+tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --extract
+tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+
+MYUID=$(id -u) || exit 77
+MYGID=$(id -g) || exit 77
+MYUSR=$(id -un) || exit 77
+MYGRP=$(id -gn) || exit 77
+
+
+decho --create
+tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --list
+tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --diff
+tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --extract
+tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "--create
+--list
+--diff
+--extract
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "--create
+OK
+OK
+OK
+OK
+--list
+OK
+OK
+OK
+OK
+--diff
+OK
+OK
+OK
+OK
+--extract
+OK
+OK
+OK
+OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/numeric.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+
+MYUID=\$(id -u) || exit 77
+MYGID=\$(id -g) || exit 77
+MYUSR=\$(id -un) || exit 77
+MYGRP=\$(id -gn) || exit 77
+
+
+decho --create
+tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --list
+tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --diff
+tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --extract
+tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+
+MYUID=$(id -u) || exit 77
+MYGID=$(id -g) || exit 77
+MYUSR=$(id -un) || exit 77
+MYGRP=$(id -gn) || exit 77
+
+
+decho --create
+tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --list
+tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --diff
+tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --extract
+tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "--create
+--list
+--diff
+--extract
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "--create
+OK
+OK
+OK
+OK
+--list
+OK
+OK
+OK
+OK
+--diff
+OK
+OK
+OK
+OK
+--extract
+OK
+OK
+OK
+OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/numeric.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+
+MYUID=\$(id -u) || exit 77
+MYGID=\$(id -g) || exit 77
+MYUSR=\$(id -un) || exit 77
+MYGRP=\$(id -gn) || exit 77
+
+
+decho --create
+tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --list
+tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --diff
+tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --extract
+tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+
+MYUID=$(id -u) || exit 77
+MYGID=$(id -g) || exit 77
+MYUSR=$(id -un) || exit 77
+MYGRP=$(id -gn) || exit 77
+
+
+decho --create
+tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --list
+tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --diff
+tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --extract
+tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "--create
+--list
+--diff
+--extract
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "--create
+OK
+OK
+OK
+OK
+--list
+OK
+OK
+OK
+OK
+--diff
+OK
+OK
+OK
+OK
+--extract
+OK
+OK
+OK
+OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/numeric.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+
+MYUID=\$(id -u) || exit 77
+MYGID=\$(id -g) || exit 77
+MYUSR=\$(id -un) || exit 77
+MYGRP=\$(id -gn) || exit 77
+
+
+decho --create
+tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --list
+tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --diff
+tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+
+decho --extract
+tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
+tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+
+MYUID=$(id -u) || exit 77
+MYGID=$(id -g) || exit 77
+MYUSR=$(id -un) || exit 77
+MYGRP=$(id -gn) || exit 77
+
+
+decho --create
+tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --list
+tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --diff
+tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+
+decho --extract
+tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
+tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "--create
+--list
+--diff
+--extract
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "--create
+OK
+OK
+OK
+OK
+--list
+OK
+OK
+OK
+OK
+--diff
+OK
+OK
+OK
+OK
+--extract
+OK
+OK
+OK
+OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_30
+#AT_START_31
+at_fn_group_banner 31 'same-order01.at:27' \
+ "working -C with --same-order" " " 4
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "31. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/same-order01.at:30:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/same-order01.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/same-order01.at:30:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/same-order01.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/same-order01.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
+
+ls directory|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_31
+#AT_START_32
+at_fn_group_banner 32 'same-order02.at:26' \
+ "multiple -C options" " " 4
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "32. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/same-order02.at:29:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=\`pwd\`
+tar -xf archive --same-order --warning=no-timestamp \\
+ -C \$HERE/en file1 \\
+ -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=`pwd`
+tar -xf archive --same-order --warning=no-timestamp \
+ -C $HERE/en file1 \
+ -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+separator
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/same-order02.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=\`pwd\`
+tar -xf archive --same-order --warning=no-timestamp \\
+ -C \$HERE/en file1 \\
+ -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=`pwd`
+tar -xf archive --same-order --warning=no-timestamp \
+ -C $HERE/en file1 \
+ -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+separator
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/same-order02.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=\`pwd\`
+tar -xf archive --same-order --warning=no-timestamp \\
+ -C \$HERE/en file1 \\
+ -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=`pwd`
+tar -xf archive --same-order --warning=no-timestamp \
+ -C $HERE/en file1 \
+ -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+separator
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/same-order02.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=\`pwd\`
+tar -xf archive --same-order --warning=no-timestamp \\
+ -C \$HERE/en file1 \\
+ -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=`pwd`
+tar -xf archive --same-order --warning=no-timestamp \
+ -C $HERE/en file1 \
+ -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+separator
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/same-order02.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=\`pwd\`
+tar -xf archive --same-order --warning=no-timestamp \\
+ -C \$HERE/en file1 \\
+ -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=`pwd`
+tar -xf archive --same-order --warning=no-timestamp \
+ -C $HERE/en file1 \
+ -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+separator
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_32
+#AT_START_33
+at_fn_group_banner 33 'append.at:22' \
+ "append" " " 5
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "33. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/append.at:25:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append.at:25:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append.at:25:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append.at:25:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append.at:25:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+touch file1
+ touch file2
+ tar cf archive file1
+ tar rf archive file2
+ tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_33
+#AT_START_34
+at_fn_group_banner 34 'append01.at:29' \
+ "appending files with long names" " " 5
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "34. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/append01.at:34:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
+touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
+touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append01.at:34:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
+touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
+touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append01.at:34:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
+touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
+touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append01.at:34:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
+touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
+touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
+This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_34
+#AT_START_35
+at_fn_group_banner 35 'append02.at:55' \
+ "append vs. create" " " 5
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "35. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/append02.at:58:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME=\"--mtime=@0\"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test \$TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
+fi
+
+echo Creating archive.1
+tar \$MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar \$MTIME -cf archive.2 -T /dev/null
+tar \$MTIME -rf archive.2 file1
+tar \$MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME="--mtime=@0"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test $TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
+fi
+
+echo Creating archive.1
+tar $MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar $MTIME -cf archive.2 -T /dev/null
+tar $MTIME -rf archive.2 file1
+tar $MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append02.at:58:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME=\"--mtime=@0\"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test \$TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
+fi
+
+echo Creating archive.1
+tar \$MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar \$MTIME -cf archive.2 -T /dev/null
+tar \$MTIME -rf archive.2 file1
+tar \$MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME="--mtime=@0"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test $TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
+fi
+
+echo Creating archive.1
+tar $MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar $MTIME -cf archive.2 -T /dev/null
+tar $MTIME -rf archive.2 file1
+tar $MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append02.at:58:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME=\"--mtime=@0\"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test \$TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
+fi
+
+echo Creating archive.1
+tar \$MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar \$MTIME -cf archive.2 -T /dev/null
+tar \$MTIME -rf archive.2 file1
+tar \$MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME="--mtime=@0"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test $TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
+fi
+
+echo Creating archive.1
+tar $MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar $MTIME -cf archive.2 -T /dev/null
+tar $MTIME -rf archive.2 file1
+tar $MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append02.at:58:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME=\"--mtime=@0\"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test \$TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
+fi
+
+echo Creating archive.1
+tar \$MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar \$MTIME -cf archive.2 -T /dev/null
+tar \$MTIME -rf archive.2 file1
+tar \$MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME="--mtime=@0"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test $TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
+fi
+
+echo Creating archive.1
+tar $MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar $MTIME -cf archive.2 -T /dev/null
+tar $MTIME -rf archive.2 file1
+tar $MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append02.at:58:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME=\"--mtime=@0\"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test \$TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
+fi
+
+echo Creating archive.1
+tar \$MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar \$MTIME -cf archive.2 -T /dev/null
+tar \$MTIME -rf archive.2 file1
+tar \$MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file1
+genfile --file file2
+
+# Make sure file timestamps in the archive will not differ
+MTIME="--mtime=@0"
+
+# For PAX archives, we need to make sure extended header names are
+# reproducible and that their contents won't change with time
+if test $TEST_TAR_FORMAT = posix; then
+ TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
+fi
+
+echo Creating archive.1
+tar $MTIME -cf archive.1 file1 file2
+
+echo Creating archive.2
+tar $MTIME -cf archive.2 -T /dev/null
+tar $MTIME -rf archive.2 file1
+tar $MTIME -rf archive.2 file2
+
+echo Comparing archives
+cmp archive.1 archive.2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_35
+#AT_START_36
+at_fn_group_banner 36 'append03.at:21' \
+ "append with name transformation" " " 5
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "36. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Description: Make sure filenames are transformed during append.
+
+
+
+ { set +x
+$as_echo "$at_srcdir/append03.at:26:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Appending
+plik.1
+Testing
+plik.1
+plik.2
+plik.1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append03.at:26:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Appending
+plik.1
+Testing
+plik.1
+plik.2
+plik.1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append03.at:26:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Appending
+plik.1
+Testing
+plik.1
+plik.2
+plik.1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append03.at:26:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Appending
+plik.1
+Testing
+plik.1
+plik.2
+plik.1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append03.at:26:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file.1
+genfile --file file.2
+
+tar -c -f archive --transform 's/file/plik/' file.*
+echo Appending
+tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
+echo Testing
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Appending
+plik.1
+Testing
+plik.1
+plik.2
+plik.1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_36
+#AT_START_37
+at_fn_group_banner 37 'append04.at:29' \
+ "append with verify" " " 5
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "37. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/append04.at:32:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+==
+file1
+file2
+file3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append04.at:32:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+==
+file1
+file2
+file3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append04.at:32:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+==
+file1
+file2
+file3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append04.at:32:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+==
+file1
+file2
+file3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append04.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+# Create two empty files:
+touch file1 file2
+
+# Create an archive:
+tar cpfW archive.tar file1 file2
+
+# Verify created archive by listing its content:
+tar -tf archive.tar
+echo ==
+# Create another empty file:
+touch file3
+
+# Append it to the already created archive:
+tar rpfW archive.tar file3
+
+# Verify content of the new archive:
+tar -tf archive.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+==
+file1
+file2
+file3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_37
+#AT_START_38
+at_fn_group_banner 38 'append05.at:32' \
+ "append after changed blocking" " " 5
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "38. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/append05.at:35:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo \$f > \$f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo $f > $f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "creating archive
+adding d e f
+adding g h i
+resulting archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "creating archive
+a
+b
+c
+adding d e f
+d
+e
+f
+==
+a
+b
+c
+d
+e
+f
+adding g h i
+g
+h
+i
+resulting archive
+a
+b
+c
+d
+e
+f
+g
+h
+i
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append05.at:35:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo \$f > \$f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo $f > $f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "creating archive
+adding d e f
+adding g h i
+resulting archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "creating archive
+a
+b
+c
+adding d e f
+d
+e
+f
+==
+a
+b
+c
+d
+e
+f
+adding g h i
+g
+h
+i
+resulting archive
+a
+b
+c
+d
+e
+f
+g
+h
+i
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append05.at:35:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo \$f > \$f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo $f > $f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "creating archive
+adding d e f
+adding g h i
+resulting archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "creating archive
+a
+b
+c
+adding d e f
+d
+e
+f
+==
+a
+b
+c
+d
+e
+f
+adding g h i
+g
+h
+i
+resulting archive
+a
+b
+c
+d
+e
+f
+g
+h
+i
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append05.at:35:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo \$f > \$f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo $f > $f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "creating archive
+adding d e f
+adding g h i
+resulting archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "creating archive
+a
+b
+c
+adding d e f
+d
+e
+f
+==
+a
+b
+c
+d
+e
+f
+adding g h i
+g
+h
+i
+resulting archive
+a
+b
+c
+d
+e
+f
+g
+h
+i
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/append05.at:35:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo \$f > \$f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+for f in a b c d e f g h i
+do
+ echo $f > $f
+done
+
+decho 'creating archive'
+tar -cf archive -b1 a b c
+
+tar tf archive
+
+decho 'adding d e f'
+tar -vrf archive -b3 d e f
+echo ==
+tar tf archive
+
+decho 'adding g h i'
+tar -vrf archive -b5 g h i
+
+decho 'resulting archive'
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "creating archive
+adding d e f
+adding g h i
+resulting archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "creating archive
+a
+b
+c
+adding d e f
+d
+e
+f
+==
+a
+b
+c
+d
+e
+f
+adding g h i
+g
+h
+i
+resulting archive
+a
+b
+c
+d
+e
+f
+g
+h
+i
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_38
+#AT_START_39
+at_fn_group_banner 39 'xform-h.at:30' \
+ "transforming hard links on create" " " 6
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "39. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/xform-h.at:39:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo \"hello\" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo \"Default transform scope\"
+tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Not transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo "hello" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo "Default transform scope"
+tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Transforming hard links"
+tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Not transforming hard links"
+tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Default transform scope
+test
+Transforming hard links
+test
+Not transforming hard links
+basedir/test
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xform-h.at:39:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo \"hello\" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo \"Default transform scope\"
+tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Not transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo "hello" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo "Default transform scope"
+tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Transforming hard links"
+tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Not transforming hard links"
+tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Default transform scope
+test
+Transforming hard links
+test
+Not transforming hard links
+basedir/test
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xform-h.at:39:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo \"hello\" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo \"Default transform scope\"
+tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Not transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo "hello" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo "Default transform scope"
+tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Transforming hard links"
+tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Not transforming hard links"
+tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Default transform scope
+test
+Transforming hard links
+test
+Not transforming hard links
+basedir/test
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xform-h.at:39:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo \"hello\" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo \"Default transform scope\"
+tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Not transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo "hello" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo "Default transform scope"
+tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Transforming hard links"
+tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Not transforming hard links"
+tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Default transform scope
+test
+Transforming hard links
+test
+Not transforming hard links
+basedir/test
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xform-h.at:39:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo \"hello\" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo \"Default transform scope\"
+tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo \"Not transforming hard links\"
+tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir basedir
+echo "hello" > basedir/test
+ln basedir/test basedir/test_link
+
+
+echo "Default transform scope"
+tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Transforming hard links"
+tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+
+echo "Not transforming hard links"
+tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Default transform scope
+test
+Transforming hard links
+test
+Not transforming hard links
+basedir/test
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_39
+#AT_START_40
+at_fn_group_banner 40 'xform01.at:26' \
+ "transformations and GNU volume labels" " " 6
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "40. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/xform01.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar -cf archive.tar -V /label/ file
+tar tf archive.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform01.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar -cf archive.tar -V /label/ file
+tar tf archive.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "/label/
+file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform01.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_40
+#AT_START_41
+at_fn_group_banner 41 'xform02.at:21' \
+ "transforming escaped delimiters on create" " " 6
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "41. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/xform02.at:24:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \\
+ --transform='s/file/other\\/name/' \\
+ --show-transformed-name
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \
+ --transform='s/file/other\/name/' \
+ --show-transformed-name
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "other/name
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xform02.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \\
+ --transform='s/file/other\\/name/' \\
+ --show-transformed-name
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \
+ --transform='s/file/other\/name/' \
+ --show-transformed-name
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "other/name
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xform02.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \\
+ --transform='s/file/other\\/name/' \\
+ --show-transformed-name
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \
+ --transform='s/file/other\/name/' \
+ --show-transformed-name
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "other/name
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xform02.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \\
+ --transform='s/file/other\\/name/' \\
+ --show-transformed-name
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \
+ --transform='s/file/other\/name/' \
+ --show-transformed-name
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "other/name
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xform02.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \\
+ --transform='s/file/other\\/name/' \\
+ --show-transformed-name
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file file
+tar cvf /dev/null file \
+ --transform='s/file/other\/name/' \
+ --show-transformed-name
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "other/name
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_41
+#AT_START_42
+at_fn_group_banner 42 'exclude.at:23' \
+ "exclude" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "42. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude.at:26:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir dir
+echo blues > dir/blues
+echo jazz > dir/jazz
+mkdir dir/folk
+echo tagfile > dir/folk/tagfile
+echo sanjuan > dir/folk/sanjuan
+mkdir dir/rock
+echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG
+echo \"test\" > dir/rock/file
+
+for option in exclude-caches exclude-caches-under exclude-caches-all
+do
+ echo OPTION \$option
+ tar -cf archive.tar --\$option -v dir 2>err | sort
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar | sort
+done
+
+for option in exclude-tag exclude-tag-under exclude-tag-all
+do
+ echo OPTION \$option
+ tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar | sort
+done
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude.at:26"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir dir
+echo blues > dir/blues
+echo jazz > dir/jazz
+mkdir dir/folk
+echo tagfile > dir/folk/tagfile
+echo sanjuan > dir/folk/sanjuan
+mkdir dir/rock
+echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
+echo "test" > dir/rock/file
+
+for option in exclude-caches exclude-caches-under exclude-caches-all
+do
+ echo OPTION $option
+ tar -cf archive.tar --$option -v dir 2>err | sort
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar | sort
+done
+
+for option in exclude-tag exclude-tag-under exclude-tag-all
+do
+ echo OPTION $option
+ tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar | sort
+done
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "OPTION exclude-caches
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+OPTION exclude-caches-under
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+OPTION exclude-caches-all
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/folk/sanjuan
+dir/folk/tagfile
+dir/jazz
+OPTION exclude-tag
+dir/
+dir/blues
+dir/folk/
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/folk/tagfile
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+OPTION exclude-tag-under
+dir/
+dir/blues
+dir/folk/
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/folk/
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+OPTION exclude-tag-all
+dir/
+dir/blues
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/jazz
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_42
+#AT_START_43
+at_fn_group_banner 43 'exclude01.at:19' \
+ "exclude wildcards" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "43. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude01.at:22:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude=testdir/dir1/\\* \\
+ --no-wildcards \\
+ --exclude=testdir/dir2/\\* \\
+ --wildcards \\
+ --exclude=testdir/dir3/\\* \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir/dir1
+tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards \"testdir/dir1/*\" -f archive | sort
+
+rm -rf testdir
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude=testdir/dir1/\* \
+ --no-wildcards \
+ --exclude=testdir/dir2/\* \
+ --wildcards \
+ --exclude=testdir/dir3/\* \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir/dir1
+tar t --no-wildcards "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards "testdir/dir1/*" -f archive | sort
+
+rm -rf testdir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir2/
+testdir/dir2/file2
+testdir/dir3/
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude01.at:22:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude=testdir/dir1/\\* \\
+ --no-wildcards \\
+ --exclude=testdir/dir2/\\* \\
+ --wildcards \\
+ --exclude=testdir/dir3/\\* \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir/dir1
+tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards \"testdir/dir1/*\" -f archive | sort
+
+rm -rf testdir
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude=testdir/dir1/\* \
+ --no-wildcards \
+ --exclude=testdir/dir2/\* \
+ --wildcards \
+ --exclude=testdir/dir3/\* \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir/dir1
+tar t --no-wildcards "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards "testdir/dir1/*" -f archive | sort
+
+rm -rf testdir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir2/
+testdir/dir2/file2
+testdir/dir3/
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude01.at:22:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude=testdir/dir1/\\* \\
+ --no-wildcards \\
+ --exclude=testdir/dir2/\\* \\
+ --wildcards \\
+ --exclude=testdir/dir3/\\* \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir/dir1
+tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards \"testdir/dir1/*\" -f archive | sort
+
+rm -rf testdir
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude=testdir/dir1/\* \
+ --no-wildcards \
+ --exclude=testdir/dir2/\* \
+ --wildcards \
+ --exclude=testdir/dir3/\* \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir/dir1
+tar t --no-wildcards "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards "testdir/dir1/*" -f archive | sort
+
+rm -rf testdir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir2/
+testdir/dir2/file2
+testdir/dir3/
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude01.at:22:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude=testdir/dir1/\\* \\
+ --no-wildcards \\
+ --exclude=testdir/dir2/\\* \\
+ --wildcards \\
+ --exclude=testdir/dir3/\\* \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir/dir1
+tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards \"testdir/dir1/*\" -f archive | sort
+
+rm -rf testdir
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude=testdir/dir1/\* \
+ --no-wildcards \
+ --exclude=testdir/dir2/\* \
+ --wildcards \
+ --exclude=testdir/dir3/\* \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir/dir1
+tar t --no-wildcards "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards "testdir/dir1/*" -f archive | sort
+
+rm -rf testdir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir2/
+testdir/dir2/file2
+testdir/dir3/
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude01.at:22:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude=testdir/dir1/\\* \\
+ --no-wildcards \\
+ --exclude=testdir/dir2/\\* \\
+ --wildcards \\
+ --exclude=testdir/dir3/\\* \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir/dir1
+tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards \"testdir/dir1/*\" -f archive | sort
+
+rm -rf testdir
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude=testdir/dir1/\* \
+ --no-wildcards \
+ --exclude=testdir/dir2/\* \
+ --wildcards \
+ --exclude=testdir/dir3/\* \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir/dir1
+tar t --no-wildcards "testdir/dir1/*" -f archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards "testdir/dir1/*" -f archive | sort
+
+rm -rf testdir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir2/
+testdir/dir2/file2
+testdir/dir3/
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+NEXT
+testdir/dir1/*
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_43
+#AT_START_44
+at_fn_group_banner 44 'exclude02.at:19' \
+ "exclude: anchoring" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "44. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude02.at:22:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive --no-anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 2\"
+tar cf archive --anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 3\"
+tar cf archive testdir file1.txt
+tar t \"file1.txt\" -f archive | sort
+
+echo \"SUB 4\"
+tar t --no-anchored \"file1.txt\" -f archive | sort
+
+echo \"SUB 5\"
+tar t --anchored \"file1.txt\" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive --no-anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 2"
+tar cf archive --anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 3"
+tar cf archive testdir file1.txt
+tar t "file1.txt" -f archive | sort
+
+echo "SUB 4"
+tar t --no-anchored "file1.txt" -f archive | sort
+
+echo "SUB 5"
+tar t --anchored "file1.txt" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file2
+SUB 1
+testdir/
+testdir/file2
+SUB 2
+testdir/
+testdir/file1.txt
+testdir/file2
+SUB 3
+file1.txt
+SUB 4
+file1.txt
+testdir/file1.txt
+SUB 5
+file1.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude02.at:22:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive --no-anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 2\"
+tar cf archive --anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 3\"
+tar cf archive testdir file1.txt
+tar t \"file1.txt\" -f archive | sort
+
+echo \"SUB 4\"
+tar t --no-anchored \"file1.txt\" -f archive | sort
+
+echo \"SUB 5\"
+tar t --anchored \"file1.txt\" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive --no-anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 2"
+tar cf archive --anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 3"
+tar cf archive testdir file1.txt
+tar t "file1.txt" -f archive | sort
+
+echo "SUB 4"
+tar t --no-anchored "file1.txt" -f archive | sort
+
+echo "SUB 5"
+tar t --anchored "file1.txt" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file2
+SUB 1
+testdir/
+testdir/file2
+SUB 2
+testdir/
+testdir/file1.txt
+testdir/file2
+SUB 3
+file1.txt
+SUB 4
+file1.txt
+testdir/file1.txt
+SUB 5
+file1.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude02.at:22:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive --no-anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 2\"
+tar cf archive --anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 3\"
+tar cf archive testdir file1.txt
+tar t \"file1.txt\" -f archive | sort
+
+echo \"SUB 4\"
+tar t --no-anchored \"file1.txt\" -f archive | sort
+
+echo \"SUB 5\"
+tar t --anchored \"file1.txt\" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive --no-anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 2"
+tar cf archive --anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 3"
+tar cf archive testdir file1.txt
+tar t "file1.txt" -f archive | sort
+
+echo "SUB 4"
+tar t --no-anchored "file1.txt" -f archive | sort
+
+echo "SUB 5"
+tar t --anchored "file1.txt" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file2
+SUB 1
+testdir/
+testdir/file2
+SUB 2
+testdir/
+testdir/file1.txt
+testdir/file2
+SUB 3
+file1.txt
+SUB 4
+file1.txt
+testdir/file1.txt
+SUB 5
+file1.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude02.at:22:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive --no-anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 2\"
+tar cf archive --anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 3\"
+tar cf archive testdir file1.txt
+tar t \"file1.txt\" -f archive | sort
+
+echo \"SUB 4\"
+tar t --no-anchored \"file1.txt\" -f archive | sort
+
+echo \"SUB 5\"
+tar t --anchored \"file1.txt\" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive --no-anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 2"
+tar cf archive --anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 3"
+tar cf archive testdir file1.txt
+tar t "file1.txt" -f archive | sort
+
+echo "SUB 4"
+tar t --no-anchored "file1.txt" -f archive | sort
+
+echo "SUB 5"
+tar t --anchored "file1.txt" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file2
+SUB 1
+testdir/
+testdir/file2
+SUB 2
+testdir/
+testdir/file1.txt
+testdir/file2
+SUB 3
+file1.txt
+SUB 4
+file1.txt
+testdir/file1.txt
+SUB 5
+file1.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude02.at:22:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive --no-anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 2\"
+tar cf archive --anchored \\
+ --exclude=\"file1.txt\" \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 3\"
+tar cf archive testdir file1.txt
+tar t \"file1.txt\" -f archive | sort
+
+echo \"SUB 4\"
+tar t --no-anchored \"file1.txt\" -f archive | sort
+
+echo \"SUB 5\"
+tar t --anchored \"file1.txt\" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir
+touch file1.txt
+touch testdir/file1.txt
+touch testdir/file2
+
+tar cf archive --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive --no-anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 2"
+tar cf archive --anchored \
+ --exclude="file1.txt" \
+ testdir
+tar tf archive | sort
+
+echo "SUB 3"
+tar cf archive testdir file1.txt
+tar t "file1.txt" -f archive | sort
+
+echo "SUB 4"
+tar t --no-anchored "file1.txt" -f archive | sort
+
+echo "SUB 5"
+tar t --anchored "file1.txt" -f archive | sort
+
+rm -rf testdir file1.txt
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file2
+SUB 1
+testdir/
+testdir/file2
+SUB 2
+testdir/
+testdir/file1.txt
+testdir/file2
+SUB 3
+file1.txt
+SUB 4
+file1.txt
+testdir/file1.txt
+SUB 5
+file1.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_44
+#AT_START_45
+at_fn_group_banner 45 'exclude03.at:19' \
+ "exclude: wildcards match slash" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "45. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude03.at:22:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\\*f\\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude='testdir*f*1' \\
+ --no-wildcards-match-slash \\
+ --exclude='testdir*f*2' \\
+ --wildcards-match-slash \\
+ --exclude='testdir*f*3' \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\*f\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude='testdir*f*1' \
+ --no-wildcards-match-slash \
+ --exclude='testdir*f*2' \
+ --wildcards-match-slash \
+ --exclude='testdir*f*3' \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir1/*
+testdir/dir2/
+testdir/dir2/*
+testdir/dir2/file2
+testdir/dir3/
+testdir/dir3/*
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+NEXT
+testdir/*f*1
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude03.at:22:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\\*f\\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude='testdir*f*1' \\
+ --no-wildcards-match-slash \\
+ --exclude='testdir*f*2' \\
+ --wildcards-match-slash \\
+ --exclude='testdir*f*3' \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\*f\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude='testdir*f*1' \
+ --no-wildcards-match-slash \
+ --exclude='testdir*f*2' \
+ --wildcards-match-slash \
+ --exclude='testdir*f*3' \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir1/*
+testdir/dir2/
+testdir/dir2/*
+testdir/dir2/file2
+testdir/dir3/
+testdir/dir3/*
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+NEXT
+testdir/*f*1
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude03.at:22:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\\*f\\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude='testdir*f*1' \\
+ --no-wildcards-match-slash \\
+ --exclude='testdir*f*2' \\
+ --wildcards-match-slash \\
+ --exclude='testdir*f*3' \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\*f\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude='testdir*f*1' \
+ --no-wildcards-match-slash \
+ --exclude='testdir*f*2' \
+ --wildcards-match-slash \
+ --exclude='testdir*f*3' \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir1/*
+testdir/dir2/
+testdir/dir2/*
+testdir/dir2/file2
+testdir/dir3/
+testdir/dir3/*
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+NEXT
+testdir/*f*1
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude03.at:22:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\\*f\\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude='testdir*f*1' \\
+ --no-wildcards-match-slash \\
+ --exclude='testdir*f*2' \\
+ --wildcards-match-slash \\
+ --exclude='testdir*f*3' \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\*f\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude='testdir*f*1' \
+ --no-wildcards-match-slash \
+ --exclude='testdir*f*2' \
+ --wildcards-match-slash \
+ --exclude='testdir*f*3' \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir1/*
+testdir/dir2/
+testdir/dir2/*
+testdir/dir2/file2
+testdir/dir3/
+testdir/dir3/*
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+NEXT
+testdir/*f*1
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude03.at:22:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\\*f\\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\\*
+touch testdir/dir2/file2
+touch testdir/dir2/\\*
+touch testdir/dir3/file3
+touch testdir/dir3/\\*
+
+tar cf archive --exclude='testdir*f*1' \\
+ --no-wildcards-match-slash \\
+ --exclude='testdir*f*2' \\
+ --wildcards-match-slash \\
+ --exclude='testdir*f*3' \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo \"NEXT\"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
+touch testdir/\*f\*1
+touch testdir/dir1/file1
+touch testdir/dir1/\*
+touch testdir/dir2/file2
+touch testdir/dir2/\*
+touch testdir/dir3/file3
+touch testdir/dir3/\*
+
+tar cf archive --exclude='testdir*f*1' \
+ --no-wildcards-match-slash \
+ --exclude='testdir*f*2' \
+ --wildcards-match-slash \
+ --exclude='testdir*f*3' \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive testdir
+tar t --wildcards 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+echo "NEXT"
+tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir1/
+testdir/dir1/*
+testdir/dir2/
+testdir/dir2/*
+testdir/dir2/file2
+testdir/dir3/
+testdir/dir3/*
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+NEXT
+testdir/*f*1
+NEXT
+testdir/*f*1
+testdir/dir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_45
+#AT_START_46
+at_fn_group_banner 46 'exclude04.at:19' \
+ "exclude: case insensitive" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "46. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude04.at:22:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \\
+ --exclude=file1 \\
+ --ignore-case \\
+ --exclude=file3 \\
+ --no-ignore-case \\
+ --exclude=FILE2 \\
+ --exclude=file4 \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo \"SUB 2\"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo \"SUB 3\"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \
+ --exclude=file1 \
+ --ignore-case \
+ --exclude=file3 \
+ --no-ignore-case \
+ --exclude=FILE2 \
+ --exclude=file4 \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo "SUB 2"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo "SUB 3"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir/
+testdir/dir/File1
+testdir/dir/File2
+testdir/dir/File4
+testdir/file2
+SUB 1
+testdir/dir/File2
+SUB 2
+testdir/dir/File2
+testdir/file2
+SUB 3
+testdir/dir/File2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude04.at:22:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \\
+ --exclude=file1 \\
+ --ignore-case \\
+ --exclude=file3 \\
+ --no-ignore-case \\
+ --exclude=FILE2 \\
+ --exclude=file4 \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo \"SUB 2\"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo \"SUB 3\"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \
+ --exclude=file1 \
+ --ignore-case \
+ --exclude=file3 \
+ --no-ignore-case \
+ --exclude=FILE2 \
+ --exclude=file4 \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo "SUB 2"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo "SUB 3"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir/
+testdir/dir/File1
+testdir/dir/File2
+testdir/dir/File4
+testdir/file2
+SUB 1
+testdir/dir/File2
+SUB 2
+testdir/dir/File2
+testdir/file2
+SUB 3
+testdir/dir/File2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude04.at:22:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \\
+ --exclude=file1 \\
+ --ignore-case \\
+ --exclude=file3 \\
+ --no-ignore-case \\
+ --exclude=FILE2 \\
+ --exclude=file4 \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo \"SUB 2\"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo \"SUB 3\"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \
+ --exclude=file1 \
+ --ignore-case \
+ --exclude=file3 \
+ --no-ignore-case \
+ --exclude=FILE2 \
+ --exclude=file4 \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo "SUB 2"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo "SUB 3"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir/
+testdir/dir/File1
+testdir/dir/File2
+testdir/dir/File4
+testdir/file2
+SUB 1
+testdir/dir/File2
+SUB 2
+testdir/dir/File2
+testdir/file2
+SUB 3
+testdir/dir/File2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude04.at:22:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \\
+ --exclude=file1 \\
+ --ignore-case \\
+ --exclude=file3 \\
+ --no-ignore-case \\
+ --exclude=FILE2 \\
+ --exclude=file4 \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo \"SUB 2\"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo \"SUB 3\"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \
+ --exclude=file1 \
+ --ignore-case \
+ --exclude=file3 \
+ --no-ignore-case \
+ --exclude=FILE2 \
+ --exclude=file4 \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo "SUB 2"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo "SUB 3"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir/
+testdir/dir/File1
+testdir/dir/File2
+testdir/dir/File4
+testdir/file2
+SUB 1
+testdir/dir/File2
+SUB 2
+testdir/dir/File2
+testdir/file2
+SUB 3
+testdir/dir/File2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude04.at:22:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \\
+ --exclude=file1 \\
+ --ignore-case \\
+ --exclude=file3 \\
+ --no-ignore-case \\
+ --exclude=FILE2 \\
+ --exclude=file4 \\
+ testdir
+tar tf archive | sort
+
+echo \"SUB 1\"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo \"SUB 2\"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo \"SUB 3\"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir
+mkdir -p testdir/dir
+touch testdir/file1
+touch testdir/file2
+touch testdir/file3
+touch testdir/file4
+touch testdir/dir/File1
+touch testdir/dir/File2
+touch testdir/dir/File3
+touch testdir/dir/File4
+
+tar cf archive --exclude=FILE2 \
+ --exclude=file1 \
+ --ignore-case \
+ --exclude=file3 \
+ --no-ignore-case \
+ --exclude=FILE2 \
+ --exclude=file4 \
+ testdir
+tar tf archive | sort
+
+echo "SUB 1"
+tar cf archive testdir
+tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
+
+echo "SUB 2"
+tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
+
+echo "SUB 3"
+tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
+
+rm -rf testdir
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/dir/
+testdir/dir/File1
+testdir/dir/File2
+testdir/dir/File4
+testdir/file2
+SUB 1
+testdir/dir/File2
+SUB 2
+testdir/dir/File2
+testdir/file2
+SUB 3
+testdir/dir/File2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_46
+#AT_START_47
+at_fn_group_banner 47 'exclude05.at:21' \
+ "exclude: lots of excludes" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "47. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude05.at:24:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
+ while read name
+ do
+ genfile --file \$name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
+ while read name
+ do
+ genfile --file $name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+NEXT
+testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude05.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
+ while read name
+ do
+ genfile --file \$name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
+ while read name
+ do
+ genfile --file $name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+NEXT
+testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude05.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
+ while read name
+ do
+ genfile --file \$name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
+ while read name
+ do
+ genfile --file $name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+NEXT
+testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude05.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
+ while read name
+ do
+ genfile --file \$name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
+ while read name
+ do
+ genfile --file $name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+NEXT
+testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude05.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
+ while read name
+ do
+ genfile --file \$name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+echo \"NEXT\"
+tar cf archive --exclude-from=exclfile \\
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+rm -rf testdir exclfile
+mkdir -p testdir
+awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
+ while read name
+ do
+ genfile --file $name
+ done
+
+awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
+
+tar cf archive --anchored --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+echo "NEXT"
+tar cf archive --exclude-from=exclfile \
+ testdir
+tar tf archive | sort
+
+rm -rf testdir exclfile
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+NEXT
+testdir/
+testdir/file10
+testdir/file11
+testdir/file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_47
+#AT_START_48
+at_fn_group_banner 48 'exclude06.at:26' \
+ "exclude: long files in pax archives" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "48. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude06.at:31:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77
+genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
+genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
+
+tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
+mkdir out
+tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
+find out -type f
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "exclude06.at:31"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77
+genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
+genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
+
+tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
+mkdir out
+tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
+find out -type f
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "out/one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude06.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_48
+#AT_START_49
+at_fn_group_banner 49 'exclude07.at:19' \
+ "exclude: --exclude-backups option" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "49. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude07.at:22:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file \"dir/.#file\"
+genfile --file \"dir/#file#\"
+
+tar -v -c -f archive --exclude-backups dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file "dir/.#file"
+genfile --file "dir/#file#"
+
+tar -v -c -f archive --exclude-backups dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude07.at:22:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file \"dir/.#file\"
+genfile --file \"dir/#file#\"
+
+tar -v -c -f archive --exclude-backups dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file "dir/.#file"
+genfile --file "dir/#file#"
+
+tar -v -c -f archive --exclude-backups dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude07.at:22:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file \"dir/.#file\"
+genfile --file \"dir/#file#\"
+
+tar -v -c -f archive --exclude-backups dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file "dir/.#file"
+genfile --file "dir/#file#"
+
+tar -v -c -f archive --exclude-backups dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude07.at:22:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file \"dir/.#file\"
+genfile --file \"dir/#file#\"
+
+tar -v -c -f archive --exclude-backups dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file "dir/.#file"
+genfile --file "dir/#file#"
+
+tar -v -c -f archive --exclude-backups dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude07.at:22:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file \"dir/.#file\"
+genfile --file \"dir/#file#\"
+
+tar -v -c -f archive --exclude-backups dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+genfile --file dir/file
+genfile --file dir/file~
+genfile --file "dir/.#file"
+genfile --file "dir/#file#"
+
+tar -v -c -f archive --exclude-backups dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_49
+#AT_START_50
+at_fn_group_banner 50 'exclude08.at:36' \
+ "--exclude-tag option" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "50. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude08.at:39:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/subdir/excludeme
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude08.at:39:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/subdir/excludeme
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude08.at:39:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/subdir/excludeme
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude08.at:39:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/subdir/excludeme
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude08.at:39:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/subdir/excludeme
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_50
+#AT_START_51
+at_fn_group_banner 51 'exclude09.at:37' \
+ "--exclude-tag option and --listed-incremental" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "51. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude09.at:40:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude09.at:40"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/subdir/excludeme
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude09.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_51
+#AT_START_52
+at_fn_group_banner 52 'exclude10.at:38' \
+ "--exclude-tag option in incremental pass" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "52. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude10.at:41:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+rm etest/subdir/excludeme
+decho \"# Level 0\"
+tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho \"# Level 1\"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude10.at:41"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+rm etest/subdir/excludeme
+decho "# Level 0"
+tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho "# Level 1"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Level 0
+tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+# Level 1
+tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Level 0
+etest/
+etest/subdir/
+etest/subdir/subdir-file
+etest/top-level-file
+# Level 1
+etest/
+etest/subdir/
+etest/subdir/excludeme
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude10.at:41"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_52
+#AT_START_53
+at_fn_group_banner 53 'exclude11.at:36' \
+ "--exclude-tag-under option" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "53. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude11.at:39:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude11.at:39:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude11.at:39:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude11.at:39:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude11.at:39:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_53
+#AT_START_54
+at_fn_group_banner 54 'exclude12.at:37' \
+ "--exclude-tag-under and --listed-incremental" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "54. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude12.at:40:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude12.at:40"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/subdir/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude12.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_54
+#AT_START_55
+at_fn_group_banner 55 'exclude13.at:39' \
+ "--exclude-tag-under option in incremental pass" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "55. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude13.at:42:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+rm etest/subdir/excludeme
+decho \"# Level 0\"
+tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho \"# Level 1\"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude13.at:42"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+rm etest/subdir/excludeme
+decho "# Level 0"
+tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho "# Level 1"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Level 0
+tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+# Level 1
+tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Level 0
+etest/
+etest/subdir/
+etest/subdir/subdir-file
+etest/top-level-file
+# Level 1
+etest/
+etest/subdir/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude13.at:42"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_55
+#AT_START_56
+at_fn_group_banner 56 'exclude14.at:36' \
+ "--exclude-tag-all option" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "56. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude14.at:39:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude14.at:39:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude14.at:39:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude14.at:39:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/exclude14.at:39:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_56
+#AT_START_57
+at_fn_group_banner 57 'exclude15.at:36' \
+ "--exclude-tag-all and --listed-incremental" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "57. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude15.at:39:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude15.at:39"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "etest/
+etest/top-level-file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude15.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_57
+#AT_START_58
+at_fn_group_banner 58 'exclude16.at:38' \
+ "--exclude-tag-all option in incremental pass" " " 7
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "58. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/exclude16.at:41:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkexcltest etest
+rm etest/subdir/excludeme
+decho \"# Level 0\"
+tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho \"# Level 1\"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "exclude16.at:41"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkexcltest etest
+rm etest/subdir/excludeme
+decho "# Level 0"
+tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
+touch etest/subdir/excludeme
+touch etest/subdir/otherfile
+
+decho "# Level 1"
+cp snar-0 snar-1
+tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Level 0
+tar: etest: Directory is new
+tar: etest/subdir: Directory is new
+# Level 1
+tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Level 0
+etest/
+etest/subdir/
+etest/subdir/subdir-file
+etest/top-level-file
+# Level 1
+etest/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/exclude16.at:41"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_58
+#AT_START_59
+at_fn_group_banner 59 'delete01.at:24' \
+ "deleting a member after a big one" " " 8
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "59. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/delete01.at:27:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete01.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete01.at:27:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete01.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete01.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_59
+#AT_START_60
+at_fn_group_banner 60 'delete02.at:24' \
+ "deleting a member from stdin archive" " " 8
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "60. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/delete02.at:27:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "1
+2
+3
+separator
+1
+3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete02.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "1
+2
+3
+separator
+1
+3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete02.at:27:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "1
+2
+3
+separator
+1
+3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete02.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "1
+2
+3
+separator
+1
+3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete02.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3073 -p zeros --file 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "1
+2
+3
+separator
+1
+3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_60
+#AT_START_61
+at_fn_group_banner 61 'delete03.at:21' \
+ "deleting members with long names" " " 8
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "61. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/delete03.at:26:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
+rm -f \$prefix*
+for i in 1 2 3 4 5 6 7 8 9
+do touch \$prefix\$i
+done
+tar -cf archive ./\$prefix* &&
+ tar --delete -f archive ./\${prefix}5 &&
+ tar -tf archive
+)"
+at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
+rm -f $prefix*
+for i in 1 2 3 4 5 6 7 8 9
+do touch $prefix$i
+done
+tar -cf archive ./$prefix* &&
+ tar --delete -f archive ./${prefix}5 &&
+ tar -tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete03.at:26:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
+rm -f \$prefix*
+for i in 1 2 3 4 5 6 7 8 9
+do touch \$prefix\$i
+done
+tar -cf archive ./\$prefix* &&
+ tar --delete -f archive ./\${prefix}5 &&
+ tar -tf archive
+)"
+at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
+rm -f $prefix*
+for i in 1 2 3 4 5 6 7 8 9
+do touch $prefix$i
+done
+tar -cf archive ./$prefix* &&
+ tar --delete -f archive ./${prefix}5 &&
+ tar -tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete03.at:26:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
+rm -f \$prefix*
+for i in 1 2 3 4 5 6 7 8 9
+do touch \$prefix\$i
+done
+tar -cf archive ./\$prefix* &&
+ tar --delete -f archive ./\${prefix}5 &&
+ tar -tf archive
+)"
+at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
+rm -f $prefix*
+for i in 1 2 3 4 5 6 7 8 9
+do touch $prefix$i
+done
+tar -cf archive ./$prefix* &&
+ tar --delete -f archive ./${prefix}5 &&
+ tar -tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8
+./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_61
+#AT_START_62
+at_fn_group_banner 62 'delete04.at:24' \
+ "deleting a large last member" " " 8
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "62. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/delete04.at:27:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete04.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete04.at:27:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete04.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete04.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 3 -f file1
+genfile -l 5 -f file2
+genfile -l 3 -f file3
+genfile -l 6 -f file4
+genfile -l 24 -f file5
+genfile -l 13 -f file6
+genfile -l 1385 -f file7
+genfile -l 30 -f file8
+genfile -l 10 -f file9
+genfile -l 256000 -f file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_62
+#AT_START_63
+at_fn_group_banner 63 'delete05.at:28' \
+ "deleting non-existing member" " " 8
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "63. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/delete05.at:31:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "en
+to
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete05.at:31:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "en
+to
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete05.at:31:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "en
+to
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete05.at:31:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "en
+to
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/delete05.at:31:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 1024 -f en
+genfile -l 1024 -f to
+
+tar cf archive en to
+# Make sure we don't use bogus blocking factor.
+# GNU tar up to and including 1.14.91 produced an empty archive this way:
+tar --file archive --blocking-factor=20 --delete tre
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "en
+to
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_63
+#AT_START_64
+at_fn_group_banner 64 'extrac01.at:24' \
+ "extract over an existing directory" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "64. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac01.at:27:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac01.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac01.at:27:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac01.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac01.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive --warning=no-timestamp || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_64
+#AT_START_65
+at_fn_group_banner 65 'extrac02.at:24' \
+ "extracting symlinks over an existing file" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "65. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# FIXME: Skip if symlinks are not supported on the system
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac02.at:29:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac02.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac02.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac02.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac02.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_65
+#AT_START_66
+at_fn_group_banner 66 'extrac03.at:23' \
+ "extraction loops" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "66. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac03.at:26:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/../directory/
+separator
+directory/../directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac03.at:26:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/../directory/
+separator
+directory/../directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac03.at:26:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/../directory/
+separator
+directory/../directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac03.at:26:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/../directory/
+separator
+directory/../directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac03.at:26:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive --warning=no-timestamp)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/../directory/
+separator
+directory/../directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_66
+#AT_START_67
+at_fn_group_banner 67 'extrac04.at:24' \
+ "extract + fnmatch" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "67. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac04.at:27:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \\
+ --exclude='./*1' \\
+ --exclude='d*/*1' \\
+ --exclude='d*/s*/*2' | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \
+ --exclude='./*1' \
+ --exclude='d*/*1' \
+ --exclude='d*/s*/*2' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file2
+directory/subdirectory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac04.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \\
+ --exclude='./*1' \\
+ --exclude='d*/*1' \\
+ --exclude='d*/s*/*2' | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \
+ --exclude='./*1' \
+ --exclude='d*/*1' \
+ --exclude='d*/s*/*2' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file2
+directory/subdirectory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac04.at:27:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \\
+ --exclude='./*1' \\
+ --exclude='d*/*1' \\
+ --exclude='d*/s*/*2' | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \
+ --exclude='./*1' \
+ --exclude='d*/*1' \
+ --exclude='d*/s*/*2' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file2
+directory/subdirectory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac04.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \\
+ --exclude='./*1' \\
+ --exclude='d*/*1' \\
+ --exclude='d*/s*/*2' | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \
+ --exclude='./*1' \
+ --exclude='d*/*1' \
+ --exclude='d*/s*/*2' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file2
+directory/subdirectory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac04.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \\
+ --exclude='./*1' \\
+ --exclude='d*/*1' \\
+ --exclude='d*/s*/*2' | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \
+ --exclude='./*1' \
+ --exclude='d*/*1' \
+ --exclude='d*/s*/*2' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/file2
+directory/subdirectory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_67
+#AT_START_68
+at_fn_group_banner 68 'extrac05.at:31' \
+ "extracting selected members from pax" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "68. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+cat >list <<'_ATEOF'
+jeden
+cztery
+_ATEOF
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac05.at:39:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
+genfile --length 118 --file jeden
+genfile --length 223 --file dwa
+genfile --length 517 --file trzy
+genfile --length 110 --file cztery
+
+tar cf archive jeden dwa trzy cztery || exit 1
+
+mkdir dir
+cd dir
+
+tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
+
+cd ..
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac05.at:39"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
+genfile --length 118 --file jeden
+genfile --length 223 --file dwa
+genfile --length 517 --file trzy
+genfile --length 110 --file cztery
+
+tar cf archive jeden dwa trzy cztery || exit 1
+
+mkdir dir
+cd dir
+
+tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
+
+cd ..
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "jeden
+cztery
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac05.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_68
+#AT_START_69
+at_fn_group_banner 69 'extrac06.at:34' \
+ "mode of extracted directories" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "69. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac06.at:37:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "777
+755
+755
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac06.at:37:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "777
+755
+755
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac06.at:37:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "777
+755
+755
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac06.at:37:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "777
+755
+755
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac06.at:37:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+# Force umask
+umask 022
+
+# Make sure user's umask is honored, even if we are superuser
+TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
+
+# Create a directory
+mkdir directory
+chmod 777 directory
+genfile --stat=mode:777 directory
+
+# Archive it
+tar cf arc directory
+
+# Change its permissions ...
+chmod 755 directory
+genfile --stat=mode:777 directory
+
+# ... and attempt to restore it twice
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+tar xf arc directory --warning=no-timestamp
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "777
+755
+755
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_69
+#AT_START_70
+at_fn_group_banner 70 'extrac07.at:27' \
+ "extracting symlinks to a read-only dir" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "70. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac07.at:30:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod a-w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+chmod +w dir
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod a-w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+chmod +w dir
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Prepare the directory
+Create the archive
+Extract
+dir/
+dir/foo
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ # Testing one format is enough
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_70
+#AT_START_71
+at_fn_group_banner 71 'extrac08.at:33' \
+ "restoring mode on existing directory" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "71. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac08.at:36:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac08.at:36:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac08.at:36:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac08.at:36:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac08.at:36:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+umask 000
+mkdir dir
+chmod 755 dir
+echo bla > dir/file
+tar cf test.tar dir
+chmod 700 dir
+tar xfv test.tar --warning=no-timestamp
+genfile --stat=mode.777 dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/file
+755
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_71
+#AT_START_72
+at_fn_group_banner 72 'extrac09.at:34' \
+ "extracting even when . and .. are unreadable" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "72. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac09.at:37:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/extract
+genfile --file dir/sub/f
+cd dir/sub
+
+tar -cf archive.tar f
+
+chmod a-r . ..
+tar -xvf archive.tar -C extract f
+status=\$?
+chmod a+r . ..
+cmp f extract/f || status=\$?
+exit \$status
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac09.at:37"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/extract
+genfile --file dir/sub/f
+cd dir/sub
+
+tar -cf archive.tar f
+
+chmod a-r . ..
+tar -xvf archive.tar -C extract f
+status=$?
+chmod a+r . ..
+cmp f extract/f || status=$?
+exit $status
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "f
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac09.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_72
+#AT_START_73
+at_fn_group_banner 73 'extrac10.at:29' \
+ "-C and delayed setting of metadata" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "73. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac10.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir d x x/y
+echo foo >d/d1
+echo bar >e
+
+tar -cf archive.tar d e &&
+tar -xf archive.tar -C x d -C y e &&
+diff -r d x/d &&
+diff e x/y/e
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac10.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir d x x/y
+echo foo >d/d1
+echo bar >e
+
+tar -cf archive.tar d e &&
+tar -xf archive.tar -C x d -C y e &&
+diff -r d x/d &&
+diff e x/y/e
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac10.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_73
+#AT_START_74
+at_fn_group_banner 74 'extrac11.at:25' \
+ "scarce file descriptors" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "74. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac11.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec </dev/null
+dirs='a
+ a/b
+ a/b/c
+ a/b/c/d
+ a/b/c/d/e
+ a/b/c/d/e/f
+ a/b/c/d/e/f/g
+ a/b/c/d/e/f/g/h
+ a/b/c/d/e/f/g/h/i
+ a/b/c/d/e/f/g/h/i/j
+ a/b/c/d/e/f/g/h/i/j/k
+'
+files=
+mkdir \$dirs dest1 dest2 dest3 || exit
+for dir in \$dirs; do
+ for file in X Y Z; do
+ echo \$file >\$dir/\$file || exit
+ files=\"\$files \$file\"
+ done
+done
+
+# Check that \"ulimit\" itself works. Close file descriptors before
+# invoking ulimit, to work around a bug (or a \"feature\") in some shells,
+# where they squirrel away dups of file descriptors into FD 10 and up
+# before closing the originals.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 100 &&
+ tar -cf archive1.tar a &&
+ tar -xf archive1.tar -C dest1 a
+ ) &&
+ diff -r a dest1/a
+) >/dev/null 2>&1 ||
+ exit 77
+
+# Another test that \"ulimit\" itself works:
+# tar should fail when completely starved of file descriptors.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 4 &&
+ tar -cf archive2.tar a &&
+ tar -xf archive2.tar -C dest2 a
+ ) &&
+ diff -r a dest2/a
+) >/dev/null 2>&1 &&
+ exit 77
+
+# Tar should work when there are few, but enough, file descriptors.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 10 &&
+ tar -cf archive3.tar a &&
+ tar -xf archive3.tar -C dest3 a
+ ) &&
+ diff -r a dest3/a >/dev/null 2>&1
+) || { diff -r a dest3/a; exit 1; }
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac11.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec </dev/null
+dirs='a
+ a/b
+ a/b/c
+ a/b/c/d
+ a/b/c/d/e
+ a/b/c/d/e/f
+ a/b/c/d/e/f/g
+ a/b/c/d/e/f/g/h
+ a/b/c/d/e/f/g/h/i
+ a/b/c/d/e/f/g/h/i/j
+ a/b/c/d/e/f/g/h/i/j/k
+'
+files=
+mkdir $dirs dest1 dest2 dest3 || exit
+for dir in $dirs; do
+ for file in X Y Z; do
+ echo $file >$dir/$file || exit
+ files="$files $file"
+ done
+done
+
+# Check that "ulimit" itself works. Close file descriptors before
+# invoking ulimit, to work around a bug (or a "feature") in some shells,
+# where they squirrel away dups of file descriptors into FD 10 and up
+# before closing the originals.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 100 &&
+ tar -cf archive1.tar a &&
+ tar -xf archive1.tar -C dest1 a
+ ) &&
+ diff -r a dest1/a
+) >/dev/null 2>&1 ||
+ exit 77
+
+# Another test that "ulimit" itself works:
+# tar should fail when completely starved of file descriptors.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 4 &&
+ tar -cf archive2.tar a &&
+ tar -xf archive2.tar -C dest2 a
+ ) &&
+ diff -r a dest2/a
+) >/dev/null 2>&1 &&
+ exit 77
+
+# Tar should work when there are few, but enough, file descriptors.
+( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
+ ulimit -n 10 &&
+ tar -cf archive3.tar a &&
+ tar -xf archive3.tar -C dest3 a
+ ) &&
+ diff -r a dest3/a >/dev/null 2>&1
+) || { diff -r a dest3/a; exit 1; }
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac11.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_74
+#AT_START_75
+at_fn_group_banner 75 'extrac12.at:25' \
+ "extract dot permissions" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "75. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac12.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir src dst
+echo file1 >src/file1
+echo file2 >src/file2
+chmod a-w src
+
+tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
+tar -xf archive.tar -C dst &&
+cmp src/file1 dst/file1 &&
+cmp src/file2 dst/file2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac12.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir src dst
+echo file1 >src/file1
+echo file2 >src/file2
+chmod a-w src
+
+tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
+tar -xf archive.tar -C dst &&
+cmp src/file1 dst/file1 &&
+cmp src/file2 dst/file2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac12.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_75
+#AT_START_76
+at_fn_group_banner 76 'extrac13.at:26' \
+ "extract over symlinks" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "76. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac13.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir src dst1 dst2 dst3
+echo file1 >src/file1
+ln -s target1 dst1/file1
+echo target1 >dst1/target1
+echo target1 >target1
+
+tar -cf archive.tar -C src . &&
+tar -xf archive.tar -C dst1 --warning=no-timestamp &&
+diff src/file1 dst1/file1 &&
+diff target1 dst1/target1
+
+ln -s target1 dst2/file1
+echo target1 >dst2/target1
+tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
+diff src/file1 dst2/file1 &&
+diff target1 dst2/target1
+
+ln -s target1 dst3/file1
+echo target1 >dst3/target1
+tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
+diff src/file1 dst3/file1 &&
+diff src/file1 dst3/target1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac13.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir src dst1 dst2 dst3
+echo file1 >src/file1
+ln -s target1 dst1/file1
+echo target1 >dst1/target1
+echo target1 >target1
+
+tar -cf archive.tar -C src . &&
+tar -xf archive.tar -C dst1 --warning=no-timestamp &&
+diff src/file1 dst1/file1 &&
+diff target1 dst1/target1
+
+ln -s target1 dst2/file1
+echo target1 >dst2/target1
+tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
+diff src/file1 dst2/file1 &&
+diff target1 dst2/target1
+
+ln -s target1 dst3/file1
+echo target1 >dst3/target1
+tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
+diff src/file1 dst3/file1 &&
+diff src/file1 dst3/target1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac13.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_76
+#AT_START_77
+at_fn_group_banner 77 'extrac14.at:25' \
+ "extract -C symlink" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "77. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac14.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dest
+ln -s dest symlink
+echo foo >foo
+tar -cf archive.tar foo &&
+tar -xf archive.tar -C symlink --warning=no-timestamp &&
+cmp foo dest/foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac14.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dest
+ln -s dest symlink
+echo foo >foo
+tar -cf archive.tar foo &&
+tar -xf archive.tar -C symlink --warning=no-timestamp &&
+cmp foo dest/foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac14.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_77
+#AT_START_78
+at_fn_group_banner 78 'extrac15.at:25' \
+ "extract parent mkdir failure" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "78. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac15.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+mkdir src src/a src/a/b dest dest/a
+touch src/a/b/c
+chmod a-w dest/a
+
+tar -cf archive.tar -C src a/b/c &&
+if tar -xf archive.tar -C dest a/b/c
+then (exit 1)
+else (exit 0)
+fi
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac15.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+mkdir src src/a src/a/b dest dest/a
+touch src/a/b/c
+chmod a-w dest/a
+
+tar -cf archive.tar -C src a/b/c &&
+if tar -xf archive.tar -C dest a/b/c
+then (exit 1)
+else (exit 0)
+fi
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: a/b: Cannot mkdir: Permission denied
+tar: a/b/c: Cannot open: No such file or directory
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac15.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_78
+#AT_START_79
+at_fn_group_banner 79 'extrac16.at:26' \
+ "extract empty directory with -C" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "79. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac16.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir src src/a src/a/b dest
+touch src/a/c
+
+tar -cf archive.tar -C src a &&
+tar -xf archive.tar -C dest
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac16.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir src src/a src/a/b dest
+touch src/a/c
+
+tar -cf archive.tar -C src a &&
+tar -xf archive.tar -C dest
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac16.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_79
+#AT_START_80
+at_fn_group_banner 80 'extrac17.at:21' \
+ "name matching/transformation ordering" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "80. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Description: Tar 1.24 changed the ordering of name matching and
+# name transformation so that the former saw already transformed
+# file names (see commit 9c194c99 and exclude06.at). This reverted
+# ordering made it impossible to match file names in certain cases.
+# In particular, the testcase below would not extract anything.
+#
+# Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
+# References: <x6r5fd9jye@gzp>, <20101026175126.29028@Pirx.gnu.org.ua>
+# http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac17.at:34:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
+ dir/subdir1/
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
+ dir/subdir1/
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac17.at:34:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
+ dir/subdir1/
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
+ dir/subdir1/
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac17.at:34:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
+ dir/subdir1/
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
+ dir/subdir1/
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac17.at:34:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
+ dir/subdir1/
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
+ dir/subdir1/
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac17.at:34:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
+ dir/subdir1/
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir dir/subdir1 dir/subdir2 out
+genfile --file dir/subdir1/file1
+genfile --file dir/subdir2/file2
+
+tar cf dir.tar dir
+
+tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
+ dir/subdir1/
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_80
+#AT_START_81
+at_fn_group_banner 81 'extrac18.at:34' \
+ "keep-old-files" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "81. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac18.at:37:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=2
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac18.at:37:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=2
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac18.at:37:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=2
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac18.at:37:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=2
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac18.at:37:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x -k -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=2
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_81
+#AT_START_82
+at_fn_group_banner 82 'extrac19.at:21' \
+ "skip-old-files" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "82. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/extrac19.at:24:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=0
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac19.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=0
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac19.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=0
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac19.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=0
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/extrac19.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=\$?
+
+cat a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+cd dir
+echo 'Old file a' > a
+echo 'Old file b' > b
+
+tar cf ../archive .
+
+rm b
+echo 'File a' > a
+
+tar -x --skip-old-files -f ../archive
+echo status=$?
+
+cat a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "status=0
+File a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_82
+#AT_START_83
+at_fn_group_banner 83 'backup01.at:33' \
+ "extracting existing dir with --backup" " " 9
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "83. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/backup01.at:36:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir1/
+dir1/file1
+Renaming 'dir1/file1' to 'dir1/file1~'
+dir2/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/backup01.at:36:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir1/
+dir1/file1
+Renaming 'dir1/file1' to 'dir1/file1~'
+dir2/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/backup01.at:36:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir1/
+dir1/file1
+Renaming 'dir1/file1' to 'dir1/file1~'
+dir2/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/backup01.at:36:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir1/
+dir1/file1
+Renaming 'dir1/file1' to 'dir1/file1~'
+dir2/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/backup01.at:36:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+unset VERSION_CONTROL
+mkdir dir1 dir2
+echo bla > dir1/file1
+tar cf test.tar dir1 dir2
+tar xfv test.tar --backup --warning=no-timestamp
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir1/
+dir1/file1
+Renaming 'dir1/file1' to 'dir1/file1~'
+dir2/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_83
+#AT_START_84
+at_fn_group_banner 84 'label01.at:21' \
+ "single-volume label" " " 10
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "84. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/label01.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo
+genfile --file bar
+tar -cf archive --label=Test foo bar
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo
+genfile --file bar
+tar -cf archive --label=Test foo bar
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Test
+foo
+bar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label01.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo
+genfile --file bar
+tar -cf archive --label=Test foo bar
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo
+genfile --file bar
+tar -cf archive --label=Test foo bar
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Test
+foo
+bar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label01.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo
+genfile --file bar
+tar -cf archive --label=Test foo bar
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo
+genfile --file bar
+tar -cf archive --label=Test foo bar
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Test
+foo
+bar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_84
+#AT_START_85
+at_fn_group_banner 85 'label02.at:21' \
+ "multi-volume label" " " 10
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "85. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/label02.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 0 --file foo
+genfile --length 12288 --file bar
+genfile --length 12288 --file baz
+tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
+tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 0 --file foo
+genfile --length 12288 --file bar
+genfile --length 12288 --file baz
+tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
+tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Test Volume 1
+foo
+bar
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label02.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 0 --file foo
+genfile --length 12288 --file bar
+genfile --length 12288 --file baz
+tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
+tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 0 --file foo
+genfile --length 12288 --file bar
+genfile --length 12288 --file baz
+tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
+tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Test Volume 1
+foo
+bar
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label02.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 0 --file foo
+genfile --length 12288 --file bar
+genfile --length 12288 --file baz
+tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
+tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 0 --file foo
+genfile --length 12288 --file bar
+genfile --length 12288 --file baz
+tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
+tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Test Volume 1
+foo
+bar
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_85
+#AT_START_86
+at_fn_group_banner 86 'label03.at:27' \
+ "test-label option" " " 10
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "86. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/label03.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+tar -c --label='iamalabel' --file iamanarchive file
+tar -c --file unlabeled.tar file
+decho \"# Display label\"
+tar --test-label --file=iamanarchive; echo \$?
+decho \"# Display label: unlabeled\"
+tar --test-label --file=unlabeled.tar; echo \$?
+decho \"# Test label: success\"
+tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
+decho \"# Test label: failure\"
+tar --test-label --file=iamanarchive 'amalabel'; echo \$?
+decho \"# Test label: unlabeled\"
+tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
+decho \"# Test label, verbose: success\"
+tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
+decho \"# Test label, verbose: failure\"
+tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
+decho \"# Test label: multiple arguments\"
+tar --test-label --file=iamanarchive a iamalabel b; echo \$?
+decho \"# Test label: wildcards\"
+tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+tar -c --label='iamalabel' --file iamanarchive file
+tar -c --file unlabeled.tar file
+decho "# Display label"
+tar --test-label --file=iamanarchive; echo $?
+decho "# Display label: unlabeled"
+tar --test-label --file=unlabeled.tar; echo $?
+decho "# Test label: success"
+tar --test-label --file=iamanarchive 'iamalabel'; echo $?
+decho "# Test label: failure"
+tar --test-label --file=iamanarchive 'amalabel'; echo $?
+decho "# Test label: unlabeled"
+tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
+decho "# Test label, verbose: success"
+tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
+decho "# Test label, verbose: failure"
+tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
+decho "# Test label: multiple arguments"
+tar --test-label --file=iamanarchive a iamalabel b; echo $?
+decho "# Test label: wildcards"
+tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Display label
+# Display label: unlabeled
+# Test label: success
+# Test label: failure
+# Test label: unlabeled
+# Test label, verbose: success
+# Test label, verbose: failure
+tar: Archive label mismatch
+# Test label: multiple arguments
+# Test label: wildcards
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Display label
+iamalabel
+0
+# Display label: unlabeled
+0
+# Test label: success
+0
+# Test label: failure
+1
+# Test label: unlabeled
+1
+# Test label, verbose: success
+iamalabel
+0
+# Test label, verbose: failure
+iamalabel
+1
+# Test label: multiple arguments
+0
+# Test label: wildcards
+0
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label03.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+tar -c --label='iamalabel' --file iamanarchive file
+tar -c --file unlabeled.tar file
+decho \"# Display label\"
+tar --test-label --file=iamanarchive; echo \$?
+decho \"# Display label: unlabeled\"
+tar --test-label --file=unlabeled.tar; echo \$?
+decho \"# Test label: success\"
+tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
+decho \"# Test label: failure\"
+tar --test-label --file=iamanarchive 'amalabel'; echo \$?
+decho \"# Test label: unlabeled\"
+tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
+decho \"# Test label, verbose: success\"
+tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
+decho \"# Test label, verbose: failure\"
+tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
+decho \"# Test label: multiple arguments\"
+tar --test-label --file=iamanarchive a iamalabel b; echo \$?
+decho \"# Test label: wildcards\"
+tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+tar -c --label='iamalabel' --file iamanarchive file
+tar -c --file unlabeled.tar file
+decho "# Display label"
+tar --test-label --file=iamanarchive; echo $?
+decho "# Display label: unlabeled"
+tar --test-label --file=unlabeled.tar; echo $?
+decho "# Test label: success"
+tar --test-label --file=iamanarchive 'iamalabel'; echo $?
+decho "# Test label: failure"
+tar --test-label --file=iamanarchive 'amalabel'; echo $?
+decho "# Test label: unlabeled"
+tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
+decho "# Test label, verbose: success"
+tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
+decho "# Test label, verbose: failure"
+tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
+decho "# Test label: multiple arguments"
+tar --test-label --file=iamanarchive a iamalabel b; echo $?
+decho "# Test label: wildcards"
+tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Display label
+# Display label: unlabeled
+# Test label: success
+# Test label: failure
+# Test label: unlabeled
+# Test label, verbose: success
+# Test label, verbose: failure
+tar: Archive label mismatch
+# Test label: multiple arguments
+# Test label: wildcards
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Display label
+iamalabel
+0
+# Display label: unlabeled
+0
+# Test label: success
+0
+# Test label: failure
+1
+# Test label: unlabeled
+1
+# Test label, verbose: success
+iamalabel
+0
+# Test label, verbose: failure
+iamalabel
+1
+# Test label: multiple arguments
+0
+# Test label: wildcards
+0
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label03.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+tar -c --label='iamalabel' --file iamanarchive file
+tar -c --file unlabeled.tar file
+decho \"# Display label\"
+tar --test-label --file=iamanarchive; echo \$?
+decho \"# Display label: unlabeled\"
+tar --test-label --file=unlabeled.tar; echo \$?
+decho \"# Test label: success\"
+tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
+decho \"# Test label: failure\"
+tar --test-label --file=iamanarchive 'amalabel'; echo \$?
+decho \"# Test label: unlabeled\"
+tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
+decho \"# Test label, verbose: success\"
+tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
+decho \"# Test label, verbose: failure\"
+tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
+decho \"# Test label: multiple arguments\"
+tar --test-label --file=iamanarchive a iamalabel b; echo \$?
+decho \"# Test label: wildcards\"
+tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+tar -c --label='iamalabel' --file iamanarchive file
+tar -c --file unlabeled.tar file
+decho "# Display label"
+tar --test-label --file=iamanarchive; echo $?
+decho "# Display label: unlabeled"
+tar --test-label --file=unlabeled.tar; echo $?
+decho "# Test label: success"
+tar --test-label --file=iamanarchive 'iamalabel'; echo $?
+decho "# Test label: failure"
+tar --test-label --file=iamanarchive 'amalabel'; echo $?
+decho "# Test label: unlabeled"
+tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
+decho "# Test label, verbose: success"
+tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
+decho "# Test label, verbose: failure"
+tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
+decho "# Test label: multiple arguments"
+tar --test-label --file=iamanarchive a iamalabel b; echo $?
+decho "# Test label: wildcards"
+tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Display label
+# Display label: unlabeled
+# Test label: success
+# Test label: failure
+# Test label: unlabeled
+# Test label, verbose: success
+# Test label, verbose: failure
+tar: Archive label mismatch
+# Test label: multiple arguments
+# Test label: wildcards
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Display label
+iamalabel
+0
+# Display label: unlabeled
+0
+# Test label: success
+0
+# Test label: failure
+1
+# Test label: unlabeled
+1
+# Test label, verbose: success
+iamalabel
+0
+# Test label, verbose: failure
+iamalabel
+1
+# Test label: multiple arguments
+0
+# Test label: wildcards
+0
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_86
+#AT_START_87
+at_fn_group_banner 87 'label04.at:27' \
+ "label with non-create option" " " 10
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "87. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/label04.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho \"# Create volume\"
+tar -c -f archive --label='New volume' file
+decho \"# Update: wrong label\"
+tar -rf archive --label='My volume' file; echo \$?
+decho \"# Update: right label\"
+tar -rf archive --label='New volume' file
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho "# Create volume"
+tar -c -f archive --label='New volume' file
+decho "# Update: wrong label"
+tar -rf archive --label='My volume' file; echo $?
+decho "# Update: right label"
+tar -rf archive --label='New volume' file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Create volume
+# Update: wrong label
+tar: Volume 'New volume' does not match 'My volume'
+tar: Error is not recoverable: exiting now
+# Update: right label
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Create volume
+# Update: wrong label
+2
+# Update: right label
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label04.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho \"# Create volume\"
+tar -c -f archive --label='New volume' file
+decho \"# Update: wrong label\"
+tar -rf archive --label='My volume' file; echo \$?
+decho \"# Update: right label\"
+tar -rf archive --label='New volume' file
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho "# Create volume"
+tar -c -f archive --label='New volume' file
+decho "# Update: wrong label"
+tar -rf archive --label='My volume' file; echo $?
+decho "# Update: right label"
+tar -rf archive --label='New volume' file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Create volume
+# Update: wrong label
+tar: Volume 'New volume' does not match 'My volume'
+tar: Error is not recoverable: exiting now
+# Update: right label
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Create volume
+# Update: wrong label
+2
+# Update: right label
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label04.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho \"# Create volume\"
+tar -c -f archive --label='New volume' file
+decho \"# Update: wrong label\"
+tar -rf archive --label='My volume' file; echo \$?
+decho \"# Update: right label\"
+tar -rf archive --label='New volume' file
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho "# Create volume"
+tar -c -f archive --label='New volume' file
+decho "# Update: wrong label"
+tar -rf archive --label='My volume' file; echo $?
+decho "# Update: right label"
+tar -rf archive --label='New volume' file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Create volume
+# Update: wrong label
+tar: Volume 'New volume' does not match 'My volume'
+tar: Error is not recoverable: exiting now
+# Update: right label
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Create volume
+# Update: wrong label
+2
+# Update: right label
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_87
+#AT_START_88
+at_fn_group_banner 88 'label05.at:24' \
+ "label with non-create option" " " 10
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "88. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/label05.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho \"# Create volume\"
+tar -c -f archive file
+decho \"# Update: wrong label\"
+tar -rf archive --label='My volume' file; echo \$?
+decho \"# Update: right label\"
+tar -rf archive file
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho "# Create volume"
+tar -c -f archive file
+decho "# Update: wrong label"
+tar -rf archive --label='My volume' file; echo $?
+decho "# Update: right label"
+tar -rf archive file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Create volume
+# Update: wrong label
+tar: Archive not labeled to match 'My volume'
+tar: Error is not recoverable: exiting now
+# Update: right label
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Create volume
+# Update: wrong label
+2
+# Update: right label
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label05.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho \"# Create volume\"
+tar -c -f archive file
+decho \"# Update: wrong label\"
+tar -rf archive --label='My volume' file; echo \$?
+decho \"# Update: right label\"
+tar -rf archive file
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho "# Create volume"
+tar -c -f archive file
+decho "# Update: wrong label"
+tar -rf archive --label='My volume' file; echo $?
+decho "# Update: right label"
+tar -rf archive file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Create volume
+# Update: wrong label
+tar: Archive not labeled to match 'My volume'
+tar: Error is not recoverable: exiting now
+# Update: right label
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Create volume
+# Update: wrong label
+2
+# Update: right label
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/label05.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho \"# Create volume\"
+tar -c -f archive file
+decho \"# Update: wrong label\"
+tar -rf archive --label='My volume' file; echo \$?
+decho \"# Update: right label\"
+tar -rf archive file
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --file file
+decho "# Create volume"
+tar -c -f archive file
+decho "# Update: wrong label"
+tar -rf archive --label='My volume' file; echo $?
+decho "# Update: right label"
+tar -rf archive file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "# Create volume
+# Update: wrong label
+tar: Archive not labeled to match 'My volume'
+tar: Error is not recoverable: exiting now
+# Update: right label
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Create volume
+# Update: wrong label
+2
+# Update: right label
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_88
+#AT_START_89
+at_fn_group_banner 89 'incremental.at:23' \
+ "incremental" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "89. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incremental.at:26:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir structure
+echo x >structure/file
+
+# On Nextstep (and perhaps other 4.3BSD systems),
+# a newly created file's ctime isn't updated
+# until the next sync or stat operation on the file.
+ls -l structure/file >/dev/null
+
+# If the time of an initial backup and the creation time of a file contained
+# in that backup are the same, the file will be backed up again when an
+# incremental backup is done, because the incremental backup backs up
+# files created \"on or after\" the initial backup time. Without the sleep
+# command, behaviour of tar becomes variable, depending whether the system
+# clock ticked over to the next second between creating the file and
+# backing it up.
+sleep 1
+
+tar cf archive --listed=list structure
+tar cfv archive --listed=list structure
+echo separator
+# ReiserFS often offsets the timestamps of newly created files
+# 1 second to the past. Try to compensate for it, until a better
+# solution is found.
+sleep 2
+echo y >structure/file
+tar cfv archive --listed=list structure
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir structure
+echo x >structure/file
+
+# On Nextstep (and perhaps other 4.3BSD systems),
+# a newly created file's ctime isn't updated
+# until the next sync or stat operation on the file.
+ls -l structure/file >/dev/null
+
+# If the time of an initial backup and the creation time of a file contained
+# in that backup are the same, the file will be backed up again when an
+# incremental backup is done, because the incremental backup backs up
+# files created "on or after" the initial backup time. Without the sleep
+# command, behaviour of tar becomes variable, depending whether the system
+# clock ticked over to the next second between creating the file and
+# backing it up.
+sleep 1
+
+tar cf archive --listed=list structure
+tar cfv archive --listed=list structure
+echo separator
+# ReiserFS often offsets the timestamps of newly created files
+# 1 second to the past. Try to compensate for it, until a better
+# solution is found.
+sleep 2
+echo y >structure/file
+tar cfv archive --listed=list structure
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "structure/
+separator
+structure/
+structure/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incremental.at:26:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir structure
+echo x >structure/file
+
+# On Nextstep (and perhaps other 4.3BSD systems),
+# a newly created file's ctime isn't updated
+# until the next sync or stat operation on the file.
+ls -l structure/file >/dev/null
+
+# If the time of an initial backup and the creation time of a file contained
+# in that backup are the same, the file will be backed up again when an
+# incremental backup is done, because the incremental backup backs up
+# files created \"on or after\" the initial backup time. Without the sleep
+# command, behaviour of tar becomes variable, depending whether the system
+# clock ticked over to the next second between creating the file and
+# backing it up.
+sleep 1
+
+tar cf archive --listed=list structure
+tar cfv archive --listed=list structure
+echo separator
+# ReiserFS often offsets the timestamps of newly created files
+# 1 second to the past. Try to compensate for it, until a better
+# solution is found.
+sleep 2
+echo y >structure/file
+tar cfv archive --listed=list structure
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir structure
+echo x >structure/file
+
+# On Nextstep (and perhaps other 4.3BSD systems),
+# a newly created file's ctime isn't updated
+# until the next sync or stat operation on the file.
+ls -l structure/file >/dev/null
+
+# If the time of an initial backup and the creation time of a file contained
+# in that backup are the same, the file will be backed up again when an
+# incremental backup is done, because the incremental backup backs up
+# files created "on or after" the initial backup time. Without the sleep
+# command, behaviour of tar becomes variable, depending whether the system
+# clock ticked over to the next second between creating the file and
+# backing it up.
+sleep 1
+
+tar cf archive --listed=list structure
+tar cfv archive --listed=list structure
+echo separator
+# ReiserFS often offsets the timestamps of newly created files
+# 1 second to the past. Try to compensate for it, until a better
+# solution is found.
+sleep 2
+echo y >structure/file
+tar cfv archive --listed=list structure
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "structure/
+separator
+structure/
+structure/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incremental.at:26:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir structure
+echo x >structure/file
+
+# On Nextstep (and perhaps other 4.3BSD systems),
+# a newly created file's ctime isn't updated
+# until the next sync or stat operation on the file.
+ls -l structure/file >/dev/null
+
+# If the time of an initial backup and the creation time of a file contained
+# in that backup are the same, the file will be backed up again when an
+# incremental backup is done, because the incremental backup backs up
+# files created \"on or after\" the initial backup time. Without the sleep
+# command, behaviour of tar becomes variable, depending whether the system
+# clock ticked over to the next second between creating the file and
+# backing it up.
+sleep 1
+
+tar cf archive --listed=list structure
+tar cfv archive --listed=list structure
+echo separator
+# ReiserFS often offsets the timestamps of newly created files
+# 1 second to the past. Try to compensate for it, until a better
+# solution is found.
+sleep 2
+echo y >structure/file
+tar cfv archive --listed=list structure
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir structure
+echo x >structure/file
+
+# On Nextstep (and perhaps other 4.3BSD systems),
+# a newly created file's ctime isn't updated
+# until the next sync or stat operation on the file.
+ls -l structure/file >/dev/null
+
+# If the time of an initial backup and the creation time of a file contained
+# in that backup are the same, the file will be backed up again when an
+# incremental backup is done, because the incremental backup backs up
+# files created "on or after" the initial backup time. Without the sleep
+# command, behaviour of tar becomes variable, depending whether the system
+# clock ticked over to the next second between creating the file and
+# backing it up.
+sleep 1
+
+tar cf archive --listed=list structure
+tar cfv archive --listed=list structure
+echo separator
+# ReiserFS often offsets the timestamps of newly created files
+# 1 second to the past. Try to compensate for it, until a better
+# solution is found.
+sleep 2
+echo y >structure/file
+tar cfv archive --listed=list structure
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "structure/
+separator
+structure/
+structure/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_89
+#AT_START_90
+at_fn_group_banner 90 'incr01.at:27' \
+ "restore broken symlinks from incremental" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "90. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr01.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+\$as_ln_s foo directory/bar
+
+tar -cf archive.0 -g db directory
+rm directory/bar
+tar -cf archive.1 -g db directory
+
+mv directory orig
+
+tar xvfg archive.0 /dev/null --warning=no-timestamp
+echo separator
+tar xvfg archive.1 /dev/null --warning=no-timestamp
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+$as_ln_s foo directory/bar
+
+tar -cf archive.0 -g db directory
+rm directory/bar
+tar -cf archive.1 -g db directory
+
+mv directory orig
+
+tar xvfg archive.0 /dev/null --warning=no-timestamp
+echo separator
+tar xvfg archive.1 /dev/null --warning=no-timestamp
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/bar
+separator
+directory/
+tar: Deleting 'directory/bar'
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr01.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+\$as_ln_s foo directory/bar
+
+tar -cf archive.0 -g db directory
+rm directory/bar
+tar -cf archive.1 -g db directory
+
+mv directory orig
+
+tar xvfg archive.0 /dev/null --warning=no-timestamp
+echo separator
+tar xvfg archive.1 /dev/null --warning=no-timestamp
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+$as_ln_s foo directory/bar
+
+tar -cf archive.0 -g db directory
+rm directory/bar
+tar -cf archive.1 -g db directory
+
+mv directory orig
+
+tar xvfg archive.0 /dev/null --warning=no-timestamp
+echo separator
+tar xvfg archive.1 /dev/null --warning=no-timestamp
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/bar
+separator
+directory/
+tar: Deleting 'directory/bar'
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr01.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+\$as_ln_s foo directory/bar
+
+tar -cf archive.0 -g db directory
+rm directory/bar
+tar -cf archive.1 -g db directory
+
+mv directory orig
+
+tar xvfg archive.0 /dev/null --warning=no-timestamp
+echo separator
+tar xvfg archive.1 /dev/null --warning=no-timestamp
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+$as_ln_s foo directory/bar
+
+tar -cf archive.0 -g db directory
+rm directory/bar
+tar -cf archive.1 -g db directory
+
+mv directory orig
+
+tar xvfg archive.0 /dev/null --warning=no-timestamp
+echo separator
+tar xvfg archive.1 /dev/null --warning=no-timestamp
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/bar
+separator
+directory/
+tar: Deleting 'directory/bar'
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_90
+#AT_START_91
+at_fn_group_banner 91 'incr02.at:32' \
+ "restoring timestamps from incremental" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "91. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr02.at:35:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+# Create directory structure
+mkdir dir
+mkdir dir/subdir1
+mkdir dir/subdir2
+genfile --length 10 --file dir/subdir1/file
+
+# Save mtime for later comparison
+genfile --stat=mtime dir/subdir1 > ts
+
+# Create an archive. Using incremental mode makes sure the
+# archive will have a directory-first member ordering,
+# i.e.:
+# dir/
+# dir/subdir1/
+# dir/subdir2/
+# dir/subdir1/foofile
+#
+# When restoring from this directory structure, 'dir/subdir2/' used to
+# trigger apply_nonancestor_delayed_set_stat() which restored stats for
+# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
+# latter clobbered the directory timestamp.
+
+tar -cf archive -g db dir
+
+# Move away the directory
+mv dir orig
+
+# Wait enough time for timestamps to differ in case of failure.
+sleep 5
+
+# Restore the directory
+tar -xf archive dir
+
+# Check the timestamp
+genfile --stat=mtime dir/subdir1 | diff ts -
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+# Create directory structure
+mkdir dir
+mkdir dir/subdir1
+mkdir dir/subdir2
+genfile --length 10 --file dir/subdir1/file
+
+# Save mtime for later comparison
+genfile --stat=mtime dir/subdir1 > ts
+
+# Create an archive. Using incremental mode makes sure the
+# archive will have a directory-first member ordering,
+# i.e.:
+# dir/
+# dir/subdir1/
+# dir/subdir2/
+# dir/subdir1/foofile
+#
+# When restoring from this directory structure, 'dir/subdir2/' used to
+# trigger apply_nonancestor_delayed_set_stat() which restored stats for
+# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
+# latter clobbered the directory timestamp.
+
+tar -cf archive -g db dir
+
+# Move away the directory
+mv dir orig
+
+# Wait enough time for timestamps to differ in case of failure.
+sleep 5
+
+# Restore the directory
+tar -xf archive dir
+
+# Check the timestamp
+genfile --stat=mtime dir/subdir1 | diff ts -
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr02.at:35:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+# Create directory structure
+mkdir dir
+mkdir dir/subdir1
+mkdir dir/subdir2
+genfile --length 10 --file dir/subdir1/file
+
+# Save mtime for later comparison
+genfile --stat=mtime dir/subdir1 > ts
+
+# Create an archive. Using incremental mode makes sure the
+# archive will have a directory-first member ordering,
+# i.e.:
+# dir/
+# dir/subdir1/
+# dir/subdir2/
+# dir/subdir1/foofile
+#
+# When restoring from this directory structure, 'dir/subdir2/' used to
+# trigger apply_nonancestor_delayed_set_stat() which restored stats for
+# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
+# latter clobbered the directory timestamp.
+
+tar -cf archive -g db dir
+
+# Move away the directory
+mv dir orig
+
+# Wait enough time for timestamps to differ in case of failure.
+sleep 5
+
+# Restore the directory
+tar -xf archive dir
+
+# Check the timestamp
+genfile --stat=mtime dir/subdir1 | diff ts -
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+# Create directory structure
+mkdir dir
+mkdir dir/subdir1
+mkdir dir/subdir2
+genfile --length 10 --file dir/subdir1/file
+
+# Save mtime for later comparison
+genfile --stat=mtime dir/subdir1 > ts
+
+# Create an archive. Using incremental mode makes sure the
+# archive will have a directory-first member ordering,
+# i.e.:
+# dir/
+# dir/subdir1/
+# dir/subdir2/
+# dir/subdir1/foofile
+#
+# When restoring from this directory structure, 'dir/subdir2/' used to
+# trigger apply_nonancestor_delayed_set_stat() which restored stats for
+# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
+# latter clobbered the directory timestamp.
+
+tar -cf archive -g db dir
+
+# Move away the directory
+mv dir orig
+
+# Wait enough time for timestamps to differ in case of failure.
+sleep 5
+
+# Restore the directory
+tar -xf archive dir
+
+# Check the timestamp
+genfile --stat=mtime dir/subdir1 | diff ts -
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr02.at:35:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+# Create directory structure
+mkdir dir
+mkdir dir/subdir1
+mkdir dir/subdir2
+genfile --length 10 --file dir/subdir1/file
+
+# Save mtime for later comparison
+genfile --stat=mtime dir/subdir1 > ts
+
+# Create an archive. Using incremental mode makes sure the
+# archive will have a directory-first member ordering,
+# i.e.:
+# dir/
+# dir/subdir1/
+# dir/subdir2/
+# dir/subdir1/foofile
+#
+# When restoring from this directory structure, 'dir/subdir2/' used to
+# trigger apply_nonancestor_delayed_set_stat() which restored stats for
+# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
+# latter clobbered the directory timestamp.
+
+tar -cf archive -g db dir
+
+# Move away the directory
+mv dir orig
+
+# Wait enough time for timestamps to differ in case of failure.
+sleep 5
+
+# Restore the directory
+tar -xf archive dir
+
+# Check the timestamp
+genfile --stat=mtime dir/subdir1 | diff ts -
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+# Create directory structure
+mkdir dir
+mkdir dir/subdir1
+mkdir dir/subdir2
+genfile --length 10 --file dir/subdir1/file
+
+# Save mtime for later comparison
+genfile --stat=mtime dir/subdir1 > ts
+
+# Create an archive. Using incremental mode makes sure the
+# archive will have a directory-first member ordering,
+# i.e.:
+# dir/
+# dir/subdir1/
+# dir/subdir2/
+# dir/subdir1/foofile
+#
+# When restoring from this directory structure, 'dir/subdir2/' used to
+# trigger apply_nonancestor_delayed_set_stat() which restored stats for
+# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
+# latter clobbered the directory timestamp.
+
+tar -cf archive -g db dir
+
+# Move away the directory
+mv dir orig
+
+# Wait enough time for timestamps to differ in case of failure.
+sleep 5
+
+# Restore the directory
+tar -xf archive dir
+
+# Check the timestamp
+genfile --stat=mtime dir/subdir1 | diff ts -
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_91
+#AT_START_92
+at_fn_group_banner 92 'listed01.at:27' \
+ "--listed for individual files" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "92. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/listed01.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+# Let the things settle
+sleep 1
+
+tar --create \\
+ --file=archive.1 \\
+ --listed-incremental=listing \\
+ directory/file*
+
+tar tf archive.1 || exit 1
+
+sleep 2
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo \"separator\"
+cp listing listing.old
+tar --create \\
+ --file=archive.2 \\
+ --listed-incremental=listing \\
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+# Let the things settle
+sleep 1
+
+tar --create \
+ --file=archive.1 \
+ --listed-incremental=listing \
+ directory/file*
+
+tar tf archive.1 || exit 1
+
+sleep 2
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo "separator"
+cp listing listing.old
+tar --create \
+ --file=archive.2 \
+ --listed-incremental=listing \
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/file1
+separator
+directory/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/listed01.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+# Let the things settle
+sleep 1
+
+tar --create \\
+ --file=archive.1 \\
+ --listed-incremental=listing \\
+ directory/file*
+
+tar tf archive.1 || exit 1
+
+sleep 2
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo \"separator\"
+cp listing listing.old
+tar --create \\
+ --file=archive.2 \\
+ --listed-incremental=listing \\
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+# Let the things settle
+sleep 1
+
+tar --create \
+ --file=archive.1 \
+ --listed-incremental=listing \
+ directory/file*
+
+tar tf archive.1 || exit 1
+
+sleep 2
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo "separator"
+cp listing listing.old
+tar --create \
+ --file=archive.2 \
+ --listed-incremental=listing \
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/file1
+separator
+directory/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_92
+#AT_START_93
+at_fn_group_banner 93 'listed02.at:29' \
+ "working --listed" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "93. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/listed02.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+echo Create directories
+
+mkdir tart
+sleep 1
+mkdir tart/c0
+sleep 1
+mkdir tart/c1
+sleep 1
+
+for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
+do
+ echo File \$file > \$file
+ sleep 1
+done
+
+sleep 1
+echo Creating main archive
+echo >&2 \"Creating main archive\"
+tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
+
+# The above prints two lines to stderr announcing the new directories c0 and c1.
+# Ensure that they appear in this script's stderr in sorted order.
+sort err 1>&2; rm -f err
+
+sleep 1
+echo Modifying filesystem
+rm tart/a1
+
+mv tart/b1 tart/b2
+mv tart/c1 tart/c2
+touch tart/c2/ca3
+
+echo Directory contents
+find tart -print | sort 2>/dev/null
+
+sleep 1
+echo Creating incremental archive
+echo >&2 \"Creating incremental archive\"
+cp -p tart.incr1 tart.incr2
+tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
+
+sleep 1
+
+rm -rf tart/*
+echo Extracting main archive
+echo >&2 \"Extracting main archive\"
+tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
+echo Extracting incremental archive
+# This command should produce three messages about deletion
+# of the existing files, that may appear in any order. Piping
+# to sort makes sure we don't depend on any particular ordering.
+tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
+
+echo Final files:
+find tart -print | sort 2>/dev/null
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+echo Create directories
+
+mkdir tart
+sleep 1
+mkdir tart/c0
+sleep 1
+mkdir tart/c1
+sleep 1
+
+for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
+do
+ echo File $file > $file
+ sleep 1
+done
+
+sleep 1
+echo Creating main archive
+echo >&2 "Creating main archive"
+tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
+
+# The above prints two lines to stderr announcing the new directories c0 and c1.
+# Ensure that they appear in this script's stderr in sorted order.
+sort err 1>&2; rm -f err
+
+sleep 1
+echo Modifying filesystem
+rm tart/a1
+
+mv tart/b1 tart/b2
+mv tart/c1 tart/c2
+touch tart/c2/ca3
+
+echo Directory contents
+find tart -print | sort 2>/dev/null
+
+sleep 1
+echo Creating incremental archive
+echo >&2 "Creating incremental archive"
+cp -p tart.incr1 tart.incr2
+tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
+
+sleep 1
+
+rm -rf tart/*
+echo Extracting main archive
+echo >&2 "Extracting main archive"
+tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
+echo Extracting incremental archive
+# This command should produce three messages about deletion
+# of the existing files, that may appear in any order. Piping
+# to sort makes sure we don't depend on any particular ordering.
+tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
+
+echo Final files:
+find tart -print | sort 2>/dev/null
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating main archive
+tar: tart/c0: Directory is new
+tar: tart/c1: Directory is new
+tar: tart: Directory is new
+Creating incremental archive
+tar: tart/c2: Directory has been renamed from 'tart/c1'
+Extracting main archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Create directories
+Creating main archive
+tart/
+tart/c0/
+tart/c1/
+tart/a1
+tart/b1
+tart/c0/cq1
+tart/c0/cq2
+tart/c1/ca1
+tart/c1/ca2
+Modifying filesystem
+Directory contents
+tart
+tart/b2
+tart/c0
+tart/c0/cq1
+tart/c0/cq2
+tart/c2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+Creating incremental archive
+tart/
+tart/c0/
+tart/c2/
+tart/b2
+tart/c2/ca3
+Extracting main archive
+tart/
+tart/c0/
+tart/c1/
+tart/a1
+tart/b1
+tart/c0/cq1
+tart/c0/cq2
+tart/c1/ca1
+tart/c1/ca2
+Extracting incremental archive
+tar: Deleting 'tart/a1'
+tar: Deleting 'tart/b1'
+tart/
+tart/b2
+tart/c0/
+tart/c2/
+tart/c2/ca3
+Final files:
+tart
+tart/b2
+tart/c0
+tart/c0/cq1
+tart/c0/cq2
+tart/c2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/listed02.at:32:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+echo Create directories
+
+mkdir tart
+sleep 1
+mkdir tart/c0
+sleep 1
+mkdir tart/c1
+sleep 1
+
+for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
+do
+ echo File \$file > \$file
+ sleep 1
+done
+
+sleep 1
+echo Creating main archive
+echo >&2 \"Creating main archive\"
+tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
+
+# The above prints two lines to stderr announcing the new directories c0 and c1.
+# Ensure that they appear in this script's stderr in sorted order.
+sort err 1>&2; rm -f err
+
+sleep 1
+echo Modifying filesystem
+rm tart/a1
+
+mv tart/b1 tart/b2
+mv tart/c1 tart/c2
+touch tart/c2/ca3
+
+echo Directory contents
+find tart -print | sort 2>/dev/null
+
+sleep 1
+echo Creating incremental archive
+echo >&2 \"Creating incremental archive\"
+cp -p tart.incr1 tart.incr2
+tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
+
+sleep 1
+
+rm -rf tart/*
+echo Extracting main archive
+echo >&2 \"Extracting main archive\"
+tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
+echo Extracting incremental archive
+# This command should produce three messages about deletion
+# of the existing files, that may appear in any order. Piping
+# to sort makes sure we don't depend on any particular ordering.
+tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
+
+echo Final files:
+find tart -print | sort 2>/dev/null
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:32"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+echo Create directories
+
+mkdir tart
+sleep 1
+mkdir tart/c0
+sleep 1
+mkdir tart/c1
+sleep 1
+
+for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
+do
+ echo File $file > $file
+ sleep 1
+done
+
+sleep 1
+echo Creating main archive
+echo >&2 "Creating main archive"
+tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
+
+# The above prints two lines to stderr announcing the new directories c0 and c1.
+# Ensure that they appear in this script's stderr in sorted order.
+sort err 1>&2; rm -f err
+
+sleep 1
+echo Modifying filesystem
+rm tart/a1
+
+mv tart/b1 tart/b2
+mv tart/c1 tart/c2
+touch tart/c2/ca3
+
+echo Directory contents
+find tart -print | sort 2>/dev/null
+
+sleep 1
+echo Creating incremental archive
+echo >&2 "Creating incremental archive"
+cp -p tart.incr1 tart.incr2
+tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
+
+sleep 1
+
+rm -rf tart/*
+echo Extracting main archive
+echo >&2 "Extracting main archive"
+tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
+echo Extracting incremental archive
+# This command should produce three messages about deletion
+# of the existing files, that may appear in any order. Piping
+# to sort makes sure we don't depend on any particular ordering.
+tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
+
+echo Final files:
+find tart -print | sort 2>/dev/null
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating main archive
+tar: tart/c0: Directory is new
+tar: tart/c1: Directory is new
+tar: tart: Directory is new
+Creating incremental archive
+tar: tart/c2: Directory has been renamed from 'tart/c1'
+Extracting main archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Create directories
+Creating main archive
+tart/
+tart/c0/
+tart/c1/
+tart/a1
+tart/b1
+tart/c0/cq1
+tart/c0/cq2
+tart/c1/ca1
+tart/c1/ca2
+Modifying filesystem
+Directory contents
+tart
+tart/b2
+tart/c0
+tart/c0/cq1
+tart/c0/cq2
+tart/c2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+Creating incremental archive
+tart/
+tart/c0/
+tart/c2/
+tart/b2
+tart/c2/ca3
+Extracting main archive
+tart/
+tart/c0/
+tart/c1/
+tart/a1
+tart/b1
+tart/c0/cq1
+tart/c0/cq2
+tart/c1/ca1
+tart/c1/ca2
+Extracting incremental archive
+tar: Deleting 'tart/a1'
+tar: Deleting 'tart/b1'
+tart/
+tart/b2
+tart/c0/
+tart/c2/
+tart/c2/ca3
+Final files:
+tart
+tart/b2
+tart/c0
+tart/c0/cq1
+tart/c0/cq2
+tart/c2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_93
+#AT_START_94
+at_fn_group_banner 94 'listed03.at:24' \
+ "incremental dump when the parent directory is unreadable" "" 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "94. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/listed03.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+genfile --file dir/sub/a/file
+cd dir/sub
+
+chmod a-r ..
+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 && exit 77
+fi
+cat err >&2
+exit \$status
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "listed03.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+genfile --file dir/sub/a/file
+cd dir/sub
+
+chmod a-r ..
+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 && exit 77
+fi
+cat err >&2
+exit $status
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/listed03.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_94
+#AT_START_95
+at_fn_group_banner 95 'listed04.at:26' \
+ "--listed-incremental and --one-file-system" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "95. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/listed04.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+echo a >dir/a
+echo b >dir/b
+
+tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
+tar -tf archive.tar || exit
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "listed04.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+echo a >dir/a
+echo b >dir/b
+
+tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
+tar -tf archive.tar || exit
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/a
+dir/b
+dir/
+dir/a
+dir/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/listed04.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_95
+#AT_START_96
+at_fn_group_banner 96 'listed05.at:33' \
+ "--listed-incremental and remounted directories" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "96. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/listed05.at:36:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+options=\"-C tartest --create --one-file-system --verbose\"
+rm -rf archive-01.snar archive-01.tar tartest subdir
+
+# Create initial structure
+mkdir tartest
+echo \"hi\" > tartest/top-level-file
+mkdir tartest/subdir
+echo \"hi\" > tartest/subdir/subdir-file
+
+echo \"# Level 0\"
+tar \$options --file archive-0.tar --listed-incremental=archive-0.snar .
+
+echo \"# Remount\"
+mv tartest/subdir .
+mkdir tartest/subdir
+mount -t ramfs none tartest/subdir || exit 77
+tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
+
+echo \"# Level 1\"
+cp archive-0.snar archive-1.snar
+tar \$options --file archive-1.tar --listed-incremental=archive-1.snar .
+
+umount tartest/subdir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "listed05.at:36"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+options="-C tartest --create --one-file-system --verbose"
+rm -rf archive-01.snar archive-01.tar tartest subdir
+
+# Create initial structure
+mkdir tartest
+echo "hi" > tartest/top-level-file
+mkdir tartest/subdir
+echo "hi" > tartest/subdir/subdir-file
+
+echo "# Level 0"
+tar $options --file archive-0.tar --listed-incremental=archive-0.snar .
+
+echo "# Remount"
+mv tartest/subdir .
+mkdir tartest/subdir
+mount -t ramfs none tartest/subdir || exit 77
+tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
+
+echo "# Level 1"
+cp archive-0.snar archive-1.snar
+tar $options --file archive-1.tar --listed-incremental=archive-1.snar .
+
+umount tartest/subdir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: .: Directory is new
+tar: ./subdir: Directory is new
+tar: ./subdir: directory is on a different filesystem; not dumped
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "# Level 0
+./
+./subdir/
+./top-level-file
+./subdir/subdir-file
+# Remount
+# Level 1
+./
+./subdir/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/listed05.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_96
+#AT_START_97
+at_fn_group_banner 97 'incr03.at:29' \
+ "renamed files in incrementals" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "97. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr03.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir directory
+genfile --file=directory/x
+genfile --file=directory/y
+
+sleep 1
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+cp db db.old
+tar -cf archive.2 -g db directory
+
+mv directory orig
+
+echo Listing of archive.1
+tar -tf archive.1 | sort
+echo Listing of archive.2
+tar -tf archive.2 | sort
+
+echo Directory after first restore
+tar -xf archive.1 -g db --warning=no-timestamp
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db --warning=no-timestamp
+find directory | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir directory
+genfile --file=directory/x
+genfile --file=directory/y
+
+sleep 1
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+cp db db.old
+tar -cf archive.2 -g db directory
+
+mv directory orig
+
+echo Listing of archive.1
+tar -tf archive.1 | sort
+echo Listing of archive.2
+tar -tf archive.2 | sort
+
+echo Directory after first restore
+tar -xf archive.1 -g db --warning=no-timestamp
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db --warning=no-timestamp
+find directory | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Listing of archive.1
+directory/
+directory/x
+directory/y
+Listing of archive.2
+directory/
+directory/z
+Directory after first restore
+directory
+directory/x
+directory/y
+Directory after second restore
+directory
+directory/y
+directory/z
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr03.at:32:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir directory
+genfile --file=directory/x
+genfile --file=directory/y
+
+sleep 1
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+cp db db.old
+tar -cf archive.2 -g db directory
+
+mv directory orig
+
+echo Listing of archive.1
+tar -tf archive.1 | sort
+echo Listing of archive.2
+tar -tf archive.2 | sort
+
+echo Directory after first restore
+tar -xf archive.1 -g db --warning=no-timestamp
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db --warning=no-timestamp
+find directory | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir directory
+genfile --file=directory/x
+genfile --file=directory/y
+
+sleep 1
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+cp db db.old
+tar -cf archive.2 -g db directory
+
+mv directory orig
+
+echo Listing of archive.1
+tar -tf archive.1 | sort
+echo Listing of archive.2
+tar -tf archive.2 | sort
+
+echo Directory after first restore
+tar -xf archive.1 -g db --warning=no-timestamp
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db --warning=no-timestamp
+find directory | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Listing of archive.1
+directory/
+directory/x
+directory/y
+Listing of archive.2
+directory/
+directory/z
+Directory after first restore
+directory
+directory/x
+directory/y
+Directory after second restore
+directory
+directory/y
+directory/z
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr03.at:32:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir directory
+genfile --file=directory/x
+genfile --file=directory/y
+
+sleep 1
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+cp db db.old
+tar -cf archive.2 -g db directory
+
+mv directory orig
+
+echo Listing of archive.1
+tar -tf archive.1 | sort
+echo Listing of archive.2
+tar -tf archive.2 | sort
+
+echo Directory after first restore
+tar -xf archive.1 -g db --warning=no-timestamp
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db --warning=no-timestamp
+find directory | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir directory
+genfile --file=directory/x
+genfile --file=directory/y
+
+sleep 1
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+cp db db.old
+tar -cf archive.2 -g db directory
+
+mv directory orig
+
+echo Listing of archive.1
+tar -tf archive.1 | sort
+echo Listing of archive.2
+tar -tf archive.2 | sort
+
+echo Directory after first restore
+tar -xf archive.1 -g db --warning=no-timestamp
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db --warning=no-timestamp
+find directory | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Listing of archive.1
+directory/
+directory/x
+directory/y
+Listing of archive.2
+directory/
+directory/z
+Directory after first restore
+directory
+directory/x
+directory/y
+Directory after second restore
+directory
+directory/y
+directory/z
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_97
+#AT_START_98
+at_fn_group_banner 98 'incr04.at:30' \
+ "proper icontents initialization" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "98. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr04.at:35:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+install-sh -d a/b >/dev/null || exit 77
+awk 'BEGIN {
+ for (i=1;i<=142;i++)
+ printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
+ }' < /dev/null | genfile --files-from -
+
+sleep 1
+
+echo \"Initial dump\"
+tar cvf a0.tar -g a.sna a
+mv a/b a/c
+echo \"Incremental dump\"
+tar cvf a1.tar -g a.sna a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+install-sh -d a/b >/dev/null || exit 77
+awk 'BEGIN {
+ for (i=1;i<=142;i++)
+ printf("a/b/one_31_chars_long_file_name_%03d\n", i);
+ }' < /dev/null | genfile --files-from -
+
+sleep 1
+
+echo "Initial dump"
+tar cvf a0.tar -g a.sna a
+mv a/b a/c
+echo "Incremental dump"
+tar cvf a1.tar -g a.sna a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
+tar: a/b: Directory is new
+tar: a/c: Directory has been renamed from 'a/b'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Initial dump
+a/
+a/b/
+a/b/one_31_chars_long_file_name_001
+a/b/one_31_chars_long_file_name_002
+a/b/one_31_chars_long_file_name_003
+a/b/one_31_chars_long_file_name_004
+a/b/one_31_chars_long_file_name_005
+a/b/one_31_chars_long_file_name_006
+a/b/one_31_chars_long_file_name_007
+a/b/one_31_chars_long_file_name_008
+a/b/one_31_chars_long_file_name_009
+a/b/one_31_chars_long_file_name_010
+a/b/one_31_chars_long_file_name_011
+a/b/one_31_chars_long_file_name_012
+a/b/one_31_chars_long_file_name_013
+a/b/one_31_chars_long_file_name_014
+a/b/one_31_chars_long_file_name_015
+a/b/one_31_chars_long_file_name_016
+a/b/one_31_chars_long_file_name_017
+a/b/one_31_chars_long_file_name_018
+a/b/one_31_chars_long_file_name_019
+a/b/one_31_chars_long_file_name_020
+a/b/one_31_chars_long_file_name_021
+a/b/one_31_chars_long_file_name_022
+a/b/one_31_chars_long_file_name_023
+a/b/one_31_chars_long_file_name_024
+a/b/one_31_chars_long_file_name_025
+a/b/one_31_chars_long_file_name_026
+a/b/one_31_chars_long_file_name_027
+a/b/one_31_chars_long_file_name_028
+a/b/one_31_chars_long_file_name_029
+a/b/one_31_chars_long_file_name_030
+a/b/one_31_chars_long_file_name_031
+a/b/one_31_chars_long_file_name_032
+a/b/one_31_chars_long_file_name_033
+a/b/one_31_chars_long_file_name_034
+a/b/one_31_chars_long_file_name_035
+a/b/one_31_chars_long_file_name_036
+a/b/one_31_chars_long_file_name_037
+a/b/one_31_chars_long_file_name_038
+a/b/one_31_chars_long_file_name_039
+a/b/one_31_chars_long_file_name_040
+a/b/one_31_chars_long_file_name_041
+a/b/one_31_chars_long_file_name_042
+a/b/one_31_chars_long_file_name_043
+a/b/one_31_chars_long_file_name_044
+a/b/one_31_chars_long_file_name_045
+a/b/one_31_chars_long_file_name_046
+a/b/one_31_chars_long_file_name_047
+a/b/one_31_chars_long_file_name_048
+a/b/one_31_chars_long_file_name_049
+a/b/one_31_chars_long_file_name_050
+a/b/one_31_chars_long_file_name_051
+a/b/one_31_chars_long_file_name_052
+a/b/one_31_chars_long_file_name_053
+a/b/one_31_chars_long_file_name_054
+a/b/one_31_chars_long_file_name_055
+a/b/one_31_chars_long_file_name_056
+a/b/one_31_chars_long_file_name_057
+a/b/one_31_chars_long_file_name_058
+a/b/one_31_chars_long_file_name_059
+a/b/one_31_chars_long_file_name_060
+a/b/one_31_chars_long_file_name_061
+a/b/one_31_chars_long_file_name_062
+a/b/one_31_chars_long_file_name_063
+a/b/one_31_chars_long_file_name_064
+a/b/one_31_chars_long_file_name_065
+a/b/one_31_chars_long_file_name_066
+a/b/one_31_chars_long_file_name_067
+a/b/one_31_chars_long_file_name_068
+a/b/one_31_chars_long_file_name_069
+a/b/one_31_chars_long_file_name_070
+a/b/one_31_chars_long_file_name_071
+a/b/one_31_chars_long_file_name_072
+a/b/one_31_chars_long_file_name_073
+a/b/one_31_chars_long_file_name_074
+a/b/one_31_chars_long_file_name_075
+a/b/one_31_chars_long_file_name_076
+a/b/one_31_chars_long_file_name_077
+a/b/one_31_chars_long_file_name_078
+a/b/one_31_chars_long_file_name_079
+a/b/one_31_chars_long_file_name_080
+a/b/one_31_chars_long_file_name_081
+a/b/one_31_chars_long_file_name_082
+a/b/one_31_chars_long_file_name_083
+a/b/one_31_chars_long_file_name_084
+a/b/one_31_chars_long_file_name_085
+a/b/one_31_chars_long_file_name_086
+a/b/one_31_chars_long_file_name_087
+a/b/one_31_chars_long_file_name_088
+a/b/one_31_chars_long_file_name_089
+a/b/one_31_chars_long_file_name_090
+a/b/one_31_chars_long_file_name_091
+a/b/one_31_chars_long_file_name_092
+a/b/one_31_chars_long_file_name_093
+a/b/one_31_chars_long_file_name_094
+a/b/one_31_chars_long_file_name_095
+a/b/one_31_chars_long_file_name_096
+a/b/one_31_chars_long_file_name_097
+a/b/one_31_chars_long_file_name_098
+a/b/one_31_chars_long_file_name_099
+a/b/one_31_chars_long_file_name_100
+a/b/one_31_chars_long_file_name_101
+a/b/one_31_chars_long_file_name_102
+a/b/one_31_chars_long_file_name_103
+a/b/one_31_chars_long_file_name_104
+a/b/one_31_chars_long_file_name_105
+a/b/one_31_chars_long_file_name_106
+a/b/one_31_chars_long_file_name_107
+a/b/one_31_chars_long_file_name_108
+a/b/one_31_chars_long_file_name_109
+a/b/one_31_chars_long_file_name_110
+a/b/one_31_chars_long_file_name_111
+a/b/one_31_chars_long_file_name_112
+a/b/one_31_chars_long_file_name_113
+a/b/one_31_chars_long_file_name_114
+a/b/one_31_chars_long_file_name_115
+a/b/one_31_chars_long_file_name_116
+a/b/one_31_chars_long_file_name_117
+a/b/one_31_chars_long_file_name_118
+a/b/one_31_chars_long_file_name_119
+a/b/one_31_chars_long_file_name_120
+a/b/one_31_chars_long_file_name_121
+a/b/one_31_chars_long_file_name_122
+a/b/one_31_chars_long_file_name_123
+a/b/one_31_chars_long_file_name_124
+a/b/one_31_chars_long_file_name_125
+a/b/one_31_chars_long_file_name_126
+a/b/one_31_chars_long_file_name_127
+a/b/one_31_chars_long_file_name_128
+a/b/one_31_chars_long_file_name_129
+a/b/one_31_chars_long_file_name_130
+a/b/one_31_chars_long_file_name_131
+a/b/one_31_chars_long_file_name_132
+a/b/one_31_chars_long_file_name_133
+a/b/one_31_chars_long_file_name_134
+a/b/one_31_chars_long_file_name_135
+a/b/one_31_chars_long_file_name_136
+a/b/one_31_chars_long_file_name_137
+a/b/one_31_chars_long_file_name_138
+a/b/one_31_chars_long_file_name_139
+a/b/one_31_chars_long_file_name_140
+a/b/one_31_chars_long_file_name_141
+a/b/one_31_chars_long_file_name_142
+Incremental dump
+a/
+a/c/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr04.at:35:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+install-sh -d a/b >/dev/null || exit 77
+awk 'BEGIN {
+ for (i=1;i<=142;i++)
+ printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
+ }' < /dev/null | genfile --files-from -
+
+sleep 1
+
+echo \"Initial dump\"
+tar cvf a0.tar -g a.sna a
+mv a/b a/c
+echo \"Incremental dump\"
+tar cvf a1.tar -g a.sna a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+install-sh -d a/b >/dev/null || exit 77
+awk 'BEGIN {
+ for (i=1;i<=142;i++)
+ printf("a/b/one_31_chars_long_file_name_%03d\n", i);
+ }' < /dev/null | genfile --files-from -
+
+sleep 1
+
+echo "Initial dump"
+tar cvf a0.tar -g a.sna a
+mv a/b a/c
+echo "Incremental dump"
+tar cvf a1.tar -g a.sna a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
+tar: a/b: Directory is new
+tar: a/c: Directory has been renamed from 'a/b'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Initial dump
+a/
+a/b/
+a/b/one_31_chars_long_file_name_001
+a/b/one_31_chars_long_file_name_002
+a/b/one_31_chars_long_file_name_003
+a/b/one_31_chars_long_file_name_004
+a/b/one_31_chars_long_file_name_005
+a/b/one_31_chars_long_file_name_006
+a/b/one_31_chars_long_file_name_007
+a/b/one_31_chars_long_file_name_008
+a/b/one_31_chars_long_file_name_009
+a/b/one_31_chars_long_file_name_010
+a/b/one_31_chars_long_file_name_011
+a/b/one_31_chars_long_file_name_012
+a/b/one_31_chars_long_file_name_013
+a/b/one_31_chars_long_file_name_014
+a/b/one_31_chars_long_file_name_015
+a/b/one_31_chars_long_file_name_016
+a/b/one_31_chars_long_file_name_017
+a/b/one_31_chars_long_file_name_018
+a/b/one_31_chars_long_file_name_019
+a/b/one_31_chars_long_file_name_020
+a/b/one_31_chars_long_file_name_021
+a/b/one_31_chars_long_file_name_022
+a/b/one_31_chars_long_file_name_023
+a/b/one_31_chars_long_file_name_024
+a/b/one_31_chars_long_file_name_025
+a/b/one_31_chars_long_file_name_026
+a/b/one_31_chars_long_file_name_027
+a/b/one_31_chars_long_file_name_028
+a/b/one_31_chars_long_file_name_029
+a/b/one_31_chars_long_file_name_030
+a/b/one_31_chars_long_file_name_031
+a/b/one_31_chars_long_file_name_032
+a/b/one_31_chars_long_file_name_033
+a/b/one_31_chars_long_file_name_034
+a/b/one_31_chars_long_file_name_035
+a/b/one_31_chars_long_file_name_036
+a/b/one_31_chars_long_file_name_037
+a/b/one_31_chars_long_file_name_038
+a/b/one_31_chars_long_file_name_039
+a/b/one_31_chars_long_file_name_040
+a/b/one_31_chars_long_file_name_041
+a/b/one_31_chars_long_file_name_042
+a/b/one_31_chars_long_file_name_043
+a/b/one_31_chars_long_file_name_044
+a/b/one_31_chars_long_file_name_045
+a/b/one_31_chars_long_file_name_046
+a/b/one_31_chars_long_file_name_047
+a/b/one_31_chars_long_file_name_048
+a/b/one_31_chars_long_file_name_049
+a/b/one_31_chars_long_file_name_050
+a/b/one_31_chars_long_file_name_051
+a/b/one_31_chars_long_file_name_052
+a/b/one_31_chars_long_file_name_053
+a/b/one_31_chars_long_file_name_054
+a/b/one_31_chars_long_file_name_055
+a/b/one_31_chars_long_file_name_056
+a/b/one_31_chars_long_file_name_057
+a/b/one_31_chars_long_file_name_058
+a/b/one_31_chars_long_file_name_059
+a/b/one_31_chars_long_file_name_060
+a/b/one_31_chars_long_file_name_061
+a/b/one_31_chars_long_file_name_062
+a/b/one_31_chars_long_file_name_063
+a/b/one_31_chars_long_file_name_064
+a/b/one_31_chars_long_file_name_065
+a/b/one_31_chars_long_file_name_066
+a/b/one_31_chars_long_file_name_067
+a/b/one_31_chars_long_file_name_068
+a/b/one_31_chars_long_file_name_069
+a/b/one_31_chars_long_file_name_070
+a/b/one_31_chars_long_file_name_071
+a/b/one_31_chars_long_file_name_072
+a/b/one_31_chars_long_file_name_073
+a/b/one_31_chars_long_file_name_074
+a/b/one_31_chars_long_file_name_075
+a/b/one_31_chars_long_file_name_076
+a/b/one_31_chars_long_file_name_077
+a/b/one_31_chars_long_file_name_078
+a/b/one_31_chars_long_file_name_079
+a/b/one_31_chars_long_file_name_080
+a/b/one_31_chars_long_file_name_081
+a/b/one_31_chars_long_file_name_082
+a/b/one_31_chars_long_file_name_083
+a/b/one_31_chars_long_file_name_084
+a/b/one_31_chars_long_file_name_085
+a/b/one_31_chars_long_file_name_086
+a/b/one_31_chars_long_file_name_087
+a/b/one_31_chars_long_file_name_088
+a/b/one_31_chars_long_file_name_089
+a/b/one_31_chars_long_file_name_090
+a/b/one_31_chars_long_file_name_091
+a/b/one_31_chars_long_file_name_092
+a/b/one_31_chars_long_file_name_093
+a/b/one_31_chars_long_file_name_094
+a/b/one_31_chars_long_file_name_095
+a/b/one_31_chars_long_file_name_096
+a/b/one_31_chars_long_file_name_097
+a/b/one_31_chars_long_file_name_098
+a/b/one_31_chars_long_file_name_099
+a/b/one_31_chars_long_file_name_100
+a/b/one_31_chars_long_file_name_101
+a/b/one_31_chars_long_file_name_102
+a/b/one_31_chars_long_file_name_103
+a/b/one_31_chars_long_file_name_104
+a/b/one_31_chars_long_file_name_105
+a/b/one_31_chars_long_file_name_106
+a/b/one_31_chars_long_file_name_107
+a/b/one_31_chars_long_file_name_108
+a/b/one_31_chars_long_file_name_109
+a/b/one_31_chars_long_file_name_110
+a/b/one_31_chars_long_file_name_111
+a/b/one_31_chars_long_file_name_112
+a/b/one_31_chars_long_file_name_113
+a/b/one_31_chars_long_file_name_114
+a/b/one_31_chars_long_file_name_115
+a/b/one_31_chars_long_file_name_116
+a/b/one_31_chars_long_file_name_117
+a/b/one_31_chars_long_file_name_118
+a/b/one_31_chars_long_file_name_119
+a/b/one_31_chars_long_file_name_120
+a/b/one_31_chars_long_file_name_121
+a/b/one_31_chars_long_file_name_122
+a/b/one_31_chars_long_file_name_123
+a/b/one_31_chars_long_file_name_124
+a/b/one_31_chars_long_file_name_125
+a/b/one_31_chars_long_file_name_126
+a/b/one_31_chars_long_file_name_127
+a/b/one_31_chars_long_file_name_128
+a/b/one_31_chars_long_file_name_129
+a/b/one_31_chars_long_file_name_130
+a/b/one_31_chars_long_file_name_131
+a/b/one_31_chars_long_file_name_132
+a/b/one_31_chars_long_file_name_133
+a/b/one_31_chars_long_file_name_134
+a/b/one_31_chars_long_file_name_135
+a/b/one_31_chars_long_file_name_136
+a/b/one_31_chars_long_file_name_137
+a/b/one_31_chars_long_file_name_138
+a/b/one_31_chars_long_file_name_139
+a/b/one_31_chars_long_file_name_140
+a/b/one_31_chars_long_file_name_141
+a/b/one_31_chars_long_file_name_142
+Incremental dump
+a/
+a/c/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr04.at:35:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+install-sh -d a/b >/dev/null || exit 77
+awk 'BEGIN {
+ for (i=1;i<=142;i++)
+ printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
+ }' < /dev/null | genfile --files-from -
+
+sleep 1
+
+echo \"Initial dump\"
+tar cvf a0.tar -g a.sna a
+mv a/b a/c
+echo \"Incremental dump\"
+tar cvf a1.tar -g a.sna a
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+install-sh -d a/b >/dev/null || exit 77
+awk 'BEGIN {
+ for (i=1;i<=142;i++)
+ printf("a/b/one_31_chars_long_file_name_%03d\n", i);
+ }' < /dev/null | genfile --files-from -
+
+sleep 1
+
+echo "Initial dump"
+tar cvf a0.tar -g a.sna a
+mv a/b a/c
+echo "Incremental dump"
+tar cvf a1.tar -g a.sna a
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
+tar: a/b: Directory is new
+tar: a/c: Directory has been renamed from 'a/b'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Initial dump
+a/
+a/b/
+a/b/one_31_chars_long_file_name_001
+a/b/one_31_chars_long_file_name_002
+a/b/one_31_chars_long_file_name_003
+a/b/one_31_chars_long_file_name_004
+a/b/one_31_chars_long_file_name_005
+a/b/one_31_chars_long_file_name_006
+a/b/one_31_chars_long_file_name_007
+a/b/one_31_chars_long_file_name_008
+a/b/one_31_chars_long_file_name_009
+a/b/one_31_chars_long_file_name_010
+a/b/one_31_chars_long_file_name_011
+a/b/one_31_chars_long_file_name_012
+a/b/one_31_chars_long_file_name_013
+a/b/one_31_chars_long_file_name_014
+a/b/one_31_chars_long_file_name_015
+a/b/one_31_chars_long_file_name_016
+a/b/one_31_chars_long_file_name_017
+a/b/one_31_chars_long_file_name_018
+a/b/one_31_chars_long_file_name_019
+a/b/one_31_chars_long_file_name_020
+a/b/one_31_chars_long_file_name_021
+a/b/one_31_chars_long_file_name_022
+a/b/one_31_chars_long_file_name_023
+a/b/one_31_chars_long_file_name_024
+a/b/one_31_chars_long_file_name_025
+a/b/one_31_chars_long_file_name_026
+a/b/one_31_chars_long_file_name_027
+a/b/one_31_chars_long_file_name_028
+a/b/one_31_chars_long_file_name_029
+a/b/one_31_chars_long_file_name_030
+a/b/one_31_chars_long_file_name_031
+a/b/one_31_chars_long_file_name_032
+a/b/one_31_chars_long_file_name_033
+a/b/one_31_chars_long_file_name_034
+a/b/one_31_chars_long_file_name_035
+a/b/one_31_chars_long_file_name_036
+a/b/one_31_chars_long_file_name_037
+a/b/one_31_chars_long_file_name_038
+a/b/one_31_chars_long_file_name_039
+a/b/one_31_chars_long_file_name_040
+a/b/one_31_chars_long_file_name_041
+a/b/one_31_chars_long_file_name_042
+a/b/one_31_chars_long_file_name_043
+a/b/one_31_chars_long_file_name_044
+a/b/one_31_chars_long_file_name_045
+a/b/one_31_chars_long_file_name_046
+a/b/one_31_chars_long_file_name_047
+a/b/one_31_chars_long_file_name_048
+a/b/one_31_chars_long_file_name_049
+a/b/one_31_chars_long_file_name_050
+a/b/one_31_chars_long_file_name_051
+a/b/one_31_chars_long_file_name_052
+a/b/one_31_chars_long_file_name_053
+a/b/one_31_chars_long_file_name_054
+a/b/one_31_chars_long_file_name_055
+a/b/one_31_chars_long_file_name_056
+a/b/one_31_chars_long_file_name_057
+a/b/one_31_chars_long_file_name_058
+a/b/one_31_chars_long_file_name_059
+a/b/one_31_chars_long_file_name_060
+a/b/one_31_chars_long_file_name_061
+a/b/one_31_chars_long_file_name_062
+a/b/one_31_chars_long_file_name_063
+a/b/one_31_chars_long_file_name_064
+a/b/one_31_chars_long_file_name_065
+a/b/one_31_chars_long_file_name_066
+a/b/one_31_chars_long_file_name_067
+a/b/one_31_chars_long_file_name_068
+a/b/one_31_chars_long_file_name_069
+a/b/one_31_chars_long_file_name_070
+a/b/one_31_chars_long_file_name_071
+a/b/one_31_chars_long_file_name_072
+a/b/one_31_chars_long_file_name_073
+a/b/one_31_chars_long_file_name_074
+a/b/one_31_chars_long_file_name_075
+a/b/one_31_chars_long_file_name_076
+a/b/one_31_chars_long_file_name_077
+a/b/one_31_chars_long_file_name_078
+a/b/one_31_chars_long_file_name_079
+a/b/one_31_chars_long_file_name_080
+a/b/one_31_chars_long_file_name_081
+a/b/one_31_chars_long_file_name_082
+a/b/one_31_chars_long_file_name_083
+a/b/one_31_chars_long_file_name_084
+a/b/one_31_chars_long_file_name_085
+a/b/one_31_chars_long_file_name_086
+a/b/one_31_chars_long_file_name_087
+a/b/one_31_chars_long_file_name_088
+a/b/one_31_chars_long_file_name_089
+a/b/one_31_chars_long_file_name_090
+a/b/one_31_chars_long_file_name_091
+a/b/one_31_chars_long_file_name_092
+a/b/one_31_chars_long_file_name_093
+a/b/one_31_chars_long_file_name_094
+a/b/one_31_chars_long_file_name_095
+a/b/one_31_chars_long_file_name_096
+a/b/one_31_chars_long_file_name_097
+a/b/one_31_chars_long_file_name_098
+a/b/one_31_chars_long_file_name_099
+a/b/one_31_chars_long_file_name_100
+a/b/one_31_chars_long_file_name_101
+a/b/one_31_chars_long_file_name_102
+a/b/one_31_chars_long_file_name_103
+a/b/one_31_chars_long_file_name_104
+a/b/one_31_chars_long_file_name_105
+a/b/one_31_chars_long_file_name_106
+a/b/one_31_chars_long_file_name_107
+a/b/one_31_chars_long_file_name_108
+a/b/one_31_chars_long_file_name_109
+a/b/one_31_chars_long_file_name_110
+a/b/one_31_chars_long_file_name_111
+a/b/one_31_chars_long_file_name_112
+a/b/one_31_chars_long_file_name_113
+a/b/one_31_chars_long_file_name_114
+a/b/one_31_chars_long_file_name_115
+a/b/one_31_chars_long_file_name_116
+a/b/one_31_chars_long_file_name_117
+a/b/one_31_chars_long_file_name_118
+a/b/one_31_chars_long_file_name_119
+a/b/one_31_chars_long_file_name_120
+a/b/one_31_chars_long_file_name_121
+a/b/one_31_chars_long_file_name_122
+a/b/one_31_chars_long_file_name_123
+a/b/one_31_chars_long_file_name_124
+a/b/one_31_chars_long_file_name_125
+a/b/one_31_chars_long_file_name_126
+a/b/one_31_chars_long_file_name_127
+a/b/one_31_chars_long_file_name_128
+a/b/one_31_chars_long_file_name_129
+a/b/one_31_chars_long_file_name_130
+a/b/one_31_chars_long_file_name_131
+a/b/one_31_chars_long_file_name_132
+a/b/one_31_chars_long_file_name_133
+a/b/one_31_chars_long_file_name_134
+a/b/one_31_chars_long_file_name_135
+a/b/one_31_chars_long_file_name_136
+a/b/one_31_chars_long_file_name_137
+a/b/one_31_chars_long_file_name_138
+a/b/one_31_chars_long_file_name_139
+a/b/one_31_chars_long_file_name_140
+a/b/one_31_chars_long_file_name_141
+a/b/one_31_chars_long_file_name_142
+Incremental dump
+a/
+a/c/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_98
+#AT_START_99
+at_fn_group_banner 99 'incr05.at:21' \
+ "incremental dumps with -C" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "99. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr05.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+echo Level 0
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+
+genfile --file dir/file3
+echo Level 1
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+echo Level 0
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+
+genfile --file dir/file3
+echo Level 1
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Level 0
+./
+./sub/
+./file1
+./sub/file2
+Level 1
+./
+./sub/
+./file3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr05.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+echo Level 0
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+
+genfile --file dir/file3
+echo Level 1
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+echo Level 0
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+
+genfile --file dir/file3
+echo Level 1
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Level 0
+./
+./sub/
+./file1
+./sub/file2
+Level 1
+./
+./sub/
+./file3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr05.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+echo Level 0
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+
+genfile --file dir/file3
+echo Level 1
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+echo Level 0
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+
+genfile --file dir/file3
+echo Level 1
+tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Level 0
+./
+./sub/
+./file1
+./sub/file2
+Level 1
+./
+./sub/
+./file3
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_99
+#AT_START_100
+at_fn_group_banner 100 'incr06.at:21' \
+ "incremental dumps of nested directories" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "100. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr06.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+mkdir dir/sub/b
+genfile --file dir/file1
+genfile --file dir/sub/file2
+genfile --file dir/sub/a/file3
+
+echo Level 0 . sub
+tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 0 sub .
+tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+
+mkdir dir/c
+genfile --file dir/sub/b/file4
+
+echo Level 1 . sub
+tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 1 sub .
+tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+mkdir dir/sub/b
+genfile --file dir/file1
+genfile --file dir/sub/file2
+genfile --file dir/sub/a/file3
+
+echo Level 0 . sub
+tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 0 sub .
+tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+
+mkdir dir/c
+genfile --file dir/sub/b/file4
+
+echo Level 1 . sub
+tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 1 sub .
+tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Level 0 . sub
+./
+sub/
+sub/a/
+sub/b/
+./file1
+sub/file2
+sub/a/file3
+Level 0 sub .
+./
+sub/
+sub/a/
+sub/b/
+./file1
+sub/file2
+sub/a/file3
+Level 1 . sub
+./
+./c/
+sub/
+sub/a/
+sub/b/
+sub/b/file4
+Level 1 sub .
+./
+./c/
+sub/
+sub/a/
+sub/b/
+sub/b/file4
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr06.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+mkdir dir/sub/b
+genfile --file dir/file1
+genfile --file dir/sub/file2
+genfile --file dir/sub/a/file3
+
+echo Level 0 . sub
+tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 0 sub .
+tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+
+mkdir dir/c
+genfile --file dir/sub/b/file4
+
+echo Level 1 . sub
+tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 1 sub .
+tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+mkdir dir/sub/b
+genfile --file dir/file1
+genfile --file dir/sub/file2
+genfile --file dir/sub/a/file3
+
+echo Level 0 . sub
+tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 0 sub .
+tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+
+mkdir dir/c
+genfile --file dir/sub/b/file4
+
+echo Level 1 . sub
+tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 1 sub .
+tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Level 0 . sub
+./
+sub/
+sub/a/
+sub/b/
+./file1
+sub/file2
+sub/a/file3
+Level 0 sub .
+./
+sub/
+sub/a/
+sub/b/
+./file1
+sub/file2
+sub/a/file3
+Level 1 . sub
+./
+./c/
+sub/
+sub/a/
+sub/b/
+sub/b/file4
+Level 1 sub .
+./
+./c/
+sub/
+sub/a/
+sub/b/
+sub/b/file4
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr06.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+mkdir dir/sub/b
+genfile --file dir/file1
+genfile --file dir/sub/file2
+genfile --file dir/sub/a/file3
+
+echo Level 0 . sub
+tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 0 sub .
+tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+
+mkdir dir/c
+genfile --file dir/sub/b/file4
+
+echo Level 1 . sub
+tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 1 sub .
+tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dir
+mkdir dir/sub
+mkdir dir/sub/a
+mkdir dir/sub/b
+genfile --file dir/file1
+genfile --file dir/sub/file2
+genfile --file dir/sub/a/file3
+
+echo Level 0 . sub
+tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 0 sub .
+tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+
+mkdir dir/c
+genfile --file dir/sub/b/file4
+
+echo Level 1 . sub
+tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
+echo Level 1 sub .
+tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Level 0 . sub
+./
+sub/
+sub/a/
+sub/b/
+./file1
+sub/file2
+sub/a/file3
+Level 0 sub .
+./
+sub/
+sub/a/
+sub/b/
+./file1
+sub/file2
+sub/a/file3
+Level 1 . sub
+./
+./c/
+sub/
+sub/a/
+sub/b/
+sub/b/file4
+Level 1 sub .
+./
+./c/
+sub/
+sub/a/
+sub/b/
+sub/b/file4
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_100
+#AT_START_101
+at_fn_group_banner 101 'incr07.at:18' \
+ "incremental restores with -C" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "101. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Tar 1.26 had problems extracting from incremental restores when given
+# the -C option. The code in incremen.c:try_purge_directory and
+# misc.c:remove_any_file was using savedir(), which ignored eventual changes
+# in the current working directory and caused the malfunctioning.
+#
+# The problem was reported by Piotr Rotter on 2013-03-22.
+#
+# This testcase is based on scripts provided by Piotr Rotter and Nathan
+# Stratton Treadway.
+#
+# References: <514C8F56.90900@active24.pl>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00036.html,
+# <20130326181922.GZ3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00042.html,
+# <20130327051828.GA3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00043.html,
+# <20130327054957.GB3732@shire.ontko.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00044.html
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr07.at:40:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dirA
+echo 'a' > dirA/a
+echo 'a' > dirA/b
+
+decho C0
+tar -g test.snar -vcf test.0.tar dirA
+
+echo 'a' > dirA/c
+decho C1
+tar -g test.snar -vcf test.1.tar dirA
+
+rm -f dirA/a
+decho C2
+tar -g test.snar -vcf test.2.tar dirA
+
+mkdir ext
+rm -rf dirA
+
+decho E0
+tar -g test.snar -vxf test.0.tar -C ext/
+decho E1
+tar -g test.snar -vxf test.1.tar -C ext/
+
+decho E2
+tar -g test.snar -vxf test.2.tar -C ext/
+
+mkdir ext/dirA/dirB
+touch ext/dirA/dirB/file
+
+decho E3
+tar -g test.snar -vxf test.2.tar -C ext/
+
+echo FIN
+test -d dirA && echo >&2 \"toplevel dirA exists\"
+exit 0
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dirA
+echo 'a' > dirA/a
+echo 'a' > dirA/b
+
+decho C0
+tar -g test.snar -vcf test.0.tar dirA
+
+echo 'a' > dirA/c
+decho C1
+tar -g test.snar -vcf test.1.tar dirA
+
+rm -f dirA/a
+decho C2
+tar -g test.snar -vcf test.2.tar dirA
+
+mkdir ext
+rm -rf dirA
+
+decho E0
+tar -g test.snar -vxf test.0.tar -C ext/
+decho E1
+tar -g test.snar -vxf test.1.tar -C ext/
+
+decho E2
+tar -g test.snar -vxf test.2.tar -C ext/
+
+mkdir ext/dirA/dirB
+touch ext/dirA/dirB/file
+
+decho E3
+tar -g test.snar -vxf test.2.tar -C ext/
+
+echo FIN
+test -d dirA && echo >&2 "toplevel dirA exists"
+exit 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "C0
+tar: dirA: Directory is new
+C1
+C2
+E0
+E1
+E2
+E3
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "C0
+dirA/
+dirA/a
+dirA/b
+C1
+dirA/
+dirA/c
+C2
+dirA/
+E0
+dirA/
+dirA/a
+dirA/b
+E1
+dirA/
+dirA/c
+E2
+dirA/
+tar: Deleting 'dirA/a'
+E3
+dirA/
+tar: Deleting 'dirA/dirB'
+FIN
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr07.at:40:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dirA
+echo 'a' > dirA/a
+echo 'a' > dirA/b
+
+decho C0
+tar -g test.snar -vcf test.0.tar dirA
+
+echo 'a' > dirA/c
+decho C1
+tar -g test.snar -vcf test.1.tar dirA
+
+rm -f dirA/a
+decho C2
+tar -g test.snar -vcf test.2.tar dirA
+
+mkdir ext
+rm -rf dirA
+
+decho E0
+tar -g test.snar -vxf test.0.tar -C ext/
+decho E1
+tar -g test.snar -vxf test.1.tar -C ext/
+
+decho E2
+tar -g test.snar -vxf test.2.tar -C ext/
+
+mkdir ext/dirA/dirB
+touch ext/dirA/dirB/file
+
+decho E3
+tar -g test.snar -vxf test.2.tar -C ext/
+
+echo FIN
+test -d dirA && echo >&2 \"toplevel dirA exists\"
+exit 0
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dirA
+echo 'a' > dirA/a
+echo 'a' > dirA/b
+
+decho C0
+tar -g test.snar -vcf test.0.tar dirA
+
+echo 'a' > dirA/c
+decho C1
+tar -g test.snar -vcf test.1.tar dirA
+
+rm -f dirA/a
+decho C2
+tar -g test.snar -vcf test.2.tar dirA
+
+mkdir ext
+rm -rf dirA
+
+decho E0
+tar -g test.snar -vxf test.0.tar -C ext/
+decho E1
+tar -g test.snar -vxf test.1.tar -C ext/
+
+decho E2
+tar -g test.snar -vxf test.2.tar -C ext/
+
+mkdir ext/dirA/dirB
+touch ext/dirA/dirB/file
+
+decho E3
+tar -g test.snar -vxf test.2.tar -C ext/
+
+echo FIN
+test -d dirA && echo >&2 "toplevel dirA exists"
+exit 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "C0
+tar: dirA: Directory is new
+C1
+C2
+E0
+E1
+E2
+E3
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "C0
+dirA/
+dirA/a
+dirA/b
+C1
+dirA/
+dirA/c
+C2
+dirA/
+E0
+dirA/
+dirA/a
+dirA/b
+E1
+dirA/
+dirA/c
+E2
+dirA/
+tar: Deleting 'dirA/a'
+E3
+dirA/
+tar: Deleting 'dirA/dirB'
+FIN
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/incr07.at:40:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dirA
+echo 'a' > dirA/a
+echo 'a' > dirA/b
+
+decho C0
+tar -g test.snar -vcf test.0.tar dirA
+
+echo 'a' > dirA/c
+decho C1
+tar -g test.snar -vcf test.1.tar dirA
+
+rm -f dirA/a
+decho C2
+tar -g test.snar -vcf test.2.tar dirA
+
+mkdir ext
+rm -rf dirA
+
+decho E0
+tar -g test.snar -vxf test.0.tar -C ext/
+decho E1
+tar -g test.snar -vxf test.1.tar -C ext/
+
+decho E2
+tar -g test.snar -vxf test.2.tar -C ext/
+
+mkdir ext/dirA/dirB
+touch ext/dirA/dirB/file
+
+decho E3
+tar -g test.snar -vxf test.2.tar -C ext/
+
+echo FIN
+test -d dirA && echo >&2 \"toplevel dirA exists\"
+exit 0
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir dirA
+echo 'a' > dirA/a
+echo 'a' > dirA/b
+
+decho C0
+tar -g test.snar -vcf test.0.tar dirA
+
+echo 'a' > dirA/c
+decho C1
+tar -g test.snar -vcf test.1.tar dirA
+
+rm -f dirA/a
+decho C2
+tar -g test.snar -vcf test.2.tar dirA
+
+mkdir ext
+rm -rf dirA
+
+decho E0
+tar -g test.snar -vxf test.0.tar -C ext/
+decho E1
+tar -g test.snar -vxf test.1.tar -C ext/
+
+decho E2
+tar -g test.snar -vxf test.2.tar -C ext/
+
+mkdir ext/dirA/dirB
+touch ext/dirA/dirB/file
+
+decho E3
+tar -g test.snar -vxf test.2.tar -C ext/
+
+echo FIN
+test -d dirA && echo >&2 "toplevel dirA exists"
+exit 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "C0
+tar: dirA: Directory is new
+C1
+C2
+E0
+E1
+E2
+E3
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "C0
+dirA/
+dirA/a
+dirA/b
+C1
+dirA/
+dirA/c
+C2
+dirA/
+E0
+dirA/
+dirA/a
+dirA/b
+E1
+dirA/
+dirA/c
+E2
+dirA/
+tar: Deleting 'dirA/a'
+E3
+dirA/
+tar: Deleting 'dirA/dirB'
+FIN
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_101
+#AT_START_102
+at_fn_group_banner 102 'incr08.at:38' \
+ "filename normalization" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "102. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr08.at:41:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir tartest
+cd tartest
+mkdir foo
+mkdir foo/subdir
+mkdir foo/subdir/dir1
+mkdir subdir
+mkdir subdir/dir2
+decho A
+find .|sort
+
+decho B
+DIR=\`pwd\`
+tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . \$DIR 2>../err |\\
+ sed \"s|\$DIR|ABSPATH|\"
+sed \"s|\$DIR|ABSPATH|\" ../err >&2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "incr08.at:41"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir tartest
+cd tartest
+mkdir foo
+mkdir foo/subdir
+mkdir foo/subdir/dir1
+mkdir subdir
+mkdir subdir/dir2
+decho A
+find .|sort
+
+decho B
+DIR=`pwd`
+tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . $DIR 2>../err |\
+ sed "s|$DIR|ABSPATH|"
+sed "s|$DIR|ABSPATH|" ../err >&2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+tar: .: Directory is new
+tar: ./subdir: Directory is new
+tar: ./subdir/dir1: Directory is new
+tar: ABSPATH: Directory is new
+tar: ABSPATH/subdir: Directory is new
+tar: ABSPATH/subdir/dir2: Directory is new
+tar: Removing leading \`/' from member names
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./foo
+./foo/subdir
+./foo/subdir/dir1
+./subdir
+./subdir/dir2
+B
+./
+./subdir/
+./subdir/dir1/
+ABSPATH/
+ABSPATH/subdir/
+ABSPATH/subdir/dir2/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr08.at:41"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_102
+#AT_START_103
+at_fn_group_banner 103 'incr09.at:26' \
+ "incremental with alternating -C" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "103. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr09.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo bar middle
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+echo middle/file > middle/middle_file
+decho A
+tar -cvf foo.tar --incremental -C foo . -C \`pwd\` middle -C bar .
+
+rm foo.tar
+>toplevel_file
+decho B
+tar -cvf foo.tar --incremental -C foo . -C \`pwd\` toplevel_file -C bar .
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "incr09.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo bar middle
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+echo middle/file > middle/middle_file
+decho A
+tar -cvf foo.tar --incremental -C foo . -C `pwd` middle -C bar .
+
+rm foo.tar
+>toplevel_file
+decho B
+tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file -C bar .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+tar: .: Directory is new
+tar: middle: Directory is new
+tar: .: Directory is new
+B
+tar: .: Directory is new
+tar: .: Directory is new
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+./
+./
+middle/
+./bar_file
+./foo_file
+middle/middle_file
+B
+./
+./
+toplevel_file
+./bar_file
+./foo_file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr09.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_103
+#AT_START_104
+at_fn_group_banner 104 'incr10.at:18' \
+ "concatenated incremental archives (deletes)" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "104. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Description: Extraction from concatenated incremental archives
+# produced spurious error messages when trying to set file ownership
+# and permissions on deleted directories.
+# Reported by: Alex Efros <powerman@powerman.name>
+# References: <20150411224008.GO24600@home.power>
+# http://lists.gnu.org/archive/html/bug-tar/2015-04/msg00003.html
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr10.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir in
+mkdir in/dir
+decho Level 0
+tar -cvf 1.tar -g snap -C in .
+rmdir in/dir
+decho Level 1
+tar -cvf 2.tar -g snap -C in .
+cp 1.tar full.tar
+decho Concat
+tar -A 2.tar -f full.tar -g /dev/null
+decho Extract
+mkdir out
+tar -xvf full.tar -g /dev/null -C out
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "incr10.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+mkdir in
+mkdir in/dir
+decho Level 0
+tar -cvf 1.tar -g snap -C in .
+rmdir in/dir
+decho Level 1
+tar -cvf 2.tar -g snap -C in .
+cp 1.tar full.tar
+decho Concat
+tar -A 2.tar -f full.tar -g /dev/null
+decho Extract
+mkdir out
+tar -xvf full.tar -g /dev/null -C out
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Level 0
+tar: .: Directory is new
+tar: ./dir: Directory is new
+Level 1
+Concat
+Extract
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Level 0
+./
+./dir/
+Level 1
+./
+Concat
+Extract
+./
+./dir/
+./
+tar: Deleting './dir'
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr10.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_104
+#AT_START_105
+at_fn_group_banner 105 'incr11.at:25' \
+ "concatenated incremental archives (renames)" " " 11
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "105. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/incr11.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+install-sh -d data/dir >/dev/null && genfile --file data/dir/file || exit 77
+decho Level 0
+tar -cvf full.tar -g snap -C data .
+decho Level 1
+mv data/dir data/dir2
+tar -cvf incr.tar -g snap -C data .
+decho Concat
+cp full.tar full2.tar
+tar -A -f full2.tar incr.tar
+decho Extract
+mkdir out
+tar -xvf full2.tar -g /dev/null -C out
+decho List
+find out | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "incr11.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+ckmtime || exit 77
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+install-sh -d data/dir >/dev/null && genfile --file data/dir/file || exit 77
+decho Level 0
+tar -cvf full.tar -g snap -C data .
+decho Level 1
+mv data/dir data/dir2
+tar -cvf incr.tar -g snap -C data .
+decho Concat
+cp full.tar full2.tar
+tar -A -f full2.tar incr.tar
+decho Extract
+mkdir out
+tar -xvf full2.tar -g /dev/null -C out
+decho List
+find out | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Level 0
+tar: .: Directory is new
+tar: ./dir: Directory is new
+Level 1
+tar: ./dir2: Directory has been renamed from './dir'
+Concat
+Extract
+List
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Level 0
+./
+./dir/
+./dir/file
+Level 1
+./
+./dir2/
+Concat
+Extract
+./
+./dir/
+./dir/file
+./
+./dir2/
+List
+out
+out/dir2
+out/dir2/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/incr11.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_105
+#AT_START_106
+at_fn_group_banner 106 'filerem01.at:36' \
+ "file removed as we read it (ca. 22 seconds)" " " 12
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "106. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/filerem01.at:39:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+genfile --run --checkpoint=3 --unlink dir/file1 -- \\
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
+ --checkpoint-action='echo' -c -f archive.tar \\
+ --listed-incremental db -v dir >/dev/null
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+genfile --run --checkpoint=3 --unlink dir/file1 -- \
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
+ --checkpoint-action='echo' -c -f archive.tar \
+ --listed-incremental db -v dir >/dev/null
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
+tar: dir/sub: Directory is new
+tar: dir/file1: File removed before we read it
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/filerem01.at:39:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+genfile --run --checkpoint=3 --unlink dir/file1 -- \\
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
+ --checkpoint-action='echo' -c -f archive.tar \\
+ --listed-incremental db -v dir >/dev/null
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+
+genfile --run --checkpoint=3 --unlink dir/file1 -- \
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
+ --checkpoint-action='echo' -c -f archive.tar \
+ --listed-incremental db -v dir >/dev/null
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
+tar: dir/sub: Directory is new
+tar: dir/file1: File removed before we read it
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+# Timing information:
+#
+# For -Hgnu the above command line takes about 8 seconds to execute and
+# produces:
+#
+# tar: dir: Directory is new
+# tar: dir/sub: Directory is new
+# dir/
+# tar: Write checkpoint 1
+# tar: Write checkpoint 2
+# dir/sub/
+# tar: Write checkpoint 3
+# tar: Write checkpoint 4
+# dir/file1
+# tar: Write checkpoint 5
+# dir/sub/file2
+# tar: Write checkpoint 6
+# tar: Write checkpoint 7
+# tar: Write checkpoint 8
+#
+# For -Hposix the above command line takes about 14 seconds to execute and
+# produces:
+#
+# ./tar: dir: Directory is new
+# ./tar: dir/sub: Directory is new
+# dir/
+# ./tar: Write checkpoint 1
+# ./tar: Write checkpoint 2
+# ./tar: Write checkpoint 3
+# dir/sub/
+# ./tar: Write checkpoint 4
+# ./tar: Write checkpoint 5
+# ./tar: Write checkpoint 6
+# dir/file1
+# ./tar: Write checkpoint 7
+# ./tar: Write checkpoint 8
+# ./tar: Write checkpoint 9
+# dir/sub/file2
+# ./tar: Write checkpoint 10
+# ./tar: Write checkpoint 11
+# ./tar: Write checkpoint 12
+# ./tar: Write checkpoint 13
+# ./tar: Write checkpoint 14
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_106
+#AT_START_107
+at_fn_group_banner 107 'filerem02.at:26' \
+ "toplevel file removed (ca. 24 seconds)" " " 12
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "107. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/filerem02.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+mkdir dir2
+genfile --file dir2/file1
+
+genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
+ --checkpoint-action='echo' -c -f archive.tar \\
+ --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+mkdir dir2
+genfile --file dir2/file1
+
+genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
+ --checkpoint-action='echo' -c -f archive.tar \
+ --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/filerem02.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+mkdir dir2
+genfile --file dir2/file1
+
+genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
+ --checkpoint-action='echo' -c -f archive.tar \\
+ --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+mkdir dir/sub
+genfile --file dir/file1
+genfile --file dir/sub/file2
+mkdir dir2
+genfile --file dir2/file1
+
+genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
+ --checkpoint-action='echo' -c -f archive.tar \
+ --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+# Ignore stdout and stderr because their contents depend on
+# the file system implementation.
+
+# Timing information: see filerem01.at
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_107
+#AT_START_108
+at_fn_group_banner 108 'rename01.at:25' \
+ "renamed dirs in incrementals" " " 13
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "108. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/rename01.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file
+
+echo \"Creating base archive\"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar foo/baz
+
+echo \"Creating incremental archive\"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfg arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file
+
+echo "Creating base archive"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar foo/baz
+
+echo "Creating incremental archive"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfg arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
+tar: foo/bar: Directory is new
+tar: foo/baz: Directory has been renamed from 'foo/bar'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating base archive
+foo/
+foo/bar/
+foo/file1
+foo/file2
+foo/bar/file
+Creating incremental archive
+foo/
+foo/baz/
+Begin directory listing 1
+foo
+foo/bar
+foo/bar/file
+foo/file1
+foo/file2
+End directory listing 1
+Begin directory listing 2
+foo
+foo/baz
+foo/baz/file
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename01.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file
+
+echo \"Creating base archive\"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar foo/baz
+
+echo \"Creating incremental archive\"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfg arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file
+
+echo "Creating base archive"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar foo/baz
+
+echo "Creating incremental archive"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfg arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
+tar: foo/bar: Directory is new
+tar: foo/baz: Directory has been renamed from 'foo/bar'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating base archive
+foo/
+foo/bar/
+foo/file1
+foo/file2
+foo/bar/file
+Creating incremental archive
+foo/
+foo/baz/
+Begin directory listing 1
+foo
+foo/bar
+foo/bar/file
+foo/file1
+foo/file2
+End directory listing 1
+Begin directory listing 2
+foo
+foo/baz
+foo/baz/file
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename01.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file
+
+echo \"Creating base archive\"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar foo/baz
+
+echo \"Creating incremental archive\"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfg arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file
+
+echo "Creating base archive"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar foo/baz
+
+echo "Creating incremental archive"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfg arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
+tar: foo/bar: Directory is new
+tar: foo/baz: Directory has been renamed from 'foo/bar'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating base archive
+foo/
+foo/bar/
+foo/file1
+foo/file2
+foo/bar/file
+Creating incremental archive
+foo/
+foo/baz/
+Begin directory listing 1
+foo
+foo/bar
+foo/bar/file
+foo/file1
+foo/file2
+End directory listing 1
+Begin directory listing 2
+foo
+foo/baz
+foo/baz/file
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_108
+#AT_START_109
+at_fn_group_banner 109 'rename02.at:25' \
+ "move between hierarchies" " " 13
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "109. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/rename02.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+sleep 1
+
+echo \"Creating base archive\"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar/baz foo
+
+echo \"Creating incremental archive\"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
+sort tmperr >&2
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+sleep 1
+
+echo "Creating base archive"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar/baz foo
+
+echo "Creating incremental archive"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
+tar: foo/bar: Directory is new
+tar: foo/bar/baz: Directory is new
+tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating base archive
+foo/
+foo/bar/
+foo/bar/baz/
+foo/file1
+foo/file2
+foo/bar/file.r
+foo/bar/baz/file.z
+Creating incremental archive
+foo/
+foo/bar/
+foo/baz/
+Begin directory listing 1
+foo
+foo/bar
+foo/bar/baz
+foo/bar/baz/file.z
+foo/bar/file.r
+foo/file1
+foo/file2
+End directory listing 1
+foo/
+foo/bar/
+foo/baz/
+Begin directory listing 2
+foo
+foo/bar
+foo/bar/file.r
+foo/baz
+foo/baz/file.z
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename02.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+sleep 1
+
+echo \"Creating base archive\"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar/baz foo
+
+echo \"Creating incremental archive\"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
+sort tmperr >&2
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+sleep 1
+
+echo "Creating base archive"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar/baz foo
+
+echo "Creating incremental archive"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
+tar: foo/bar: Directory is new
+tar: foo/bar/baz: Directory is new
+tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating base archive
+foo/
+foo/bar/
+foo/bar/baz/
+foo/file1
+foo/file2
+foo/bar/file.r
+foo/bar/baz/file.z
+Creating incremental archive
+foo/
+foo/bar/
+foo/baz/
+Begin directory listing 1
+foo
+foo/bar
+foo/bar/baz
+foo/bar/baz/file.z
+foo/bar/file.r
+foo/file1
+foo/file2
+End directory listing 1
+foo/
+foo/bar/
+foo/baz/
+Begin directory listing 2
+foo
+foo/bar
+foo/bar/file.r
+foo/baz
+foo/baz/file.z
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename02.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+sleep 1
+
+echo \"Creating base archive\"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar/baz foo
+
+echo \"Creating incremental archive\"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
+sort tmperr >&2
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+mkdir foo/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+sleep 1
+
+echo "Creating base archive"
+tar -g incr -cf arch.1 -v foo
+
+mv foo/bar/baz foo
+
+echo "Creating incremental archive"
+tar -g incr -cf arch.2 -v foo
+
+mv foo old
+
+tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
+tar: foo/bar: Directory is new
+tar: foo/bar/baz: Directory is new
+tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating base archive
+foo/
+foo/bar/
+foo/bar/baz/
+foo/file1
+foo/file2
+foo/bar/file.r
+foo/bar/baz/file.z
+Creating incremental archive
+foo/
+foo/bar/
+foo/baz/
+Begin directory listing 1
+foo
+foo/bar
+foo/bar/baz
+foo/bar/baz/file.z
+foo/bar/file.r
+foo/file1
+foo/file2
+End directory listing 1
+foo/
+foo/bar/
+foo/baz/
+Begin directory listing 2
+foo
+foo/bar
+foo/bar/file.r
+foo/baz
+foo/baz/file.z
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_109
+#AT_START_110
+at_fn_group_banner 110 'rename03.at:24' \
+ "cyclic renames" " " 13
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "110. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/rename03.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+
+mkdir foo/a
+genfile --file foo/a/filea
+
+mkdir foo/b
+genfile --file foo/b/fileb
+
+mkdir foo/c
+genfile --file foo/c/filec
+
+sleep 1
+
+echo \"First dump\"
+echo \"First dump\">&2
+tar -g incr -cf arch.1 -v foo 2>tmperr
+sort tmperr >&2
+
+# Shuffle directories:
+(cd foo
+mv a \$\$
+mv c a
+mv b c
+mv \$\$ b)
+
+echo \"Second dump\"
+echo \"Second dump\" >&2
+tar -g incr -cf arch.2 -v foo 2>tmperr
+sort tmperr >&2
+
+tar xfg arch.1 /dev/null --warning=no-timestamp
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+
+mkdir foo/a
+genfile --file foo/a/filea
+
+mkdir foo/b
+genfile --file foo/b/fileb
+
+mkdir foo/c
+genfile --file foo/c/filec
+
+sleep 1
+
+echo "First dump"
+echo "First dump">&2
+tar -g incr -cf arch.1 -v foo 2>tmperr
+sort tmperr >&2
+
+# Shuffle directories:
+(cd foo
+mv a $$
+mv c a
+mv b c
+mv $$ b)
+
+echo "Second dump"
+echo "Second dump" >&2
+tar -g incr -cf arch.2 -v foo 2>tmperr
+sort tmperr >&2
+
+tar xfg arch.1 /dev/null --warning=no-timestamp
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "First dump
+tar: foo/a: Directory is new
+tar: foo/b: Directory is new
+tar: foo/c: Directory is new
+tar: foo: Directory is new
+Second dump
+tar: foo/a: Directory has been renamed from 'foo/c'
+tar: foo/b: Directory has been renamed from 'foo/a'
+tar: foo/c: Directory has been renamed from 'foo/b'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "First dump
+foo/
+foo/a/
+foo/b/
+foo/c/
+foo/file1
+foo/file2
+foo/a/filea
+foo/b/fileb
+foo/c/filec
+Second dump
+foo/
+foo/a/
+foo/b/
+foo/c/
+Begin directory listing 1
+foo
+foo/a
+foo/a/filea
+foo/b
+foo/b/fileb
+foo/c
+foo/c/filec
+foo/file1
+foo/file2
+End directory listing 1
+foo/
+foo/a/
+foo/b/
+foo/c/
+Begin directory listing 2
+foo
+foo/a
+foo/a/filec
+foo/b
+foo/b/filea
+foo/c
+foo/c/fileb
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename03.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+
+mkdir foo/a
+genfile --file foo/a/filea
+
+mkdir foo/b
+genfile --file foo/b/fileb
+
+mkdir foo/c
+genfile --file foo/c/filec
+
+sleep 1
+
+echo \"First dump\"
+echo \"First dump\">&2
+tar -g incr -cf arch.1 -v foo 2>tmperr
+sort tmperr >&2
+
+# Shuffle directories:
+(cd foo
+mv a \$\$
+mv c a
+mv b c
+mv \$\$ b)
+
+echo \"Second dump\"
+echo \"Second dump\" >&2
+tar -g incr -cf arch.2 -v foo 2>tmperr
+sort tmperr >&2
+
+tar xfg arch.1 /dev/null --warning=no-timestamp
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+
+mkdir foo/a
+genfile --file foo/a/filea
+
+mkdir foo/b
+genfile --file foo/b/fileb
+
+mkdir foo/c
+genfile --file foo/c/filec
+
+sleep 1
+
+echo "First dump"
+echo "First dump">&2
+tar -g incr -cf arch.1 -v foo 2>tmperr
+sort tmperr >&2
+
+# Shuffle directories:
+(cd foo
+mv a $$
+mv c a
+mv b c
+mv $$ b)
+
+echo "Second dump"
+echo "Second dump" >&2
+tar -g incr -cf arch.2 -v foo 2>tmperr
+sort tmperr >&2
+
+tar xfg arch.1 /dev/null --warning=no-timestamp
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "First dump
+tar: foo/a: Directory is new
+tar: foo/b: Directory is new
+tar: foo/c: Directory is new
+tar: foo: Directory is new
+Second dump
+tar: foo/a: Directory has been renamed from 'foo/c'
+tar: foo/b: Directory has been renamed from 'foo/a'
+tar: foo/c: Directory has been renamed from 'foo/b'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "First dump
+foo/
+foo/a/
+foo/b/
+foo/c/
+foo/file1
+foo/file2
+foo/a/filea
+foo/b/fileb
+foo/c/filec
+Second dump
+foo/
+foo/a/
+foo/b/
+foo/c/
+Begin directory listing 1
+foo
+foo/a
+foo/a/filea
+foo/b
+foo/b/fileb
+foo/c
+foo/c/filec
+foo/file1
+foo/file2
+End directory listing 1
+foo/
+foo/a/
+foo/b/
+foo/c/
+Begin directory listing 2
+foo
+foo/a
+foo/a/filec
+foo/b
+foo/b/filea
+foo/c
+foo/c/fileb
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename03.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+
+mkdir foo/a
+genfile --file foo/a/filea
+
+mkdir foo/b
+genfile --file foo/b/fileb
+
+mkdir foo/c
+genfile --file foo/c/filec
+
+sleep 1
+
+echo \"First dump\"
+echo \"First dump\">&2
+tar -g incr -cf arch.1 -v foo 2>tmperr
+sort tmperr >&2
+
+# Shuffle directories:
+(cd foo
+mv a \$\$
+mv c a
+mv b c
+mv \$\$ b)
+
+echo \"Second dump\"
+echo \"Second dump\" >&2
+tar -g incr -cf arch.2 -v foo 2>tmperr
+sort tmperr >&2
+
+tar xfg arch.1 /dev/null --warning=no-timestamp
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir foo
+genfile --file foo/file1
+genfile --file foo/file2
+
+mkdir foo/a
+genfile --file foo/a/filea
+
+mkdir foo/b
+genfile --file foo/b/fileb
+
+mkdir foo/c
+genfile --file foo/c/filec
+
+sleep 1
+
+echo "First dump"
+echo "First dump">&2
+tar -g incr -cf arch.1 -v foo 2>tmperr
+sort tmperr >&2
+
+# Shuffle directories:
+(cd foo
+mv a $$
+mv c a
+mv b c
+mv $$ b)
+
+echo "Second dump"
+echo "Second dump" >&2
+tar -g incr -cf arch.2 -v foo 2>tmperr
+sort tmperr >&2
+
+tar xfg arch.1 /dev/null --warning=no-timestamp
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null --warning=no-timestamp
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "First dump
+tar: foo/a: Directory is new
+tar: foo/b: Directory is new
+tar: foo/c: Directory is new
+tar: foo: Directory is new
+Second dump
+tar: foo/a: Directory has been renamed from 'foo/c'
+tar: foo/b: Directory has been renamed from 'foo/a'
+tar: foo/c: Directory has been renamed from 'foo/b'
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "First dump
+foo/
+foo/a/
+foo/b/
+foo/c/
+foo/file1
+foo/file2
+foo/a/filea
+foo/b/fileb
+foo/c/filec
+Second dump
+foo/
+foo/a/
+foo/b/
+foo/c/
+Begin directory listing 1
+foo
+foo/a
+foo/a/filea
+foo/b
+foo/b/fileb
+foo/c
+foo/c/filec
+foo/file1
+foo/file2
+End directory listing 1
+foo/
+foo/a/
+foo/b/
+foo/c/
+Begin directory listing 2
+foo
+foo/a
+foo/a/filec
+foo/b
+foo/b/filea
+foo/c
+foo/c/fileb
+foo/file1
+foo/file2
+End directory listing 2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_110
+#AT_START_111
+at_fn_group_banner 111 'rename04.at:27' \
+ "renamed directory containing subdirectories" " " 13
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "111. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/rename04.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2
+find dir | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2
+find dir | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+Second restore
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+directory
+directory/file
+directory/subdir
+Second restore
+dir
+dir/subdir
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename04.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2
+find dir | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2
+find dir | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+Second restore
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+directory
+directory/file
+directory/subdir
+Second restore
+dir
+dir/subdir
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename04.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2
+find dir | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2
+find dir | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+Second restore
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+directory
+directory/file
+directory/subdir
+Second restore
+dir
+dir/subdir
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_111
+#AT_START_112
+at_fn_group_banner 112 'rename05.at:24' \
+ "renamed subdirectories" " " 13
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "112. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/rename05.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory/subdir directory/subdir.0
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1 --warning=no-timestamp
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2 --warning=no-timestamp
+find dir | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory/subdir directory/subdir.0
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1 --warning=no-timestamp
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2 --warning=no-timestamp
+find dir | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+Second restore
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+directory
+directory/file
+directory/subdir
+Second restore
+dir
+dir/subdir.0
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename05.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory/subdir directory/subdir.0
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1 --warning=no-timestamp
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2 --warning=no-timestamp
+find dir | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory/subdir directory/subdir.0
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1 --warning=no-timestamp
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2 --warning=no-timestamp
+find dir | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+Second restore
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+directory
+directory/file
+directory/subdir
+Second restore
+dir
+dir/subdir.0
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/rename05.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory/subdir directory/subdir.0
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1 --warning=no-timestamp
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2 --warning=no-timestamp
+find dir | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+decho Creating directory structure
+mkdir directory
+mkdir directory/subdir
+genfile --file=directory/file
+
+decho Creating initial archive
+tar -cf archive.1 -g db.1 directory
+
+decho Renaming
+mv directory/subdir directory/subdir.0
+mv directory dir
+
+decho Creating incremental archive
+cp db.1 db.2
+tar -cf archive.2 -g db.2 dir
+
+mv dir orig
+
+decho First restore
+tar -xf archive.1 -g db.1 --warning=no-timestamp
+find directory | sort
+
+decho Second restore
+tar -xf archive.2 -g db.2 --warning=no-timestamp
+find dir | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+Second restore
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating directory structure
+Creating initial archive
+Renaming
+Creating incremental archive
+First restore
+directory
+directory/file
+directory/subdir
+Second restore
+dir
+dir/subdir.0
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_112
+#AT_START_113
+at_fn_group_banner 113 'chtype.at:27' \
+ "changed file types in incrementals" " " 13
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "113. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/chtype.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
+mkdir directory/a
+genfile --file directory/a/a
+
+echo First backup
+tar --create --file=archive.1 --listed-incremental=db.1 directory
+
+sleep 2
+
+# Remove directory b and create a file with this name.
+# Previous versions were not able to restore over this file.
+rm -r directory/b
+genfile --file directory/b
+genfile --file directory/a/b
+
+echo Second backup
+tar --create --file=archive.2 --listed-incremental=db.2 directory
+
+# Delete a
+rm -r directory
+
+echo Restore archive.1
+tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
+find directory | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
+mkdir directory/a
+genfile --file directory/a/a
+
+echo First backup
+tar --create --file=archive.1 --listed-incremental=db.1 directory
+
+sleep 2
+
+# Remove directory b and create a file with this name.
+# Previous versions were not able to restore over this file.
+rm -r directory/b
+genfile --file directory/b
+genfile --file directory/a/b
+
+echo Second backup
+tar --create --file=archive.2 --listed-incremental=db.2 directory
+
+# Delete a
+rm -r directory
+
+echo Restore archive.1
+tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
+find directory | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "First backup
+Second backup
+Restore archive.1
+Restore archive.2
+directory
+directory/a
+directory/a/a
+directory/a/b
+directory/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/chtype.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
+mkdir directory/a
+genfile --file directory/a/a
+
+echo First backup
+tar --create --file=archive.1 --listed-incremental=db.1 directory
+
+sleep 2
+
+# Remove directory b and create a file with this name.
+# Previous versions were not able to restore over this file.
+rm -r directory/b
+genfile --file directory/b
+genfile --file directory/a/b
+
+echo Second backup
+tar --create --file=archive.2 --listed-incremental=db.2 directory
+
+# Delete a
+rm -r directory
+
+echo Restore archive.1
+tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
+find directory | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
+mkdir directory/a
+genfile --file directory/a/a
+
+echo First backup
+tar --create --file=archive.1 --listed-incremental=db.1 directory
+
+sleep 2
+
+# Remove directory b and create a file with this name.
+# Previous versions were not able to restore over this file.
+rm -r directory/b
+genfile --file directory/b
+genfile --file directory/a/b
+
+echo Second backup
+tar --create --file=archive.2 --listed-incremental=db.2 directory
+
+# Delete a
+rm -r directory
+
+echo Restore archive.1
+tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
+find directory | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "First backup
+Second backup
+Restore archive.1
+Restore archive.2
+directory
+directory/a
+directory/a/a
+directory/a/b
+directory/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/chtype.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
+mkdir directory/a
+genfile --file directory/a/a
+
+echo First backup
+tar --create --file=archive.1 --listed-incremental=db.1 directory
+
+sleep 2
+
+# Remove directory b and create a file with this name.
+# Previous versions were not able to restore over this file.
+rm -r directory/b
+genfile --file directory/b
+genfile --file directory/a/b
+
+echo Second backup
+tar --create --file=archive.2 --listed-incremental=db.2 directory
+
+# Delete a
+rm -r directory
+
+echo Restore archive.1
+tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
+find directory | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
+mkdir directory/a
+genfile --file directory/a/a
+
+echo First backup
+tar --create --file=archive.1 --listed-incremental=db.1 directory
+
+sleep 2
+
+# Remove directory b and create a file with this name.
+# Previous versions were not able to restore over this file.
+rm -r directory/b
+genfile --file directory/b
+genfile --file directory/a/b
+
+echo Second backup
+tar --create --file=archive.2 --listed-incremental=db.2 directory
+
+# Delete a
+rm -r directory
+
+echo Restore archive.1
+tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
+find directory | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "First backup
+Second backup
+Restore archive.1
+Restore archive.2
+directory
+directory/a
+directory/a/a
+directory/a/b
+directory/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_113
+#AT_START_114
+at_fn_group_banner 114 'ignfail.at:24' \
+ "ignfail" " " 14
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "114. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/ignfail.at:27:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=\$?
+chmod 600 file
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=\$?
+chmod 600 file
+test \$status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=\$?
+chmod 700 directory
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=\$?
+chmod 700 directory
+test \$status = 0
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=$?
+chmod 600 file
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=$?
+chmod 600 file
+test $status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=$?
+chmod 700 directory
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=$?
+chmod 700 directory
+test $status = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "-----
+tar: file: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/ignfail.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=\$?
+chmod 600 file
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=\$?
+chmod 600 file
+test \$status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=\$?
+chmod 700 directory
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=\$?
+chmod 700 directory
+test \$status = 0
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=$?
+chmod 600 file
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=$?
+chmod 600 file
+test $status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=$?
+chmod 700 directory
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=$?
+chmod 700 directory
+test $status = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "-----
+tar: file: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/ignfail.at:27:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=\$?
+chmod 600 file
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=\$?
+chmod 600 file
+test \$status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=\$?
+chmod 700 directory
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=\$?
+chmod 700 directory
+test \$status = 0
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=$?
+chmod 600 file
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=$?
+chmod 600 file
+test $status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=$?
+chmod 700 directory
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=$?
+chmod 700 directory
+test $status = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "-----
+tar: file: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/ignfail.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=\$?
+chmod 600 file
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=\$?
+chmod 600 file
+test \$status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=\$?
+chmod 700 directory
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=\$?
+chmod 700 directory
+test \$status = 0
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=$?
+chmod 600 file
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=$?
+chmod 600 file
+test $status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=$?
+chmod 700 directory
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=$?
+chmod 700 directory
+test $status = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "-----
+tar: file: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/ignfail.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=\$?
+chmod 600 file
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=\$?
+chmod 600 file
+test \$status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=\$?
+chmod 700 directory
+test \$status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=\$?
+chmod 700 directory
+test \$status = 0
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+# The test is meaningless for super-user.
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+touch file
+mkdir directory
+touch directory/file
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive file
+status=$?
+chmod 600 file
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 file
+tar cf archive --ignore-failed-read file || exit 1
+status=$?
+chmod 600 file
+test $status = 0 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive directory
+status=$?
+chmod 700 directory
+test $status = 2 || exit 1
+
+echo 1>&2 -----
+chmod 000 directory
+tar cf archive --ignore-failed-read directory || exit 1
+status=$?
+chmod 700 directory
+test $status = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "-----
+tar: file: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Exiting with failure status due to previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_114
+#AT_START_115
+at_fn_group_banner 115 'link01.at:34' \
+ "link count gt 2" " " 15
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "115. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/link01.at:37:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "test.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link01.at:37:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "test.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link01.at:37:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "test.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link01.at:37:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "test.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link01.at:37:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt || exit 77
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive --warning=no-timestamp
+
+ls directory/test1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "test.txt
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_115
+#AT_START_116
+at_fn_group_banner 116 'link02.at:32' \
+ "preserve hard links with --remove-files" " " 15
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "116. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/link02.at:35:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link02.at:35:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link02.at:35:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link02.at:35:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link02.at:35:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+tar -c -f archive --remove-files file1 file2 file3 file4
+tar tfv archive | sed -n 's/.*file[2-4] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "file1
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_116
+#AT_START_117
+at_fn_group_banner 117 'link03.at:24' \
+ "working -l with --remove-files" " " 15
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "117. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/link03.at:34:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "archive.1
+archive.2
+testing archive.2
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link03.at:34:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "archive.1
+archive.2
+testing archive.2
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link03.at:34:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "archive.1
+archive.2
+testing archive.2
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link03.at:34:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "archive.1
+archive.2
+testing archive.2
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link03.at:34:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.1
+tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
+
+genfile -l 64 -f file1
+ln file1 file2
+ln file2 file3
+ln file3 file4
+
+echo archive.2
+tar -c -f archive.2 -l --remove-files file1 file2 file3
+echo testing archive.2
+tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "archive.1
+archive.2
+testing archive.2
+file1
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_117
+#AT_START_118
+at_fn_group_banner 118 'link04.at:29' \
+ "link count is 1 but multiple occurrences" " " 15
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "118. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/link04.at:32:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/
+dir/file
+dir/file link to dir/file
+dir/symlink -> file
+dir/symlink link to dir/symlink
+--
+==
+dir/
+dir/FOO
+dir/FOO link to dir/FOO
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link04.at:32:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/
+dir/file
+dir/file link to dir/file
+dir/symlink -> file
+dir/symlink link to dir/symlink
+--
+==
+dir/
+dir/FOO
+dir/FOO link to dir/FOO
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link04.at:32:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/
+dir/file
+dir/file link to dir/file
+dir/symlink -> file
+dir/symlink link to dir/symlink
+--
+==
+dir/
+dir/FOO
+dir/FOO link to dir/FOO
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link04.at:32:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/
+dir/file
+dir/file link to dir/file
+dir/symlink -> file
+dir/symlink link to dir/symlink
+--
+==
+dir/
+dir/FOO
+dir/FOO link to dir/FOO
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/link04.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir dir
+echo TEST > dir/file
+ln -s file dir/symlink || exit 77
+
+tar cf archive dir dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+' | sort
+
+echo --
+
+tar cfl archive dir dir
+
+echo ==
+
+tar chf archive dir
+tar tvf archive | sed '
+ s,.*[0-9] dir/,dir/,
+ s,file,FOO,g
+ s,symlink,FOO,g
+' | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/
+dir/
+dir/file
+dir/file link to dir/file
+dir/symlink -> file
+dir/symlink link to dir/symlink
+--
+==
+dir/
+dir/FOO
+dir/FOO link to dir/FOO
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_118
+#AT_START_119
+at_fn_group_banner 119 'longv7.at:25' \
+ "long names in V7 archives" " " 16
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "119. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/longv7.at:31:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
+touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
+
+tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
+echo separator
+tar tf archive
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "longv7.at:31"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
+touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
+
+tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
+echo separator
+tar tf archive
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c: file name is too long (max 99); not dumped
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+this_is_a_very_long_name_for_a_directory_which_causes_problems/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/longv7.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_119
+#AT_START_120
+at_fn_group_banner 120 'long01.at:28' \
+ "long file names divisible by block size" " " 16
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "120. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/long01.at:36:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
+echo test > endfile
+
+tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
+tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
+echo test > endfile
+
+tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
+tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde
+endfile
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/long01.at:36:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
+echo test > endfile
+
+tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
+tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
+echo test > endfile
+
+tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
+tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde
+endfile
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_120
+#AT_START_121
+at_fn_group_banner 121 'lustar01.at:21' \
+ "ustar: unsplittable file name" " " 16
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "121. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/lustar01.at:27:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77
+tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "lustar01.at:27"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77
+tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix: file name is too long (cannot be split); not dumped
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/lustar01.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_121
+#AT_START_122
+at_fn_group_banner 122 'lustar02.at:21' \
+ "ustar: unsplittable path name" " " 16
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "122. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/lustar02.at:32:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77
+tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "lustar02.at:32"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77
+tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/: file name is too long (cannot be split); not dumped
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/lustar02.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_122
+#AT_START_123
+at_fn_group_banner 123 'lustar03.at:21' \
+ "ustar: splitting long names" " " 16
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "123. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/lustar03.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77
+echo \"Create archive\"
+tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
+echo \"List archive\"
+tar tf archive)"
+at_fn_check_prepare_notrace 'an embedded newline' "lustar03.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77
+echo "Create archive"
+tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
+echo "List archive"
+tar tf archive)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Create archive
+List archive
+this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/
+this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/lustar03.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_123
+#AT_START_124
+at_fn_group_banner 124 'old.at:23' \
+ "old archives" " " 16
+at_xfail=no
+(
+ $as_echo "124. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+{ set +x
+$as_echo "$at_srcdir/old.at:27:
+mkdir directory
+tar cfvo archive directory || exit 1
+tar tf archive
+"
+at_fn_check_prepare_notrace 'an embedded newline' "old.at:27"
+( $at_check_trace;
+mkdir directory
+tar cfvo archive directory || exit 1
+tar tf archive
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+directory/
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/old.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_124
+#AT_START_125
+at_fn_group_banner 125 'time01.at:20' \
+ "time: tricky time stamps" " " 16
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "125. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/time01.at:23:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+export TZ=UTC0
+mkdir dir
+
+# Test files with time stamps that are near common sources of error,
+# typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
+# Use GNU-style @ notation for very large time stamps, since they
+# typically don't render into years correctly due to int overflow.
+for s in \\
+ @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \\
+ 0000-01-01T00:00:00 0000-01-01T00:00:01 \\
+ 0000-01-02T00:00:00 \\
+ 1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \\
+ 1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \\
+ 1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \\
+ 1901-12-14T20:45:51 \\
+ 1969-12-31T23:59:58 1969-12-31T23:59:59 \\
+ 1970-01-01T00:00:00 1970-01-01T00:00:01 \\
+ 2038-01-18T03:14:07 \\
+ 2038-01-19T03:14:07 2038-01-19T03:14:08 \\
+ 2106-02-07T06:28:15 2106-02-07T06:28:16 \\
+ 2242-03-16T12:56:31 2242-03-16T12:56:32 \\
+ 9999-12-31T23:59:58 9999-12-31T23:59:59 \\
+ @9223372036854775807 @9223372036854775808
+do
+ # Skip a time stamp \$s if it's out of range for this platform,
+ # of if it uses a notation that this platform does not recognize.
+ touch -d \$s dir/f\$s >/dev/null 2>&1 || continue
+
+ # Likewise for \$s.1. If \$s is the most negative time stamp and
+ # time stamps are signed, then \$s.1 is out of range.
+ touch -d \$s.1 dir/f\$s.\$ns >/dev/null 2>&1 || continue
+
+ for frac in 01 001 00001 000001 0000001 00000001 000000001 0000000001 \\
+ 9 99 999 99999 999999 9999999 99999999 999999999 9999999999
+ do
+ touch -d \$s.\$frac dir/f\$s.\$frac
+ done
+done
+
+tar -c -f archive.tar dir
+tar -d -f archive.tar dir
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "time01.at:23"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+export TZ=UTC0
+mkdir dir
+
+# Test files with time stamps that are near common sources of error,
+# typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
+# Use GNU-style @ notation for very large time stamps, since they
+# typically don't render into years correctly due to int overflow.
+for s in \
+ @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \
+ 0000-01-01T00:00:00 0000-01-01T00:00:01 \
+ 0000-01-02T00:00:00 \
+ 1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \
+ 1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \
+ 1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \
+ 1901-12-14T20:45:51 \
+ 1969-12-31T23:59:58 1969-12-31T23:59:59 \
+ 1970-01-01T00:00:00 1970-01-01T00:00:01 \
+ 2038-01-18T03:14:07 \
+ 2038-01-19T03:14:07 2038-01-19T03:14:08 \
+ 2106-02-07T06:28:15 2106-02-07T06:28:16 \
+ 2242-03-16T12:56:31 2242-03-16T12:56:32 \
+ 9999-12-31T23:59:58 9999-12-31T23:59:59 \
+ @9223372036854775807 @9223372036854775808
+do
+ # Skip a time stamp $s if it's out of range for this platform,
+ # of if it uses a notation that this platform does not recognize.
+ touch -d $s dir/f$s >/dev/null 2>&1 || continue
+
+ # Likewise for $s.1. If $s is the most negative time stamp and
+ # time stamps are signed, then $s.1 is out of range.
+ touch -d $s.1 dir/f$s.$ns >/dev/null 2>&1 || continue
+
+ for frac in 01 001 00001 000001 0000001 00000001 000000001 0000000001 \
+ 9 99 999 99999 999999 9999999 99999999 999999999 9999999999
+ do
+ touch -d $s.$frac dir/f$s.$frac
+ done
+done
+
+tar -c -f archive.tar dir
+tar -d -f archive.tar dir
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/time01.at:23"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_125
+#AT_START_126
+at_fn_group_banner 126 'time02.at:20' \
+ "time: clamping mtime" " " 16
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "126. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/time02.at:23:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+export TZ=UTC0
+mkdir dir
+
+touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || exit 77
+touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || exit 77
+touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || exit 77
+touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || exit 77
+
+tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir
+tar -d -f archive.tar dir|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "time02.at:23"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+export TZ=UTC0
+mkdir dir
+
+touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || exit 77
+touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || exit 77
+touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || exit 77
+touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || exit 77
+
+tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir
+tar -d -f archive.tar dir|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/c: Mod time differs
+dir/d: Mod time differs
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/time02.at:23"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_126
+#AT_START_127
+at_fn_group_banner 127 'multiv01.at:24' \
+ "multivolume dumps from pipes" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "127. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Fixme: should be configurable
+# TRUSS=truss -o /tmp/tr
+# TRUSS=strace
+
+
+
+ { set +x
+$as_echo "$at_srcdir/multiv01.at:31:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 7168 --file file1
+
+for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
+ \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
+ echo \"file2 block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
+ for count in 2 3 4 5 6 7 8 ; do
+ echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
+ done
+done >file2
+
+if test \$TEST_TAR_FORMAT = pax; then
+ TAPE_LENGTH=11
+else
+ TAPE_LENGTH=10
+fi
+
+tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
+ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
+
+mkdir extract-dir-pipe
+dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
+PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
+ -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
+ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)"
+at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 7168 --file file1
+
+for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
+ " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
+ echo "file2 block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+ for count in 2 3 4 5 6 7 8 ; do
+ echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+ done
+done >file2
+
+if test $TEST_TAR_FORMAT = pax; then
+ TAPE_LENGTH=11
+else
+ TAPE_LENGTH=10
+fi
+
+tar -c --multi-volume --tape-length=$TAPE_LENGTH \
+ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
+
+mkdir extract-dir-pipe
+dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
+PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
+ -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
+ --tape-length=$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv01.at:31:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 7168 --file file1
+
+for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
+ \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
+ echo \"file2 block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
+ for count in 2 3 4 5 6 7 8 ; do
+ echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
+ done
+done >file2
+
+if test \$TEST_TAR_FORMAT = pax; then
+ TAPE_LENGTH=11
+else
+ TAPE_LENGTH=10
+fi
+
+tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
+ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
+
+mkdir extract-dir-pipe
+dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
+PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
+ -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
+ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)"
+at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 7168 --file file1
+
+for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
+ " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
+ echo "file2 block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+ for count in 2 3 4 5 6 7 8 ; do
+ echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+ done
+done >file2
+
+if test $TEST_TAR_FORMAT = pax; then
+ TAPE_LENGTH=11
+else
+ TAPE_LENGTH=10
+fi
+
+tar -c --multi-volume --tape-length=$TAPE_LENGTH \
+ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
+
+mkdir extract-dir-pipe
+dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
+PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
+ -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
+ --tape-length=$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv01.at:31:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 7168 --file file1
+
+for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
+ \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
+ echo \"file2 block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
+ for count in 2 3 4 5 6 7 8 ; do
+ echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
+ done
+done >file2
+
+if test \$TEST_TAR_FORMAT = pax; then
+ TAPE_LENGTH=11
+else
+ TAPE_LENGTH=10
+fi
+
+tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
+ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
+
+mkdir extract-dir-pipe
+dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
+PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
+ -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
+ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)"
+at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+genfile --length 7168 --file file1
+
+for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
+ " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
+ echo "file2 block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+ for count in 2 3 4 5 6 7 8 ; do
+ echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+ done
+done >file2
+
+if test $TEST_TAR_FORMAT = pax; then
+ TAPE_LENGTH=11
+else
+ TAPE_LENGTH=10
+fi
+
+tar -c --multi-volume --tape-length=$TAPE_LENGTH \
+ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
+
+mkdir extract-dir-pipe
+dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
+PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
+ -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
+ --tape-length=$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_127
+#AT_START_128
+at_fn_group_banner 128 'multiv02.at:29' \
+ "skipping a straddling member" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "128. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/multiv02.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 10240 --file en
+genfile --length 20000 --file to
+genfile --length 20000 --file tre
+genfile --length 10240 --file fire
+
+exec <&-
+
+tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 10240 --file en
+genfile --length 20000 --file to
+genfile --length 20000 --file tre
+genfile --length 10240 --file fire
+
+exec <&-
+
+tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+en
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv02.at:32:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 10240 --file en
+genfile --length 20000 --file to
+genfile --length 20000 --file tre
+genfile --length 10240 --file fire
+
+exec <&-
+
+tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 10240 --file en
+genfile --length 20000 --file to
+genfile --length 20000 --file tre
+genfile --length 10240 --file fire
+
+exec <&-
+
+tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+en
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv02.at:32:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 10240 --file en
+genfile --length 20000 --file to
+genfile --length 20000 --file tre
+genfile --length 10240 --file fire
+
+exec <&-
+
+tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 10240 --file en
+genfile --length 20000 --file to
+genfile --length 20000 --file tre
+genfile --length 10240 --file fire
+
+exec <&-
+
+tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+en
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_128
+#AT_START_129
+at_fn_group_banner 129 'multiv03.at:30' \
+ "MV archive & long filenames" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "129. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/multiv03.at:33:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
+BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
+
+cat > ../experr <<EOF
+tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
+tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
+EOF
+
+cat > ../expout <<EOF
+\$AFILE
+separator-1
+separator-2
+EOF
+
+genfile --length 15360 --file \$AFILE
+
+exec <&-
+
+tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
+tar -tM -f arch.1 -f arch.2 || exit 1
+
+echo separator-1
+
+genfile --length 15360 --file \$BFILE
+tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
+
+echo separator-2
+mv \$BFILE bfile
+tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
+cmp \$BFILE bfile
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
+BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
+
+cat > ../experr <<EOF
+tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
+tar: '$BFILE' is possibly continued on this volume: header contains truncated name
+EOF
+
+cat > ../expout <<EOF
+$AFILE
+separator-1
+separator-2
+EOF
+
+genfile --length 15360 --file $AFILE
+
+exec <&-
+
+tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
+tar -tM -f arch.1 -f arch.2 || exit 1
+
+echo separator-1
+
+genfile --length 15360 --file $BFILE
+tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
+
+echo separator-2
+mv $BFILE bfile
+tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
+cmp $BFILE bfile
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+$at_diff experr "$at_stderr" || at_failed=:
+$at_diff expout "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv03.at:33:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
+BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
+
+cat > ../experr <<EOF
+tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
+tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
+EOF
+
+cat > ../expout <<EOF
+\$AFILE
+separator-1
+separator-2
+EOF
+
+genfile --length 15360 --file \$AFILE
+
+exec <&-
+
+tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
+tar -tM -f arch.1 -f arch.2 || exit 1
+
+echo separator-1
+
+genfile --length 15360 --file \$BFILE
+tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
+
+echo separator-2
+mv \$BFILE bfile
+tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
+cmp \$BFILE bfile
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
+BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
+
+cat > ../experr <<EOF
+tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
+tar: '$BFILE' is possibly continued on this volume: header contains truncated name
+EOF
+
+cat > ../expout <<EOF
+$AFILE
+separator-1
+separator-2
+EOF
+
+genfile --length 15360 --file $AFILE
+
+exec <&-
+
+tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
+tar -tM -f arch.1 -f arch.2 || exit 1
+
+echo separator-1
+
+genfile --length 15360 --file $BFILE
+tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
+
+echo separator-2
+mv $BFILE bfile
+tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
+cmp $BFILE bfile
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+$at_diff experr "$at_stderr" || at_failed=:
+$at_diff expout "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_129
+#AT_START_130
+at_fn_group_banner 130 'multiv04.at:36' \
+ "split directory members in a MV archive" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "130. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/multiv04.at:39:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
+
+exec <&-
+
+sleep 2
+
+tar --listed-incremental=list -c -f archive.a directory
+
+sleep 2
+
+tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
+
+echo separator
+
+tar -MRt -f arc.1 -f arc.2)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
+
+exec <&-
+
+sleep 2
+
+tar --listed-incremental=list -c -f archive.a directory
+
+sleep 2
+
+tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
+
+echo separator
+
+tar -MRt -f arc.1 -f arc.2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+separator
+block 0: directory/
+block 35: ** Block of NULs **
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv04.at:39:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
+
+exec <&-
+
+sleep 2
+
+tar --listed-incremental=list -c -f archive.a directory
+
+sleep 2
+
+tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
+
+echo separator
+
+tar -MRt -f arc.1 -f arc.2)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+mkdir directory
+awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
+
+exec <&-
+
+sleep 2
+
+tar --listed-incremental=list -c -f archive.a directory
+
+sleep 2
+
+tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
+
+echo separator
+
+tar -MRt -f arc.1 -f arc.2)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "directory/
+separator
+block 0: directory/
+block 35: ** Block of NULs **
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_130
+#AT_START_131
+at_fn_group_banner 131 'multiv05.at:26' \
+ "Restoring after an out of sync volume" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "131. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/multiv05.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+
+genfile --length 250k --file jeden
+genfile --length 250k --file dwa
+genfile --length 250k --file trzy
+genfile --length 250k --file cztery
+genfile --length 250k --file piec
+genfile --length 250k --file szesc
+
+
+echo Creating archive
+tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
+echo separator
+mkdir bak
+mv jeden dwa trzy cztery piec szesc bak
+tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
+echo Diffing jeden
+ cmp bak/jeden jeden || exit 1
+echo Diffing dwa
+ cmp bak/dwa dwa || exit 1
+echo Diffing trzy
+ cmp bak/trzy trzy || exit 1
+echo Diffing cztery
+ cmp bak/cztery cztery || exit 1
+echo Diffing piec
+ cmp bak/piec piec || exit 1
+echo Diffing szesc
+ cmp bak/szesc szesc || exit 1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv05.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+
+genfile --length 250k --file jeden
+genfile --length 250k --file dwa
+genfile --length 250k --file trzy
+genfile --length 250k --file cztery
+genfile --length 250k --file piec
+genfile --length 250k --file szesc
+
+
+echo Creating archive
+tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
+echo separator
+mkdir bak
+mv jeden dwa trzy cztery piec szesc bak
+tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
+echo Diffing jeden
+ cmp bak/jeden jeden || exit 1
+echo Diffing dwa
+ cmp bak/dwa dwa || exit 1
+echo Diffing trzy
+ cmp bak/trzy trzy || exit 1
+echo Diffing cztery
+ cmp bak/cztery cztery || exit 1
+echo Diffing piec
+ cmp bak/piec piec || exit 1
+echo Diffing szesc
+ cmp bak/szesc szesc || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: 'trzy' is not continued on this volume
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating archive
+separator
+jeden
+dwa
+trzy
+cztery
+piec
+szesc
+Diffing jeden
+Diffing dwa
+Diffing trzy
+Diffing cztery
+Diffing piec
+Diffing szesc
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv05.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_131
+#AT_START_132
+at_fn_group_banner 132 'multiv06.at:27' \
+ "Multivolumes with L=record_size" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "132. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/multiv06.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+decho Creating file
+genfile --length 20139 --file file
+decho Creating archive
+tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
+decho Testing archive
+tar -t -M -farc.1 -farc.2 -farc.3)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+decho Creating file
+genfile --length 20139 --file file
+decho Creating archive
+tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
+decho Testing archive
+tar -t -M -farc.1 -farc.2 -farc.3)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating file
+Creating archive
+Testing archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating file
+Creating archive
+Testing archive
+file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv06.at:30:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+decho Creating file
+genfile --length 20139 --file file
+decho Creating archive
+tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
+decho Testing archive
+tar -t -M -farc.1 -farc.2 -farc.3)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+decho Creating file
+genfile --length 20139 --file file
+decho Creating archive
+tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
+decho Testing archive
+tar -t -M -farc.1 -farc.2 -farc.3)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating file
+Creating archive
+Testing archive
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating file
+Creating archive
+Testing archive
+file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_132
+#AT_START_133
+at_fn_group_banner 133 'multiv07.at:28' \
+ "volumes split at an extended header" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "133. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/multiv07.at:31:
+
+
+test -z \"\$TEST_DATA_DIR\" && exit 77
+tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
+
+test -z \"\$TEST_DATA_DIR\" && exit 77
+tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
+
+exec <&-
+
+cd \$TEST_DATA_DIR
+tar -t -M -fxsplit-1.tar -fxsplit-2.tar
+"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv07.at:31"
+( $at_check_trace;
+
+
+test -z "$TEST_DATA_DIR" && exit 77
+tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
+
+test -z "$TEST_DATA_DIR" && exit 77
+tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
+
+exec <&-
+
+cd $TEST_DATA_DIR
+tar -t -M -fxsplit-1.tar -fxsplit-2.tar
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Archive volumes split at an extended header Volume 1
+foo
+bar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv07.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_133
+#AT_START_134
+at_fn_group_banner 134 'multiv08.at:25' \
+ "multivolume header creation" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "134. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/multiv08.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 9472 --file a
+genfile --length 9984 --file b
+decho Creating
+tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
+decho Testing
+tar -tMR -f A.tar -f B.tar -f C.tar
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv08.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 9472 --file a
+genfile --length 9984 --file b
+decho Creating
+tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
+decho Testing
+tar -tMR -f A.tar -f B.tar -f C.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "Creating
+Testing
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Creating
+Testing
+block 0: a
+block 21: b
+block 43: ** Block of NULs **
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multiv08.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_134
+#AT_START_135
+at_fn_group_banner 135 'multiv09.at:26' \
+ "bad next volume" " " 17
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "135. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# filename of length 100 characters
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/multiv09.at:33:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
+echo \"created\"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
+echo "created"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "created
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv09.at:33:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
+echo \"created\"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
+echo "created"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "created
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv09.at:33:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
+echo \"created\"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
+echo "created"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "created
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv09.at:33:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
+echo \"created\"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
+echo "created"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "created
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/multiv09.at:33:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
+echo \"created\"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
+echo "created"
+tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
+y
+q
+EOF
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "created
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_135
+#AT_START_136
+at_fn_group_banner 136 'owner.at:21' \
+ "--owner and --group" " " 18
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "136. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/owner.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+export TZ=UTC0
+
+genfile --file a
+
+tar --owner=\"Joe the Plumber:1234\" \\
+ --group=\"Plumber's Union:5678\" \\
+ --mtime='@0' \\
+ --mode='u=rw,go=r' \\
+ -cf arc a
+
+tar -tvf arc
+tar --numeric-owner -tvf arc
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "owner.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+export TZ=UTC0
+
+genfile --file a
+
+tar --owner="Joe the Plumber:1234" \
+ --group="Plumber's Union:5678" \
+ --mtime='@0' \
+ --mode='u=rw,go=r' \
+ -cf arc a
+
+tar -tvf arc
+tar --numeric-owner -tvf arc
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
+-rw-r--r-- 1234/5678 0 1970-01-01 00:00 a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/owner.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_136
+#AT_START_137
+at_fn_group_banner 137 'map.at:21' \
+ "--owner-map and --group-map" " " 18
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "137. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/map.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+export TZ=UTC0
+
+genfile --file a
+set -- \`genfile --stat=uid,gid a\`
+cat > uid.map <<EOT
+# Owner mapping
++\$1 \"Joe the Plumber:1234\"
+EOT
+# Group mapping
+cat > gid.map <<EOT
++\$2 \"Plumber's Union:5678\"
+EOT
+
+tar --owner-map=uid.map\\
+ --group-map=gid.map\\
+ --owner=\"Fallback Owner:4321\" \\
+ --group=\"Fallback Group:8765\" \\
+ --mtime='@0' \\
+ --mode='u=rw,go=r' \\
+ -cf 1.tar a
+
+tar -tvf 1.tar
+tar --numeric-owner -tvf 1.tar
+
+> uid.map
+> gid.map
+
+tar --owner-map=uid.map\\
+ --group-map=gid.map\\
+ --owner=\"Fallback Owner:4321\" \\
+ --group=\"Fallback Group:8765\" \\
+ --mtime='@0' \\
+ --mode='u=rw,go=r' \\
+ -cf 2.tar a
+
+tar -tvf 2.tar
+tar --numeric-owner -tvf 2.tar
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "map.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+export TZ=UTC0
+
+genfile --file a
+set -- `genfile --stat=uid,gid a`
+cat > uid.map <<EOT
+# Owner mapping
++$1 "Joe the Plumber:1234"
+EOT
+# Group mapping
+cat > gid.map <<EOT
++$2 "Plumber's Union:5678"
+EOT
+
+tar --owner-map=uid.map\
+ --group-map=gid.map\
+ --owner="Fallback Owner:4321" \
+ --group="Fallback Group:8765" \
+ --mtime='@0' \
+ --mode='u=rw,go=r' \
+ -cf 1.tar a
+
+tar -tvf 1.tar
+tar --numeric-owner -tvf 1.tar
+
+> uid.map
+> gid.map
+
+tar --owner-map=uid.map\
+ --group-map=gid.map\
+ --owner="Fallback Owner:4321" \
+ --group="Fallback Group:8765" \
+ --mtime='@0' \
+ --mode='u=rw,go=r' \
+ -cf 2.tar a
+
+tar -tvf 2.tar
+tar --numeric-owner -tvf 2.tar
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
+-rw-r--r-- 1234/5678 0 1970-01-01 00:00 a
+-rw-r--r-- Fallback Owner/Fallback Group 0 1970-01-01 00:00 a
+-rw-r--r-- 4321/8765 0 1970-01-01 00:00 a
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/map.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_137
+#AT_START_138
+at_fn_group_banner 138 'sparse01.at:22' \
+ "sparse files" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "138. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/sparse01.at:25:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 1000 -f begin
+genfile --length 1000 -f end
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive --warning=no-timestamp
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 1000 -f begin
+genfile --length 1000 -f end
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive --warning=no-timestamp
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/sparse01.at:25:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 1000 -f begin
+genfile --length 1000 -f end
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive --warning=no-timestamp
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 1000 -f begin
+genfile --length 1000 -f end
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive --warning=no-timestamp
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/sparse01.at:25:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 1000 -f begin
+genfile --length 1000 -f end
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive --warning=no-timestamp
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 1000 -f begin
+genfile --length 1000 -f end
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive --warning=no-timestamp
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+cat >stdout.re <<'_ATEOF'
+separator
+-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
+-rw-r--r-- ^ ^ * *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
+-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
+separator
+sparsefile 10344448
+_ATEOF
+
+awk '{print NR " " $0}' stdout > $$.1
+awk '{print NR " " $0}' stdout.re | join - $$.1 |
+while read NUM RE LINE
+do
+ echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
+done
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_138
+#AT_START_139
+at_fn_group_banner 139 'sparse02.at:22' \
+ "extracting sparse file over a pipe" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "139. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
+# References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
+# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
+
+
+
+ { set +x
+$as_echo "$at_srcdir/sparse02.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/sparse02.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/sparse02.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
+tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_139
+#AT_START_140
+at_fn_group_banner 140 'sparse03.at:21' \
+ "storing sparse files > 8G" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "140. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Tar 1.15.1 incorrectly computed sparse member size if the extended
+# PAX header contained size keyword.
+# References: <87vf46nb36.fsf@penguin.cs.ucla.edu>
+# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
+
+
+
+ { set +x
+$as_echo "$at_srcdir/sparse03.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 1000 --file begin
+genfile --length 1000 --file end
+genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse03.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 1000 --file begin
+genfile --length 1000 --file end
+genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+echo separator
+mkdir directory
+tar Cxf directory archive
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/sparse03.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+cat >stdout.re <<'_ATEOF'
+separator
+-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
+-rw-r--r-- ^ ^ * *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
+-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
+separator
+sparsefile 8589935104
+_ATEOF
+
+awk '{print NR " " $0}' stdout > $$.1
+awk '{print NR " " $0}' stdout.re | join - $$.1 |
+while read NUM RE LINE
+do
+ echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
+done
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_140
+#AT_START_141
+at_fn_group_banner 141 'sparse04.at:21' \
+ "storing long sparse file names" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "141. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Description: Tar versions from 1.15.92 to 1.25 would incorrectly
+# store sparse file names longer than 100 characters in pax mode.
+# Namely, the 'path' keyword of the produced PAX header would contain the
+# crafted name of the header itself, instead of that of the file.
+# Reported by: Kamil Dudka <kdudka@redhat.com>
+# References: <201011250026.44908.kdudka@redhat.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/sparse04.at:35:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
+tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse04.at:35"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
+tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sparse04.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_141
+#AT_START_142
+at_fn_group_banner 142 'sparse05.at:21' \
+ "listing sparse files bigger than 2^33 B" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "142. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Description: If an archive in POSIX.1-2001 archive contained a sparse file
+# member whose real size (excluding zero blocks) is bigger than 2^33 bytes,
+# tar 1.28 would incorrectly list the real member size.
+# Reported by: Pavel Raiskup <praiskup@redhat.com>
+# References: <1359119879.15037.4.camel@raiskup>,
+# http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html
+
+
+
+ { set +x
+$as_echo "$at_srcdir/sparse05.at:31:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+cat >mapfile <<'_ATEOF'
+0 =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+_ATEOF
+
+genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77
+tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print \$3, \$(NF) }'
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "sparse05.at:31"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+cat >mapfile <<'_ATEOF'
+0 =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+10M =2560
+_ATEOF
+
+genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77
+tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print $3, $(NF) }'
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "20961034240 BIGFILE
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sparse05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_142
+#AT_START_143
+at_fn_group_banner 143 'sparse06.at:21' \
+ "storing sparse file using seek method" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "143. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/sparse06.at:32:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+checkseekhole || exit 77
+
+
+TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=seek\"
+genfile --sparse --file bigsparse 0 ABC 8G DEF
+tar -cSf a bigsparse
+test \$? -eq 0 || exit 1
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 0 ABC
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 0 ABC 10M
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 0 ABC 10M DEF
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 10M
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 10M ABC
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 10M ABC 20M
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 10M DEF 20M GHI 30M JKL 40M
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparse06.at:32"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+checkseekhole || exit 77
+
+
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=seek"
+genfile --sparse --file bigsparse 0 ABC 8G DEF
+tar -cSf a bigsparse
+test $? -eq 0 || exit 1
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 0 ABC
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 0 ABC 10M
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 0 ABC 10M DEF
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 10M
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 10M ABC
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 10M ABC 20M
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+
+rm -rf out archive.tar smallsparse && mkdir out
+genfile --sparse --quiet --file smallsparse 10M DEF 20M GHI 30M JKL 40M
+tar -cSf archive.tar smallsparse
+tar -xf archive.tar -C out
+cmp smallsparse out/smallsparse
+
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sparse06.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_143
+#AT_START_144
+at_fn_group_banner 144 'sparsemv.at:21' \
+ "sparse files in MV archives" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "144. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Check if sparse files are correctly split between GNU multi-volume
+# archives.
+# There are two cases: the file can be split within an empty (null) block,
+# or within a data block. Since null blocks are not archived, the first
+# case means the file is split between two consecutive data blocks.
+#
+
+
+
+ { set +x
+$as_echo "$at_srcdir/sparsemv.at:31:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
+echo \"Pass 1: Split between data blocks\"
+echo \"Create archive\"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo \"Test archive\"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo \"Compare archive\"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+
+echo \"Pass 2: Split within a data block\"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
+echo \"Create archive\"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo \"Test archive\"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo \"Compare archive\"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
+echo "Pass 1: Split between data blocks"
+echo "Create archive"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo "Test archive"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+
+echo "Pass 2: Split within a data block"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
+echo "Create archive"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo "Test archive"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
+Create archive
+Test archive
+sparsefile
+Compare archive
+Pass 2: Split within a data block
+Create archive
+Test archive
+sparsefile
+Compare archive
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/sparsemv.at:31:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
+echo \"Pass 1: Split between data blocks\"
+echo \"Create archive\"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo \"Test archive\"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo \"Compare archive\"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+
+echo \"Pass 2: Split within a data block\"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
+echo \"Create archive\"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo \"Test archive\"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo \"Compare archive\"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
+echo "Pass 1: Split between data blocks"
+echo "Create archive"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo "Test archive"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+
+echo "Pass 2: Split within a data block"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
+echo "Create archive"
+tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
+echo "Test archive"
+tar --record-size=512 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar --record-size=512 -d -M -f arc.1 -f arc.2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
+Create archive
+Test archive
+sparsefile
+Compare archive
+Pass 2: Split within a data block
+Create archive
+Test archive
+sparsefile
+Compare archive
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_144
+#AT_START_145
+at_fn_group_banner 145 'spmvp00.at:21' \
+ "sparse files in PAX MV archives, v.0.0" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "145. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/spmvp00.at:24:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
+genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
+echo \"Pass 1: Split between data blocks\"
+echo \"Create archive\"
+tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo \"Test archive\"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo \"Compare archive\"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+
+echo \"Pass 2: Split within a data block\"
+genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
+echo \"Create archive\"
+tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo \"Test archive\"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo \"Compare archive\"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "spmvp00.at:24"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
+genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
+echo "Pass 1: Split between data blocks"
+echo "Create archive"
+tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo "Test archive"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+
+echo "Pass 2: Split within a data block"
+genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
+echo "Create archive"
+tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo "Test archive"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
+Create archive
+Test archive
+sparsefile
+Compare archive
+Pass 2: Split within a data block
+Create archive
+Test archive
+sparsefile
+Compare archive
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/spmvp00.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_145
+#AT_START_146
+at_fn_group_banner 146 'spmvp01.at:21' \
+ "sparse files in PAX MV archives, v.0.1" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "146. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/spmvp01.at:24:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
+echo \"Pass 1: Split between data blocks\"
+echo \"Create archive\"
+tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo \"Test archive\"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo \"Compare archive\"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+
+echo \"Pass 2: Split within a data block\"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
+echo \"Create archive\"
+tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo \"Test archive\"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo \"Compare archive\"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "spmvp01.at:24"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
+echo "Pass 1: Split between data blocks"
+echo "Create archive"
+tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo "Test archive"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+
+echo "Pass 2: Split within a data block"
+genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
+echo "Create archive"
+tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo "Test archive"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
+Create archive
+Test archive
+sparsefile
+Compare archive
+Pass 2: Split within a data block
+Create archive
+Test archive
+sparsefile
+Compare archive
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/spmvp01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_146
+#AT_START_147
+at_fn_group_banner 147 'spmvp10.at:21' \
+ "sparse files in PAX MV archives, v.1.0" " " 19
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "147. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/spmvp10.at:24:
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H pax\"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
+genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
+echo \"Pass 1: Split between data blocks\"
+echo \"Create archive\"
+tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo \"Test archive\"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo \"Compare archive\"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+
+echo \"Pass 2: Split within a data block\"
+genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
+echo \"Create archive\"
+tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo \"Test archive\"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo \"Compare archive\"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "spmvp10.at:24"
+( $at_check_trace;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
+genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
+echo "Pass 1: Split between data blocks"
+echo "Create archive"
+tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo "Test archive"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+
+echo "Pass 2: Split within a data block"
+genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
+echo "Create archive"
+tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
+echo "Test archive"
+tar -t -M -f arc.1 -f arc.2 -f arc.3
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2 -f arc.3
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
+Create archive
+Test archive
+sparsefile
+Compare archive
+Pass 2: Split within a data block
+Create archive
+Test archive
+sparsefile
+Compare archive
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/spmvp10.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_147
+#AT_START_148
+at_fn_group_banner 148 'update.at:28' \
+ "update unchanged directories" " " 20
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "148. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/update.at:31:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update.at:31:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update.at:31:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update.at:31:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update.at:31:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_148
+#AT_START_149
+at_fn_group_banner 149 'update01.at:29' \
+ "update directories" " " 20
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "149. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/update01.at:32:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/c
+separator
+a/
+a/b
+a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update01.at:32:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/c
+separator
+a/
+a/b
+a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update01.at:32:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/c
+separator
+a/
+a/b
+a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update01.at:32:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/c
+separator
+a/
+a/b
+a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update01.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/c
+separator
+a/
+a/b
+a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_149
+#AT_START_150
+at_fn_group_banner 150 'update02.at:26' \
+ "update changed files" " " 20
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "150. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/update02.at:29:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/b
+separator
+a/
+a/b
+a/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update02.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/b
+separator
+a/
+a/b
+a/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update02.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/b
+separator
+a/
+a/b
+a/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update02.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/b
+separator
+a/
+a/b
+a/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/update02.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo \"separator\"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo \"separator\"
+tar tf arc | sort || exit 1
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+a/b
+separator
+a/
+a/b
+a/b
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_150
+#AT_START_151
+at_fn_group_banner 151 'verify.at:25' \
+ "verify" " " 21
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "151. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/verify.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+Verify foo
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/verify.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+Verify foo
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/verify.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+Verify foo
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/verify.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+Verify foo
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/verify.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar -cvf archive.tar --verify foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+Verify foo
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_151
+#AT_START_152
+at_fn_group_banner 152 'volume.at:24' \
+ "volume" " " 22
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "152. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/volume.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+tar -cf archive -V label -T /dev/null || exit 1
+
+tar xfV archive label || exit 1
+tar xfV archive 'la?el' || exit 1
+tar xfV archive 'l*l' || exit 1
+
+echo 1>&2 -----
+tar xfV archive lab
+test \$? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive bel
+test \$? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive babel
+test \$? = 2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "volume.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+tar -cf archive -V label -T /dev/null || exit 1
+
+tar xfV archive label || exit 1
+tar xfV archive 'la?el' || exit 1
+tar xfV archive 'l*l' || exit 1
+
+echo 1>&2 -----
+tar xfV archive lab
+test $? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive bel
+test $? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive babel
+test $? = 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "-----
+tar: Volume 'label' does not match 'lab'
+tar: Error is not recoverable: exiting now
+-----
+tar: Volume 'label' does not match 'bel'
+tar: Error is not recoverable: exiting now
+-----
+tar: Volume 'label' does not match 'babel'
+tar: Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/volume.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/volume.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+tar -cf archive -V label -T /dev/null || exit 1
+
+tar xfV archive label || exit 1
+tar xfV archive 'la?el' || exit 1
+tar xfV archive 'l*l' || exit 1
+
+echo 1>&2 -----
+tar xfV archive lab
+test \$? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive bel
+test \$? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive babel
+test \$? = 2
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "volume.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+tar -cf archive -V label -T /dev/null || exit 1
+
+tar xfV archive label || exit 1
+tar xfV archive 'la?el' || exit 1
+tar xfV archive 'l*l' || exit 1
+
+echo 1>&2 -----
+tar xfV archive lab
+test $? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive bel
+test $? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive babel
+test $? = 2
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "-----
+tar: Volume 'label' does not match 'lab'
+tar: Error is not recoverable: exiting now
+-----
+tar: Volume 'label' does not match 'bel'
+tar: Error is not recoverable: exiting now
+-----
+tar: Volume 'label' does not match 'babel'
+tar: Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/volume.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_152
+#AT_START_153
+at_fn_group_banner 153 'volsize.at:29' \
+ "volume header size" " " 22
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "153. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/volsize.at:32:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+test -z \"\$TEST_DATA_DIR\" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf \$TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+test -z "$TEST_DATA_DIR" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf $TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/volsize.at:32:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+test -z \"\$TEST_DATA_DIR\" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf \$TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+test -z "$TEST_DATA_DIR" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf $TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/volsize.at:32:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+test -z \"\$TEST_DATA_DIR\" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf \$TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+test -z "$TEST_DATA_DIR" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf $TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/volsize.at:32:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+test -z \"\$TEST_DATA_DIR\" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf \$TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+test -z "$TEST_DATA_DIR" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf $TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/volsize.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+test -z \"\$TEST_DATA_DIR\" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf \$TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+test -z "$TEST_DATA_DIR" && exit 77
+tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
+
+echo Short Listing
+tar tf $TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_153
+#AT_START_154
+at_fn_group_banner 154 'comprec.at:22' \
+ "compressed format recognition" " " 23
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "154. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/comprec.at:26:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo \"separator\"
+tar cfz archive file1
+echo \"separator\"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo "separator"
+tar cfz archive file1
+echo "separator"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/comprec.at:26:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo \"separator\"
+tar cfz archive file1
+echo \"separator\"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo "separator"
+tar cfz archive file1
+echo "separator"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/comprec.at:26:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo \"separator\"
+tar cfz archive file1
+echo \"separator\"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo "separator"
+tar cfz archive file1
+echo "separator"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/comprec.at:26:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo \"separator\"
+tar cfz archive file1
+echo \"separator\"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo "separator"
+tar cfz archive file1
+echo "separator"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/comprec.at:26:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo \"separator\"
+tar cfz archive file1
+echo \"separator\"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+genfile --length 10240 --file file1
+echo "separator"
+tar cfz archive file1
+echo "separator"
+mv file1 orig
+tar xfv archive --warning=no-timestamp
+cmp orig file1
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+separator
+file1
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_154
+#AT_START_155
+at_fn_group_banner 155 'shortfile.at:26' \
+ "short input files" " " 23
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "155. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/shortfile.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 511 --file foo || exit 5
+tar tf foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortfile.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 511 --file foo || exit 5
+tar tf foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: This does not look like a tar archive
+tar: Exiting with failure status due to previous errors
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/shortfile.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_155
+#AT_START_156
+at_fn_group_banner 156 'shortupd.at:31' \
+ "updating short archives" " " 23
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "156. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/shortupd.at:34:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/shortupd.at:34:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/shortupd.at:34:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/shortupd.at:34:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/shortupd.at:34:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+touch foo
+tar uf archive foo
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_156
+#AT_START_157
+at_fn_group_banner 157 'truncate.at:29' \
+ "truncate" " " 23
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "157. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/truncate.at:32:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: \$?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)"
+at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: $?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/truncate.at:32:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: \$?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)"
+at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: $?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/truncate.at:32:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: \$?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)"
+at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: $?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/truncate.at:32:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: \$?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)"
+at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: $?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/truncate.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: \$?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)"
+at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: $?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_157
+#AT_START_158
+at_fn_group_banner 158 'grow.at:24' \
+ "grow" " " 23
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "158. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/grow.at:27:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/grow.at:27:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/grow.at:27:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/grow.at:27:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/grow.at:27:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --file foo --length 50000k
+genfile --file baz
+genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "foo
+baz
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_158
+#AT_START_159
+at_fn_group_banner 159 'sigpipe.at:21' \
+ "sigpipe handling" " " 23
+at_xfail=no
+(
+ $as_echo "159. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Description: Tar 1.23 ignored sigpipe which lead to spurious "write
+# error" diagnostics when piping output to another programs.
+# Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
+# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html
+# <20100319184141.GC30047@wo.int.altlinux.org>
+
+{ set +x
+$as_echo "$at_srcdir/sigpipe.at:30:
+
+case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
+?*) exit 77;;
+esac
+
+
+genfile --length 2048 --file first
+genfile --length 2048 --file second
+genfile --length 2049 --file third
+
+tar cf archive first second third
+
+# Discard diagnostics that some shells generate about broken pipes.
+(tar tf archive 2>&3 | :) 3>&2 2>/dev/null
+"
+at_fn_check_prepare_notrace 'a `...` command substitution' "sigpipe.at:30"
+( $at_check_trace;
+
+case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
+?*) exit 77;;
+esac
+
+
+genfile --length 2048 --file first
+genfile --length 2048 --file second
+genfile --length 2049 --file third
+
+tar cf archive first second third
+
+# Discard diagnostics that some shells generate about broken pipes.
+(tar tf archive 2>&3 | :) 3>&2 2>/dev/null
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/sigpipe.at:30"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_159
+#AT_START_160
+at_fn_group_banner 160 'comperr.at:18' \
+ "compressor program failure" " " 23
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "160. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# Description: If the --use-compress-program fails, then it is unsafe
+# to assume that the created archive is OK. Tar should fail with a
+# prominent error message.
+# Reported by: Ole Tange <tange@gnu.org>
+# References: <CA+4vN7wLZ-+LK1t7WMkM_b9f3mV9JTnSuPamPn2ciX5PTN=9Xw@mail.gmail.com>,
+# http://lists.gnu.org/archive/html/bug-tar/2015-03/msg00002.html
+
+
+
+ { set +x
+$as_echo "$at_srcdir/comperr.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=\$?
+sed -n '\$p' err
+exit \$rc
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=$?
+sed -n '$p' err
+exit $rc
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/comperr.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=\$?
+sed -n '\$p' err
+exit \$rc
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=$?
+sed -n '$p' err
+exit $rc
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/comperr.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=\$?
+sed -n '\$p' err
+exit \$rc
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=$?
+sed -n '$p' err
+exit $rc
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/comperr.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=\$?
+sed -n '\$p' err
+exit \$rc
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=$?
+sed -n '$p' err
+exit $rc
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/comperr.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=\$?
+sed -n '\$p' err
+exit \$rc
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+tar --use-compress-program false -cf a.tar . 2>err
+rc=$?
+sed -n '$p' err
+exit $rc
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_160
+#AT_START_161
+at_fn_group_banner 161 'remfiles01.at:28' \
+ "remove-files with compression" " " 24
+at_xfail=no
+(
+ $as_echo "161. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+{ set +x
+$as_echo "$at_srcdir/remfiles01.at:32:
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 && exit 77
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+
+case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
+?*) exit 77;;
+esac
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir dir
+cd dir
+genfile --file a --length 0
+chmod 0 a
+genfile --file b
+mkdir c
+
+# Depending on when the SIGPIPE gets delivered, the invocation below
+# may finish with either
+# tar: a: Cannot write: Broken pipe
+# or
+# tar: Child returned status 2
+
+# Discard diagnostics that some shells generate about broken pipes,
+# and discard all of tar's diagnostics except for the ones saying \"(child)\".
+# Gzip's exit code is propagated to the shell. Usually it is 141.
+# Convert all non-zero exits to 2 to make it predictable.
+(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
+EC=\$?
+sed -n '/(child)/p' err >&2
+rm err
+find . | sort
+exit \$EC
+"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles01.at:32"
+( $at_check_trace;
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 && exit 77
+
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+
+case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
+?*) exit 77;;
+esac
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir dir
+cd dir
+genfile --file a --length 0
+chmod 0 a
+genfile --file b
+mkdir c
+
+# Depending on when the SIGPIPE gets delivered, the invocation below
+# may finish with either
+# tar: a: Cannot write: Broken pipe
+# or
+# tar: Child returned status 2
+
+# Discard diagnostics that some shells generate about broken pipes,
+# and discard all of tar's diagnostics except for the ones saying "(child)".
+# Gzip's exit code is propagated to the shell. Usually it is 141.
+# Convert all non-zero exits to 2 to make it predictable.
+(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
+EC=$?
+sed -n '/(child)/p' err >&2
+rm err
+find . | sort
+exit $EC
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Permission denied
+tar (child): Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./b
+./c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/remfiles01.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_161
+#AT_START_162
+at_fn_group_banner 162 'remfiles02.at:28' \
+ "remove-files with compression: grand-child" " " 24
+at_xfail=no
+(
+ $as_echo "162. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+{ set +x
+$as_echo "$at_srcdir/remfiles02.at:32:
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+mkdir dir
+cd dir
+mkdir a
+genfile --file b
+mkdir c
+
+tar -c -f a -z --remove-files b c 2>err
+EC=\$?
+sed -n '/(child)/p' err >&2
+rm err
+find . | sort
+exit \$EC
+"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles02.at:32"
+( $at_check_trace;
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+mkdir dir
+cd dir
+mkdir a
+genfile --file b
+mkdir c
+
+tar -c -f a -z --remove-files b c 2>err
+EC=$?
+sed -n '/(child)/p' err >&2
+rm err
+find . | sort
+exit $EC
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Is a directory
+tar (child): Error is not recoverable: exiting now
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./b
+./c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/remfiles02.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_162
+#AT_START_163
+at_fn_group_banner 163 'remfiles03.at:28' \
+ "remove-files with symbolic links" " " 24
+at_xfail=no
+(
+ $as_echo "163. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+{ set +x
+$as_echo "$at_srcdir/remfiles03.at:31:
+mkdir a
+mkdir a/b
+ln -s b a/c || exit 77
+tar --remove-files -cf a.tar a
+genfile --stat a
+"
+at_fn_check_prepare_notrace 'an embedded newline' "remfiles03.at:31"
+( $at_check_trace;
+mkdir a
+mkdir a/b
+ln -s b a/c || exit 77
+tar --remove-files -cf a.tar a
+genfile --stat a
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "genfile: stat(a) failed: No such file or directory
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles03.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_163
+#AT_START_164
+at_fn_group_banner 164 'remfiles04a.at:25' \
+ "remove-files with -C:rel in -c/non-incr. mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "164. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles04a.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar --remove-files -C foo bar
+echo A
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04a.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar --remove-files -C foo bar
+echo A
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./bar
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles04a.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_164
+#AT_START_165
+at_fn_group_banner 165 'remfiles04b.at:33' \
+ "remove-files with -C:rel in -c/incr. mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "165. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles04b.at:36:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar --incremental --remove-files -C foo bar
+echo A
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04b.at:36"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar --incremental --remove-files -C foo bar
+echo A
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./bar
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles04b.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_165
+#AT_START_166
+at_fn_group_banner 166 'remfiles04c.at:33' \
+ "remove-files with -C:rel in -r mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "166. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles04c.at:36:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar -C foo bar
+echo A
+find . | sort
+tar -rf foo.tar --remove-files -C foo bar
+echo B
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04c.at:36"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+echo bar > bar
+echo foobar > foo/bar
+tar -cf foo.tar -C foo bar
+echo A
+find . | sort
+tar -rf foo.tar --remove-files -C foo bar
+echo B
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./bar
+./foo
+./foo.tar
+./foo/bar
+B
+.
+./bar
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles04c.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_166
+#AT_START_167
+at_fn_group_banner 167 'remfiles05a.at:34' \
+ "remove-files with -C:rel,rel in -c/non-incr. mode" "" 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "167. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles05a.at:37:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+decho A
+tar -cvf foo.tar --remove-files -C foo file -C ../bar file
+decho B
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05a.at:37"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+decho A
+tar -cvf foo.tar --remove-files -C foo file -C ../bar file
+decho B
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles05a.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_167
+#AT_START_168
+at_fn_group_banner 168 'remfiles05b.at:25' \
+ "remove-files with -C:rel,rel in -c/incr. mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "168. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles05b.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
+decho B
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05b.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
+decho B
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles05b.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_168
+#AT_START_169
+at_fn_group_banner 169 'remfiles05c.at:25' \
+ "remove-files with -C:rel,rel in -r mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "169. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles05c.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+tar -cf foo.tar -C foo file -C ../bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo file -C ../bar file
+decho C
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05c.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+tar -cf foo.tar -C foo file -C ../bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo file -C ../bar file
+decho C
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+C
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./bar
+./bar/file
+./file
+./foo
+./foo.tar
+./foo/file
+B
+file
+file
+C
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles05c.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_169
+#AT_START_170
+at_fn_group_banner 170 'remfiles06a.at:25' \
+ "remove-files with -C:rel,abs in -c/non-incr. mode" "" 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "170. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles06a.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=\`pwd\`
+decho A
+tar -cvf foo.tar --remove-files -C foo file -C \$DIR/bar file
+decho B
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06a.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+decho A
+tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file
+decho B
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles06a.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_170
+#AT_START_171
+at_fn_group_banner 171 'remfiles06b.at:25' \
+ "remove-files with -C:rel,abs in -c/incr. mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "171. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles06b.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=\`pwd\`
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo file -C \$DIR/bar file
+decho B
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06b.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file
+decho B
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles06b.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_171
+#AT_START_172
+at_fn_group_banner 172 'remfiles06c.at:25' \
+ "remove-files with -C:rel,abs in -r mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "172. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles06c.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=\`pwd\`
+tar -cf foo.tar -C foo file -C \$DIR/bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo file -C \$DIR/bar file
+decho C
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06c.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+tar -cf foo.tar -C foo file -C $DIR/bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file
+decho C
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+C
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./bar
+./bar/file
+./file
+./foo
+./foo.tar
+./foo/file
+B
+file
+file
+C
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles06c.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_172
+#AT_START_173
+at_fn_group_banner 173 'remfiles07a.at:25' \
+ "remove-files with -C:abs,rel in -c/non-incr. mode" "" 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "173. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles07a.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=\`pwd\`
+decho A
+tar -cvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
+decho B
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07a.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+decho A
+tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
+decho B
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles07a.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_173
+#AT_START_174
+at_fn_group_banner 174 'remfiles07b.at:25' \
+ "remove-files with -C:abs,rel in -c/incr. mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "174. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles07b.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=\`pwd\`
+decho A
+tar -cvf foo.tar --incremental --remove-files -C \$DIR/foo file -C ../bar file
+decho B
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07b.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+decho A
+tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file
+decho B
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+file
+file
+B
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles07b.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_174
+#AT_START_175
+at_fn_group_banner 175 'remfiles07c.at:25' \
+ "remove-files with -C:abs,rel in -r mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "175. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles07c.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=\`pwd\`
+tar -cf foo.tar -C \$DIR/foo file -C ../bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
+decho C
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07c.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo file > file
+echo foo/file > foo/file
+echo bar/file > bar/file
+DIR=`pwd`
+tar -cf foo.tar -C $DIR/foo file -C ../bar file
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
+decho C
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+C
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./bar
+./bar/file
+./file
+./foo
+./foo.tar
+./foo/file
+B
+file
+file
+C
+.
+./bar
+./file
+./foo
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles07c.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_175
+#AT_START_176
+at_fn_group_banner 176 'remfiles08a.at:28' \
+ "remove-files deleting two subdirs in -c/non-incr. mode" "" 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "176. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles08a.at:31:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+decho A
+tar -cvf foo.tar --remove-files -C foo . -C ../bar .
+decho B
+find .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "remfiles08a.at:31"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+decho A
+tar -cvf foo.tar --remove-files -C foo . -C ../bar .
+decho B
+find .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+./
+./foo_file
+./
+./bar_file
+B
+.
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles08a.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_176
+#AT_START_177
+at_fn_group_banner 177 'remfiles08b.at:31' \
+ "remove-files deleting two subdirs in -c/incr. mode" "" 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "177. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles08b.at:34:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
+decho B
+find .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "remfiles08b.at:34"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+decho A
+tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
+decho B
+find .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+tar: .: Directory is new
+tar: .: Directory is new
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+./
+./
+./foo_file
+./bar_file
+B
+.
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles08b.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_177
+#AT_START_178
+at_fn_group_banner 178 'remfiles08c.at:28' \
+ "remove-files deleting two subdirs in -r mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "178. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles08c.at:31:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+tar -cf foo.tar -C foo . -C ../bar .
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo . -C ../bar .
+decho C
+find .
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:31"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+mkdir bar
+echo foo/foo_file > foo/foo_file
+echo bar/bar_file > bar/bar_file
+tar -cf foo.tar -C foo . -C ../bar .
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files -C foo . -C ../bar .
+decho C
+find .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+C
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./bar
+./bar/bar_file
+./foo
+./foo.tar
+./foo/foo_file
+B
+./
+./foo_file
+./
+./bar_file
+C
+.
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles08c.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_178
+#AT_START_179
+at_fn_group_banner 179 'remfiles09a.at:25' \
+ "remove-files on full directory in -c/non-incr. mode" "" 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "179. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles09a.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+echo foo/file > foo/file
+decho A
+tar -cvf foo.tar --remove-files foo
+decho B
+find .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "remfiles09a.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+echo foo/file > foo/file
+decho A
+tar -cvf foo.tar --remove-files foo
+decho B
+find .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+foo/
+foo/file
+B
+.
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles09a.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_179
+#AT_START_180
+at_fn_group_banner 180 'remfiles09b.at:29' \
+ "remove-files on full directory in -c/incr. mode" "" 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "180. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles09b.at:32:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+echo foo/file > foo/file
+decho A
+tar -cvf foo.tar --incremental --remove-files foo
+decho B
+find .
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "remfiles09b.at:32"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+echo foo/file > foo/file
+decho A
+tar -cvf foo.tar --incremental --remove-files foo
+decho B
+find .
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+tar: foo: Directory is new
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+foo/
+foo/file
+B
+.
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles09b.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_180
+#AT_START_181
+at_fn_group_banner 181 'remfiles09c.at:25' \
+ "remove-files on full directory in -r mode" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "181. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles09c.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir foo
+echo foo/file > foo/file
+tar -cf foo.tar foo
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files foo
+decho C
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles09c.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir foo
+echo foo/file > foo/file
+tar -cf foo.tar foo
+decho A
+find . | sort
+decho B
+tar -rvf foo.tar --remove-files foo
+decho C
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+B
+C
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+.
+./foo
+./foo.tar
+./foo/file
+B
+foo/
+foo/file
+C
+.
+./foo.tar
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/remfiles09c.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_181
+#AT_START_182
+at_fn_group_banner 182 'remfiles10.at:20' \
+ "remove-files" " " 24
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "182. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/remfiles10.at:23:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+echo foo/file > foo/file
+decho A
+(cd foo && tar -cvf ../foo.tar --remove-files .)
+tar_status=\$?
+decho B
+find foo
+exit \$tar_status
+)"
+at_fn_check_prepare_notrace 'an embedded newline' "remfiles10.at:23"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+mkdir foo
+echo foo/file > foo/file
+decho A
+(cd foo && tar -cvf ../foo.tar --remove-files .)
+tar_status=$?
+decho B
+find foo
+exit $tar_status
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo >>"$at_stderr"; $as_echo "A
+tar: .: Cannot rmdir: Invalid argument
+tar: Exiting with failure status due to previous errors
+B
+" | \
+ $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "A
+./
+./file
+B
+foo
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 2 $at_status "$at_srcdir/remfiles10.at:23"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_182
+#AT_START_183
+at_fn_group_banner 183 'xattr01.at:25' \
+ "xattrs: basic functionality" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "183. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/xattr01.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^\$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
+user.test=\"OurFileValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr01.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^\$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
+user.test=\"OurFileValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr01.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^\$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
+user.test=\"OurFileValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr01.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^\$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
+user.test=\"OurFileValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr01.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^\$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
+user.test=\"OurFileValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_183
+#AT_START_184
+at_fn_group_banner 184 'xattr02.at:25' \
+ "xattrs: change directory with -C option" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "184. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/xattr02.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^\$
+getfattr -h -d file2 | grep -v -e '^#' -e ^\$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^$
+getfattr -h -d file2 | grep -v -e '^#' -e ^$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
+user.test=\"OurFile2Value\"
+user.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr02.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^\$
+getfattr -h -d file2 | grep -v -e '^#' -e ^\$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^$
+getfattr -h -d file2 | grep -v -e '^#' -e ^$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
+user.test=\"OurFile2Value\"
+user.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr02.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^\$
+getfattr -h -d file2 | grep -v -e '^#' -e ^\$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^$
+getfattr -h -d file2 | grep -v -e '^#' -e ^$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
+user.test=\"OurFile2Value\"
+user.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr02.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^\$
+getfattr -h -d file2 | grep -v -e '^#' -e ^\$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^$
+getfattr -h -d file2 | grep -v -e '^#' -e ^$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
+user.test=\"OurFile2Value\"
+user.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr02.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^\$
+getfattr -h -d file2 | grep -v -e '^#' -e ^\$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^$
+getfattr -h -d file2 | grep -v -e '^#' -e ^$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
+user.test=\"OurFile2Value\"
+user.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_184
+#AT_START_185
+at_fn_group_banner 185 'xattr03.at:25' \
+ "xattrs: trusted.* attributes" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "185. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/xattr03.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
+trusted.test=\"OurFile2Value\"
+trusted.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr03.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
+trusted.test=\"OurFile2Value\"
+trusted.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr03.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
+trusted.test=\"OurFile2Value\"
+trusted.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr03.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
+trusted.test=\"OurFile2Value\"
+trusted.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr03.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
+trusted.test=\"OurFile2Value\"
+trusted.test=\"OurDirValue\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_185
+#AT_START_186
+at_fn_group_banner 186 'xattr04.at:26' \
+ "xattrs: s/open/openat/ regression" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "186. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/xattr04.at:29:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=\$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^\$
+exit \$ret
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^$
+exit $ret
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"value\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr04.at:29:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=\$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^\$
+exit \$ret
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^$
+exit $ret
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"value\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr04.at:29:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=\$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^\$
+exit \$ret
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^$
+exit $ret
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"value\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr04.at:29:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=\$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^\$
+exit \$ret
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^$
+exit $ret
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"value\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr04.at:29:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=\$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^\$
+exit \$ret
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^$
+exit $ret
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "user.test=\"value\"
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_186
+#AT_START_187
+at_fn_group_banner 187 'xattr05.at:28' \
+ "xattrs: keywords with '=' and '%'" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "187. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/xattr05.at:31:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr05.at:31:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr05.at:31:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr05.at:31:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/xattr05.at:31:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_187
+#AT_START_188
+at_fn_group_banner 188 'acls01.at:25' \
+ "acls: basic functionality" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "188. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/acls01.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/file
+setfacl -m u:\$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/file
+setfacl -m u:$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls01.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/file
+setfacl -m u:\$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/file
+setfacl -m u:$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls01.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/file
+setfacl -m u:\$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/file
+setfacl -m u:$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls01.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/file
+setfacl -m u:\$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/file
+setfacl -m u:$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls01.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/file
+setfacl -m u:\$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/file
+setfacl -m u:$MYNAME:--x dir
+
+getfattr -h -m. -d dir dir/file > before
+
+tar --acls -cf archive.tar dir
+rm -rf dir
+
+tar --acls -xf archive.tar
+
+getfattr -h -m. -d dir dir/file > after
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_188
+#AT_START_189
+at_fn_group_banner 189 'acls02.at:25' \
+ "acls: work with -C" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "189. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/acls02.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/subdir
+setfacl -m u:\$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/subdir
+setfacl -m u:$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls02.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/subdir
+setfacl -m u:\$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/subdir
+setfacl -m u:$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls02.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/subdir
+setfacl -m u:\$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/subdir
+setfacl -m u:$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls02.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/subdir
+setfacl -m u:\$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/subdir
+setfacl -m u:$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls02.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=\$( id -un )
+
+setfacl -m u:\$MYNAME:--x dir/subdir
+setfacl -m u:\$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test \"\$?\" = 0
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkdir dir/subdir
+genfile --file dir/subdir/file
+
+MYNAME=$( id -un )
+
+setfacl -m u:$MYNAME:--x dir/subdir
+setfacl -m u:$MYNAME:--x dir/subdir/file
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../before
+cd ..
+
+tar --acls -cf archive.tar -C dir subdir
+rm -rf dir
+
+mkdir dir
+tar --acls -xf archive.tar -C dir
+
+cd dir
+getfattr -h -m. -d subdir subdir/file > ../after
+cd ..
+
+diff before after
+test "$?" = 0
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_189
+#AT_START_190
+at_fn_group_banner 190 'acls03.at:30' \
+ "acls: default ACLs" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "190. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/acls03.at:47:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+MYNAME=\$( id -un )
+MYGROUP=\$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:\$MYGROUP:r-x pure/d1
+setfacl -d -m g:\$MYGROUP:rwx pure/d1
+setfacl -d -m u:\$MYNAME:rwx pure/d1
+# \"*a\" files have \"some\" additional ACLs
+setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:\$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on \"how the files were extracted from
+# archive\". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl\$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ echo \"\$pure\" > pure.log
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
+ echo \"bad 'pure' against 'sacl_def_optacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
+ if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+MYNAME=$( id -un )
+MYGROUP=$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:$MYGROUP:r-x pure/d1
+setfacl -d -m g:$MYGROUP:rwx pure/d1
+setfacl -d -m u:$MYNAME:rwx pure/d1
+# "*a" files have "some" additional ACLs
+setfacl -m u:$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on "how the files were extracted from
+# archive". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ echo "$pure" > pure.log
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ if test ! "$pure" "=" "$sacl_def_optacl"; then
+ echo "bad 'pure' against 'sacl_def_optacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
+ if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
+ fi
+
+
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls03.at:47:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+MYNAME=\$( id -un )
+MYGROUP=\$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:\$MYGROUP:r-x pure/d1
+setfacl -d -m g:\$MYGROUP:rwx pure/d1
+setfacl -d -m u:\$MYNAME:rwx pure/d1
+# \"*a\" files have \"some\" additional ACLs
+setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:\$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on \"how the files were extracted from
+# archive\". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl\$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ echo \"\$pure\" > pure.log
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
+ echo \"bad 'pure' against 'sacl_def_optacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
+ if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+MYNAME=$( id -un )
+MYGROUP=$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:$MYGROUP:r-x pure/d1
+setfacl -d -m g:$MYGROUP:rwx pure/d1
+setfacl -d -m u:$MYNAME:rwx pure/d1
+# "*a" files have "some" additional ACLs
+setfacl -m u:$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on "how the files were extracted from
+# archive". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ echo "$pure" > pure.log
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ if test ! "$pure" "=" "$sacl_def_optacl"; then
+ echo "bad 'pure' against 'sacl_def_optacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
+ if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
+ fi
+
+
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls03.at:47:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+MYNAME=\$( id -un )
+MYGROUP=\$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:\$MYGROUP:r-x pure/d1
+setfacl -d -m g:\$MYGROUP:rwx pure/d1
+setfacl -d -m u:\$MYNAME:rwx pure/d1
+# \"*a\" files have \"some\" additional ACLs
+setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:\$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on \"how the files were extracted from
+# archive\". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl\$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ echo \"\$pure\" > pure.log
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
+ echo \"bad 'pure' against 'sacl_def_optacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
+ if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+MYNAME=$( id -un )
+MYGROUP=$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:$MYGROUP:r-x pure/d1
+setfacl -d -m g:$MYGROUP:rwx pure/d1
+setfacl -d -m u:$MYNAME:rwx pure/d1
+# "*a" files have "some" additional ACLs
+setfacl -m u:$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on "how the files were extracted from
+# archive". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ echo "$pure" > pure.log
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ if test ! "$pure" "=" "$sacl_def_optacl"; then
+ echo "bad 'pure' against 'sacl_def_optacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
+ if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
+ fi
+
+
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls03.at:47:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+MYNAME=\$( id -un )
+MYGROUP=\$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:\$MYGROUP:r-x pure/d1
+setfacl -d -m g:\$MYGROUP:rwx pure/d1
+setfacl -d -m u:\$MYNAME:rwx pure/d1
+# \"*a\" files have \"some\" additional ACLs
+setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:\$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on \"how the files were extracted from
+# archive\". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl\$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ echo \"\$pure\" > pure.log
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
+ echo \"bad 'pure' against 'sacl_def_optacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
+ if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+MYNAME=$( id -un )
+MYGROUP=$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:$MYGROUP:r-x pure/d1
+setfacl -d -m g:$MYGROUP:rwx pure/d1
+setfacl -d -m u:$MYNAME:rwx pure/d1
+# "*a" files have "some" additional ACLs
+setfacl -m u:$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on "how the files were extracted from
+# archive". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ echo "$pure" > pure.log
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ if test ! "$pure" "=" "$sacl_def_optacl"; then
+ echo "bad 'pure' against 'sacl_def_optacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
+ if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
+ fi
+
+
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/acls03.at:47:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+
+MYNAME=\$( id -un )
+MYGROUP=\$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:\$MYGROUP:r-x pure/d1
+setfacl -d -m g:\$MYGROUP:rwx pure/d1
+setfacl -d -m u:\$MYNAME:rwx pure/d1
+# \"*a\" files have \"some\" additional ACLs
+setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:\$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on \"how the files were extracted from
+# archive\". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl\$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
+ cd ..
+
+
+
+ echo \"\$pure\" > pure.log
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
+ echo \"bad 'pure' against 'sacl_def_optacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
+ if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
+ echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
+ fi
+
+
+ echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
+ echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
+ if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
+ echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
+ fi
+
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+MYNAME=$( id -un )
+MYGROUP=$( id -gn )
+
+# Prepare directory structure with default ACLs
+mkdir -p pure/d1/d2
+genfile --file pure/d1/f2a
+genfile --file pure/d1/f2b
+genfile --file pure/d1/d2/f3a
+genfile --file pure/d1/d2/f3b
+setfacl -m g:$MYGROUP:r-x pure/d1
+setfacl -d -m g:$MYGROUP:rwx pure/d1
+setfacl -d -m u:$MYNAME:rwx pure/d1
+# "*a" files have "some" additional ACLs
+setfacl -m u:$MYNAME:--- pure/d1/d2/f3a
+setfacl -m u:$MYNAME:--- pure/d1/f2a
+
+# use default format (no acls stored)
+tar -cf noacl.tar -C pure d1
+
+# use posix format, acls stored
+tar --acls -cf acl.tar -C pure d1
+
+# Directory names are chosen based on "how the files were extracted from
+# archive". Equivalent no* tags are used also:
+# ^sacl_ — extracted archive has stored ACLs
+# _def_ — target directory (-C) has default ACLs
+# _optacl$ — extraction was done with --acls option
+
+mkdir sacl_def_optacl
+mkdir sacl_def_optnoacl
+mkdir sacl_nodef_optacl
+mkdir sacl_nodef_optnoacl
+mkdir nosacl_def_optacl
+mkdir nosacl_def_optnoacl
+mkdir nosacl_nodef_optacl
+mkdir nosacl_nodef_optnoacl
+
+setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
+
+tar -xf acl.tar -C sacl_nodef_optnoacl
+tar --acls -xf acl.tar -C sacl_nodef_optacl
+tar -xf acl.tar -C sacl_def_optnoacl
+tar --acls -xf acl.tar -C sacl_def_optacl
+tar -xf noacl.tar -C nosacl_def_optnoacl
+# _NO_ ACLs in output
+tar -xf noacl.tar -C nosacl_nodef_optnoacl
+tar -xf noacl.tar -C nosacl_nodef_optacl
+tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
+# _NO_ ACLs in output (even when default ACLs exist)
+tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
+
+
+ cd pure
+ pure="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ cd sacl_def_optacl
+ sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_def_optnoacl
+ sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optacl
+ sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd sacl_nodef_optnoacl
+ sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optacl
+ nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_def_optnoacl
+ nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optacl
+ nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+ cd nosacl_nodef_optnoacl
+ nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
+ cd ..
+
+
+
+ echo "$pure" > pure.log
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ if test ! "$pure" "=" "$sacl_def_optacl"; then
+ echo "bad 'pure' against 'sacl_def_optacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
+ if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
+ fi
+
+
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
+ fi
+
+
+ echo "$nosacl_def_optacl" > nosacl_def_optacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
+ fi
+
+
+ echo "$sacl_def_optacl" > sacl_def_optacl.log
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
+ echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
+ fi
+
+
+ echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
+ echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
+ if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
+ echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
+ fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_190
+#AT_START_191
+at_fn_group_banner 191 'selnx01.at:25' \
+ "selinux: basic store/restore" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "191. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/selnx01.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
+ grep -v -e '^#' -e ^\$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test \"\$?\" -eq \"0\"; then
+ echo \"selinux contexts probably restored while --selinux is off\"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test \"\$?\" -ne \"0\"; then
+ echo \"bad result\"
+fi
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
+ grep -v -e '^#' -e ^$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test "$?" -eq "0"; then
+ echo "selinux contexts probably restored while --selinux is off"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test "$?" -ne "0"; then
+ echo "bad result"
+fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
+security.selinux=\"unconfined_u
+security.selinux=\"system_u
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/selnx01.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
+ grep -v -e '^#' -e ^\$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test \"\$?\" -eq \"0\"; then
+ echo \"selinux contexts probably restored while --selinux is off\"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test \"\$?\" -ne \"0\"; then
+ echo \"bad result\"
+fi
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
+ grep -v -e '^#' -e ^$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test "$?" -eq "0"; then
+ echo "selinux contexts probably restored while --selinux is off"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test "$?" -ne "0"; then
+ echo "bad result"
+fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
+security.selinux=\"unconfined_u
+security.selinux=\"system_u
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/selnx01.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
+ grep -v -e '^#' -e ^\$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test \"\$?\" -eq \"0\"; then
+ echo \"selinux contexts probably restored while --selinux is off\"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test \"\$?\" -ne \"0\"; then
+ echo \"bad result\"
+fi
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
+ grep -v -e '^#' -e ^$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test "$?" -eq "0"; then
+ echo "selinux contexts probably restored while --selinux is off"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test "$?" -ne "0"; then
+ echo "bad result"
+fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
+security.selinux=\"unconfined_u
+security.selinux=\"system_u
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/selnx01.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
+ grep -v -e '^#' -e ^\$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test \"\$?\" -eq \"0\"; then
+ echo \"selinux contexts probably restored while --selinux is off\"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test \"\$?\" -ne \"0\"; then
+ echo \"bad result\"
+fi
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
+ grep -v -e '^#' -e ^$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test "$?" -eq "0"; then
+ echo "selinux contexts probably restored while --selinux is off"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test "$?" -ne "0"; then
+ echo "bad result"
+fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
+security.selinux=\"unconfined_u
+security.selinux=\"system_u
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/selnx01.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
+ grep -v -e '^#' -e ^\$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test \"\$?\" -eq \"0\"; then
+ echo \"selinux contexts probably restored while --selinux is off\"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test \"\$?\" -ne \"0\"; then
+ echo \"bad result\"
+fi
+
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+genfile --file dir/file
+ln -s file dir/link
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
+
+restorecon -R dir
+chcon -h --user=system_u dir
+chcon -h --user=unconfined_u dir/file
+chcon -h --user=system_u dir/link
+
+# archive whole directory including selinux contexts
+tar --selinux -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# ================================================
+# check if selinux contexts are correctly restored
+
+tar --selinux -xf archive.tar
+
+# archive for later debugging
+cp archive.tar archive_origin.tar
+
+# check if selinux contexts were restored
+getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
+ grep -v -e '^#' -e ^$ | cut -d: -f1
+
+# ===========================================================================
+# check if selinux contexts are not restored when --selinux option is missing
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
+rm -rf dir
+tar -xf archive.tar
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
+
+diff with_selinux without_selinux > diff_with_without
+if test "$?" -eq "0"; then
+ echo "selinux contexts probably restored while --selinux is off"
+fi
+
+# =================================================================
+# check if selinux is not archived when --selinux option is missing
+
+tar -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore (with --selinux)
+tar --selinux -xf archive.tar dir
+
+getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
+diff start final > final_diff
+if test "$?" -ne "0"; then
+ echo "bad result"
+fi
+
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
+security.selinux=\"unconfined_u
+security.selinux=\"system_u
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_191
+#AT_START_192
+at_fn_group_banner 192 'selacl01.at:25' \
+ "acls/selinux: special files & fifos" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "192. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/selacl01.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
+MINOR=\$( stat /dev/urandom --printf=\"%T\" )
+mknod dir/chartype c \$MAJOR \$MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:\$UID:--- dir/fifo
+setfacl -m u:\$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=$( stat /dev/urandom --printf="%t" )
+MINOR=$( stat /dev/urandom --printf="%T" )
+mknod dir/chartype c $MAJOR $MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:$UID:--- dir/fifo
+setfacl -m u:$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/selacl01.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
+MINOR=\$( stat /dev/urandom --printf=\"%T\" )
+mknod dir/chartype c \$MAJOR \$MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:\$UID:--- dir/fifo
+setfacl -m u:\$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=$( stat /dev/urandom --printf="%t" )
+MINOR=$( stat /dev/urandom --printf="%T" )
+mknod dir/chartype c $MAJOR $MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:$UID:--- dir/fifo
+setfacl -m u:$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/selacl01.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
+MINOR=\$( stat /dev/urandom --printf=\"%T\" )
+mknod dir/chartype c \$MAJOR \$MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:\$UID:--- dir/fifo
+setfacl -m u:\$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=$( stat /dev/urandom --printf="%t" )
+MINOR=$( stat /dev/urandom --printf="%T" )
+mknod dir/chartype c $MAJOR $MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:$UID:--- dir/fifo
+setfacl -m u:$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/selacl01.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
+MINOR=\$( stat /dev/urandom --printf=\"%T\" )
+mknod dir/chartype c \$MAJOR \$MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:\$UID:--- dir/fifo
+setfacl -m u:\$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=$( stat /dev/urandom --printf="%t" )
+MINOR=$( stat /dev/urandom --printf="%T" )
+mknod dir/chartype c $MAJOR $MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:$UID:--- dir/fifo
+setfacl -m u:$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/selacl01.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:\$UID:rwx \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfacl \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:\$UID:rwx \$file
+ err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
+MINOR=\$( stat /dev/urandom --printf=\"%T\" )
+mknod dir/chartype c \$MAJOR \$MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:\$UID:--- dir/fifo
+setfacl -m u:\$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ restorecon $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ chcon -h --user=unconfined_u $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfacl -m u:$UID:rwx $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfacl $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+mkdir dir
+mkfifo dir/fifo
+MAJOR=$( stat /dev/urandom --printf="%t" )
+MINOR=$( stat /dev/urandom --printf="%T" )
+mknod dir/chartype c $MAJOR $MINOR
+
+# setup attributes
+restorecon -R dir
+chcon -h --user=system_u dir/fifo
+chcon -h --user=system_u dir/chartype
+setfacl -m u:$UID:--- dir/fifo
+setfacl -m u:$UID:rwx dir/chartype
+
+getfacl dir/fifo >> before
+getfattr -msecurity.selinux dir/chartype >> before
+
+tar --xattrs --selinux --acls -cf archive.tar dir
+
+mv dir olddir
+
+tar --xattrs --selinux --acls -xf archive.tar
+
+getfacl dir/fifo >> after
+getfattr -msecurity.selinux dir/chartype >> after
+
+diff before after
+echo separator
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "separator
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_192
+#AT_START_193
+at_fn_group_banner 193 'capabs_raw01.at:25' \
+ "capabilities: binary store/restore" " " 25
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "193. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/capabs_raw01.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap \"= cap_chown=ei\" \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getcap \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap \"= cap_chown=ei\" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap "= cap_chown=ei" $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getcap $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap "= cap_chown=ei" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/capabs_raw01.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap \"= cap_chown=ei\" \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getcap \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap \"= cap_chown=ei\" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap "= cap_chown=ei" $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getcap $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap "= cap_chown=ei" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/capabs_raw01.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap \"= cap_chown=ei\" \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getcap \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap \"= cap_chown=ei\" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap "= cap_chown=ei" $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getcap $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap "= cap_chown=ei" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/capabs_raw01.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap \"= cap_chown=ei\" \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getcap \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap \"= cap_chown=ei\" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap "= cap_chown=ei" $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getcap $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap "= cap_chown=ei" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/capabs_raw01.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo \"test\" > \$\$
+chmod 0 \$\$
+cat \$\$ > /dev/null 2>&1
+result=\$?
+rm -f \$\$
+test \$result -eq 0 || exit 77
+
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getfattr \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj \$file
+ # check whether tar fails to store xattrs
+ err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
+ if test \"\$err\" != \"0\"; then
+ exit 77
+ fi
+
+
+ file=\$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap \"= cap_chown=ei\" \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+
+ getcap \$file &> /dev/null
+ if test \"\$?\" != 0; then
+ exit 77
+ fi
+
+ rm -rf \$file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap \"= cap_chown=ei\" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+echo "test" > $$
+chmod 0 $$
+cat $$ > /dev/null 2>&1
+result=$?
+rm -f $$
+test $result -eq 0 || exit 77
+
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setfattr -n user.test -v test $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getfattr $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ exit 77
+ fi
+
+
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+
+ setcap "= cap_chown=ei" $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+
+ getcap $file &> /dev/null
+ if test "$?" != 0; then
+ exit 77
+ fi
+
+ rm -rf $file
+
+
+mkdir dir
+genfile --file dir/file
+
+setcap "= cap_chown=ei" dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar dir
+
+# clear the directory
+rm -rf dir
+
+# restore _all_ xattrs (not just the user.* domain)
+tar --xattrs --xattrs-include='*' -xf archive.tar
+
+getcap dir/file
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_193
+#AT_START_194
+at_fn_group_banner 194 'onetop01.at:21' \
+ "tar --one-top-level" " " 26
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "194. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/onetop01.at:24:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop01.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop01.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop01.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop01.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_194
+#AT_START_195
+at_fn_group_banner 195 'onetop02.at:21' \
+ "tar --one-top-level --show-transformed" " " 26
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "195. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/onetop02.at:24:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/c
+.
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop02.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/c
+.
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop02.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/c
+.
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop02.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/c
+.
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop02.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --show-transformed -v -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/c
+.
+./a
+./a/b
+./a/c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_195
+#AT_START_196
+at_fn_group_banner 196 'onetop03.at:21' \
+ "tar --one-top-level --transform" " " 26
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "196. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/onetop03.at:24:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop03.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop03.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop03.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop03.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+mkdir out
+cd out
+tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
+find . | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo ".
+./a
+./a/b
+./a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_196
+#AT_START_197
+at_fn_group_banner 197 'onetop04.at:21' \
+ "tar --one-top-level --transform" " " 26
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "197. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+
+
+ { set +x
+$as_echo "$at_srcdir/onetop04.at:24:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop04.at:24:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop04.at:24:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop04.at:24:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop04.at:24:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)"
+at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+mkdir a
+genfile --file a/b
+genfile --file c
+tar cf a.tar a c
+tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "a/
+a/b
+a/d
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_197
+#AT_START_198
+at_fn_group_banner 198 'onetop05.at:21' \
+ "tar --one-top-level restoring permissions" " " 26
+at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+(
+ $as_echo "198. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+# When extracting an archive that contains ./ with the --one-top-level option,
+# the mode and ownership of ./ would be incorrectly applied to the current
+# working directory, instead of the requested top-level directory.
+
+
+
+ { set +x
+$as_echo "$at_srcdir/onetop05.at:28:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod \$orig_mode d
+
+mode=\$(genfile --stat=mode.7777 d)
+test \$mode = \$orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=\$(genfile --stat=mode.777 d1)
+if test 700 = \$mode; then
+ echo \"CWD: OK\"
+else
+ echo \"CWD: mode changed: 700 != \$mode\"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=\$(genfile --stat=mode.777 d2)
+if test 700 = \$mode; then
+ echo \"DIR: OK\"
+else
+ echo \"DIR: mode changed: 700 != \$mode\"
+fi
+mode=\$(genfile --stat=mode.7777 d2/top)
+if test \$mode = \$orig_mode; then
+ echo \"TOP: OK\"
+else
+ echo \"TOP: mode changed: \$orig_mode != \$mode\"
+fi
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
+( $at_check_trace;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod $orig_mode d
+
+mode=$(genfile --stat=mode.7777 d)
+test $mode = $orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=$(genfile --stat=mode.777 d1)
+if test 700 = $mode; then
+ echo "CWD: OK"
+else
+ echo "CWD: mode changed: 700 != $mode"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=$(genfile --stat=mode.777 d2)
+if test 700 = $mode; then
+ echo "DIR: OK"
+else
+ echo "DIR: mode changed: 700 != $mode"
+fi
+mode=$(genfile --stat=mode.7777 d2/top)
+if test $mode = $orig_mode; then
+ echo "TOP: OK"
+else
+ echo "TOP: mode changed: $orig_mode != $mode"
+fi
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "CWD: OK
+DIR: OK
+TOP: OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop05.at:28:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod \$orig_mode d
+
+mode=\$(genfile --stat=mode.7777 d)
+test \$mode = \$orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=\$(genfile --stat=mode.777 d1)
+if test 700 = \$mode; then
+ echo \"CWD: OK\"
+else
+ echo \"CWD: mode changed: 700 != \$mode\"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=\$(genfile --stat=mode.777 d2)
+if test 700 = \$mode; then
+ echo \"DIR: OK\"
+else
+ echo \"DIR: mode changed: 700 != \$mode\"
+fi
+mode=\$(genfile --stat=mode.7777 d2/top)
+if test \$mode = \$orig_mode; then
+ echo \"TOP: OK\"
+else
+ echo \"TOP: mode changed: \$orig_mode != \$mode\"
+fi
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
+( $at_check_trace;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod $orig_mode d
+
+mode=$(genfile --stat=mode.7777 d)
+test $mode = $orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=$(genfile --stat=mode.777 d1)
+if test 700 = $mode; then
+ echo "CWD: OK"
+else
+ echo "CWD: mode changed: 700 != $mode"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=$(genfile --stat=mode.777 d2)
+if test 700 = $mode; then
+ echo "DIR: OK"
+else
+ echo "DIR: mode changed: 700 != $mode"
+fi
+mode=$(genfile --stat=mode.7777 d2/top)
+if test $mode = $orig_mode; then
+ echo "TOP: OK"
+else
+ echo "TOP: mode changed: $orig_mode != $mode"
+fi
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "CWD: OK
+DIR: OK
+TOP: OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop05.at:28:
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H ustar\"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod \$orig_mode d
+
+mode=\$(genfile --stat=mode.7777 d)
+test \$mode = \$orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=\$(genfile --stat=mode.777 d1)
+if test 700 = \$mode; then
+ echo \"CWD: OK\"
+else
+ echo \"CWD: mode changed: 700 != \$mode\"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=\$(genfile --stat=mode.777 d2)
+if test 700 = \$mode; then
+ echo \"DIR: OK\"
+else
+ echo \"DIR: mode changed: 700 != \$mode\"
+fi
+mode=\$(genfile --stat=mode.7777 d2/top)
+if test \$mode = \$orig_mode; then
+ echo \"TOP: OK\"
+else
+ echo \"TOP: mode changed: \$orig_mode != \$mode\"
+fi
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
+( $at_check_trace;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod $orig_mode d
+
+mode=$(genfile --stat=mode.7777 d)
+test $mode = $orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=$(genfile --stat=mode.777 d1)
+if test 700 = $mode; then
+ echo "CWD: OK"
+else
+ echo "CWD: mode changed: 700 != $mode"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=$(genfile --stat=mode.777 d2)
+if test 700 = $mode; then
+ echo "DIR: OK"
+else
+ echo "DIR: mode changed: 700 != $mode"
+fi
+mode=$(genfile --stat=mode.7777 d2/top)
+if test $mode = $orig_mode; then
+ echo "TOP: OK"
+else
+ echo "TOP: mode changed: $orig_mode != $mode"
+fi
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "CWD: OK
+DIR: OK
+TOP: OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop05.at:28:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod \$orig_mode d
+
+mode=\$(genfile --stat=mode.7777 d)
+test \$mode = \$orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=\$(genfile --stat=mode.777 d1)
+if test 700 = \$mode; then
+ echo \"CWD: OK\"
+else
+ echo \"CWD: mode changed: 700 != \$mode\"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=\$(genfile --stat=mode.777 d2)
+if test 700 = \$mode; then
+ echo \"DIR: OK\"
+else
+ echo \"DIR: mode changed: 700 != \$mode\"
+fi
+mode=\$(genfile --stat=mode.7777 d2/top)
+if test \$mode = \$orig_mode; then
+ echo \"TOP: OK\"
+else
+ echo \"TOP: mode changed: \$orig_mode != \$mode\"
+fi
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
+( $at_check_trace;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod $orig_mode d
+
+mode=$(genfile --stat=mode.7777 d)
+test $mode = $orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=$(genfile --stat=mode.777 d1)
+if test 700 = $mode; then
+ echo "CWD: OK"
+else
+ echo "CWD: mode changed: 700 != $mode"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=$(genfile --stat=mode.777 d2)
+if test 700 = $mode; then
+ echo "DIR: OK"
+else
+ echo "DIR: mode changed: 700 != $mode"
+fi
+mode=$(genfile --stat=mode.7777 d2/top)
+if test $mode = $orig_mode; then
+ echo "TOP: OK"
+else
+ echo "TOP: mode changed: $orig_mode != $mode"
+fi
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "CWD: OK
+DIR: OK
+TOP: OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+ { set +x
+$as_echo "$at_srcdir/onetop05.at:28:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod \$orig_mode d
+
+mode=\$(genfile --stat=mode.7777 d)
+test \$mode = \$orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=\$(genfile --stat=mode.777 d1)
+if test 700 = \$mode; then
+ echo \"CWD: OK\"
+else
+ echo \"CWD: mode changed: 700 != \$mode\"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=\$(genfile --stat=mode.777 d2)
+if test 700 = \$mode; then
+ echo \"DIR: OK\"
+else
+ echo \"DIR: mode changed: 700 != \$mode\"
+fi
+mode=\$(genfile --stat=mode.7777 d2/top)
+if test \$mode = \$orig_mode; then
+ echo \"TOP: OK\"
+else
+ echo \"TOP: mode changed: \$orig_mode != \$mode\"
+fi
+)"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
+( $at_check_trace;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+orig_mode=3702
+mkdir d
+chmod $orig_mode d
+
+mode=$(genfile --stat=mode.7777 d)
+test $mode = $orig_mode || exit 77
+
+genfile --file d/file
+tar -cf d.tar -C d .
+rm -rf d
+
+(mkdir d1
+chmod 700 d1
+cd d1
+tar --one-top-level=top -xpf ../d.tar)
+mode=$(genfile --stat=mode.777 d1)
+if test 700 = $mode; then
+ echo "CWD: OK"
+else
+ echo "CWD: mode changed: 700 != $mode"
+fi
+
+mkdir d2
+chmod 700 d2
+tar -C d2 --one-top-level=top -xpf d.tar
+mode=$(genfile --stat=mode.777 d2)
+if test 700 = $mode; then
+ echo "DIR: OK"
+else
+ echo "DIR: mode changed: 700 != $mode"
+fi
+mode=$(genfile --stat=mode.7777 d2/top)
+if test $mode = $orig_mode; then
+ echo "TOP: OK"
+else
+ echo "TOP: mode changed: $orig_mode != $mode"
+fi
+)
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "CWD: OK
+DIR: OK
+TOP: OK
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_198
+#AT_START_199
+at_fn_group_banner 199 'gtarfail.at:22' \
+ "gtarfail" " " 27
+at_xfail=no
+(
+ $as_echo "199. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+{ set +x
+$as_echo "$at_srcdir/gtarfail.at:27:
+
+test -z \"\$STAR_TESTSCRIPTS\" && exit 77
+tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
+
+
+tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail.tar
+"
+at_fn_check_prepare_notrace 'an embedded newline' "gtarfail.at:27"
+( $at_check_trace;
+
+test -z "$STAR_TESTSCRIPTS" && exit 77
+tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
+
+
+tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone 518 2001-05-25 14:41 vedpowered.gif
+-rw-r--r-- jes/glone 6825 1997-04-29 00:19 cd.gif
+-rw-r--r-- jes/glone 33354 1999-06-22 12:17 DSCN0049c.JPG
+-rw-r--r-- jes/glone 86159 2001-06-05 18:16 Window1.jpg
+-rw-r--r-- jes/glone 1310 2001-05-25 13:05 vipower.gif
+-rw-rw-rw- jes/glone 148753 1998-09-15 13:08 billyboy.jpg
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/gtarfail.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_199
+#AT_START_200
+at_fn_group_banner 200 'gtarfail2.at:22' \
+ "gtarfail2" " " 27
+at_xfail=no
+(
+ $as_echo "200. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+{ set +x
+$as_echo "$at_srcdir/gtarfail2.at:27:
+
+test -z \"\$STAR_TESTSCRIPTS\" && exit 77
+tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
+
+tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail2.tar
+"
+at_fn_check_prepare_notrace 'an embedded newline' "gtarfail2.at:27"
+( $at_check_trace;
+
+test -z "$STAR_TESTSCRIPTS" && exit 77
+tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
+
+tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "-rwxr-xr-x jes/glone 214 2001-09-21 14:08 .clean
+lrwxrwxrwx jes/cats 0 1998-05-07 12:39 RULES -> makefiles/RULES
+drwxr-sr-x jes/glone 0 2001-12-10 00:00 build/
+-rw-r--r-- jes/glone 312019 2001-12-10 00:00 build/smake-1.2.tar.gz
+drwxr-sr-x jes/glone 0 2001-11-09 18:20 build/psmake/
+-rwxr-xr-x jes/glone 259 2000-01-09 16:36 build/psmake/MAKE
+-rwxr-xr-x jes/glone 4820 2001-02-25 22:45 build/psmake/MAKE.sh
+-rw-r--r-- jes/glone 647 2001-02-25 23:50 build/psmake/Makefile
+lrwxrwxrwx jes/glone 0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c
+lrwxrwxrwx jes/glone 0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/gtarfail2.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_200
+#AT_START_201
+at_fn_group_banner 201 'multi-fail.at:22' \
+ "multi-fail" " " 27
+at_xfail=no
+(
+ $as_echo "201. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+{ set +x
+$as_echo "$at_srcdir/multi-fail.at:27:
+
+test -z \"\$STAR_TESTSCRIPTS\" && exit 77
+tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
+
+
+test -z \"\$STAR_TESTSCRIPTS\" && exit 77
+tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
+
+
+tar --utc -tvM -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \\
+ -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
+"
+at_fn_check_prepare_notrace 'an embedded newline' "multi-fail.at:27"
+( $at_check_trace;
+
+test -z "$STAR_TESTSCRIPTS" && exit 77
+tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
+
+
+test -z "$STAR_TESTSCRIPTS" && exit 77
+tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
+
+
+tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
+ -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs 0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/
+-rw-r--r-- joerg/bs 1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull
+-rw-r--r-- joerg/bs 1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d
+-rw-r--r-- joerg/bs 1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d
+-rw-r--r-- joerg/bs 1540 2003-10-10 18:06 OBJ/i386-sunos5-gcc/cpiohdr.d
+-rw-r--r-- joerg/bs 2245 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xheader.d
+-rw-r--r-- joerg/bs 1254 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xattr.d
+-rw-r--r-- joerg/bs 1330 2003-10-10 18:06 OBJ/i386-sunos5-gcc/list.d
+-rw-r--r-- joerg/bs 1745 2003-10-10 18:06 OBJ/i386-sunos5-gcc/extract.d
+-rw-r--r-- joerg/bs 1518 2003-10-10 18:06 OBJ/i386-sunos5-gcc/create.d
+-rw-r--r-- joerg/bs 1235 2003-10-10 18:06 OBJ/i386-sunos5-gcc/append.d
+-rw-r--r-- joerg/bs 1368 2003-10-10 18:06 OBJ/i386-sunos5-gcc/diff.d
+-rw-r--r-- joerg/bs 1423 2003-10-10 18:06 OBJ/i386-sunos5-gcc/remove.d
+-rw-r--r-- joerg/bs 1493 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.d
+-rw-r--r-- joerg/bs 1572 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.d
+-rw-r--r-- joerg/bs 1453 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.d
+-rw-r--r-- joerg/bs 2257 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.d
+-rw-r--r-- joerg/bs 969 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.d
+-rw-r--r-- joerg/bs 1308 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.d
+-rw-r--r-- joerg/bs 1287 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.d
+-rw-r--r-- joerg/bs 1105 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.d
+-rw-r--r-- joerg/bs 1230 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.d
+-rw-r--r-- joerg/bs 1091 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.d
+-rw-r--r-- joerg/bs 961 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.d
+-rw-r--r-- joerg/bs 1113 2003-10-10 18:07 OBJ/i386-sunos5-gcc/props.d
+-rw-r--r-- joerg/bs 2146 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fetchdir.d
+-rw-r--r-- joerg/bs 1093 2003-10-10 18:07 OBJ/i386-sunos5-gcc/unicode.d
+-rw-r--r-- joerg/bs 1211 2003-10-10 18:07 OBJ/i386-sunos5-gcc/subst.d
+-rw-r--r-- joerg/bs 2076 2003-10-11 11:53 OBJ/i386-sunos5-gcc/volhdr.d
+-rw-r--r-- joerg/bs 1480 2003-10-10 18:07 OBJ/i386-sunos5-gcc/chdir.d
+-rw-r--r-- joerg/bs 42460 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star.o
+-rw-r--r-- joerg/bs 22564 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.o
+-rw-r--r-- joerg/bs 7880 2003-10-10 18:07 OBJ/i386-sunos5-gcc/cpiohdr.o
+-rw-r--r-- joerg/bs 14624 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xheader.o
+-rw-r--r-- joerg/bs 924 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xattr.o
+-rw-r--r-- joerg/bs 6120 2003-10-10 18:07 OBJ/i386-sunos5-gcc/list.o
+-rw-r--r-- joerg/bs 12764 2003-10-10 18:07 OBJ/i386-sunos5-gcc/extract.o
+-rw-r--r-- joerg/bs 14668 2003-10-10 18:07 OBJ/i386-sunos5-gcc/create.o
+-rw-r--r-- joerg/bs 2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/append.o
+-rw-r--r-- joerg/bs 7636 2003-10-10 18:07 OBJ/i386-sunos5-gcc/diff.o
+-rw-r--r-- joerg/bs 3072 2003-10-10 18:07 OBJ/i386-sunos5-gcc/remove.o
+-rw-r--r-- joerg/bs 5612 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.o
+-rw-r--r-- joerg/bs 6220 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.o
+-rw-r--r-- joerg/bs 1092 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.o
+-rw-r--r-- joerg/bs 20996 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.o
+-rw-r--r-- joerg/bs 2060 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.o
+-rw-r--r-- joerg/bs 1664 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.o
+-rw-r--r-- joerg/bs 10564 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.o
+-rw-r--r-- joerg/bs 3864 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.o
+-rw-r--r-- joerg/bs 2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o
+-rw-r--r-- joerg/bs 952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o
+-rw-r--r-- joerg/bs 2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/multi-fail.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_201
+#AT_START_202
+at_fn_group_banner 202 'ustar-big-2g.at:22' \
+ "ustar-big-2g" " " 27
+at_xfail=no
+(
+ $as_echo "202. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+{ set +x
+$as_echo "$at_srcdir/ustar-big-2g.at:27:
+
+cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
+
+
+test -z \"\$STAR_TESTSCRIPTS\" && exit 77
+tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
+
+
+tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
+"
+at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-2g.at:27"
+( $at_check_trace;
+
+cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
+
+
+test -z "$STAR_TESTSCRIPTS" && exit 77
+tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
+
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big
+-rw-r--r-- jes/glone 0 2002-06-15 14:53 file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+cat >stderr.re <<'_ATEOF'
+tar: Record size = .*
+_ATEOF
+
+awk '{print NR " " $0}' stderr > $$.1
+awk '{print NR " " $0}' stderr.re | join - $$.1 |
+while read NUM RE LINE
+do
+ echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
+done
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_202
+#AT_START_203
+at_fn_group_banner 203 'ustar-big-8g.at:22' \
+ "ustar-big-8g" " " 27
+at_xfail=no
+(
+ $as_echo "203. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+{ set +x
+$as_echo "$at_srcdir/ustar-big-8g.at:27:
+
+cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
+
+
+test -z \"\$STAR_TESTSCRIPTS\" && exit 77
+tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
+
+
+tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
+"
+at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-8g.at:27"
+( $at_check_trace;
+
+cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
+
+
+test -z "$STAR_TESTSCRIPTS" && exit 77
+tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
+
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1
+-rw-r--r-- jes/glone 0 2002-06-15 14:53 file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+cat >stderr.re <<'_ATEOF'
+tar: Record size = .*
+_ATEOF
+
+awk '{print NR " " $0}' stderr > $$.1
+awk '{print NR " " $0}' stderr.re | join - $$.1 |
+while read NUM RE LINE
+do
+ echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
+done
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_203
+#AT_START_204
+at_fn_group_banner 204 'pax-big-10g.at:22' \
+ "pax-big-10g" " " 27
+at_xfail=no
+(
+ $as_echo "204. $at_setup_line: testing $at_desc ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+{ set +x
+$as_echo "$at_srcdir/pax-big-10g.at:27:
+
+cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
+
+
+test -z \"\$STAR_TESTSCRIPTS\" && exit 77
+tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
+
+
+tar --utc -tvjf \$STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
+"
+at_fn_check_prepare_notrace 'an embedded newline' "pax-big-10g.at:27"
+( $at_check_trace;
+
+cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
+
+
+test -z "$STAR_TESTSCRIPTS" && exit 77
+tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
+
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
+
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g
+-rw-r--r-- jes/glone 0 2002-06-15 14:53 file
+" | \
+ $at_diff - "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:27"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+
+cat >stderr.re <<'_ATEOF'
+tar: Record size = .*
+_ATEOF
+
+awk '{print NR " " $0}' stderr > $$.1
+awk '{print NR " " $0}' stderr.re | join - $$.1 |
+while read NUM RE LINE
+do
+ echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
+done
+
+
+ set +x
+ $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_204
diff --git a/tests/testsuite.at b/tests/testsuite.at
new file mode 100644
index 0000000..cf4b2fd
--- /dev/null
+++ b/tests/testsuite.at
@@ -0,0 +1,468 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004-2008, 2010-2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# We need a recent Autotest.
+m4_version_prereq([2.52g])
+
+m4_define([AT_TAR_CHECK_HOOK])
+m4_define([AT_TAR_CHECK],[
+ AT_XFAIL_IF(test -f $[]XFAILFILE)
+ m4_foreach([FMT],
+ [m4_if([$7],[],[v7,oldgnu,ustar,posix,gnu],[$7])],
+ [AT_CHECK([
+mkdir FMT
+(cd FMT
+TEST_TAR_FORMAT=FMT
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H FMT"
+export TAR_OPTIONS
+rm -rf *
+$1)],$2,$3,$4,$5,$6)
+ AT_TAR_CHECK_HOOK])
+])
+
+m4_define([AT_TAR_WITH_HOOK],[
+ m4_pushdef([AT_TAR_CHECK_HOOK],[$1])
+ $2
+
+ m4_popdef([AT_TAR_CHECK_HOOK])])
+
+m4_define([TAR_IGNREC_HOOK],[
+ AT_CHECK([grep -v '^.*tar: Record size = ' stderr; exit 0])
+])
+
+m4_define([RE_CHECK],[
+AT_DATA([$1.re],[$2])
+awk '{print NR " " $[]0}' $1 > $[]$.1
+awk '{print NR " " $[]0}' $1.re | join - $[]$.1 |
+while read NUM RE LINE
+do
+ echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
+done
+])
+
+m4_define([AT_SKIP_TEST],[exit 77])
+
+dnl AT_TARBALL_PREREQ(tarball, md5sum) - Check if test tarball exists
+dnl in $TEST_DATA_DIR. If it does not, try to download it from
+dnl $TEST_DATA_URL. If download fails, or it the file's md5 sum does not
+dnl match second argument, skip the test.
+
+m4_define([AT_TARBALL_PREREQ],[
+test -z "$[]TEST_DATA_DIR" && AT_SKIP_TEST
+tarball_prereq $1 $2 $[]TEST_DATA_DIR $[]TEST_DATA_URL || AT_SKIP_TEST])
+
+dnl AT_STAR_PREREQ(tarball, md5sum) - Same for star testfiles
+m4_define([AT_STAR_PREREQ],[
+test -z "$STAR_TESTSCRIPTS" && AT_SKIP_TEST
+tarball_prereq $1 $2 $[]STAR_TESTSCRIPTS $[]STAR_DATA_URL || AT_SKIP_TEST
+])
+
+dnl AT_GZIP_PREREQ - Skip test unless gzip (or $1) is available
+m4_define([AT_GZIP_PREREQ],[
+cat /dev/null | m4_if([$1],[],gzip,[$1]) - > /dev/null 2>&1 || AT_SKIP_TEST
+])
+
+dnl AT_SIGPIPE_PREREQ - Skip test unless SIGPIPE handling is the default
+m4_define([AT_SIGPIPE_PREREQ],[
+case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
+?*) AT_SKIP_TEST;;
+esac
+])
+
+dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr
+m4_define([AT_SORT_PREREQ],[
+test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST
+])
+
+dnl AT_UNPRIVILEGED_PREREQ - Skip test if running at root privileges
+m4_define([AT_UNPRIVILEGED_PREREQ],[
+echo "test" > $[]$
+chmod 0 $[]$
+cat $[]$ > /dev/null 2>&1
+result=$?
+rm -f $[]$
+test $result -eq 0 && AT_SKIP_TEST
+])
+
+dnl AT_PRIVILEGED_PREREQ - Skip test if not running at root privileges
+m4_define([AT_PRIVILEGED_PREREQ],[
+echo "test" > $[]$
+chmod 0 $[]$
+cat $[]$ > /dev/null 2>&1
+result=$?
+rm -f $[]$
+test $result -eq 0 || AT_SKIP_TEST
+])
+
+dnl AT_SEEKHOLE_PREREQ
+m4_define([AT_SEEKHOLE_PREREQ],[
+checkseekhole || AT_SKIP_TEST
+])
+
+m4_define([AT_TIMEOUT_PREREQ],[
+timeout 100 true
+if test $? -ne 0; then
+ echo >&2 "the 'timeout' utility not found"
+ AT_SKIP_TEST
+fi
+])
+
+m4_define([AT_TAR_MKHIER],[
+install-sh -d $1 >/dev/null dnl
+m4_if([$2],,,&& genfile --file [$1]/[$2]) || AT_SKIP_TEST])
+
+dnl Skip test when utlity does not return expected return value
+m4_define([AT_CHECK_UTIL],[
+ $1 &> /dev/null
+ if test "$?" != $2; then
+ AT_SKIP_TEST
+ fi
+])
+
+m4_define([AT_XATTRS_UTILS_PREREQ],[
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ AT_CHECK_UTIL(setfattr -n user.test -v test $file,0)
+ AT_CHECK_UTIL(getfattr $file,0)
+])
+m4_define([AT_SELINUX_UTILS_PREREQ],[
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ AT_CHECK_UTIL(restorecon $file, 0)
+ AT_CHECK_UTIL(chcon -h --user=unconfined_u $file,0)
+ rm -rf $file
+])
+m4_define([AT_ACLS_UTILS_PREREQ],[
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ AT_CHECK_UTIL(setfacl -m u:$UID:rwx $file,0)
+ AT_CHECK_UTIL(getfacl $file,0)
+ rm -rf $file
+])
+m4_define([AT_CAPABILITIES_UTILS_PREREQ],[
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ AT_CHECK_UTIL(setcap "= cap_chown=ei" $file,0)
+ AT_CHECK_UTIL(getcap $file,0)
+ rm -rf $file
+])
+m4_define([AT_XATTRS_PREREQ],[
+ AT_XATTRS_UTILS_PREREQ
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfattr -n user.test -v ahoj $file
+ # check whether tar fails to store xattrs
+ err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ AT_SKIP_TEST
+ fi
+])
+m4_define([AT_SELINUX_PREREQ],[
+ AT_SELINUX_UTILS_PREREQ
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ AT_SKIP_TEST
+ fi
+])
+m4_define([AT_ACLS_PREREQ],[
+ AT_ACLS_UTILS_PREREQ
+ file=$(TMPDIR=. mktemp fiXXXXXX)
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ AT_SKIP_TEST
+ fi
+])
+
+dnl Check whether a newly created file has timestamp consistent with the
+dnl local time. Skip the test if not.
+m4_define([AT_CHECK_TIMESTAMP],[ckmtime || AT_SKIP_TEST])
+
+m4_include([sparsemvp.at])
+
+AT_INIT
+
+AT_TESTED([tar])
+
+m4_include([version.at])
+
+m4_include([pipe.at])
+
+m4_include([options.at])
+m4_include([options02.at])
+
+AT_BANNER([Option compatibility])
+m4_include([opcomp01.at])
+m4_include([opcomp02.at])
+m4_include([opcomp03.at])
+m4_include([opcomp04.at])
+m4_include([opcomp05.at])
+m4_include([opcomp06.at])
+
+AT_BANNER([The -T option])
+m4_include([T-mult.at])
+m4_include([T-nest.at])
+m4_include([T-rec.at])
+m4_include([T-recurse.at])
+m4_include([T-cd.at])
+m4_include([T-empty.at])
+m4_include([T-null.at])
+m4_include([T-null2.at])
+m4_include([T-zfile.at])
+m4_include([T-nonl.at])
+m4_include([T-dir00.at])
+m4_include([T-dir01.at])
+
+AT_BANNER([Various options])
+m4_include([indexfile.at])
+m4_include([verbose.at])
+m4_include([gzip.at])
+m4_include([recurse.at])
+m4_include([recurs02.at])
+m4_include([shortrec.at])
+m4_include([numeric.at])
+
+AT_BANNER([The --same-order option])
+m4_include([same-order01.at])
+m4_include([same-order02.at])
+
+AT_BANNER([Append])
+m4_include([append.at])
+m4_include([append01.at])
+m4_include([append02.at])
+m4_include([append03.at])
+m4_include([append04.at])
+m4_include([append05.at])
+
+AT_BANNER([Transforms])
+m4_include([xform-h.at])
+m4_include([xform01.at])
+m4_include([xform02.at])
+
+AT_BANNER([Exclude])
+m4_include([exclude.at])
+m4_include([exclude01.at])
+m4_include([exclude02.at])
+m4_include([exclude03.at])
+m4_include([exclude04.at])
+m4_include([exclude05.at])
+m4_include([exclude06.at])
+m4_include([exclude07.at])
+m4_include([exclude08.at])
+m4_include([exclude09.at])
+m4_include([exclude10.at])
+m4_include([exclude11.at])
+m4_include([exclude12.at])
+m4_include([exclude13.at])
+m4_include([exclude14.at])
+m4_include([exclude15.at])
+m4_include([exclude16.at])
+
+AT_BANNER([Deletions])
+m4_include([delete01.at])
+m4_include([delete02.at])
+m4_include([delete03.at])
+m4_include([delete04.at])
+m4_include([delete05.at])
+
+AT_BANNER([Extracting])
+m4_include([extrac01.at])
+m4_include([extrac02.at])
+m4_include([extrac03.at])
+m4_include([extrac04.at])
+m4_include([extrac05.at])
+m4_include([extrac06.at])
+m4_include([extrac07.at])
+m4_include([extrac08.at])
+m4_include([extrac09.at])
+m4_include([extrac10.at])
+m4_include([extrac11.at])
+m4_include([extrac12.at])
+m4_include([extrac13.at])
+m4_include([extrac14.at])
+m4_include([extrac15.at])
+m4_include([extrac16.at])
+m4_include([extrac17.at])
+m4_include([extrac18.at])
+m4_include([extrac19.at])
+m4_include([backup01.at])
+
+AT_BANNER([Volume label operations])
+m4_include([label01.at])
+m4_include([label02.at])
+m4_include([label03.at])
+m4_include([label04.at])
+m4_include([label05.at])
+
+AT_BANNER([Incremental archives])
+m4_include([incremental.at])
+m4_include([incr01.at])
+m4_include([incr02.at])
+m4_include([listed01.at])
+m4_include([listed02.at])
+m4_include([listed03.at])
+m4_include([listed04.at])
+m4_include([listed05.at])
+m4_include([incr03.at])
+m4_include([incr04.at])
+m4_include([incr05.at])
+m4_include([incr06.at])
+m4_include([incr07.at])
+m4_include([incr08.at])
+m4_include([incr09.at])
+m4_include([incr10.at])
+m4_include([incr11.at])
+
+AT_BANNER([Files removed while archiving])
+m4_include([filerem01.at])
+m4_include([filerem02.at])
+
+AT_BANNER([Renames])
+m4_include([rename01.at])
+m4_include([rename02.at])
+m4_include([rename03.at])
+m4_include([rename04.at])
+m4_include([rename05.at])
+m4_include([chtype.at])
+
+AT_BANNER([Ignore failing reads])
+m4_include([ignfail.at])
+
+AT_BANNER([Link handling])
+m4_include([link01.at])
+m4_include([link02.at])
+m4_include([link03.at])
+m4_include([link04.at])
+
+AT_BANNER([Specific archive formats])
+m4_include([longv7.at])
+m4_include([long01.at])
+m4_include([lustar01.at])
+m4_include([lustar02.at])
+m4_include([lustar03.at])
+m4_include([old.at])
+
+m4_include([time01.at])
+m4_include([time02.at])
+
+AT_BANNER([Multivolume archives])
+m4_include([multiv01.at])
+m4_include([multiv02.at])
+m4_include([multiv03.at])
+m4_include([multiv04.at])
+m4_include([multiv05.at])
+m4_include([multiv06.at])
+m4_include([multiv07.at])
+m4_include([multiv08.at])
+m4_include([multiv09.at])
+
+AT_BANNER([Owner and Groups])
+m4_include([owner.at])
+m4_include([map.at])
+
+AT_BANNER([Sparse files])
+m4_include([sparse01.at])
+m4_include([sparse02.at])
+m4_include([sparse03.at])
+m4_include([sparse04.at])
+m4_include([sparse05.at])
+m4_include([sparse06.at])
+m4_include([sparsemv.at])
+m4_include([spmvp00.at])
+m4_include([spmvp01.at])
+m4_include([spmvp10.at])
+
+AT_BANNER([Updates])
+m4_include([update.at])
+m4_include([update01.at])
+m4_include([update02.at])
+
+AT_BANNER([Verifying the archive])
+m4_include([verify.at])
+
+AT_BANNER([Volume operations])
+m4_include([volume.at])
+m4_include([volsize.at])
+
+AT_BANNER()
+m4_include([comprec.at])
+m4_include([shortfile.at])
+m4_include([shortupd.at])
+
+m4_include([truncate.at])
+m4_include([grow.at])
+m4_include([sigpipe.at])
+m4_include([comperr.at])
+
+AT_BANNER([Removing files after archiving])
+m4_include([remfiles01.at])
+m4_include([remfiles02.at])
+m4_include([remfiles03.at])
+m4_include([remfiles04a.at])
+m4_include([remfiles04b.at])
+m4_include([remfiles04c.at])
+m4_include([remfiles05a.at])
+m4_include([remfiles05b.at])
+m4_include([remfiles05c.at])
+m4_include([remfiles06a.at])
+m4_include([remfiles06b.at])
+m4_include([remfiles06c.at])
+m4_include([remfiles07a.at])
+m4_include([remfiles07b.at])
+m4_include([remfiles07c.at])
+m4_include([remfiles08a.at])
+m4_include([remfiles08b.at])
+m4_include([remfiles08c.at])
+m4_include([remfiles09a.at])
+m4_include([remfiles09b.at])
+m4_include([remfiles09c.at])
+m4_include([remfiles10.at])
+
+AT_BANNER([Extended attributes])
+m4_include([xattr01.at])
+m4_include([xattr02.at])
+m4_include([xattr03.at])
+m4_include([xattr04.at])
+m4_include([xattr05.at])
+
+m4_include([acls01.at])
+m4_include([acls02.at])
+m4_include([acls03.at])
+
+m4_include([selnx01.at])
+m4_include([selacl01.at])
+
+m4_include([capabs_raw01.at])
+
+AT_BANNER([One top level])
+m4_include([onetop01.at])
+m4_include([onetop02.at])
+m4_include([onetop03.at])
+m4_include([onetop04.at])
+m4_include([onetop05.at])
+
+AT_BANNER([Star tests])
+m4_include([star/gtarfail.at])
+m4_include([star/gtarfail2.at])
+
+m4_include([star/multi-fail.at])
+
+m4_include([star/ustar-big-2g.at])
+m4_include([star/ustar-big-8g.at])
+
+m4_include([star/pax-big-10g.at])
+
diff --git a/tests/time01.at b/tests/time01.at
new file mode 100644
index 0000000..d84c6ff
--- /dev/null
+++ b/tests/time01.at
@@ -0,0 +1,70 @@
+# Test time stamps for GNU tar. -*- Autotest -*-
+#
+# Copyright 2012-2014, 2016 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+AT_SETUP([time: tricky time stamps])
+AT_KEYWORDS([time time01])
+
+AT_TAR_CHECK([
+export TZ=UTC0
+mkdir dir
+
+# Test files with time stamps that are near common sources of error,
+# typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
+# Use GNU-style @ notation for very large time stamps, since they
+# typically don't render into years correctly due to int overflow.
+for s in \
+ @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \
+ 0000-01-01T00:00:00 0000-01-01T00:00:01 \
+ 0000-01-02T00:00:00 \
+ 1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \
+ 1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \
+ 1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \
+ 1901-12-14T20:45:51 \
+ 1969-12-31T23:59:58 1969-12-31T23:59:59 \
+ 1970-01-01T00:00:00 1970-01-01T00:00:01 \
+ 2038-01-18T03:14:07 \
+ 2038-01-19T03:14:07 2038-01-19T03:14:08 \
+ 2106-02-07T06:28:15 2106-02-07T06:28:16 \
+ 2242-03-16T12:56:31 2242-03-16T12:56:32 \
+ 9999-12-31T23:59:58 9999-12-31T23:59:59 \
+ @9223372036854775807 @9223372036854775808
+do
+ # Skip a time stamp $s if it's out of range for this platform,
+ # of if it uses a notation that this platform does not recognize.
+ touch -d $s dir/f$s >/dev/null 2>&1 || continue
+
+ # Likewise for $s.1. If $s is the most negative time stamp and
+ # time stamps are signed, then $s.1 is out of range.
+ touch -d $s.1 dir/f$s.$ns >/dev/null 2>&1 || continue
+
+ for frac in 01 001 00001 000001 0000001 00000001 000000001 0000000001 \
+ 9 99 999 99999 999999 9999999 99999999 999999999 9999999999
+ do
+ touch -d $s.$frac dir/f$s.$frac
+ done
+done
+
+tar -c -f archive.tar dir
+tar -d -f archive.tar dir
+],
+[0],
+[], [], [], [],
+[pax])
+
+AT_CLEANUP
diff --git a/tests/time02.at b/tests/time02.at
new file mode 100644
index 0000000..be0360d
--- /dev/null
+++ b/tests/time02.at
@@ -0,0 +1,43 @@
+# Test clamping mtime GNU tar. -*- Autotest -*-
+#
+# Copyright 2016 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Daniel Kahn Gillmor
+
+AT_SETUP([time: clamping mtime])
+AT_KEYWORDS([time time02])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+export TZ=UTC0
+mkdir dir
+
+touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || AT_SKIP_TEST
+touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || AT_SKIP_TEST
+touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || AT_SKIP_TEST
+touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || AT_SKIP_TEST
+
+tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir
+tar -d -f archive.tar dir|sort
+],
+[0],
+[
+dir/c: Mod time differs
+dir/d: Mod time differs
+], [], [], [],
+[pax])
+
+AT_CLEANUP
diff --git a/tests/truncate.at b/tests/truncate.at
new file mode 100644
index 0000000..8f8ff6c
--- /dev/null
+++ b/tests/truncate.at
@@ -0,0 +1,52 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005, 2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.15.1 incorrectly padded archive members that were truncated during
+# archiving.
+# References: <1115437005.8530.644529@goedel.fjf.gnu.de>
+# http://lists.gnu.org/archive/html/bug-tar/2005-05/msg00008.html
+#
+# The test case is based on the script by Frank Heckenbach <frank@g-n-u.de>
+# Additionally, the test verifies if tar exits with code 1 (file differs).
+
+AT_SETUP([truncate])
+AT_KEYWORDS([truncate filechange])
+
+AT_TAR_CHECK([
+genfile --file foo --length 200k
+genfile --file baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+echo Exit status: $?
+echo separator
+genfile --file foo --seek 195k --length 5k --pattern=zeros
+tar dvf bar],
+[1],
+[foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+],
+[tar: foo: File shrank by 5120 bytes; padding with zeros
+])
+
+AT_CLEANUP
diff --git a/tests/update.at b/tests/update.at
new file mode 100644
index 0000000..7f7aa2b
--- /dev/null
+++ b/tests/update.at
@@ -0,0 +1,51 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2005-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that tar --update does not add non-changed directories to the
+# archive.
+# References: <42AB0D28.6030706@mein-horde.de>
+# by Martin Lohmeier <martin@mein-horde.de>
+# on Sat, 11 Jun 2005 18:11:20 +0200
+# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00024.html
+
+AT_SETUP([update unchanged directories])
+AT_KEYWORDS([update update00])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir directory
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 10240 --pattern default --file directory/file2
+
+tar cf archive directory || exit 1
+echo separator
+tar uf archive directory || exit 1
+echo separator
+tar tf archive | sort || exit 1
+],
+[0],
+[separator
+separator
+directory/
+directory/file1
+directory/file2
+])
+
+AT_CLEANUP
diff --git a/tests/update01.at b/tests/update01.at
new file mode 100644
index 0000000..fc20dd2
--- /dev/null
+++ b/tests/update01.at
@@ -0,0 +1,57 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: If dir is a directory and arc is a tar archive which
+# contains that directory, and dir contains some modifications added
+# after adding it to the archive, then 'tar -u dir' would add dir/ to
+# the archive.
+# Last-Affected-Version: 1.22.90
+# References: <4AD4E703.80500@teclabs.eu>
+# http://lists.gnu.org/archive/html/bug-tar/2009-10/msg00017.html
+
+AT_SETUP([update directories])
+AT_KEYWORDS([update update01])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+genfile --file a/c
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+],
+[0],
+[separator
+a/c
+separator
+a/
+a/b
+a/c
+])
+
+AT_CLEANUP
diff --git a/tests/update02.at b/tests/update02.at
new file mode 100644
index 0000000..6ee2dd1
--- /dev/null
+++ b/tests/update02.at
@@ -0,0 +1,54 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: See update01.at
+# Last-Affected-Version: 1.22.90
+# References: <4AD4E703.80500@teclabs.eu>
+# http://lists.gnu.org/archive/html/bug-tar/2009-10/msg00017.html
+
+AT_SETUP([update changed files])
+AT_KEYWORDS([update update02])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+mkdir a
+genfile --file a/b
+
+tar cf arc a
+
+echo "separator"
+
+sleep 2
+touch a/b
+
+tar ufv arc a
+echo "separator"
+tar tf arc | sort || exit 1
+],
+[0],
+[separator
+a/b
+separator
+a/
+a/b
+a/b
+])
+
+AT_CLEANUP
diff --git a/tests/verbose.at b/tests/verbose.at
new file mode 100644
index 0000000..19e2980
--- /dev/null
+++ b/tests/verbose.at
@@ -0,0 +1,44 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2007, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Version 1.15.92 sent verbose output to the archive when invoked
+# as tar cvf - foo.txt > foo.tar
+# Reported by Mike Frysinger <vapier@gentoo.org>
+# References: <200610131946.20530.vapier@gentoo.org>
+
+AT_SETUP([tar cvf -])
+AT_KEYWORDS([stdout verbose])
+
+AT_TAR_CHECK([
+genfile --file file --length 10240
+echo Creating the archive
+tar cvf - file > archive
+echo Testing the archive
+tar tf archive
+],
+[0],
+[Creating the archive
+Testing the archive
+file
+],
+[file
+])
+
+AT_CLEANUP
diff --git a/tests/verify.at b/tests/verify.at
new file mode 100644
index 0000000..a9b8de8
--- /dev/null
+++ b/tests/verify.at
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that tar --verify works.
+# Problem reported by Gilles Espinasse in
+# <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00065.html>.
+
+AT_SETUP([verify])
+AT_KEYWORDS([verify])
+
+AT_TAR_CHECK([
+touch foo
+tar -cvf archive.tar --verify foo
+],
+[0],
+[foo
+Verify foo
+])
+
+AT_CLEANUP
diff --git a/tests/version.at b/tests/version.at
new file mode 100644
index 0000000..f5bec8b
--- /dev/null
+++ b/tests/version.at
@@ -0,0 +1,36 @@
+# Checking tar version -*- Autotest -*-
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([tar version])
+
+AT_CHECK([tar --version | sed 1q],
+ [0],
+ [AT_PACKAGE_TARNAME (AT_PACKAGE_NAME) AT_PACKAGE_VERSION
+],
+[],
+[cat >$[]XFAILFILE <<'_EOT'
+
+==============================================================
+WARNING: Not using the proper version, *all* checks dubious...
+==============================================================
+_EOT
+],
+[rm -f $[]XFAILFILE])
+
+AT_CLEANUP
diff --git a/tests/volsize.at b/tests/volsize.at
new file mode 100644
index 0000000..4c2a5d0
--- /dev/null
+++ b/tests/volsize.at
@@ -0,0 +1,59 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2006-2009, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Description: The size field of a volume header was ignored when listing,
+# but taken into account when extracting. Thus it was possible to hide
+# some files within the archive, placing them after a volume header and
+# manually modifying its size field. Test tarball kindly provided by Tomas.
+# Reported by: Thomas <metaf4@users.askja.de>
+# References: <4462E13A.3080008@users.askja.de>,
+# <44639C4C.5050401@users.askja.de>
+
+AT_SETUP([volume header size])
+AT_KEYWORDS([volume volsize])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+AT_TARBALL_PREREQ([abc.tar],[540f196ceddcad9e7bd2f2d7533d0474])
+
+echo Short Listing
+tar tf $TEST_DATA_DIR/abc.tar
+echo Verbose Listing
+tar --utc -tvf $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+],
+[0],
+[Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+],
+[])
+
+AT_CLEANUP
+
+# End of volsize.at
diff --git a/tests/volume.at b/tests/volume.at
new file mode 100644
index 0000000..4154440
--- /dev/null
+++ b/tests/volume.at
@@ -0,0 +1,58 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2004, 2006-2007, 2013-2014, 2016 Free Software Foundation,
+# Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Volume labels are checked on read by fnmatch.
+
+AT_SETUP([volume])
+AT_KEYWORDS([volume volcheck])
+
+AT_TAR_CHECK([
+tar -cf archive -V label -T /dev/null || exit 1
+
+tar xfV archive label || exit 1
+tar xfV archive 'la?el' || exit 1
+tar xfV archive 'l*l' || exit 1
+
+echo 1>&2 -----
+tar xfV archive lab
+test $? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive bel
+test $? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive babel
+test $? = 2
+],
+[0],
+[],
+[-----
+tar: Volume 'label' does not match 'lab'
+tar: Error is not recoverable: exiting now
+-----
+tar: Volume 'label' does not match 'bel'
+tar: Error is not recoverable: exiting now
+-----
+tar: Volume 'label' does not match 'babel'
+tar: Error is not recoverable: exiting now
+],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/xattr01.at b/tests/xattr01.at
new file mode 100644
index 0000000..349f1e5
--- /dev/null
+++ b/tests/xattr01.at
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2011, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description:
+#
+# This is basic test for support of extended attributes.
+
+AT_SETUP([xattrs: basic functionality])
+AT_KEYWORDS([xattrs xattr01])
+
+AT_TAR_CHECK([
+AT_XATTRS_PREREQ
+mkdir dir
+genfile --file dir/file
+
+setfattr -n user.test -v OurDirValue dir
+setfattr -n user.test -v OurFileValue dir/file
+
+tar --xattrs -cf archive.tar dir
+
+rm -rf dir
+tar --xattrs -xf archive.tar
+
+getfattr -h -d dir | grep -v -e '^#' -e ^$
+getfattr -h -d dir/file | grep -v -e '^#' -e ^$
+],
+[0],
+[user.test="OurDirValue"
+user.test="OurFileValue"
+])
+
+AT_CLEANUP
diff --git a/tests/xattr02.at b/tests/xattr02.at
new file mode 100644
index 0000000..d4ca71b
--- /dev/null
+++ b/tests/xattr02.at
@@ -0,0 +1,57 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2011, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description:
+#
+# Cooperation of the '-C' option and storing/restoring extended attributes.
+
+AT_SETUP([xattrs: change directory with -C option])
+AT_KEYWORDS([xattrs xattr02])
+
+AT_TAR_CHECK([
+AT_XATTRS_PREREQ
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n user.test -v OurFile1Value dir/file1
+setfattr -n user.test -v OurFile2Value dir/subdir/file2
+setfattr -n user.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs -xf archive.tar
+
+getfattr -h -d file1 | grep -v -e '^#' -e ^$
+getfattr -h -d file2 | grep -v -e '^#' -e ^$
+getfattr -h -d subsubdir | grep -v -e '^#' -e ^$
+],
+[0],
+[user.test="OurFile1Value"
+user.test="OurFile2Value"
+user.test="OurDirValue"
+])
+
+AT_CLEANUP
diff --git a/tests/xattr03.at b/tests/xattr03.at
new file mode 100644
index 0000000..51b191b
--- /dev/null
+++ b/tests/xattr03.at
@@ -0,0 +1,58 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2012-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description:
+#
+# Setup of the trusted.* domain under privileged user.
+
+AT_SETUP([xattrs: trusted.* attributes])
+AT_KEYWORDS([xattrs xattr03])
+
+AT_TAR_CHECK([
+AT_PRIVILEGED_PREREQ
+AT_XATTRS_PREREQ
+
+mkdir dir
+mkdir dir/subdir
+mkdir dir/subdir/subsubdir
+genfile --file dir/file1
+genfile --file dir/subdir/file2
+
+setfattr -n trusted.test -v OurFile1Value dir/file1
+setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
+setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir
+
+tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
+
+rm -rf dir
+
+tar --xattrs --xattrs-include=trusted* -xf archive.tar
+
+getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$
+getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$
+],
+[0],
+[trusted.test="OurFile1Value"
+trusted.test="OurFile2Value"
+trusted.test="OurDirValue"
+])
+
+AT_CLEANUP
diff --git a/tests/xattr04.at b/tests/xattr04.at
new file mode 100644
index 0000000..13d0dd2
--- /dev/null
+++ b/tests/xattr04.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2012-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description: Test for the regression caused by tar update from 1.23 to
+# 1.26, Red Hat xattr patch was not ready for open->openat conversion.
+#
+# Related commit 4bde4f3. See the bug: https://bugzilla.redhat.com/717684
+
+AT_SETUP([xattrs: s/open/openat/ regression])
+AT_KEYWORDS([xattrs xattr04])
+
+AT_TAR_CHECK([
+AT_XATTRS_PREREQ
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.test -v value dir/file
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+ret=$?
+getfattr -h -d output/file | grep -v -e '^#' -e ^$
+exit $ret
+],
+[0],
+[user.test="value"
+])
+
+AT_CLEANUP
diff --git a/tests/xattr05.at b/tests/xattr05.at
new file mode 100644
index 0000000..ab5a2ab
--- /dev/null
+++ b/tests/xattr05.at
@@ -0,0 +1,51 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2012-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Test description: Test for archiving/extracting of extended attributes
+# having the '=' character in its keyword.
+#
+# Relevant mailing list thread:
+#
+# http://lists.gnu.org/archive/html/bug-tar/2012-10/msg00017.html
+
+AT_SETUP([xattrs: keywords with '=' and '%'])
+AT_KEYWORDS([xattrs xattr05])
+
+AT_TAR_CHECK([
+AT_XATTRS_PREREQ
+
+mkdir dir
+mkdir output
+genfile --file dir/file
+
+setfattr -n user.=NAME%3D= -v value dir/file
+getfattr -d dir/file | grep -v '# ' > before
+
+# archive whole directory including binary xattrs
+tar --xattrs -cf archive.tar -C dir .
+
+tar --xattrs -xf archive.tar -C output
+getfattr -d output/file | grep -v '# ' > after
+diff before after
+],
+[0],
+[])
+
+AT_CLEANUP
diff --git a/tests/xform-h.at b/tests/xform-h.at
new file mode 100644
index 0000000..dddf016
--- /dev/null
+++ b/tests/xform-h.at
@@ -0,0 +1,61 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009-2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# When creating archives, tar 1.22 did not apply the --transform option
+# to hard links.
+#
+# Reported by: Jose Miguel Goncalves <jose.goncalves@inov.pt>
+# References:
+# <4A436D1D.4040408@inov.pt>
+# http://lists.gnu.org/archive/html/bug-tar/2009-06/msg00017.html
+#
+
+AT_SETUP([transforming hard links on create])
+AT_KEYWORDS([transform xform xform-h])
+
+m4_pushdef([xformtest],[
+echo "$1"
+tar cf archive --transform="s,^basedir/,,$2" basedir/test basedir/test_link
+tar tvf archive | sed -n 's/.*test_link link to //p'
+])
+
+AT_TAR_CHECK([
+mkdir basedir
+echo "hello" > basedir/test
+ln basedir/test basedir/test_link
+
+xformtest(Default transform scope)
+xformtest(Transforming hard links,h)
+xformtest(Not transforming hard links,H)
+],
+[0],
+[Default transform scope
+test
+Transforming hard links
+test
+Not transforming hard links
+basedir/test
+])
+
+m4_popdef([xformtest])
+
+AT_CLEANUP
+
+# End of xform-h.at
diff --git a/tests/xform01.at b/tests/xform01.at
new file mode 100644
index 0000000..2e76bb4
--- /dev/null
+++ b/tests/xform01.at
@@ -0,0 +1,43 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2010, 2013-2014, 2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Transformations should not apply to GNU volume labels.
+# Reported by: Thomas Graf <hausmeister@askja.de>
+# References: <4C72AB8D.3070706@askja.de>
+# http://lists.gnu.org/archive/html/bug-tar/2010-08/msg00035.html
+
+AT_SETUP([transformations and GNU volume labels])
+AT_KEYWORDS([transform xform xform01 volume])
+
+AT_TAR_CHECK([
+genfile --file file
+tar -cf archive.tar -V /label/ file
+tar tf archive.tar
+],
+[0],
+[/label/
+file
+],
+[],[],[],[gnu])
+
+AT_CLEANUP
+
+
+
diff --git a/tests/xform02.at b/tests/xform02.at
new file mode 100644
index 0000000..98306aa
--- /dev/null
+++ b/tests/xform02.at
@@ -0,0 +1,36 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright 2009-2010, 2013-2016 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([transforming escaped delimiters on create])
+AT_KEYWORDS([transform xform delimiter])
+
+AT_TAR_CHECK([
+genfile --file file
+tar cvf /dev/null file \
+ --transform='s/file/other\/name/' \
+ --show-transformed-name
+],
+[0],
+[other/name
+])
+
+AT_CLEANUP
+
+# End of xform02.at