summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am161
-rw-r--r--tests/Makefile.in817
-rw-r--r--tests/T-empty.at52
-rw-r--r--tests/T-null.at46
-rw-r--r--tests/append.at34
-rw-r--r--tests/append01.at48
-rw-r--r--tests/append02.at75
-rw-r--r--tests/argcv.c396
-rw-r--r--tests/argcv.h50
-rw-r--r--tests/atlocal.in33
-rw-r--r--tests/chtype.at73
-rw-r--r--tests/comprec.at41
-rw-r--r--tests/delete01.at36
-rw-r--r--tests/delete02.at44
-rw-r--r--tests/delete03.at48
-rw-r--r--tests/delete04.at53
-rw-r--r--tests/delete05.at48
-rw-r--r--tests/exclude.at161
-rw-r--r--tests/extrac01.at33
-rw-r--r--tests/extrac02.at37
-rw-r--r--tests/extrac03.at37
-rw-r--r--tests/extrac04.at47
-rw-r--r--tests/extrac05.at61
-rw-r--r--tests/extrac06.at72
-rw-r--r--tests/extrac07.at57
-rw-r--r--tests/genfile.c884
-rw-r--r--tests/grow.at40
-rw-r--r--tests/gzip.at42
-rw-r--r--tests/ignfail.at77
-rw-r--r--tests/incr01.at55
-rw-r--r--tests/incr02.at77
-rw-r--r--tests/incr03.at78
-rw-r--r--tests/incr04.at63
-rw-r--r--tests/incremental.at60
-rw-r--r--tests/indexfile.at47
-rw-r--r--tests/link01.at55
-rw-r--r--tests/listed01.at63
-rw-r--r--tests/listed02.at150
-rw-r--r--tests/long01.at49
-rw-r--r--tests/longv7.at48
-rw-r--r--tests/lustar01.at37
-rw-r--r--tests/lustar02.at42
-rw-r--r--tests/lustar03.at43
-rw-r--r--tests/multiv01.at66
-rw-r--r--tests/multiv02.at49
-rw-r--r--tests/multiv03.at71
-rw-r--r--tests/multiv04.at66
-rw-r--r--tests/multiv05.at67
-rw-r--r--tests/old.at37
-rw-r--r--tests/options.at37
-rw-r--r--tests/options02.at39
-rw-r--r--tests/package.m46
-rw-r--r--tests/pipe.at54
-rw-r--r--tests/recurse.at34
-rw-r--r--tests/rename01.at89
-rw-r--r--tests/rename02.at102
-rw-r--r--tests/rename03.at126
-rw-r--r--tests/same-order01.at47
-rw-r--r--tests/same-order02.at49
-rw-r--r--tests/shortrec.at39
-rw-r--r--tests/sparse01.at52
-rw-r--r--tests/sparse02.at41
-rw-r--r--tests/sparse03.at56
-rw-r--r--tests/sparsemv.at65
-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/README68
-rw-r--r--tests/star/gtarfail.at40
-rw-r--r--tests/star/gtarfail2.at45
-rw-r--r--tests/star/multi-fail.at89
-rw-r--r--tests/star/pax-big-10g.at43
-rwxr-xr-xtests/star/quicktest.sh108
-rw-r--r--tests/star/ustar-big-2g.at42
-rw-r--r--tests/star/ustar-big-8g.at42
-rwxr-xr-xtests/testsuite27410
-rw-r--r--tests/testsuite.at194
-rw-r--r--tests/truncate.at53
-rw-r--r--tests/update.at50
-rw-r--r--tests/verbose.at44
-rw-r--r--tests/version.at35
-rw-r--r--tests/volsize.at60
-rw-r--r--tests/volume.at58
84 files changed, 34181 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..d339bc2
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,161 @@
+# Makefile for GNU tar regression tests.
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+
+# François Pinard <pinard@iro.umontreal.ca>, 1988.
+# Sergey Poznyakoff <gray@mirddin.farlep.net>, 2004.
+
+## 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 2, 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.
+
+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-empty.at\
+ T-null.at\
+ testsuite.at\
+ append.at\
+ append01.at\
+ append02.at\
+ chtype.at\
+ comprec.at\
+ delete01.at\
+ delete02.at\
+ delete03.at\
+ delete04.at\
+ delete05.at\
+ exclude.at\
+ extrac01.at\
+ extrac02.at\
+ extrac03.at\
+ extrac04.at\
+ extrac05.at\
+ extrac06.at\
+ extrac07.at\
+ gzip.at\
+ grow.at\
+ incremental.at\
+ incr01.at\
+ incr02.at\
+ incr03.at\
+ incr04.at\
+ indexfile.at\
+ ignfail.at\
+ link01.at\
+ listed01.at\
+ listed02.at\
+ long01.at\
+ longv7.at\
+ lustar01.at\
+ lustar02.at\
+ lustar03.at\
+ multiv01.at\
+ multiv02.at\
+ multiv03.at\
+ multiv04.at\
+ multiv05.at\
+ old.at\
+ options.at\
+ options02.at\
+ pipe.at\
+ recurse.at\
+ rename01.at\
+ rename02.at\
+ rename03.at\
+ same-order01.at\
+ same-order02.at\
+ shortrec.at\
+ sparse01.at\
+ sparse02.at\
+ sparse03.at\
+ sparsemv.at\
+ sparsemvp.at\
+ spmvp00.at\
+ spmvp01.at\
+ spmvp10.at\
+ truncate.at\
+ update.at\
+ volsize.at\
+ volume.at\
+ verbose.at\
+ version.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
+
+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)
+
+check-full:
+ FULL_TEST=1 $(MAKE) check
+
+#check_SCRIPTS = tar
+
+# Run the test suite on the *installed* tree.
+installcheck-local:
+ $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
+
+
+## ------------ ##
+## genfile ##
+## ------------ ##
+
+check_PROGRAMS = genfile
+
+genfile_SOURCES = genfile.c argcv.c argcv.h
+
+localedir = $(datadir)/locale
+INCLUDES = -I$(top_srcdir)/lib -I../lib -I$(top_srcdir)/src
+AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
+LDADD = ../lib/libtar.a $(LIBINTL) $(LIB_CLOCK_GETTIME)
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..e2615cf
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,817 @@
+# Makefile.in generated by automake 1.10a from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007 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 (C) 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+
+# François Pinard <pinard@iro.umontreal.ca>, 1988.
+# Sergey Poznyakoff <gray@mirddin.farlep.net>, 2004.
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@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)
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/atlocal.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
+ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
+ $(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/argp.m4 \
+ $(top_srcdir)/m4/backupfile.m4 $(top_srcdir)/m4/bison.m4 \
+ $(top_srcdir)/m4/canonicalize-lgpl.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/closeout.m4 \
+ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/d-ino.m4 \
+ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/exclude.m4 $(top_srcdir)/m4/exitfail.m4 \
+ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \
+ $(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl_h.m4 \
+ $(top_srcdir)/m4/fileblocks.m4 $(top_srcdir)/m4/float_h.m4 \
+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
+ $(top_srcdir)/m4/ftruncate.m4 \
+ $(top_srcdir)/m4/getcwd-abort-bug.m4 \
+ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+ $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.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/hash.m4 \
+ $(top_srcdir)/m4/human.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/inline.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/lchown.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/longlong.m4 \
+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+ $(top_srcdir)/m4/mbscasecmp.m4 $(top_srcdir)/m4/mbstate_t.m4 \
+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \
+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/memset.m4 \
+ $(top_srcdir)/m4/mkdtemp.m4 $(top_srcdir)/m4/mktime.m4 \
+ $(top_srcdir)/m4/modechange.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/paxutils.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/regex.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/setenv.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.m4 \
+ $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stdarg.m4 \
+ $(top_srcdir)/m4/stdbool.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/string_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/sys_stat_h.m4 \
+ $(top_srcdir)/m4/sys_time_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/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlinkdir.m4 $(top_srcdir)/m4/unlocked-io.m4 \
+ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \
+ $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
+ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/vsnprintf.m4 $(top_srcdir)/m4/wchar.m4 \
+ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \
+ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \
+ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
+ $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = atlocal
+am_genfile_OBJECTS = genfile.$(OBJEXT) argcv.$(OBJEXT)
+genfile_OBJECTS = $(am_genfile_OBJECTS)
+genfile_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+genfile_DEPENDENCIES = ../lib/libtar.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(genfile_SOURCES)
+DIST_SOURCES = $(genfile_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@
+ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@
+ABSOLUTE_FLOAT_H = @ABSOLUTE_FLOAT_H@
+ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@
+ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
+ABSOLUTE_STDIO_H = @ABSOLUTE_STDIO_H@
+ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@
+ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
+ABSOLUTE_SYSEXITS_H = @ABSOLUTE_SYSEXITS_H@
+ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@
+ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@
+ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@
+ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@
+ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@
+ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+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@
+DIRENT_H = @DIRENT_H@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FCNTL_H = @FCNTL_H@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GREP = @GREP@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_IO_H = @HAVE_IO_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_READLINK = @HAVE_READLINK@
+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_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_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTTYPES_H = @INTTYPES_H@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTAR_LIBDEPS = @LIBTAR_LIBDEPS@
+LIBTAR_LTLIBDEPS = @LIBTAR_LTLIBDEPS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_SETSOCKOPT = @LIB_SETSOCKOPT@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+PU_RMT_PROG = @PU_RMT_PROG@
+RANLIB = @RANLIB@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYSEXITS_H = @SYSEXITS_H@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+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_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@
+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@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+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-empty.at\
+ T-null.at\
+ testsuite.at\
+ append.at\
+ append01.at\
+ append02.at\
+ chtype.at\
+ comprec.at\
+ delete01.at\
+ delete02.at\
+ delete03.at\
+ delete04.at\
+ delete05.at\
+ exclude.at\
+ extrac01.at\
+ extrac02.at\
+ extrac03.at\
+ extrac04.at\
+ extrac05.at\
+ extrac06.at\
+ extrac07.at\
+ gzip.at\
+ grow.at\
+ incremental.at\
+ incr01.at\
+ incr02.at\
+ incr03.at\
+ incr04.at\
+ indexfile.at\
+ ignfail.at\
+ link01.at\
+ listed01.at\
+ listed02.at\
+ long01.at\
+ longv7.at\
+ lustar01.at\
+ lustar02.at\
+ lustar03.at\
+ multiv01.at\
+ multiv02.at\
+ multiv03.at\
+ multiv04.at\
+ multiv05.at\
+ old.at\
+ options.at\
+ options02.at\
+ pipe.at\
+ recurse.at\
+ rename01.at\
+ rename02.at\
+ rename03.at\
+ same-order01.at\
+ same-order02.at\
+ shortrec.at\
+ sparse01.at\
+ sparse02.at\
+ sparse03.at\
+ sparsemv.at\
+ sparsemvp.at\
+ spmvp00.at\
+ spmvp01.at\
+ spmvp10.at\
+ truncate.at\
+ update.at\
+ volsize.at\
+ volume.at\
+ verbose.at\
+ version.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
+
+TESTSUITE = $(srcdir)/testsuite
+AUTOTEST = $(AUTOM4TE) --language=autotest
+genfile_SOURCES = genfile.c argcv.c argcv.h
+INCLUDES = -I$(top_srcdir)/lib -I../lib -I$(top_srcdir)/src
+AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
+LDADD = ../lib/libtar.a $(LIBINTL) $(LIB_CLOCK_GETTIME)
+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 \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/Makefile'; \
+ 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
+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)
+genfile$(EXEEXT): $(genfile_OBJECTS) $(genfile_DEPENDENCIES)
+ @rm -f genfile$(EXEEXT)
+ $(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)/genfile.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+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
+
+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: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+ clean-checkPROGRAMS clean-generic clean-local ctags distclean \
+ distclean-compile distclean-generic 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 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
+$(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)
+
+check-full:
+ FULL_TEST=1 $(MAKE) check
+
+#check_SCRIPTS = tar
+
+# Run the test suite on the *installed* tree.
+installcheck-local:
+ $(SHELL) $(TESTSUITE) 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-empty.at b/tests/T-empty.at
new file mode 100644
index 0000000..be902fb
--- /dev/null
+++ b/tests/T-empty.at
@@ -0,0 +1,52 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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([files-from: empty entries])
+AT_KEYWORDS([files-from empty])
+
+AT_DATA([file-list],
+[jeden
+dwa
+
+trzy
+])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+genfile --file jeden
+genfile --file dwa
+genfile --file trzy
+
+tar cfvT archive ../file-list | sort
+],
+[0],
+[dwa
+jeden
+trzy
+],
+[],[],[],[ustar]) # Testing one format is enough
+
+AT_CLEANUP \ No newline at end of file
diff --git a/tests/T-null.at b/tests/T-null.at
new file mode 100644
index 0000000..206f5e8
--- /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 (C) 2006 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 2, 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.
+
+AT_SETUP([files-from: 0-separated file without -0])
+AT_KEYWORDS([files-from null])
+
+AT_TAR_CHECK([
+AT_SORT_PREREQ
+
+echo dwa > temp
+echo trzy >> temp
+cat temp | tr '\n' '\0' > temp1
+echo jeden > file-list
+cat temp1 >> file-list
+
+genfile -f "jeden
+dwa" || AT_SKIP_TEST
+genfile -f trzy
+
+tar cfTv archive file-list | sort
+],
+[0],
+[jeden\ndwa
+trzy
+],
+[tar: file-list: file name read contains nul character
+],[],[],[ustar]) # Testing one format is enough
+
+AT_CLEANUP
diff --git a/tests/append.at b/tests/append.at
new file mode 100644
index 0000000..0ef4d9d
--- /dev/null
+++ b/tests/append.at
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+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..f8efb1c
--- /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 (C) 2005, 2006 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 2, 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.
+
+# 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_define([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])
+
+AT_CLEANUP
+
diff --git a/tests/append02.at b/tests/append02.at
new file mode 100644
index 0000000..3c31a34
--- /dev/null
+++ b/tests/append02.at
@@ -0,0 +1,75 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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). Namely, in the
+# second case the mode field of all members, except the first, was truncated
+# to lower 3 octets (& 0777).
+#
+# References:
+# <200607210526.AA03440@tamuki.linet.gr.jp>
+# http://lists.gnu.org/archive/html/bug-tar/2006-07/msg00029.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/argcv.c b/tests/argcv.c
new file mode 100644
index 0000000..a9d4061
--- /dev/null
+++ b/tests/argcv.c
@@ -0,0 +1,396 @@
+/* argcv.c - simple functions for parsing input based on whitespace
+ Copyright (C) 1999, 2000, 2001 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 2 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 */
+
+#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 (*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(*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 (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..029b1f8
--- /dev/null
+++ b/tests/argcv.h
@@ -0,0 +1,50 @@
+/* GNU Mailutils -- a suite of utilities for electronic mail
+ Copyright (C) 1999, 2000, 2001 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 2 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..f095080
--- /dev/null
+++ b/tests/atlocal.in
@@ -0,0 +1,33 @@
+# @configure_input@ -*- shell-script -*-
+# Configurable variable values for tar test suite.
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+
+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
+fi
+
+STAR_DATA_URL=http://download.berlios.de/pub/star/testscripts
+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
+ if test -r $3/$1; then
+ :
+ elif test -n "$FULL_TEST"; then
+ wget -q --directory-prefix=$3 $4/$1
+ fi
+ fi
+ echo "$2 $3/$1" | md5sum --status --check - >/dev/null 2>&1
+}
+
+
diff --git a/tests/chtype.at b/tests/chtype.at
new file mode 100644
index 0000000..a2c3b63
--- /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 (C) 2006 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 2, 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.
+
+# 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 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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+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/comprec.at b/tests/comprec.at
new file mode 100644
index 0000000..197e9b8
--- /dev/null
+++ b/tests/comprec.at
@@ -0,0 +1,41 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+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
+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..a401c94
--- /dev/null
+++ b/tests/delete01.at
@@ -0,0 +1,36 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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..4e45b4f
--- /dev/null
+++ b/tests/delete02.at
@@ -0,0 +1,44 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2005 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 2, 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.
+
+# 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..29dc644
--- /dev/null
+++ b/tests/delete03.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004 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 2, 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.
+
+AT_SETUP([deleting members with long names])
+AT_KEYWORDS([delete delete03])
+
+m4_define([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])
+
+AT_CLEANUP
diff --git a/tests/delete04.at b/tests/delete04.at
new file mode 100644
index 0000000..9f4f2a4
--- /dev/null
+++ b/tests/delete04.at
@@ -0,0 +1,53 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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..3faaa20
--- /dev/null
+++ b/tests/delete05.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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: Error exit delayed from previous errors
+])
+
+AT_CLEANUP
diff --git a/tests/exclude.at b/tests/exclude.at
new file mode 100644
index 0000000..817ef76
--- /dev/null
+++ b/tests/exclude.at
@@ -0,0 +1,161 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2007 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 2, 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.
+
+# Test the functioning of --exclude-caches and --exclude-tag option families
+
+AT_SETUP([exclude])
+AT_KEYWORDS([exclude])
+
+AT_TAR_CHECK([
+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
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar
+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
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar
+done
+],
+[0],
+[OPTION exclude-caches
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+dir/rock/
+dir/rock/CACHEDIR.TAG
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+dir/rock/
+dir/rock/CACHEDIR.TAG
+OPTION exclude-caches-under
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+dir/rock/
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+dir/rock/
+OPTION exclude-caches-all
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+OPTION exclude-tag
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+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/jazz
+dir/folk/
+dir/folk/tagfile
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+OPTION exclude-tag-under
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+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/jazz
+dir/folk/
+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/extrac01.at b/tests/extrac01.at
new file mode 100644
index 0000000..f458ba7
--- /dev/null
+++ b/tests/extrac01.at
@@ -0,0 +1,33 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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 || exit 1
+])
+
+AT_CLEANUP
diff --git a/tests/extrac02.at b/tests/extrac02.at
new file mode 100644
index 0000000..ee2517a
--- /dev/null
+++ b/tests/extrac02.at
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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..1a2f6d4
--- /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 (C) 2004 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 2, 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.
+
+# 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],
+[0],
+[directory/../directory/
+separator
+directory/../directory/
+])
+
+AT_CLEANUP
diff --git a/tests/extrac04.at b/tests/extrac04.at
new file mode 100644
index 0000000..ddc5651
--- /dev/null
+++ b/tests/extrac04.at
@@ -0,0 +1,47 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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..f20830b
--- /dev/null
+++ b/tests/extrac05.at
@@ -0,0 +1,61 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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 --length 118 --file jeden
+genfile --length 223 --file dwa
+genfile --length 517 --file trzy
+genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
+genfile --length 110 --file cztery
+
+tar cf archive jeden dwa trzy cztery || exit 1
+
+mkdir dir
+cd dir
+
+tar xvfT ../archive ../../list || 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..983e5fe
--- /dev/null
+++ b/tests/extrac06.at
@@ -0,0 +1,72 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+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..1919a2a
--- /dev/null
+++ b/tests/extrac07.at
@@ -0,0 +1,57 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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([
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+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/genfile.c b/tests/genfile.c
new file mode 100644
index 0000000..8032dd3
--- /dev/null
+++ b/tests/genfile.c
@@ -0,0 +1,884 @@
+/* Generate a file containing some preset patterns.
+ Print statistics for existing files.
+
+ Copyright (C) 1995, 1996, 1997, 2001, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ François Pinard <pinard@iro.umontreal.ca>, 1995.
+ Sergey Poznyakoff <gray@mirddin.farlep.net>, 2004, 2005, 2006.
+
+ 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 2, 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 <getdate.h>
+#include <setenv.h>
+#include <utimens.h>
+#include <inttostr.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;
+
+/* Time for --touch option */
+struct timespec touch_time;
+
+/* Verbose mode */
+int verbose;
+
+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
+
+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 },
+
+#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_("COMMAND"), 0,
+ N_("Execute given COMMAND. Useful with --checkpoint and one of --cut, --append, --touch"),
+ 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 },
+#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)
+ {
+ printf ("%lu %lu\n", (unsigned long)st.st_size , (unsigned long)file_length);
+ exit (1);
+ }
+
+ if (mode == mode_sparse && !ST_IS_SPARSE (st))
+ exit (1);
+ }
+}
+
+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 's':
+ mode = mode_sparse;
+ break;
+
+ case 'S':
+ mode = mode_stat;
+ if (arg)
+ stat_format = arg;
+ break;
+
+ case 'r':
+ mode = mode_exec;
+ argcv_get (arg, "", NULL, &exec_argc, &exec_argv);
+ 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 (!get_date (&touch_time, arg, NULL))
+ argp_error (state, _("Unknown date format"));
+ break;
+
+ case OPT_APPEND:
+ case OPT_TRUNCATE:
+ case OPT_TOUCH:
+ case OPT_EXEC:
+ 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 ? "r+" : "w");
+ if (!fp)
+ error (EXIT_FAILURE, 0, _("cannot open `%s'"), filename);
+ }
+ else
+ fp = stdout;
+
+ if (fseeko (fp, seek_offset, 0))
+ error (EXIT_FAILURE, 0, _("cannot seek: %s"), strerror (errno));
+
+ 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, "r") : 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)
+{
+ if (lseek (fd, displ, SEEK_CUR) == -1)
+ error (EXIT_FAILURE, errno, "lseek");
+ ftruncate (fd, lseek (fd, 0, SEEK_CUR));
+}
+
+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 void
+generate_sparse_file (int argc, char **argv)
+{
+ int i;
+ int fd;
+ int flags = O_CREAT|O_RDWR;
+
+ 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, 0644);
+ if (fd < 0)
+ error (EXIT_FAILURE, 0, _("cannot open `%s'"), file_name);
+
+ buffer = xmalloc (block_size);
+
+ file_length = 0;
+
+ for (i = 0; i < argc; i += 2)
+ {
+ off_t displ = get_size (argv[i], 1);
+ file_length += displ;
+
+ if (i == argc-1)
+ {
+ mkhole (fd, displ);
+ break;
+ }
+ else
+ {
+ file_length += block_size * strlen (argv[i+1]);
+ mksparse (fd, displ, argv[i+1]);
+ }
+ }
+
+ 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)
+ {
+ mode_t mask = ~0;
+
+ if (ispunct (p[4]))
+ {
+ char *q;
+
+ mask = 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", st.st_mode & mask);
+ }
+ 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 (utimens (p->name, ts) != 0)
+ {
+ error (0, errno, _("cannot set time on `%s'"), p->name);
+ break;
+ }
+ }
+ break;
+
+ case OPT_APPEND:
+ {
+ FILE *fp = fopen (p->name, "a");
+ 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);
+ if (fd == -1)
+ {
+ error (0, errno, _("cannot open `%s'"), p->name);
+ break;
+ }
+ ftruncate (fd, p->size);
+ close (fd);
+ }
+ break;
+
+ case OPT_EXEC:
+ system (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) */
+ 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";
+
+#ifdef SIGCHLD
+ /* System V fork+wait does not work if SIGCHLD is ignored. */
+ signal (SIGCHLD, SIG_DFL);
+#endif
+
+ pipe (fd);
+
+ 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");
+ }
+
+ /* Master */
+ close (fd[1]);
+ fp = fdopen (fd[0], "r");
+ if (fp == NULL)
+ error (EXIT_FAILURE, errno, "fdopen");
+
+ while ((p = fgets (buf, sizeof buf, fp)))
+ {
+ while (*p && !isspace (*p) && *p != ':')
+ p++;
+
+ if (*p == ':')
+ {
+ for (p++; *p && isspace (*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 (*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);
+
+ get_date (&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:
+ 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..3074d61
--- /dev/null
+++ b/tests/grow.at
@@ -0,0 +1,40 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+],
+[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..a68520e
--- /dev/null
+++ b/tests/gzip.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004 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 2, 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.
+
+# 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
+test $? = 2 || exit 1
+],
+[0],
+[],
+[
+gzip: stdin: unexpected end of file
+tar: Child returned status 1
+tar: Error exit delayed from previous errors
+],
+[],[])
+
+AT_CLEANUP
diff --git a/tests/ignfail.at b/tests/ignfail.at
new file mode 100644
index 0000000..feab9d7
--- /dev/null
+++ b/tests/ignfail.at
@@ -0,0 +1,77 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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: Error exit delayed from previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Error exit delayed from 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..91ff39a
--- /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 (C) 2005 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 2, 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.
+
+# 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([
+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
+echo separator
+tar xvfg archive.1 /dev/null
+],
+[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..b456341
--- /dev/null
+++ b/tests/incr02.at
@@ -0,0 +1,77 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2005 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 2, 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.
+
+# 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([
+# 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..474ae7f
--- /dev/null
+++ b/tests/incr03.at
@@ -0,0 +1,78 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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_SORT_PREREQ
+mkdir directory
+genfile --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+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..42bb781
--- /dev/null
+++ b/tests/incr04.at
@@ -0,0 +1,63 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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_define([NAME_PREFIX],[a/b/one_31_chars_long_file_name_])
+
+AT_TAR_CHECK([
+AT_TAR_MKHIER(a/b)
+awk 'BEGIN {
+ for (i=1;i<=142;i++)
+ printf("NAME_PREFIX[%03d]\n", i);
+ }' < /dev/null | genfile --files-from -
+
+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/b: Directory is new
+tar: a/c: Directory has been renamed from `a/b'
+],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
+
+# End of incr04.at
diff --git a/tests/incremental.at b/tests/incremental.at
new file mode 100644
index 0000000..801b0b7
--- /dev/null
+++ b/tests/incremental.at
@@ -0,0 +1,60 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004 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 2, 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.
+
+# A directory older than the listed entry was skipped completely.
+
+AT_SETUP([incremental])
+AT_KEYWORDS([incremental incr00])
+
+AT_TAR_CHECK([
+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
+sleep 1
+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..0c899c9
--- /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 (C) 2006 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 2, 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.
+
+# 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/link01.at b/tests/link01.at
new file mode 100644
index 0000000..fd0fc94
--- /dev/null
+++ b/tests/link01.at
@@ -0,0 +1,55 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004 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 2, 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.
+
+# 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([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
+
+ls directory/test1
+],
+[0],
+[test.txt
+])
+
+AT_CLEANUP
diff --git a/tests/listed01.at b/tests/listed01.at
new file mode 100644
index 0000000..e8eb480
--- /dev/null
+++ b/tests/listed01.at
@@ -0,0 +1,63 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2005, 2006 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 2, 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.
+
+# 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([
+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 1
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo "separator"
+
+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..5040c08
--- /dev/null
+++ b/tests/listed02.at
@@ -0,0 +1,150 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2005, 2006 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 2, 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.
+
+# 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_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
+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
+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
+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
+],
+[tar: tart/c0: Directory is new
+tar: tart/c1: Directory is new
+tar: tart/c2: Directory has been renamed from `tart/c1'
+],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/long01.at b/tests/long01.at
new file mode 100644
index 0000000..022c2ce
--- /dev/null
+++ b/tests/long01.at
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2005, 2006 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 2, 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.
+
+# 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_define([NAME],[0123456789abcde])
+m4_define([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])
+
+AT_CLEANUP
+
diff --git a/tests/longv7.at b/tests/longv7.at
new file mode 100644
index 0000000..8a20fa6
--- /dev/null
+++ b/tests/longv7.at
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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_define([DIR],[this_is_a_very_long_name_for_a_directory_which_causes_problems])
+m4_define([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: Error exit delayed from previous errors
+],
+[],[],[v7])
+
+AT_CLEANUP
+
diff --git a/tests/lustar01.at b/tests/lustar01.at
new file mode 100644
index 0000000..436536c
--- /dev/null
+++ b/tests/lustar01.at
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+AT_SETUP([ustar: unsplittable file name])
+AT_KEYWORDS([longname ustar lustar01])
+
+m4_define([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
+tar cf archive LONGNAME
+],
+[2],
+[],
+[tar: LONGNAME: file name is too long (cannot be split); not dumped
+tar: Error exit delayed from previous errors
+],[],[],[ustar])
+
+AT_CLEANUP
diff --git a/tests/lustar02.at b/tests/lustar02.at
new file mode 100644
index 0000000..fb7d4c6
--- /dev/null
+++ b/tests/lustar02.at
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+AT_SETUP([ustar: unsplittable path name])
+AT_KEYWORDS([longname ustar lustar02])
+
+m4_define([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_define([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_define([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: Error exit delayed from previous errors
+],[],[],[ustar])
+
+AT_CLEANUP
diff --git a/tests/lustar03.at b/tests/lustar03.at
new file mode 100644
index 0000000..255c55c
--- /dev/null
+++ b/tests/lustar03.at
@@ -0,0 +1,43 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+AT_SETUP([ustar: splitting long names])
+AT_KEYWORDS([longname ustar lustar03])
+
+m4_define([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_define([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])
+
+AT_CLEANUP
diff --git a/tests/multiv01.at b/tests/multiv01.at
new file mode 100644
index 0000000..4247156
--- /dev/null
+++ b/tests/multiv01.at
@@ -0,0 +1,66 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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 \
+ --listed-incremental=t.snar \
+ -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 \
+ --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..84184ea
--- /dev/null
+++ b/tests/multiv02.at
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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 || 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..02458bc
--- /dev/null
+++ b/tests/multiv03.at
@@ -0,0 +1,71 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2005, 2006 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 2, 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.
+
+# 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 || 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..516ccbe
--- /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 (C) 2005, 2006 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 2, 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.
+
+# 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 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..59a2902
--- /dev/null
+++ b/tests/multiv05.at
@@ -0,0 +1,67 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# Up to version 1.15.91 tar was unable to recognize all volumes
+# given after an aout-of-sync volume.
+# Reported by: Joerg Weilbier <gnu@weilbier.net>
+# References: <200610011952.29880.gnu@weilbier.net>
+
+AT_SETUP([Restoring after an out of sync folume])
+AT_KEYWORDS([multivolume multiv multiv05 sync])
+m4_define([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])
+
+AT_CLEANUP
+
+
+
diff --git a/tests/old.at b/tests/old.at
new file mode 100644
index 0000000..ba0ae13
--- /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 (C) 2004 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 2, 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.
+
+# 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/options.at b/tests/options.at
new file mode 100644
index 0000000..a0b39a5
--- /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 (C) 2004, 2006 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 2, 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.
+
+# 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..05c24ca
--- /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 (C) 2004, 2006 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 2, 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.
+
+# 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/package.m4 b/tests/package.m4
new file mode 100644
index 0000000..4e8fce7
--- /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.17])
+m4_define([AT_PACKAGE_STRING], [GNU tar 1.17])
+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..c557b29
--- /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 (C) 2004, 2005, 2006 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 2, 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.
+
+# 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|sort
+mv directory orig
+cat archive | tar xfv - | 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/recurse.at b/tests/recurse.at
new file mode 100644
index 0000000..ce34660
--- /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 (C) 2004 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 2, 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.
+
+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/rename01.at b/tests/rename01.at
new file mode 100644
index 0000000..52e139b
--- /dev/null
+++ b/tests/rename01.at
@@ -0,0 +1,89 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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/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..c623851
--- /dev/null
+++ b/tests/rename02.at
@@ -0,0 +1,102 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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
+
+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 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv 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/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/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..138ef00
--- /dev/null
+++ b/tests/rename03.at
@@ -0,0 +1,126 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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
+
+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
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+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
+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/same-order01.at b/tests/same-order01.at
new file mode 100644
index 0000000..ea159ed
--- /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 (C) 2004, 2006 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 2, 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.
+
+# 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 || 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..f01b142
--- /dev/null
+++ b/tests/same-order02.at
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+# 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 -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/shortrec.at b/tests/shortrec.at
new file mode 100644
index 0000000..9871143
--- /dev/null
+++ b/tests/shortrec.at
@@ -0,0 +1,39 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2005 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 2, 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.
+
+# 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])
+
+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/sparse01.at b/tests/sparse01.at
new file mode 100644
index 0000000..651660d
--- /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 (C) 2004, 2006 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 2, 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.
+
+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
+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..979e479
--- /dev/null
+++ b/tests/sparse02.at
@@ -0,0 +1,41 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+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 -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..1ebac2e
--- /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 (C) 2005, 2006 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 2, 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.
+
+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/sparsemv.at b/tests/sparsemv.at
new file mode 100644
index 0000000..973480e
--- /dev/null
+++ b/tests/sparsemv.at
@@ -0,0 +1,65 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2005, 2006 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 2, 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.
+
+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 <&-
+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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -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..0c6ff62
--- /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 (C) 2005, 2006 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 2, 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.
+
+# 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 <&-
+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..526289d
--- /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 (C) 2006 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 2, 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.
+
+AT_SETUP([sparse files in PAX MV archives, v.0.0])
+AT_KEYWORDS([sparse 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..a2123cc
--- /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 (C) 2006 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 2, 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.
+
+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..e35908d
--- /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 (C) 2006 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 2, 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.
+
+AT_SETUP([sparse files in PAX MV archives, v.1.0])
+AT_KEYWORDS([sparse 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..8e1b231
--- /dev/null
+++ b/tests/star/README
@@ -0,0 +1,68 @@
+This directory contains scripts for testing GNU tar using
+star "test archives". The archives themselves can be obtained
+from http://download.berlios.de/pub/star/testscripts.
+
+The tests are ignored unless environment variable STAR_TESTSCRIPTS
+is set and points to the directory where the test archives reside.
+Sample usage:
+
+ 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/tartest 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 test 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
+
+
+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..fa7abda
--- /dev/null
+++ b/tests/star/gtarfail.at
@@ -0,0 +1,40 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+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..61c4dc3
--- /dev/null
+++ b/tests/star/gtarfail2.at
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+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..9627ced
--- /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 (C) 2004, 2006 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 2, 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.
+
+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..5e28db2
--- /dev/null
+++ b/tests/star/pax-big-10g.at
@@ -0,0 +1,43 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2006 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 2, 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.
+
+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..8eb2fc8
--- /dev/null
+++ b/tests/star/quicktest.sh
@@ -0,0 +1,108 @@
+#! /bin/sh
+# This file is part of GNU tar testsuite.
+# Copyright (C) 2004, 2005 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 2, 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.
+
+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..c132d06
--- /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 (C) 2004, 2006 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 2, 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.
+
+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..b642bf7
--- /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 (C) 2004, 2006 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 2, 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.
+
+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..af849c2
--- /dev/null
+++ b/tests/testsuite
@@ -0,0 +1,27410 @@
+#! /bin/sh
+#
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs 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
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+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.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+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
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+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
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs 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
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs 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
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. 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" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # 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
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+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
+fi
+echo >conf$$.file
+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 -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+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=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+# Find out whether ``test -x'' works. Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ as_executable_p="test -x"
+else
+ as_executable_p=:
+fi
+rm -f conf$$.file
+
+# 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="$@"
+
+# Load the config file.
+for at_file in atconfig atlocal
+do
+ test -r $at_file || continue
+ . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
+: ${at_top_build_prefix=$at_top_builddir}
+
+# 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 in srcdir top_srcdir top_build_prefix
+ do
+ at_val=`eval echo '${'at_$at_dir'}'`
+ eval "$at_dir=\$at_val/../.."
+ done
+fi
+
+# 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?
+at_verbose=:
+at_quiet=echo
+
+# 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
+# Test groups to run
+at_groups=
+
+# The directory we are in.
+at_dir=`pwd`
+# The directory the whole suite works in.
+# Should be absolutely to let the user `cd' at will.
+at_suite_dir=$at_dir/$as_me.dir
+# The file containing the suite.
+at_suite_log=$at_dir/$as_me.log
+# The file containing the location of the last AT_CHECK.
+at_check_line_file=$at_suite_dir/at-check-line
+# The file containing the exit status of the last command.
+at_status_file=$at_suite_dir/at-status
+# The files containing the output of the tested commands.
+at_stdout=$at_suite_dir/at-stdout
+at_stder1=$at_suite_dir/at-stder1
+at_stderr=$at_suite_dir/at-stderr
+# The file containing dates.
+at_times_file=$at_suite_dir/at-times
+
+# List of the tested programs.
+at_tested='tar'
+# List of the all the test groups.
+at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72'
+# 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:19;tar version;;
+2;pipe.at:29;decompressing from stdin;pipe;
+3;options.at:24;mixing options;options options00;
+4;options02.at:26;interspersed options;options options02;
+5;T-empty.at:26;files-from: empty entries;files-from empty;
+6;T-null.at:21;files-from: 0-separated file without -0;files-from null;
+7;indexfile.at:26;tar --index-file=this_is_a_very_long_file_name_which_raises_issues.c --file=-;stdout indexfile;
+8;verbose.at:26;tar cvf -;stdout verbose;
+9;append.at:21;append;append append00;
+10;append01.at:29;appending files with long names;append append01;
+11;append02.at:40;append vs. create;append append02 append-gnu;
+12;exclude.at:23;exclude;exclude;
+13;delete01.at:23;deleting a member after a big one;delete delete01;
+14;delete02.at:23;deleting a member from stdin archive;delete delete02;
+15;delete03.at:21;deleting members with long names;delete delete03;
+16;delete04.at:23;deleting a large last member;delete delete04;
+17;delete05.at:27;deleting non-existing member;delete delete05;
+18;extrac01.at:23;extract over an existing directory;extract extract01;
+19;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink;
+20;extrac03.at:23;extraction loops;extract extract03;
+21;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch;
+22;extrac05.at:30;extracting selected members from pax;extract extract05;
+23;extrac06.at:33;mode of extracted directories;extract extract06 directory mode;
+24;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink;
+25;gzip.at:23;gzip;gzip;
+26;incremental.at:23;incremental;incremental incr00;
+27;incr01.at:27;restore broken symlinks from incremental;incremental incr01;
+28;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02;
+29;listed01.at:26;--listed for individual files;listed incremental listed01;
+30;listed02.at:28;working --listed;listed incremental listed02;
+31;incr03.at:28;renamed files in incrementals;incremental incr03 rename;
+32;incr04.at:29;proper icontents initialization;incremental incr04 icontents;
+33;rename01.at:24;renamed dirs in incrementals;incremental rename rename01;
+34;rename02.at:24;move between hierarchies;incremental rename rename02;
+35;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename;
+36;chtype.at:27;changed file types in incrementals;incremental chtype;
+37;ignfail.at:23;ignfail;ignfail;
+38;link01.at:33;link count gt 2;link01;
+39;longv7.at:24;long names in V7 archives;longname longv7;
+40;long01.at:28;long file names divisible by block size;longname long512;
+41;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01;
+42;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02;
+43;lustar03.at:21;ustar: splitting long names;longname ustar lustar03;
+44;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01;
+45;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02;
+46;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03;
+47;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental multiv04;
+48;multiv05.at:26;Restoring after an out of sync folume;multivolume multiv multiv05 sync;
+49;old.at:23;old archives;old;
+50;recurse.at:21;recurse;recurse;
+51;same-order01.at:26;working -C with --same-order;same-order same-order01;
+52;same-order02.at:25;multiple -C options;same-order same-order02;
+53;shortrec.at:25;short records;shortrec.at;
+54;sparse01.at:21;sparse files;sparse sparse01;
+55;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02;
+56;sparse03.at:21;storing sparse files > 8G;sparse sparse03;
+57;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv;
+58;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multiv sparsemvp sparsemvp00;
+59;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01;
+60;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multiv sparsemvp sparsemvp10;
+61;update.at:27;update unchanged directories;update;
+62;volume.at:23;volume;volume volcheck;
+63;volsize.at:29;volume header size;volume volsize;
+64;comprec.at:21;compressed format recognition;comprec;
+65;truncate.at:29;truncate;truncate filechange;
+66;grow.at:24;grow;grow filechange;
+67;gtarfail.at:21;gtarfail;star gtarfail;
+68;gtarfail2.at:21;gtarfail2;star gtarfail2;
+69;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail;
+70;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g;
+71;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g;
+72;pax-big-10g.at:21;pax-big-10g;star pax-big-10g;
+'
+
+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" : 'x[^=]*=\(.*\)'` ;;
+ *) 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 )
+ 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 0
+ ;;
+
+ --debug | -d )
+ at_debug_p=:
+ ;;
+
+ --errexit | -e )
+ at_debug_p=:
+ at_errexit_p=:
+ ;;
+
+ --verbose | -v )
+ at_verbose=echo; at_quiet=:
+ ;;
+
+ --trace | -x )
+ at_traceon='set -x'; at_traceoff='set +x'
+ ;;
+
+ [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
+ at_groups="$at_groups$at_option "
+ ;;
+
+ # 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_range=`echo " $at_groups_all " | \
+ sed -e 's/^.* \('$at_range_start' \)/\1/'`
+ at_groups="$at_groups$at_range "
+ ;;
+
+ -[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_range=`echo " $at_groups_all " | \
+ sed -e 's/\( '$at_range_end'\) .*$/\1/'`
+ at_groups="$at_groups$at_range "
+ ;;
+
+ [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_range=`echo " $at_groups_all " | \
+ sed -e 's/^.*\( '$at_range_start' \)/\1/' \
+ -e 's/\( '$at_range_end'\) .*$/\1/'`
+ at_groups="$at_groups$at_range "
+ ;;
+
+ # 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=`echo "$at_groups_selected" |
+ grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
+ done
+ at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
+ # Smash the newlines.
+ at_groups="$at_groups`echo $at_groups_selected` "
+ ;;
+
+ *=*)
+ at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $at_envvar" >&2
+ { (exit 1); exit 1; }; }
+ at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$at_envvar='$at_value'"
+ export $at_envvar
+ # Propagate to debug scripts.
+ at_debug_args="$at_debug_args $at_envvar='$at_value'"
+ ;;
+
+ *) echo "$as_me: invalid option: $at_option" >&2
+ echo "Try \`$0 --help' for more information." >&2
+ exit 1
+ ;;
+ esac
+done
+
+# Selected test groups.
+if test -z "$at_groups"; then
+ at_groups=$at_groups_all
+else
+ # Sort the tests, removing duplicates:
+ at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu`
+ # and add banners. (Passing at_groups_all is tricky--see the comment
+ # starting with "Passing at_groups is tricky.")
+ at_groups=`echo "$at_groups$as_nl $at_groups_all" |
+ awk 'BEGIN { FS = "@" } # Effectively switch off field splitting.
+ /^$/ { next } # Ignore the empty line.
+ !/ / { groups++; selected[$ 0] = 1; next }
+ # The last line, containing at_groups_all.
+ {
+ n = split($ 0, a, " ")
+ # If there are several tests, select their banners:
+ if (groups > 1) {
+ for (i = 1; i <= n; i++) {
+ if (a[i] ~ /^banner-/)
+ banner = a[i]
+ else if (banner != "" && selected[a[i]] == 1)
+ selected[banner] = 1
+ }
+ }
+ for (i = 1; i <= n; i++)
+ if (selected[a[i]] == 1)
+ list = list " " a[i]
+ print list
+ }'`
+fi
+
+# Help message.
+if $at_help_p; then
+ cat <<_ATEOF
+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.
+
+You should not change environment variables unless explicitly passed
+as command line arguments. Set \`AUTOTEST_PATH' to select the executables
+to exercise. Each relative directory is expanded as build and source
+directories relatively to the top level of this distribution. E.g.,
+
+ $ $0 AUTOTEST_PATH=bin
+
+possibly amounts into
+
+ PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
+_ATEOF
+cat <<_ATEOF
+
+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
+
+Execution tuning:
+ -k, --keywords=KEYWORDS
+ select the tests matching all the comma-separated KEYWORDS
+ multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+ -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
+
+Report bugs to <bug-tar@gnu.org>.
+_ATEOF
+ exit 0
+fi
+
+# List of tests.
+if $at_list_p; then
+ cat <<_ATEOF
+GNU tar 1.17 test suite test groups:
+
+ NUM: FILE-NAME:LINE TEST-GROUP-NAME
+ KEYWORDS
+
+_ATEOF
+ # Passing at_groups is tricky. We cannot use it to form a literal string
+ # or regexp because of the limitation of AIX awk. And Solaris' awk
+ # doesn't grok more than 99 fields in a record, so we have to use `split'.
+ echo "$at_groups$as_nl$at_help_all" |
+ awk 'BEGIN { FS = ";" }
+ NR == 1 {
+ for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
+ next
+ }
+ {
+ if (selected[$ 1]) {
+ printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
+ if ($ 4) printf " %s\n", $ 4
+ }
+ }'
+ exit 0
+fi
+if $at_version_p; then
+ echo "$as_me (GNU tar 1.17)"
+ cat <<\_ACEOF
+
+Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+Foundation, Inc.
+This test suite is free software; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+
+# Don't take risks: use only absolute directories in PATH.
+#
+# For stand-alone test suites, 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=`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" && at_path=$at_path$PATH_SEPARATOR
+case $as_dir in
+ [\\/]* | ?:[\\/]* )
+ at_path=$at_path$as_dir
+ ;;
+ * )
+ if test -z "$at_top_build_prefix"; then
+ # Stand-alone test suite.
+ at_path=$at_path$as_dir
+ else
+ # Embedded test suite.
+ at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
+ at_path=$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.
+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=.
+ as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
+test -d "$as_dir" || continue
+case $PATH in
+ $as_dir | \
+ $as_dir$PATH_SEPARATOR* | \
+ *$PATH_SEPARATOR$as_dir | \
+ *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;
+
+ '') PATH=$as_dir ;;
+ *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
+esac
+done
+IFS=$as_save_IFS
+
+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.
+cat <<\_ASBOX
+## ------------------------ ##
+## GNU tar 1.17 test suite. ##
+## ------------------------ ##
+_ASBOX
+{
+ cat <<\_ASBOX
+## ------------------------ ##
+## GNU tar 1.17 test suite. ##
+## ------------------------ ##
+_ASBOX
+ echo
+
+ echo "$as_me: command line was:"
+ echo " $ $0 $at_cli_args"
+ echo
+
+ # Try to find a few ChangeLogs in case it might help determining the
+ # exact version. Use the relative dir: if the top dir is a symlink,
+ # find will not follow it (and options to follow the links are not
+ # portable), which would result in no output here.
+ if test -n "$at_top_srcdir"; then
+ cat <<\_ASBOX
+## ----------- ##
+## ChangeLogs. ##
+## ----------- ##
+_ASBOX
+ echo
+ for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
+ do
+ echo "$as_me: $at_file:"
+ sed 's/^/| /;10q' $at_file
+ echo
+ done
+
+ {
+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=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+}
+ echo
+ fi
+
+ # Contents of the config files.
+ for at_file in atconfig atlocal
+ do
+ test -r $at_file || continue
+ echo "$as_me: $at_file:"
+ sed 's/^/| /' $at_file
+ echo
+ done
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Tested programs. ##
+## ---------------- ##
+_ASBOX
+ echo
+} >&5
+
+# Report what programs are being tested.
+for at_program in : $at_tested
+do
+ test "$at_program" = : && continue
+ 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
+
+ if test -f "$as_dir/$at_program"; then
+ {
+ echo "$at_srcdir/testsuite.at:92: $as_dir/$at_program --version"
+ "$as_dir/$at_program" --version
+ echo
+ } >&5 2>&1
+ else
+ { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
+echo "$as_me: error: cannot find $at_program" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+done
+
+{
+ cat <<\_ASBOX
+## ------------------ ##
+## Running the tests. ##
+## ------------------ ##
+_ASBOX
+} >&5
+
+at_start_date=`date`
+at_start_time=`date +%s 2>/dev/null`
+echo "$as_me: starting at: $at_start_date" >&5
+at_xpass_list=
+at_xfail_list=
+at_pass_list=
+at_fail_list=
+at_skip_list=
+at_group_count=0
+
+# Create the master directory if it doesn't already exist.
+test -d "$at_suite_dir" ||
+ mkdir "$at_suite_dir" ||
+ { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
+echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
+ { (exit 1); exit 1; }; }
+
+# 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
+
+
+for at_group in $at_groups
+do
+ # Be sure to come back to the top test directory.
+ cd "$at_suite_dir"
+
+ case $at_group in
+ banner-*)
+ at_group_log=$at_suite_log
+ ;;
+
+ *)
+ at_group_normalized=$at_group
+
+ 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.
+ 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"
+ fi
+ # Be tolerant if the above `rm' was not able to remove the directory.
+ { as_dir=$at_group_dir
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`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 ||
+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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ cd $at_group_dir
+ ;;
+ esac
+
+ echo 0 > "$at_status_file"
+
+ # Clearly separate the test groups when verbose.
+ test $at_group_count != 0 && $at_verbose
+
+ # In verbose mode, append to the log file *and* show on
+ # the standard output; in quiet mode only write to the log
+ if test $at_verbose = echo; then
+ at_tee_pipe='tee -a "$at_group_log"'
+ else
+ at_tee_pipe='cat >> "$at_group_log"'
+ fi
+
+ case $at_group in
+ 1 ) # 1. version.at:19: tar version
+ at_setup_line='version.at:19'
+ at_desc='tar version'
+ $at_quiet $ECHO_N " 1: tar version $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "1. version.at:19: testing ..."
+ $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/version.at:21: tar --version | sed 1q"
+echo version.at:21 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ at_trace_this=yes
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "tar (GNU tar) 1.17
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/version.at:21: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+ cat >$XFAILFILE <<'_EOT'
+
+==============================================================
+WARNING: Not using the proper version, *all* checks dubious...
+==============================================================
+_EOT
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+else
+ rm -f $XFAILFILE
+fi
+
+$at_traceon
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 2 ) # 2. pipe.at:29: decompressing from stdin
+ at_setup_line='pipe.at:29'
+ at_desc='decompressing from stdin'
+ $at_quiet $ECHO_N " 2: decompressing from stdin $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "2. pipe.at:29: testing ..."
+ $at_traceon
+
+
+
+
+
+
+ $at_traceoff
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+echo pipe.at:33 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+echo pipe.at:33 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+echo pipe.at:33 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+echo pipe.at:33 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo \"separator\"
+cmp orig/file1 directory/file1
+echo \"separator\"
+cmp orig/file2 directory/file2)"
+echo pipe.at:33 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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|sort
+mv directory orig
+cat archive | tar xfv - | sort
+echo "separator"
+cmp orig/file1 directory/file1
+echo "separator"
+cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file1
+directory/file2
+separator
+separator
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 3 ) # 3. options.at:24: mixing options
+ at_setup_line='options.at:24'
+ at_desc='mixing options'
+ $at_quiet $ECHO_N " 3: mixing options $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "3. options.at:24: testing ..."
+ $at_traceon
+
+
+
+$at_traceoff
+echo "$at_srcdir/options.at:27:
+echo > file1
+TAR_OPTIONS=--numeric-owner tar chof archive file1
+tar tf archive
+"
+echo options.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+echo > file1
+TAR_OPTIONS=--numeric-owner tar chof archive file1
+tar tf archive
+ ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+echo > file1
+TAR_OPTIONS=--numeric-owner tar chof archive file1
+tar tf archive
+ ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/options.at:27: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 4 ) # 4. options02.at:26: interspersed options
+ at_setup_line='options02.at:26'
+ at_desc='interspersed options'
+ $at_quiet $ECHO_N " 4: interspersed options $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "4. options02.at:26: testing ..."
+ $at_traceon
+
+
+
+$at_traceoff
+echo "$at_srcdir/options02.at:29:
+echo > file1
+tar c file1 -f archive
+tar tf archive
+"
+echo options02.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+echo > file1
+tar c file1 -f archive
+tar tf archive
+ ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+echo > file1
+tar c file1 -f archive
+tar tf archive
+ ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/options02.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 5 ) # 5. T-empty.at:26: files-from: empty entries
+ at_setup_line='T-empty.at:26'
+ at_desc='files-from: empty entries'
+ $at_quiet $ECHO_N " 5: files-from: empty entries $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "5. T-empty.at:26: testing ..."
+ $at_traceon
+
+
+
+cat >file-list <<'_ATEOF'
+jeden
+dwa
+
+trzy
+_ATEOF
+
+
+
+
+ $at_traceoff
+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 *
+
+
+test -z "`sort < /dev/null 2>&1`" || exit 77
+
+
+genfile --file jeden
+genfile --file dwa
+genfile --file trzy
+
+tar cfvT archive ../file-list | sort
+)"
+echo T-empty.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 --file jeden
+genfile --file dwa
+genfile --file trzy
+
+tar cfvT archive ../file-list | sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 --file jeden
+genfile --file dwa
+genfile --file trzy
+
+tar cfvT archive ../file-list | sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "dwa
+jeden
+trzy
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/T-empty.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+ # Testing one format is enough
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 6 ) # 6. T-null.at:21: files-from: 0-separated file without -0
+ at_setup_line='T-null.at:21'
+ at_desc='files-from: 0-separated file without -0'
+ $at_quiet $ECHO_N " 6: files-from: 0-separated file without -0 $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "6. T-null.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 dwa > temp
+echo trzy >> temp
+cat temp | tr '\\n' '\\0' > temp1
+echo jeden > file-list
+cat temp1 >> file-list
+
+genfile -f \"jeden
+dwa\" || exit 77
+genfile -f trzy
+
+tar cfTv archive file-list | sort
+)"
+echo T-null.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 dwa > temp
+echo trzy >> temp
+cat temp | tr '\n' '\0' > temp1
+echo jeden > file-list
+cat temp1 >> file-list
+
+genfile -f "jeden
+dwa" || exit 77
+genfile -f trzy
+
+tar cfTv archive file-list | sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 dwa > temp
+echo trzy >> temp
+cat temp | tr '\n' '\0' > temp1
+echo jeden > file-list
+cat temp1 >> file-list
+
+genfile -f "jeden
+dwa" || exit 77
+genfile -f trzy
+
+tar cfTv archive file-list | sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: file-list: file name read contains nul character
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "jeden\\ndwa
+trzy
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/T-null.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+ # Testing one format is enough
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 7 ) # 7. indexfile.at:26: tar --index-file=FILE --file=-
+ at_setup_line='indexfile.at:26'
+ at_desc='tar --index-file=FILE --file=-'
+ $at_quiet $ECHO_N " 7: tar --index-file=FILE --file=- $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "7. indexfile.at:26: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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
+)"
+echo indexfile.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo indexfile.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo indexfile.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo indexfile.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo indexfile.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+directory/
+directory/a
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 8 ) # 8. verbose.at:26: tar cvf -
+ at_setup_line='verbose.at:26'
+ at_desc='tar cvf -'
+ $at_quiet $ECHO_N " 8: tar cvf - $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "8. verbose.at:26: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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
+)"
+echo verbose.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "file
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+file
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo verbose.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "file
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+file
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo verbose.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "file
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+file
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo verbose.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "file
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+file
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo verbose.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "file
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating the archive
+Testing the archive
+file
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 9 ) # 9. append.at:21: append
+ at_setup_line='append.at:21'
+ at_desc='append'
+ $at_quiet $ECHO_N " 9: append $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "9. append.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/append.at:24:
+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)"
+echo append.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/append.at:24:
+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)"
+echo append.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/append.at:24:
+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)"
+echo append.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/append.at:24:
+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)"
+echo append.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/append.at:24:
+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)"
+echo append.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 10 ) # 10. append01.at:29: appending files with long names
+ at_setup_line='append01.at:29'
+ at_desc='appending files with long names'
+ $at_quiet $ECHO_N " 10: appending files with long names $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "10. append01.at:29: testing ..."
+ $at_traceon
+
+
+
+
+
+
+
+ $at_traceoff
+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
+)"
+echo append01.at:34 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo append01.at:34 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo append01.at:34 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo append01.at:34 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 11 ) # 11. append02.at:40: append vs. create
+ at_setup_line='append02.at:40'
+ at_desc='append vs. create'
+ $at_quiet $ECHO_N " 11: append vs. create $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "11. append02.at:40: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/append02.at:43:
+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
+)"
+echo append02.at:43 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/append02.at:43:
+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
+)"
+echo append02.at:43 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/append02.at:43:
+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
+)"
+echo append02.at:43 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/append02.at:43:
+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
+)"
+echo append02.at:43 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/append02.at:43:
+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
+)"
+echo append02.at:43 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Creating archive.1
+Creating archive.2
+Comparing archives
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 12 ) # 12. exclude.at:23: exclude
+ at_setup_line='exclude.at:23'
+ at_desc='exclude'
+ $at_quiet $ECHO_N " 12: exclude $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "12. exclude.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 *
+
+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
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar
+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
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar
+done
+)"
+echo exclude.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+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
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar
+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
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar
+done
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+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
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar
+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
+ cat err
+ echo ARCHIVE
+ tar tf archive.tar
+done
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "OPTION exclude-caches
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+dir/rock/
+dir/rock/CACHEDIR.TAG
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+dir/rock/
+dir/rock/CACHEDIR.TAG
+OPTION exclude-caches-under
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+dir/rock/
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+dir/rock/
+OPTION exclude-caches-all
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
+ARCHIVE
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+dir/folk/sanjuan
+OPTION exclude-tag
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+dir/folk/tagfile
+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/jazz
+dir/folk/
+dir/folk/tagfile
+dir/rock/
+dir/rock/CACHEDIR.TAG
+dir/rock/file
+OPTION exclude-tag-under
+dir/
+dir/blues
+dir/jazz
+dir/folk/
+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/jazz
+dir/folk/
+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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/exclude.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 13 ) # 13. delete01.at:23: deleting a member after a big one
+ at_setup_line='delete01.at:23'
+ at_desc='deleting a member after a big one'
+ $at_quiet $ECHO_N " 13: deleting a member after a big one $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "13. delete01.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/delete01.at:26:
+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)"
+echo delete01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete01.at:26:
+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)"
+echo delete01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete01.at:26:
+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)"
+echo delete01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete01.at:26:
+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)"
+echo delete01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete01.at:26:
+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)"
+echo delete01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 14 ) # 14. delete02.at:23: deleting a member from stdin archive
+ at_setup_line='delete02.at:23'
+ at_desc='deleting a member from stdin archive'
+ $at_quiet $ECHO_N " 14: deleting a member from stdin archive $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "14. delete02.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/delete02.at:26:
+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)"
+echo delete02.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "1
+2
+3
+separator
+1
+3
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete02.at:26:
+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)"
+echo delete02.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "1
+2
+3
+separator
+1
+3
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete02.at:26:
+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)"
+echo delete02.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "1
+2
+3
+separator
+1
+3
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete02.at:26:
+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)"
+echo delete02.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "1
+2
+3
+separator
+1
+3
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete02.at:26:
+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)"
+echo delete02.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "1
+2
+3
+separator
+1
+3
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 15 ) # 15. delete03.at:21: deleting members with long names
+ at_setup_line='delete03.at:21'
+ at_desc='deleting members with long names'
+ $at_quiet $ECHO_N " 15: deleting members with long names $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "15. delete03.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+
+
+ $at_traceoff
+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
+)"
+echo delete03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo delete03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo delete03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 16 ) # 16. delete04.at:23: deleting a large last member
+ at_setup_line='delete04.at:23'
+ at_desc='deleting a large last member'
+ $at_quiet $ECHO_N " 16: deleting a large last member $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "16. delete04.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/delete04.at:26:
+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
+)"
+echo delete04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete04.at:26:
+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
+)"
+echo delete04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete04.at:26:
+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
+)"
+echo delete04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete04.at:26:
+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
+)"
+echo delete04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete04.at:26:
+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
+)"
+echo delete04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 17 ) # 17. delete05.at:27: deleting non-existing member
+ at_setup_line='delete05.at:27'
+ at_desc='deleting non-existing member'
+ $at_quiet $ECHO_N " 17: deleting non-existing member $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "17. delete05.at:27: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/delete05.at:30:
+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
+)"
+echo delete05.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: tre: Not found in archive
+tar: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "en
+to
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete05.at:30:
+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
+)"
+echo delete05.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: tre: Not found in archive
+tar: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "en
+to
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete05.at:30:
+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
+)"
+echo delete05.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: tre: Not found in archive
+tar: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "en
+to
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete05.at:30:
+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
+)"
+echo delete05.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: tre: Not found in archive
+tar: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "en
+to
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/delete05.at:30:
+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
+)"
+echo delete05.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: tre: Not found in archive
+tar: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "en
+to
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 18 ) # 18. extrac01.at:23: extract over an existing directory
+ at_setup_line='extrac01.at:23'
+ at_desc='extract over an existing directory'
+ $at_quiet $ECHO_N " 18: extract over an existing directory $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "18. extrac01.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/extrac01.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
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive || exit 1
+)"
+echo extrac01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac01.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
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive || exit 1
+)"
+echo extrac01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac01.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
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive || exit 1
+)"
+echo extrac01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac01.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
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive || exit 1
+)"
+echo extrac01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac01.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
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive || exit 1
+)"
+echo extrac01.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 19 ) # 19. extrac02.at:23: extracting symlinks over an existing file
+ at_setup_line='extrac02.at:23'
+ at_desc='extracting symlinks over an existing file'
+ $at_quiet $ECHO_N " 19: extracting symlinks over an existing file $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "19. extrac02.at:23: testing ..."
+ $at_traceon
+
+
+
+# FIXME: Skip if symlinks are not supported on the system
+
+
+
+ $at_traceoff
+echo "$at_srcdir/extrac02.at:28:
+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
+)"
+echo extrac02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac02.at:28:
+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
+)"
+echo extrac02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac02.at:28:
+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
+)"
+echo extrac02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac02.at:28:
+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
+)"
+echo extrac02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac02.at:28:
+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
+)"
+echo extrac02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 20 ) # 20. extrac03.at:23: extraction loops
+ at_setup_line='extrac03.at:23'
+ at_desc='extraction loops'
+ $at_quiet $ECHO_N " 20: extraction loops $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "20. extrac03.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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)"
+echo extrac03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/../directory/
+separator
+directory/../directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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)"
+echo extrac03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/../directory/
+separator
+directory/../directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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)"
+echo extrac03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/../directory/
+separator
+directory/../directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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)"
+echo extrac03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/../directory/
+separator
+directory/../directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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)"
+echo extrac03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/../directory/
+separator
+directory/../directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 21 ) # 21. extrac04.at:23: extract + fnmatch
+ at_setup_line='extrac04.at:23'
+ at_desc='extract + fnmatch'
+ $at_quiet $ECHO_N " 21: extract + fnmatch $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "21. extrac04.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/extrac04.at:26:
+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
+)"
+echo extrac04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file2
+directory/subdirectory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac04.at:26:
+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
+)"
+echo extrac04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file2
+directory/subdirectory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac04.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
+
+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
+)"
+echo extrac04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file2
+directory/subdirectory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac04.at:26:
+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
+)"
+echo extrac04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file2
+directory/subdirectory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac04.at:26:
+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
+)"
+echo extrac04.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/file2
+directory/subdirectory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 22 ) # 22. extrac05.at:30: extracting selected members from pax
+ at_setup_line='extrac05.at:30'
+ at_desc='extracting selected members from pax'
+ $at_quiet $ECHO_N " 22: extracting selected members from pax $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "22. extrac05.at:30: testing ..."
+ $at_traceon
+
+
+
+cat >list <<'_ATEOF'
+jeden
+cztery
+_ATEOF
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/extrac05.at:38:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 118 --file jeden
+genfile --length 223 --file dwa
+genfile --length 517 --file trzy
+genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
+genfile --length 110 --file cztery
+
+tar cf archive jeden dwa trzy cztery || exit 1
+
+mkdir dir
+cd dir
+
+tar xvfT ../archive ../../list || exit 1
+
+cd ..
+)"
+echo extrac05.at:38 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 118 --file jeden
+genfile --length 223 --file dwa
+genfile --length 517 --file trzy
+genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
+genfile --length 110 --file cztery
+
+tar cf archive jeden dwa trzy cztery || exit 1
+
+mkdir dir
+cd dir
+
+tar xvfT ../archive ../../list || exit 1
+
+cd ..
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+genfile --length 118 --file jeden
+genfile --length 223 --file dwa
+genfile --length 517 --file trzy
+genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
+genfile --length 110 --file cztery
+
+tar cf archive jeden dwa trzy cztery || exit 1
+
+mkdir dir
+cd dir
+
+tar xvfT ../archive ../../list || exit 1
+
+cd ..
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "jeden
+cztery
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac05.at:38: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 23 ) # 23. extrac06.at:33: mode of extracted directories
+ at_setup_line='extrac06.at:33'
+ at_desc='mode of extracted directories'
+ $at_quiet $ECHO_N " 23: mode of extracted directories $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "23. extrac06.at:33: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/extrac06.at:36:
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+echo extrac06.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "777
+755
+755
+755
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac06.at:36:
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+echo extrac06.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "777
+755
+755
+755
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac06.at:36:
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+echo extrac06.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "777
+755
+755
+755
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac06.at:36:
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+echo extrac06.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "777
+755
+755
+755
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac06.at:36:
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+)"
+echo extrac06.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+genfile --stat=mode:777 directory
+
+tar xf arc directory
+genfile --stat=mode:777 directory
+
+# After both restores, the directory mode should be 755
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "777
+755
+755
+755
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 24 ) # 24. extrac07.at:27: extracting symlinks to a read-only dir
+ at_setup_line='extrac07.at:27'
+ at_desc='extracting symlinks to a read-only dir'
+ $at_quiet $ECHO_N " 24: extracting symlinks to a read-only dir $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "24. extrac07.at:27: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/extrac07.at:30:
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H v7\"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+)"
+echo extrac07.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir v7
+(cd v7
+TEST_TAR_FORMAT=v7
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H v7"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Prepare the directory
+Create the archive
+Extract
+dir/
+dir/foo
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+else
+ ustar
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac07.at:30:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+)"
+echo extrac07.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Prepare the directory
+Create the archive
+Extract
+dir/
+dir/foo
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+else
+ ustar
+fi
+
+$at_traceon
+$at_traceoff
+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 Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+)"
+echo extrac07.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir ustar
+(cd ustar
+TEST_TAR_FORMAT=ustar
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H ustar"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Prepare the directory
+Create the archive
+Extract
+dir/
+dir/foo
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+else
+ ustar
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac07.at:30:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+)"
+echo extrac07.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Prepare the directory
+Create the archive
+Extract
+dir/
+dir/foo
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+else
+ ustar
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/extrac07.at:30:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+)"
+echo extrac07.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+echo Prepare the directory
+mkdir dir
+genfile -f foo
+cd dir
+ln -s ../foo .
+cd ..
+chmod -w dir
+
+echo Create the archive
+tar cf archive dir || exit 1
+
+echo Extract
+mkdir out
+tar -C out -xvf archive
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Prepare the directory
+Create the archive
+Extract
+dir/
+dir/foo
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+else
+ ustar
+fi
+
+$at_traceon
+
+ # Testing one format is enough
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 25 ) # 25. gzip.at:23: gzip
+ at_setup_line='gzip.at:23'
+ at_desc='gzip'
+ $at_quiet $ECHO_N " 25: gzip $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "25. gzip.at:23: testing ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+$at_traceoff
+echo "$at_srcdir/gzip.at:28:
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+tar xfvz /dev/null
+test \$? = 2 || exit 1
+"
+echo gzip.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+tar xfvz /dev/null
+test $? = 2 || exit 1
+ ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+
+cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
+
+tar xfvz /dev/null
+test $? = 2 || exit 1
+ ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "
+gzip: stdin: unexpected end of file
+tar: Child returned status 1
+tar: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/gzip.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 26 ) # 26. incremental.at:23: incremental
+ at_setup_line='incremental.at:23'
+ at_desc='incremental'
+ $at_quiet $ECHO_N " 26: incremental $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "26. incremental.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+)"
+echo incremental.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "structure/
+separator
+structure/
+structure/file
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+)"
+echo incremental.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "structure/
+separator
+structure/
+structure/file
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+)"
+echo incremental.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+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
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "structure/
+separator
+structure/
+structure/file
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 27 ) # 27. incr01.at:27: restore broken symlinks from incremental
+ at_setup_line='incr01.at:27'
+ at_desc='restore broken symlinks from incremental'
+ $at_quiet $ECHO_N " 27: restore broken symlinks from incremental $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "27. incr01.at:27: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+)"
+echo incr01.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/bar
+separator
+directory/
+tar: Deleting \`directory/bar'
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+)"
+echo incr01.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/bar
+separator
+directory/
+tar: Deleting \`directory/bar'
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+)"
+echo incr01.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+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
+echo separator
+tar xvfg archive.1 /dev/null
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/bar
+separator
+directory/
+tar: Deleting \`directory/bar'
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 28 ) # 28. incr02.at:32: restoring timestamps from incremental
+ at_setup_line='incr02.at:32'
+ at_desc='restoring timestamps from incremental'
+ $at_quiet $ECHO_N " 28: restoring timestamps from incremental $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "28. incr02.at:32: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 *
+
+# 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 -
+)"
+echo incr02.at:35 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+# 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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+# 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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 *
+
+# 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 -
+)"
+echo incr02.at:35 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+# 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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+# 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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 *
+
+# 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 -
+)"
+echo incr02.at:35 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+# 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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+# 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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 29 ) # 29. listed01.at:26: --listed for individual files
+ at_setup_line='listed01.at:26'
+ at_desc='--listed for individual files'
+ $at_quiet $ECHO_N " 29: --listed for individual files $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "29. listed01.at:26: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/listed01.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 --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 1
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo \"separator\"
+
+tar --create \\
+ --file=archive.2 \\
+ --listed-incremental=listing \\
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+)"
+echo listed01.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+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 1
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo "separator"
+
+tar --create \
+ --file=archive.2 \
+ --listed-incremental=listing \
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+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 1
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo "separator"
+
+tar --create \
+ --file=archive.2 \
+ --listed-incremental=listing \
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/file1
+separator
+directory/file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/listed01.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/listed01.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 --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 1
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo \"separator\"
+
+tar --create \\
+ --file=archive.2 \\
+ --listed-incremental=listing \\
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+)"
+echo listed01.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+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 1
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo "separator"
+
+tar --create \
+ --file=archive.2 \
+ --listed-incremental=listing \
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+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 1
+
+genfile --length 10240 --pattern zeros --file directory/file2
+
+echo "separator"
+
+tar --create \
+ --file=archive.2 \
+ --listed-incremental=listing \
+ directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/file1
+separator
+directory/file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/listed01.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 30 ) # 30. listed02.at:28: working --listed
+ at_setup_line='listed02.at:28'
+ at_desc='working --listed'
+ $at_quiet $ECHO_N " 30: working --listed $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "30. listed02.at:28: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/listed02.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
+
+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
+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
+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
+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
+)"
+echo listed02.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+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
+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
+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
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+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
+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
+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
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: tart/c0: Directory is new
+tar: tart/c1: Directory is new
+tar: tart/c2: Directory has been renamed from \`tart/c1'
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/listed02.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/listed02.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
+
+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
+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
+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
+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
+)"
+echo listed02.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+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
+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
+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
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+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
+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
+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
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: tart/c0: Directory is new
+tar: tart/c1: Directory is new
+tar: tart/c2: Directory has been renamed from \`tart/c1'
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/listed02.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 31 ) # 31. incr03.at:28: renamed files in incrementals
+ at_setup_line='incr03.at:28'
+ at_desc='renamed files in incrementals'
+ $at_quiet $ECHO_N " 31: renamed files in incrementals $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "31. incr03.at:28: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/incr03.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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+)"
+echo incr03.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/incr03.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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+)"
+echo incr03.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/incr03.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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+)"
+echo incr03.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 --file=directory/x
+genfile --file=directory/y
+
+tar -cf archive.1 -g db directory
+
+mv directory/x directory/z
+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
+find directory | sort
+
+echo Directory after second restore
+tar -xf archive.2 -g db
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 32 ) # 32. incr04.at:29: proper icontents initialization
+ at_setup_line='incr04.at:29'
+ at_desc='proper icontents initialization'
+ $at_quiet $ECHO_N " 32: proper icontents initialization $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "32. incr04.at:29: testing ..."
+ $at_traceon
+
+
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/incr04.at:34:
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H gnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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
+)"
+echo incr04.at:34 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/incr04.at:34:
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H oldgnu\"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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
+)"
+echo incr04.at:34 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/incr04.at:34:
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS=\"-H posix\"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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
+)"
+echo incr04.at:34 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir posix
+(cd posix
+TEST_TAR_FORMAT=posix
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H posix"
+export TAR_OPTIONS
+rm -rf *
+
+
+install-sh -d a/b >/dev/null
+
+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 -
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 33 ) # 33. rename01.at:24: renamed dirs in incrementals
+ at_setup_line='rename01.at:24'
+ at_desc='renamed dirs in incrementals'
+ $at_quiet $ECHO_N " 33: renamed dirs in incrementals $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "33. rename01.at:24: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/rename01.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/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
+)"
+echo rename01.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/rename01.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/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
+)"
+echo rename01.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/rename01.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/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
+)"
+echo rename01.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 34 ) # 34. rename02.at:24: move between hierarchies
+ at_setup_line='rename02.at:24'
+ at_desc='move between hierarchies'
+ $at_quiet $ECHO_N " 34: move between hierarchies $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "34. rename02.at:24: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/rename02.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/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+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 2>tmperr
+sort tmperr >&2
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+echo rename02.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+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 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+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 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/rename02.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/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+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 2>tmperr
+sort tmperr >&2
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+echo rename02.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+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 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+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 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/rename02.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/bar
+genfile --file foo/bar/file.r
+mkdir foo/bar/baz
+genfile --file foo/bar/baz/file.z
+
+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 2>tmperr
+sort tmperr >&2
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+echo rename02.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+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 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+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 2>tmperr
+sort tmperr >&2
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 35 ) # 35. rename03.at:23: cyclic renames
+ at_setup_line='rename03.at:23'
+ at_desc='cyclic renames'
+ $at_quiet $ECHO_N " 35: cyclic renames $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "35. rename03.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/rename03.at:26:
+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
+
+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
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+echo rename03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+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
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+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
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "First dump
+tar: foo/a: Directory is new
+tar: foo/b: Directory is new
+tar: foo/c: 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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/rename03.at:26:
+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
+
+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
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+echo rename03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+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
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+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
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "First dump
+tar: foo/a: Directory is new
+tar: foo/b: Directory is new
+tar: foo/c: 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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/rename03.at:26:
+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
+
+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
+
+echo \"Begin directory listing 1\"
+find foo | sort
+echo \"End directory listing 1\"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+)"
+echo rename03.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+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
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+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
+
+echo "Begin directory listing 1"
+find foo | sort
+echo "End directory listing 1"
+
+tar xfgv arch.2 /dev/null
+echo Begin directory listing 2
+find foo | sort
+echo End directory listing 2
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "First dump
+tar: foo/a: Directory is new
+tar: foo/b: Directory is new
+tar: foo/c: 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"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 36 ) # 36. chtype.at:27: changed file types in incrementals
+ at_setup_line='chtype.at:27'
+ at_desc='changed file types in incrementals'
+ $at_quiet $ECHO_N " 36: changed file types in incrementals $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "36. chtype.at:27: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+)"
+echo chtype.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+)"
+echo chtype.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+)"
+echo chtype.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+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
+echo Restore archive.2
+tar -xf archive.2 --listed-incremental=/dev/null
+find directory | sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 37 ) # 37. ignfail.at:23: ignfail
+ at_setup_line='ignfail.at:23'
+ at_desc='ignfail'
+ $at_quiet $ECHO_N " 37: ignfail $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "37. ignfail.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/ignfail.at:26:
+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
+)"
+echo ignfail.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "-----
+tar: file: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | $at_diff - "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/ignfail.at:26:
+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
+)"
+echo ignfail.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "-----
+tar: file: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | $at_diff - "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/ignfail.at:26:
+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
+)"
+echo ignfail.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "-----
+tar: file: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | $at_diff - "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/ignfail.at:26:
+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
+)"
+echo ignfail.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "-----
+tar: file: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | $at_diff - "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/ignfail.at:26:
+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
+)"
+echo ignfail.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "-----
+tar: file: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: directory: Warning: Cannot open: Permission denied
+" | $at_diff - "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 38 ) # 38. link01.at:33: link count gt 2
+ at_setup_line='link01.at:33'
+ at_desc='link count gt 2'
+ $at_quiet $ECHO_N " 38: link count gt 2 $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "38. link01.at:33: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/link01.at:36:
+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
+
+ls directory/test1
+)"
+echo link01.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "test.txt
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/link01.at:36:
+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
+
+ls directory/test1
+)"
+echo link01.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "test.txt
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/link01.at:36:
+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
+
+ls directory/test1
+)"
+echo link01.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "test.txt
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/link01.at:36:
+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
+
+ls directory/test1
+)"
+echo link01.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "test.txt
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/link01.at:36:
+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
+
+ls directory/test1
+)"
+echo link01.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+
+ls directory/test1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "test.txt
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 39 ) # 39. longv7.at:24: long names in V7 archives
+ at_setup_line='longv7.at:24'
+ at_desc='long names in V7 archives'
+ $at_quiet $ECHO_N " 39: long names in V7 archives $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "39. longv7.at:24: testing ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/longv7.at:30:
+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
+)"
+echo longv7.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; 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: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+this_is_a_very_long_name_for_a_directory_which_causes_problems/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/longv7.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 40 ) # 40. long01.at:28: long file names divisible by block size
+ at_setup_line='long01.at:28'
+ at_desc='long file names divisible by block size'
+ $at_quiet $ECHO_N " 40: long file names divisible by block size $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "40. long01.at:28: testing ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+
+ $at_traceoff
+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
+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)"
+echo long01.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/long01.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+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)"
+echo long01.at:36 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/long01.at:36: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 41 ) # 41. lustar01.at:21: ustar: unsplittable file name
+ at_setup_line='lustar01.at:21'
+ at_desc='ustar: unsplittable file name'
+ $at_quiet $ECHO_N " 41: ustar: unsplittable file name $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "41. lustar01.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+
+
+ $at_traceoff
+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
+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
+)"
+echo lustar01.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; 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: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 2) ;;
+ *) echo "$at_srcdir/lustar01.at:27: exit code was $at_status, expected 2"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 42 ) # 42. lustar02.at:21: ustar: unsplittable path name
+ at_setup_line='lustar02.at:21'
+ at_desc='ustar: unsplittable path name'
+ $at_quiet $ECHO_N " 42: ustar: unsplittable path name $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "42. lustar02.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+
+
+
+ $at_traceoff
+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
+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 lustar02.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; 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: Error exit delayed from previous errors
+" | $at_diff - "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 2) ;;
+ *) echo "$at_srcdir/lustar02.at:32: exit code was $at_status, expected 2"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 43 ) # 43. lustar03.at:21: ustar: splitting long names
+ at_setup_line='lustar03.at:21'
+ at_desc='ustar: splitting long names'
+ $at_quiet $ECHO_N " 43: ustar: splitting long names $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "43. lustar03.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+
+
+
+
+ $at_traceoff
+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
+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)"
+echo lustar03.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/lustar03.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 44 ) # 44. multiv01.at:23: multivolume dumps from pipes
+ at_setup_line='multiv01.at:23'
+ at_desc='multivolume dumps from pipes'
+ $at_quiet $ECHO_N " 44: multivolume dumps from pipes $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "44. multiv01.at:23: testing ..."
+ $at_traceon
+
+
+
+# Fixme: should be configurable
+# TRUSS=truss -o /tmp/tr
+# TRUSS=strace
+
+
+
+ $at_traceoff
+echo "$at_srcdir/multiv01.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 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 \\
+ --listed-incremental=t.snar \\
+ -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 \\
+ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)"
+echo multiv01.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 \
+ --listed-incremental=t.snar \
+ -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 \
+ --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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 \
+ --listed-incremental=t.snar \
+ -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 \
+ --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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/multiv01.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 --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 \\
+ --listed-incremental=t.snar \\
+ -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 \\
+ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)"
+echo multiv01.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 \
+ --listed-incremental=t.snar \
+ -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 \
+ --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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 \
+ --listed-incremental=t.snar \
+ -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 \
+ --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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/multiv01.at:30:
+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 \\
+ --listed-incremental=t.snar \\
+ -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 \\
+ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+)"
+echo multiv01.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 \
+ --listed-incremental=t.snar \
+ -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 \
+ --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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 \
+ --listed-incremental=t.snar \
+ -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 \
+ --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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 45 ) # 45. multiv02.at:28: skipping a straddling member
+ at_setup_line='multiv02.at:28'
+ at_desc='skipping a straddling member'
+ $at_quiet $ECHO_N " 45: skipping a straddling member $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "45. multiv02.at:28: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/multiv02.at:31:
+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 || exit 1
+)"
+echo multiv02.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+en
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/multiv02.at:31:
+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 || exit 1
+)"
+echo multiv02.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+en
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/multiv02.at:31:
+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 || exit 1
+)"
+echo multiv02.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+en
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 46 ) # 46. multiv03.at:30: MV archive & long filenames
+ at_setup_line='multiv03.at:30'
+ at_desc='MV archive & long filenames'
+ $at_quiet $ECHO_N " 46: MV archive & long filenames $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "46. multiv03.at:30: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 || exit 1
+cmp \$BFILE bfile
+)"
+echo multiv03.at:33 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+cmp $BFILE bfile
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+cmp $BFILE bfile
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff experr "$at_stderr" || at_failed=:
+$at_diff expout "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv03.at:33: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 || exit 1
+cmp \$BFILE bfile
+)"
+echo multiv03.at:33 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+cmp $BFILE bfile
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+cmp $BFILE bfile
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff experr "$at_stderr" || at_failed=:
+$at_diff expout "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv03.at:33: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 47 ) # 47. multiv04.at:36: split directory members in a MV archive
+ at_setup_line='multiv04.at:36'
+ at_desc='split directory members in a MV archive'
+ $at_quiet $ECHO_N " 47: split directory members in a MV archive $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "47. multiv04.at:36: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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)"
+echo multiv04.at:39 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+separator
+block 0: directory/
+block 35: ** Block of NULs **
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv04.at:39: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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)"
+echo multiv04.at:39 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+separator
+block 0: directory/
+block 35: ** Block of NULs **
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv04.at:39: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 48 ) # 48. multiv05.at:26: Restoring after an out of sync folume
+ at_setup_line='multiv05.at:26'
+ at_desc='Restoring after an out of sync folume'
+ $at_quiet $ECHO_N " 48: Restoring after an out of sync folume $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "48. multiv05.at:26: testing ..."
+ $at_traceon
+
+
+
+
+
+
+ $at_traceoff
+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
+)"
+echo multiv05.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: \`trzy' is not continued on this volume
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multiv05.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 49 ) # 49. old.at:23: old archives
+ at_setup_line='old.at:23'
+ at_desc='old archives'
+ $at_quiet $ECHO_N " 49: old archives $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "49. old.at:23: testing ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+$at_traceoff
+echo "$at_srcdir/old.at:27:
+mkdir directory
+tar cfvo archive directory || exit 1
+tar tf archive
+"
+echo old.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir directory
+tar cfvo archive directory || exit 1
+tar tf archive
+ ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir directory
+tar cfvo archive directory || exit 1
+tar tf archive
+ ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/old.at:27: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 50 ) # 50. recurse.at:21: recurse
+ at_setup_line='recurse.at:21'
+ at_desc='recurse'
+ $at_quiet $ECHO_N " 50: recurse $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "50. recurse.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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
+)"
+echo recurse.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo recurse.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo recurse.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo recurse.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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
+)"
+echo recurse.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "directory/
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 51 ) # 51. same-order01.at:26: working -C with --same-order
+ at_setup_line='same-order01.at:26'
+ at_desc='working -C with --same-order'
+ $at_quiet $ECHO_N " 51: working -C with --same-order $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "51. same-order01.at:26: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/same-order01.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
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory || exit 1
+
+ls directory|sort
+)"
+echo same-order01.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/same-order01.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
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory || exit 1
+
+ls directory|sort
+)"
+echo same-order01.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/same-order01.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
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory || exit 1
+
+ls directory|sort
+)"
+echo same-order01.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/same-order01.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
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory || exit 1
+
+ls directory|sort
+)"
+echo same-order01.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/same-order01.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
+
+
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory || exit 1
+
+ls directory|sort
+)"
+echo same-order01.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 || exit 1
+
+ls directory|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 52 ) # 52. same-order02.at:25: multiple -C options
+ at_setup_line='same-order02.at:25'
+ at_desc='multiple -C options'
+ $at_quiet $ECHO_N " 52: multiple -C options $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "52. same-order02.at:25: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/same-order02.at:28:
+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 -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+echo same-order02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+separator
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/same-order02.at:28:
+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 -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+echo same-order02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+separator
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/same-order02.at:28:
+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 -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+echo same-order02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+separator
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/same-order02.at:28:
+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 -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+echo same-order02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+separator
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/same-order02.at:28:
+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 -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+)"
+echo same-order02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "file1
+separator
+file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 53 ) # 53. shortrec.at:25: short records
+ at_setup_line='shortrec.at:25'
+ at_desc='short records'
+ $at_quiet $ECHO_N " 53: short records $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "53. shortrec.at:25: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/shortrec.at:28:
+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
+)"
+echo shortrec.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/shortrec.at:28:
+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
+)"
+echo shortrec.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/shortrec.at:28:
+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
+)"
+echo shortrec.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/shortrec.at:28:
+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
+)"
+echo shortrec.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/shortrec.at:28:
+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
+)"
+echo shortrec.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 54 ) # 54. sparse01.at:21: sparse files
+ at_setup_line='sparse01.at:21'
+ at_desc='sparse files'
+ $at_quiet $ECHO_N " 54: sparse files $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "54. sparse01.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/sparse01.at:24:
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)"
+echo sparse01.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; tee stdout <"$at_stdout"
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/sparse01.at:24:
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)"
+echo sparse01.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; tee stdout <"$at_stdout"
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/sparse01.at:24:
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+)"
+echo sparse01.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+genfile --stat=name,size sparsefile
+cmp sparsefile directory/sparsefile
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; tee stdout <"$at_stdout"
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$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
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 55 ) # 55. sparse02.at:21: extracting sparse file over a pipe
+ at_setup_line='sparse02.at:21'
+ at_desc='extracting sparse file over a pipe'
+ $at_quiet $ECHO_N " 55: extracting sparse file over a pipe $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "55. sparse02.at:21: testing ..."
+ $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
+
+
+
+ $at_traceoff
+echo "$at_srcdir/sparse02.at:28:
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)"
+echo sparse02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/sparse02.at:28:
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)"
+echo sparse02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/sparse02.at:28:
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+)"
+echo sparse02.at:28 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 -c -f archive --sparse sparsefile || exit 1
+echo separator
+
+tar xfO archive | cat - > sparsecopy || exit 1
+cmp sparsefile sparsecopy
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 56 ) # 56. sparse03.at:21: storing sparse files > 8G
+ at_setup_line='sparse03.at:21'
+ at_desc='storing sparse files > 8G'
+ $at_quiet $ECHO_N " 56: storing sparse files > 8G $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "56. sparse03.at:21: testing ..."
+ $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
+
+
+
+ $at_traceoff
+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
+)"
+echo sparse03.at:29 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; tee stdout <"$at_stdout"
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparse03.at:29: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$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
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 57 ) # 57. sparsemv.at:21: sparse files in MV archives
+ at_setup_line='sparsemv.at:21'
+ at_desc='sparse files in MV archives'
+ $at_quiet $ECHO_N " 57: sparse files in MV archives $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "57. sparsemv.at:21: testing ..."
+ $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.
+#
+
+
+
+ $at_traceoff
+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 <&-
+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 -t -M -f arc.1 -f arc.2
+echo \"Compare archive\"
+tar -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 -t -M -f arc.1 -f arc.2
+echo \"Compare archive\"
+tar -d -M -f arc.1 -f arc.2
+)"
+echo sparsemv.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir gnu
+(cd gnu
+TEST_TAR_FORMAT=gnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H gnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparsemv.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 <&-
+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 -t -M -f arc.1 -f arc.2
+echo \"Compare archive\"
+tar -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 -t -M -f arc.1 -f arc.2
+echo \"Compare archive\"
+tar -d -M -f arc.1 -f arc.2
+)"
+echo sparsemv.at:31 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir oldgnu
+(cd oldgnu
+TEST_TAR_FORMAT=oldgnu
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H oldgnu"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -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 -t -M -f arc.1 -f arc.2
+echo "Compare archive"
+tar -d -M -f arc.1 -f arc.2
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/sparsemv.at:31: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 58 ) # 58. spmvp00.at:21: sparse files in PAX MV archives, v.0.0
+ at_setup_line='spmvp00.at:21'
+ at_desc='sparse files in PAX MV archives, v.0.0'
+ $at_quiet $ECHO_N " 58: sparse files in PAX MV archives, v.0.0 $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "58. spmvp00.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+
+ $at_traceoff
+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 <&-
+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
+)"
+echo spmvp00.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/spmvp00.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 59 ) # 59. spmvp01.at:21: sparse files in PAX MV archives, v.0.1
+ at_setup_line='spmvp01.at:21'
+ at_desc='sparse files in PAX MV archives, v.0.1'
+ $at_quiet $ECHO_N " 59: sparse files in PAX MV archives, v.0.1 $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "59. spmvp01.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+
+ $at_traceoff
+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 <&-
+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
+)"
+echo spmvp01.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/spmvp01.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 60 ) # 60. spmvp10.at:21: sparse files in PAX MV archives, v.1.0
+ at_setup_line='spmvp10.at:21'
+ at_desc='sparse files in PAX MV archives, v.1.0'
+ $at_quiet $ECHO_N " 60: sparse files in PAX MV archives, v.1.0 $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "60. spmvp10.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+
+ $at_traceoff
+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 <&-
+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
+)"
+echo spmvp10.at:24 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+mkdir pax
+(cd pax
+TEST_TAR_FORMAT=pax
+export TEST_TAR_FORMAT
+TAR_OPTIONS="-H pax"
+export TAR_OPTIONS
+rm -rf *
+
+exec <&-
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/spmvp10.at:24: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 61 ) # 61. update.at:27: update unchanged directories
+ at_setup_line='update.at:27'
+ at_desc='update unchanged directories'
+ $at_quiet $ECHO_N " 61: update unchanged directories $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "61. update.at:27: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/update.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 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
+)"
+echo update.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/update.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 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
+)"
+echo update.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/update.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 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
+)"
+echo update.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/update.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 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
+)"
+echo update.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/update.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 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
+)"
+echo update.at:30 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+directory/
+directory/file1
+directory/file2
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 62 ) # 62. volume.at:23: volume
+ at_setup_line='volume.at:23'
+ at_desc='volume'
+ $at_quiet $ECHO_N " 62: volume $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "62. volume.at:23: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/volume.at:26:
+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
+)"
+echo volume.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; 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_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/volume.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/volume.at:26:
+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
+)"
+echo volume.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; 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_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/volume.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 63 ) # 63. volsize.at:29: volume header size
+ at_setup_line='volsize.at:29'
+ at_desc='volume header size'
+ $at_quiet $ECHO_N " 63: volume header size $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "63. volsize.at:29: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 tfv \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+echo volsize.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 22:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 tfv \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+echo volsize.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 22:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 tfv \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+echo volsize.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 22:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 tfv \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+echo volsize.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 22:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 tfv \$TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf \$TEST_DATA_DIR/abc.tar
+find abc|sort
+)"
+echo volsize.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 tfv $TEST_DATA_DIR/abc.tar
+echo Extracted directory
+tar xf $TEST_DATA_DIR/abc.tar
+find abc|sort
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "Short Listing
+abc/not-a-file.gif
+abc/CCC
+Verbose Listing
+V--------- 0/0 1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 22:52 abc/CCC
+Extracted directory
+abc
+abc/CCC
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 64 ) # 64. comprec.at:21: compressed format recognition
+ at_setup_line='comprec.at:21'
+ at_desc='compressed format recognition'
+ $at_quiet $ECHO_N " 64: compressed format recognition $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "64. comprec.at:21: testing ..."
+ $at_traceon
+
+
+
+
+
+
+ $at_traceoff
+echo "$at_srcdir/comprec.at:25:
+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
+cmp orig file1
+)"
+echo comprec.at:25 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/comprec.at:25:
+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
+cmp orig file1
+)"
+echo comprec.at:25 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/comprec.at:25:
+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
+cmp orig file1
+)"
+echo comprec.at:25 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/comprec.at:25:
+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
+cmp orig file1
+)"
+echo comprec.at:25 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+echo "$at_srcdir/comprec.at:25:
+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
+cmp orig file1
+)"
+echo comprec.at:25 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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
+cmp orig file1
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "separator
+separator
+file1
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 65 ) # 65. truncate.at:29: truncate
+ at_setup_line='truncate.at:29'
+ at_desc='truncate'
+ $at_quiet $ECHO_N " 65: truncate $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "65. truncate.at:29: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 50000k
+genfile --file baz
+genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: \$?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar)"
+echo truncate.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 50000k
+genfile --file baz
+genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: \$?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar)"
+echo truncate.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 50000k
+genfile --file baz
+genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: \$?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar)"
+echo truncate.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 50000k
+genfile --file baz
+genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: \$?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar)"
+echo truncate.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 50000k
+genfile --file baz
+genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: \$?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar)"
+echo truncate.at:32 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --length 5k --pattern=zeros
+tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+Exit status: 1
+separator
+foo
+foo: Mod time differs
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 66 ) # 66. grow.at:24: grow
+ at_setup_line='grow.at:24'
+ at_desc='grow'
+ $at_quiet $ECHO_N " 66: grow $ECHO_C"
+ at_xfail=no
+ test -f $XFAILFILE && at_xfail=yes
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "66. grow.at:24: testing ..."
+ $at_traceon
+
+
+
+
+
+ $at_traceoff
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
+ --append foo
+)"
+echo grow.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
+ --append foo
+)"
+echo grow.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
+ --append foo
+)"
+echo grow.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
+ --append foo
+)"
+echo grow.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+$at_traceoff
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
+ --append foo
+)"
+echo grow.at:27 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+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 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
+ --append foo
+) ) >"$at_stdout" 2>"$at_stderr"
+ at_status=$?
+fi
+
+at_failed=false
+echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
+" | $at_diff - "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; echo "foo
+baz
+" | $at_diff - "$at_stdout" || at_failed=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 1) ;;
+ *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 67 ) # 67. gtarfail.at:21: gtarfail
+ at_setup_line='gtarfail.at:21'
+ at_desc='gtarfail'
+ $at_quiet $ECHO_N " 67: gtarfail $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "67. gtarfail.at:21: testing ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+$at_traceoff
+echo "$at_srcdir/gtarfail.at:26:
+
+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
+"
+echo gtarfail.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/gtarfail.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 68 ) # 68. gtarfail2.at:21: gtarfail2
+ at_setup_line='gtarfail2.at:21'
+ at_desc='gtarfail2'
+ $at_quiet $ECHO_N " 68: gtarfail2 $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "68. gtarfail2.at:21: testing ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+$at_traceoff
+echo "$at_srcdir/gtarfail2.at:26:
+
+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
+"
+echo gtarfail2.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/gtarfail2.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 69 ) # 69. multi-fail.at:21: multi-fail
+ at_setup_line='multi-fail.at:21'
+ at_desc='multi-fail'
+ $at_quiet $ECHO_N " 69: multi-fail $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "69. multi-fail.at:21: testing ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+$at_traceoff
+echo "$at_srcdir/multi-fail.at:26:
+
+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 <&-
+"
+echo multi-fail.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/multi-fail.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$at_traceon
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 70 ) # 70. ustar-big-2g.at:21: ustar-big-2g
+ at_setup_line='ustar-big-2g.at:21'
+ at_desc='ustar-big-2g'
+ $at_quiet $ECHO_N " 70: ustar-big-2g $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "70. ustar-big-2g.at:21: testing ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+$at_traceoff
+echo "$at_srcdir/ustar-big-2g.at:26:
+
+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
+"
+echo ustar-big-2g.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo stderr:; tee stderr <"$at_stderr"
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/ustar-big-2g.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$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
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 71 ) # 71. ustar-big-8g.at:21: ustar-big-8g
+ at_setup_line='ustar-big-8g.at:21'
+ at_desc='ustar-big-8g'
+ $at_quiet $ECHO_N " 71: ustar-big-8g $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "71. ustar-big-8g.at:21: testing ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+$at_traceoff
+echo "$at_srcdir/ustar-big-8g.at:26:
+
+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
+"
+echo ustar-big-8g.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo stderr:; tee stderr <"$at_stderr"
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/ustar-big-8g.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$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
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+ 72 ) # 72. pax-big-10g.at:21: pax-big-10g
+ at_setup_line='pax-big-10g.at:21'
+ at_desc='pax-big-10g'
+ $at_quiet $ECHO_N " 72: pax-big-10g $ECHO_C"
+ at_xfail=no
+ echo "# -*- compilation -*-" >> "$at_group_log"
+ (
+ echo "72. pax-big-10g.at:21: testing ..."
+ $at_traceon
+
+
+
+unset TAR_OPTIONS
+
+$at_traceoff
+echo "$at_srcdir/pax-big-10g.at:26:
+
+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
+"
+echo pax-big-10g.at:26 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+ echo 'Not enabling shell tracing (command contains an embedded newline)'
+fi
+
+if test -n "$at_trace_this"; then
+ ( $at_traceon;
+
+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_stder1"
+ at_status=$?
+ grep '^ *+' "$at_stder1" >&2
+ grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+ ( :;
+
+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"
+ at_status=$?
+fi
+
+at_failed=false
+echo stderr:; tee stderr <"$at_stderr"
+echo >>"$at_stdout"; 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=:
+case $at_status in
+ 77) echo 77 > "$at_status_file"; exit 77;;
+ 0) ;;
+ *) echo "$at_srcdir/pax-big-10g.at:26: exit code was $at_status, expected 0"
+ at_failed=:;;
+esac
+if $at_failed; then
+
+
+ echo 1 > "$at_status_file"
+ exit 1
+fi
+
+$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
+
+
+ $at_traceoff
+ $at_times_p && times >"$at_times_file"
+ ) 5>&1 2>&1 | eval $at_tee_pipe
+ at_status=`cat "$at_status_file"`
+ ;;
+
+
+ * )
+ echo "$as_me: no such test group: $at_group" >&2
+ continue
+ ;;
+ esac
+
+ # 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"
+
+ case $at_group in
+ banner-*) ;;
+ *)
+ 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
+ echo "$at_setup_line" >"$at_check_line_file"
+ fi
+ at_group_count=`expr 1 + $at_group_count`
+ $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
+ echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log"
+ case $at_xfail:$at_status in
+ yes:0)
+ at_msg="UNEXPECTED PASS"
+ at_xpass_list="$at_xpass_list $at_group"
+ at_errexit=$at_errexit_p
+ ;;
+ no:0)
+ at_msg="ok"
+ at_pass_list="$at_pass_list $at_group"
+ at_errexit=false
+ ;;
+ *:77)
+ at_msg='skipped ('`cat "$at_check_line_file"`')'
+ at_skip_list="$at_skip_list $at_group"
+ at_errexit=false
+ ;;
+ yes:*)
+ at_msg='expected failure ('`cat "$at_check_line_file"`')'
+ at_xfail_list="$at_xfail_list $at_group"
+ at_errexit=false
+ ;;
+ no:*)
+ at_msg='FAILED ('`cat "$at_check_line_file"`')'
+ at_fail_list="$at_fail_list $at_group"
+ at_errexit=$at_errexit_p
+ ;;
+ esac
+ # Make sure there is a separator even with long titles.
+ echo " $at_msg"
+ 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
+ echo "$at_log_msg" >> "$at_group_log"
+ echo "$at_log_msg" >&5
+
+ # Cleanup the group directory, unless the user wants the files.
+ if $at_debug_p ; then
+ {
+ echo "#! /bin/sh"
+ echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
+ echo "cd '$at_dir'"
+ echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
+ '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
+ echo 'exit 1'
+ } >$at_group_dir/run
+ chmod +x $at_group_dir/run
+
+ elif test -d "$at_group_dir"; then
+ find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+ rm -fr "$at_group_dir"
+ 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.
+ echo "$at_log_msg" >> "$at_group_log"
+
+ # Upon failure, keep the group directory for autopsy, and
+ # create the debugging script.
+ {
+ echo "#! /bin/sh"
+ echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
+ echo "cd '$at_dir'"
+ echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
+ '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
+ echo 'exit 1'
+ } >$at_group_dir/run
+ chmod +x $at_group_dir/run
+
+ $at_errexit && break
+ ;;
+ esac
+ ;;
+ esac
+done
+
+# Back to the top directory.
+cd "$at_dir"
+
+# Compute the duration of the suite.
+at_stop_date=`date`
+at_stop_time=`date +%s 2>/dev/null`
+echo "$as_me: ending at: $at_stop_date" >&5
+case $at_start_time,$at_stop_time in
+ [0-9]*,[0-9]*)
+ at_duration_s=`expr $at_stop_time - $at_start_time`
+ at_duration_m=`expr $at_duration_s / 60`
+ at_duration_h=`expr $at_duration_m / 60`
+ at_duration_s=`expr $at_duration_s % 60`
+ at_duration_m=`expr $at_duration_m % 60`
+ at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
+ echo "$as_me: test suite duration: $at_duration" >&5
+ ;;
+esac
+
+# Wrap up the test suite with summary statistics.
+at_skip_count=`set dummy $at_skip_list; shift; echo $#`
+at_fail_count=`set dummy $at_fail_list; shift; echo $#`
+at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
+at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`
+
+at_run_count=`expr $at_group_count - $at_skip_count`
+at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
+at_total_fail_count=`expr $at_xfail_count + $at_fail_count`
+
+echo
+cat <<\_ASBOX
+## ------------- ##
+## Test results. ##
+## ------------- ##
+_ASBOX
+echo
+{
+ echo
+ cat <<\_ASBOX
+## ------------- ##
+## Test results. ##
+## ------------- ##
+_ASBOX
+ 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."
+else
+ # Don't you just love exponential explosion of the number of cases?
+ 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." ;;
+ 0:0:*) at_result="$at_result behaved as expected." ;;
+
+ # 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_result"
+ echo "$at_result" >&5
+else
+ echo "ERROR: $at_result" >&2
+ echo "ERROR: $at_result" >&5
+ {
+ echo
+ cat <<\_ASBOX
+## ------------------------ ##
+## Summary of the failures. ##
+## ------------------------ ##
+_ASBOX
+
+ # Summary of failed and skipped tests.
+ if test $at_fail_count != 0; then
+ echo "Failed tests:"
+ $SHELL "$0" $at_fail_list --list
+ echo
+ fi
+ if test $at_skip_count != 0; then
+ echo "Skipped tests:"
+ $SHELL "$0" $at_skip_list --list
+ echo
+ fi
+ if test $at_xpass_count != 0; then
+ echo "Unexpected passes:"
+ $SHELL "$0" $at_xpass_list --list
+ echo
+ fi
+ if test $at_fail_count != 0; then
+ cat <<\_ASBOX
+## ---------------------- ##
+## Detailed failed tests. ##
+## ---------------------- ##
+_ASBOX
+ echo
+ for at_group in $at_fail_list
+ do
+ at_group_normalized=$at_group
+
+ 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
+ echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:"
+ echo
+ echo " To: <bug-tar@gnu.org>"
+ echo " Subject: [GNU tar 1.17] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
+ echo
+ if test $at_debug_p = false; then
+ echo
+ echo 'You may investigate any problem if you feel able to do so, in which'
+ echo 'case the test suite provides a good starting point. Its output may'
+ echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
+ echo
+ fi
+ exit 1
+fi
+
+exit 0
+
+
+
diff --git a/tests/testsuite.at b/tests/testsuite.at
new file mode 100644
index 0000000..86dfe9a
--- /dev/null
+++ b/tests/testsuite.at
@@ -0,0 +1,194 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2004, 2005, 2006, 2007 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 2, 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.
+
+# We need a recent Autotest.
+m4_version_prereq([2.52g])
+
+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)])
+])
+
+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_TARBALL_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_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
+])
+
+m4_define([AT_TAR_MKHIER],[
+install-sh -d $1 >/dev/null
+m4_if([$2],,,genfile --file [$1]/[$2])])
+
+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])
+
+m4_include([T-empty.at])
+m4_include([T-null.at])
+
+m4_include([indexfile.at])
+m4_include([verbose.at])
+
+m4_include([append.at])
+m4_include([append01.at])
+m4_include([append02.at])
+
+m4_include([exclude.at])
+
+m4_include([delete01.at])
+m4_include([delete02.at])
+m4_include([delete03.at])
+m4_include([delete04.at])
+m4_include([delete05.at])
+
+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([gzip.at])
+
+m4_include([incremental.at])
+m4_include([incr01.at])
+m4_include([incr02.at])
+m4_include([listed01.at])
+m4_include([listed02.at])
+m4_include([incr03.at])
+m4_include([incr04.at])
+m4_include([rename01.at])
+m4_include([rename02.at])
+m4_include([rename03.at])
+m4_include([chtype.at])
+
+m4_include([ignfail.at])
+
+m4_include([link01.at])
+
+m4_include([longv7.at])
+m4_include([long01.at])
+m4_include([lustar01.at])
+m4_include([lustar02.at])
+m4_include([lustar03.at])
+
+m4_include([multiv01.at])
+m4_include([multiv02.at])
+m4_include([multiv03.at])
+m4_include([multiv04.at])
+m4_include([multiv05.at])
+
+m4_include([old.at])
+
+m4_include([recurse.at])
+
+m4_include([same-order01.at])
+m4_include([same-order02.at])
+
+m4_include([shortrec.at])
+
+m4_include([sparse01.at])
+m4_include([sparse02.at])
+m4_include([sparse03.at])
+m4_include([sparsemv.at])
+m4_include([spmvp00.at])
+m4_include([spmvp01.at])
+m4_include([spmvp10.at])
+
+m4_include([update.at])
+
+m4_include([volume.at])
+m4_include([volsize.at])
+
+m4_include([comprec.at])
+
+m4_include([truncate.at])
+m4_include([grow.at])
+
+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/truncate.at b/tests/truncate.at
new file mode 100644
index 0000000..3d2e670
--- /dev/null
+++ b/tests/truncate.at
@@ -0,0 +1,53 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2005 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 2, 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.
+
+# 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 50000k
+genfile --file baz
+genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+echo Exit status: $?
+echo separator
+sleep 1
+genfile --file foo --seek 49995k --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..30fc2dc
--- /dev/null
+++ b/tests/update.at
@@ -0,0 +1,50 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2005, 2006 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 2, 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.
+
+# 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
+
+AT_SETUP([update unchanged directories])
+AT_KEYWORDS([update])
+
+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/verbose.at b/tests/verbose.at
new file mode 100644
index 0000000..abd5a81
--- /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 (C) 2006 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 2, 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.
+
+# 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/version.at b/tests/version.at
new file mode 100644
index 0000000..6c1485e
--- /dev/null
+++ b/tests/version.at
@@ -0,0 +1,35 @@
+# Checking tar version -*- Autotest -*-
+# Copyright (C) 2004, 2006 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 2, 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.
+
+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..ddda506
--- /dev/null
+++ b/tests/volsize.at
@@ -0,0 +1,60 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2006 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 2, 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.
+
+# 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 tfv $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-09 01:07 abc/not-a-file.gif--Volume Header--
+-rw-r--r-- tom/users 0 2006-04-22 22: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..7607062
--- /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 (C) 2004, 2006 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 2, 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.
+
+# 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
+