diff -u tar-1.22/debian/control tar-1.22/debian/control --- tar-1.22/debian/control +++ tar-1.22/debian/control @@ -1,7 +1,8 @@ Source: tar Section: utils Priority: required -Maintainer: Bdale Garbee +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Bdale Garbee Uploaders: Carl Worth Build-Depends: debhelper (>> 5), gettext, autoconf, autotools-dev Standards-Version: 3.8.2 diff -u tar-1.22/debian/changelog tar-1.22/debian/changelog --- tar-1.22/debian/changelog +++ tar-1.22/debian/changelog @@ -1,3 +1,11 @@ +tar (1.22-2ubuntu1) lucid; urgency=low + + * Cherry pick + http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=41c44a66101c6c14b4e7f151247d517579760ba9 + to address problems on kernels older than 2.6.22 (LP: #539814) + + -- Andrew Pollock Thu, 22 Apr 2010 08:56:04 -0700 + tar (1.22-2) unstable; urgency=low * Add Carl Worth as an uploader. only in patch2: unchanged: --- tar-1.22.orig/build-aux/config.sub +++ tar-1.22/build-aux/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-02-03' +timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -153,6 +153,9 @@ os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -272,6 +275,7 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ | nios | nios2 \ @@ -466,6 +470,10 @@ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -1259,7 +1267,7 @@ # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ @@ -1612,7 +1620,7 @@ -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) only in patch2: unchanged: --- tar-1.22.orig/build-aux/config.guess +++ tar-1.22/build-aux/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-02-03' +timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -170,7 +170,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -324,6 +324,9 @@ case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; @@ -653,7 +656,7 @@ # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -819,6 +822,9 @@ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -879,40 +885,17 @@ m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips64 - #undef mips64el + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif @@ -944,7 +927,7 @@ EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; @@ -998,14 +981,6 @@ elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -1071,7 +1046,7 @@ i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1115,8 +1090,11 @@ pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 @@ -1176,7 +1154,7 @@ rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) only in patch2: unchanged: --- tar-1.22.orig/lib/utimens.c +++ tar-1.22/lib/utimens.c @@ -1,7 +1,6 @@ /* Set file access and modification times. - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software - Foundation, Inc. + Copyright (C) 2003-2010 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 @@ -24,12 +23,17 @@ #include "utimens.h" +#include #include #include +#include #include #include #include +#include "stat-time.h" +#include "timespec.h" + #if HAVE_UTIME_H # include #endif @@ -44,25 +48,110 @@ }; #endif -/* Some systems don't have ENOSYS. */ -#ifndef ENOSYS -# ifdef ENOTSUP -# define ENOSYS ENOTSUP -# else -/* Some systems don't have ENOTSUP either. */ -# define ENOSYS EINVAL -# endif +/* Avoid recursion with rpl_futimens or rpl_utimensat. */ +#undef futimens +#undef utimensat + +/* Solaris 9 mistakenly succeeds when given a non-directory with a + trailing slash. Force the use of rpl_stat for a fix. */ +#ifndef REPLACE_FUNC_STAT_FILE +# define REPLACE_FUNC_STAT_FILE 0 #endif -#ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) -# define __attribute__(x) -# endif -#endif +#if HAVE_UTIMENSAT || HAVE_FUTIMENS +/* Cache variables for whether the utimensat syscall works; used to + avoid calling the syscall if we know it will just fail with ENOSYS, + and to avoid unnecessary work in massaging timestamps if the + syscall will work. Multiple variables are needed, to distinguish + between the following scenarios on Linux: + utimensat doesn't exist, or is in glibc but kernel 2.6.18 fails with ENOSYS + kernel 2.6.22 and earlier rejects AT_SYMLINK_NOFOLLOW + kernel 2.6.25 and earlier reject UTIME_NOW/UTIME_OMIT with non-zero tv_sec + kernel 2.6.32 used with xfs or ntfs-3g fail to honor UTIME_OMIT + utimensat completely works + For each cache variable: 0 = unknown, 1 = yes, -1 = no. */ +static int utimensat_works_really; +static int lutimensat_works_really; +#endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */ + +/* Validate the requested timestamps. Return 0 if the resulting + timespec can be used for utimensat (after possibly modifying it to + work around bugs in utimensat). Return a positive value if the + timespec needs further adjustment based on stat results: 1 if any + adjustment is needed for utimes, and 2 if any adjustment is needed + for Linux utimensat. Return -1, with errno set to EINVAL, if + timespec is out of range. */ +static int +validate_timespec (struct timespec timespec[2]) +{ + int result = 0; + int utime_omit_count = 0; + assert (timespec); + if ((timespec[0].tv_nsec != UTIME_NOW + && timespec[0].tv_nsec != UTIME_OMIT + && (timespec[0].tv_nsec < 0 || 1000000000 <= timespec[0].tv_nsec)) + || (timespec[1].tv_nsec != UTIME_NOW + && timespec[1].tv_nsec != UTIME_OMIT + && (timespec[1].tv_nsec < 0 || 1000000000 <= timespec[1].tv_nsec))) + { + errno = EINVAL; + return -1; + } + /* Work around Linux kernel 2.6.25 bug, where utimensat fails with + EINVAL if tv_sec is not 0 when using the flag values of tv_nsec. + Flag a Linux kernel 2.6.32 bug, where an mtime of UTIME_OMIT + fails to bump ctime. */ + if (timespec[0].tv_nsec == UTIME_NOW + || timespec[0].tv_nsec == UTIME_OMIT) + { + timespec[0].tv_sec = 0; + result = 1; + if (timespec[0].tv_nsec == UTIME_OMIT) + utime_omit_count++; + } + if (timespec[1].tv_nsec == UTIME_NOW + || timespec[1].tv_nsec == UTIME_OMIT) + { + timespec[1].tv_sec = 0; + result = 1; + if (timespec[1].tv_nsec == UTIME_OMIT) + utime_omit_count++; + } + return result + (utime_omit_count == 1); +} -#ifndef ATTRIBUTE_UNUSED -# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#endif +/* Normalize any UTIME_NOW or UTIME_OMIT values in *TS, using stat + buffer STATBUF to obtain the current timestamps of the file. If + both times are UTIME_NOW, set *TS to NULL (as this can avoid some + permissions issues). If both times are UTIME_OMIT, return true + (nothing further beyond the prior collection of STATBUF is + necessary); otherwise return false. */ +static bool +update_timespec (struct stat const *statbuf, struct timespec *ts[2]) +{ + struct timespec *timespec = *ts; + if (timespec[0].tv_nsec == UTIME_OMIT + && timespec[1].tv_nsec == UTIME_OMIT) + return true; + if (timespec[0].tv_nsec == UTIME_NOW + && timespec[1].tv_nsec == UTIME_NOW) + { + *ts = NULL; + return false; + } + + if (timespec[0].tv_nsec == UTIME_OMIT) + timespec[0] = get_stat_atime (statbuf); + else if (timespec[0].tv_nsec == UTIME_NOW) + gettime (×pec[0]); + + if (timespec[1].tv_nsec == UTIME_OMIT) + timespec[1] = get_stat_mtime (statbuf); + else if (timespec[1].tv_nsec == UTIME_NOW) + gettime (×pec[1]); + + return false; +} /* Set the access and modification time stamps of FD (a.k.a. FILE) to be TIMESPEC[0] and TIMESPEC[1], respectively. @@ -75,9 +164,36 @@ Return 0 on success, -1 (setting errno) on failure. */ int -gl_futimens (int fd ATTRIBUTE_UNUSED, - char const *file, struct timespec const timespec[2]) +fdutimens (char const *file, int fd, struct timespec const timespec[2]) { + struct timespec adjusted_timespec[2]; + struct timespec *ts = timespec ? adjusted_timespec : NULL; + int adjustment_needed = 0; + struct stat st; + + if (ts) + { + adjusted_timespec[0] = timespec[0]; + adjusted_timespec[1] = timespec[1]; + adjustment_needed = validate_timespec (ts); + } + if (adjustment_needed < 0) + return -1; + + /* Require that at least one of FD or FILE are valid. Works around + a Linux bug where futimens (AT_FDCWD, NULL) changes "." rather + than failing. */ + if (!file) + { + if (fd < 0) + { + errno = EBADF; + return -1; + } + if (dup2 (fd, fd) != fd) + return -1; + } + /* Some Linux-based NFS clients are buggy, and mishandle time stamps of files in NFS file systems in some cases. We have no configure-time test for this, but please see @@ -95,57 +211,103 @@ fsync (fd); #endif - /* POSIX 200x added two interfaces to set file timestamps with - nanosecond resolution. We provide a fallback for ENOSYS (for - example, compiling against Linux 2.6.25 kernel headers and glibc - 2.7, but running on Linux 2.6.18 kernel). */ -#if HAVE_UTIMENSAT - if (fd < 0) + /* POSIX 2008 added two interfaces to set file timestamps with + nanosecond resolution; newer Linux implements both functions via + a single syscall. We provide a fallback for ENOSYS (for example, + compiling against Linux 2.6.25 kernel headers and glibc 2.7, but + running on Linux 2.6.18 kernel). */ +#if HAVE_UTIMENSAT || HAVE_FUTIMENS + if (0 <= utimensat_works_really) { - int result = utimensat (AT_FDCWD, file, timespec, 0); -# ifdef __linux__ - /* Work around what might be a kernel bug: - http://bugzilla.redhat.com/442352 - http://bugzilla.redhat.com/449910 - It appears that utimensat can mistakenly return 280 rather - than -1 upon failure. - FIXME: remove in 2010 or whenever the offending kernels - are no longer in common use. */ - if (0 < result) - errno = ENOSYS; -# endif - - if (result == 0 || errno != ENOSYS) - return result; + int result; +# if __linux__ + /* As recently as Linux kernel 2.6.32 (Dec 2009), several file + systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT, + but work if both times are either explicitly specified or + UTIME_NOW. Work around it with a preparatory [f]stat prior + to calling futimens/utimensat; fortunately, there is not much + timing impact due to the extra syscall even on file systems + where UTIME_OMIT would have worked. FIXME: Simplify this in + 2012, when file system bugs are no longer common. */ + if (adjustment_needed == 2) + { + if (fd < 0 ? stat (file, &st) : fstat (fd, &st)) + return -1; + if (ts[0].tv_nsec == UTIME_OMIT) + ts[0] = get_stat_atime (&st); + else if (ts[1].tv_nsec == UTIME_OMIT) + ts[1] = get_stat_mtime (&st); + /* Note that st is good, in case utimensat gives ENOSYS. */ + adjustment_needed++; + } +# endif /* __linux__ */ +# if HAVE_UTIMENSAT + if (fd < 0) + { + result = utimensat (AT_FDCWD, file, ts, 0); +# ifdef __linux__ + /* Work around a kernel bug: + http://bugzilla.redhat.com/442352 + http://bugzilla.redhat.com/449910 + It appears that utimensat can mistakenly return 280 rather + than -1 upon ENOSYS failure. + FIXME: remove in 2010 or whenever the offending kernels + are no longer in common use. */ + if (0 < result) + errno = ENOSYS; +# endif /* __linux__ */ + if (result == 0 || errno != ENOSYS) + { + utimensat_works_really = 1; + return result; + } + } +# endif /* HAVE_UTIMENSAT */ +# if HAVE_FUTIMENS + if (0 <= fd) + { + result = futimens (fd, ts); +# ifdef __linux__ + /* Work around the same bug as above. */ + if (0 < result) + errno = ENOSYS; +# endif /* __linux__ */ + if (result == 0 || errno != ENOSYS) + { + utimensat_works_really = 1; + return result; + } + } +# endif /* HAVE_FUTIMENS */ } -#endif -#if HAVE_FUTIMENS - { - int result = futimens (fd, timespec); -# ifdef __linux__ - /* Work around the same bug as above. */ - if (0 < result) - errno = ENOSYS; -# endif - if (result == 0 || errno != ENOSYS) - return result; - } -#endif + utimensat_works_really = -1; + lutimensat_works_really = -1; +#endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */ /* The platform lacks an interface to set file timestamps with nanosecond resolution, so do the best we can, discarding any fractional part of the timestamp. */ + + if (adjustment_needed || (REPLACE_FUNC_STAT_FILE && fd < 0)) + { + if (adjustment_needed != 3 + && (fd < 0 ? stat (file, &st) : fstat (fd, &st))) + return -1; + if (ts && update_timespec (&st, &ts)) + return 0; + } + { #if HAVE_FUTIMESAT || HAVE_WORKING_UTIMES struct timeval timeval[2]; struct timeval const *t; - if (timespec) + if (ts) { - timeval[0].tv_sec = timespec[0].tv_sec; - timeval[0].tv_usec = timespec[0].tv_nsec / 1000; - timeval[1].tv_sec = timespec[1].tv_sec; - timeval[1].tv_usec = timespec[1].tv_nsec / 1000; - t = timeval; + timeval[0].tv_sec = ts[0].tv_sec; + timeval[0].tv_usec = ts[0].tv_nsec / 1000; + timeval[1].tv_sec = ts[1].tv_sec; + timeval[1].tv_usec = ts[1].tv_nsec / 1000; + t = timeval; } else t = NULL; @@ -153,48 +315,38 @@ if (fd < 0) { # if HAVE_FUTIMESAT - return futimesat (AT_FDCWD, file, t); + return futimesat (AT_FDCWD, file, t); # endif } else { - /* If futimesat or futimes fails here, don't try to speed things - up by returning right away. glibc can incorrectly fail with - errno == ENOENT if /proc isn't mounted. Also, Mandrake 10.0 - in high security mode doesn't allow ordinary users to read - /proc/self, so glibc incorrectly fails with errno == EACCES. - If errno == EIO, EPERM, or EROFS, it's probably safe to fail - right away, but these cases are rare enough that they're not - worth optimizing, and who knows what other messed-up systems - are out there? So play it safe and fall back on the code - below. */ -# if HAVE_FUTIMESAT - if (futimesat (fd, NULL, t) == 0) - return 0; + /* If futimesat or futimes fails here, don't try to speed things + up by returning right away. glibc can incorrectly fail with + errno == ENOENT if /proc isn't mounted. Also, Mandrake 10.0 + in high security mode doesn't allow ordinary users to read + /proc/self, so glibc incorrectly fails with errno == EACCES. + If errno == EIO, EPERM, or EROFS, it's probably safe to fail + right away, but these cases are rare enough that they're not + worth optimizing, and who knows what other messed-up systems + are out there? So play it safe and fall back on the code + below. */ +# if HAVE_FUTIMESAT && !FUTIMESAT_NULL_BUG + if (futimesat (fd, NULL, t) == 0) + return 0; # elif HAVE_FUTIMES - if (futimes (fd, t) == 0) - return 0; + if (futimes (fd, t) == 0) + return 0; # endif } #endif /* HAVE_FUTIMESAT || HAVE_WORKING_UTIMES */ if (!file) { -#if ! (HAVE_FUTIMESAT || (HAVE_WORKING_UTIMES && HAVE_FUTIMES)) - errno = ENOSYS; +#if ! ((HAVE_FUTIMESAT && !FUTIMESAT_NULL_BUG) \ + || (HAVE_WORKING_UTIMES && HAVE_FUTIMES)) + errno = ENOSYS; #endif - - /* Prefer EBADF to ENOSYS if both error numbers apply. */ - if (errno == ENOSYS) - { - int fd2 = dup (fd); - int dup_errno = errno; - if (0 <= fd2) - close (fd2); - errno = (fd2 < 0 && dup_errno == EBADF ? EBADF : ENOSYS); - } - - return -1; + return -1; } #if HAVE_WORKING_UTIMES @@ -202,15 +354,15 @@ #else { struct utimbuf utimbuf; - struct utimbuf const *ut; - if (timespec) - { - utimbuf.actime = timespec[0].tv_sec; - utimbuf.modtime = timespec[1].tv_sec; - ut = &utimbuf; - } + struct utimbuf *ut; + if (ts) + { + utimbuf.actime = ts[0].tv_sec; + utimbuf.modtime = ts[1].tv_sec; + ut = &utimbuf; + } else - ut = NULL; + ut = NULL; return utime (file, ut); } @@ -218,10 +370,144 @@ } } +/* Set the access and modification time stamps of FD (a.k.a. FILE) to be + TIMESPEC[0] and TIMESPEC[1], respectively. + FD must be either negative -- in which case it is ignored -- + or a file descriptor that is open on FILE. + If FD is nonnegative, then FILE can be NULL, which means + use just futimes (or equivalent) instead of utimes (or equivalent), + and fail if on an old system without futimes (or equivalent). + If TIMESPEC is null, set the time stamps to the current time. + Return 0 on success, -1 (setting errno) on failure. */ + +int +gl_futimens (int fd, char const *file, struct timespec const timespec[2]) +{ + return fdutimens (file, fd, timespec); +} + /* Set the access and modification time stamps of FILE to be TIMESPEC[0] and TIMESPEC[1], respectively. */ int utimens (char const *file, struct timespec const timespec[2]) { - return gl_futimens (-1, file, timespec); + return fdutimens (file, -1, timespec); +} + +/* Set the access and modification time stamps of FILE to be + TIMESPEC[0] and TIMESPEC[1], respectively, without dereferencing + symlinks. Fail with ENOSYS if the platform does not support + changing symlink timestamps, but FILE was a symlink. */ +int +lutimens (char const *file, struct timespec const timespec[2]) +{ + struct timespec adjusted_timespec[2]; + struct timespec *ts = timespec ? adjusted_timespec : NULL; + int adjustment_needed = 0; + struct stat st; + + if (ts) + { + adjusted_timespec[0] = timespec[0]; + adjusted_timespec[1] = timespec[1]; + adjustment_needed = validate_timespec (ts); + } + if (adjustment_needed < 0) + return -1; + + /* The Linux kernel did not support symlink timestamps until + utimensat, in version 2.6.22, so we don't need to mimic + gl_futimens' worry about buggy NFS clients. But we do have to + worry about bogus return values. */ + +#if HAVE_UTIMENSAT + if (0 <= lutimensat_works_really) + { + int result; +# if __linux__ + /* As recently as Linux kernel 2.6.32 (Dec 2009), several file + systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT, + but work if both times are either explicitly specified or + UTIME_NOW. Work around it with a preparatory lstat prior to + calling utimensat; fortunately, there is not much timing + impact due to the extra syscall even on file systems where + UTIME_OMIT would have worked. FIXME: Simplify this in 2012, + when file system bugs are no longer common. */ + if (adjustment_needed == 2) + { + if (lstat (file, &st)) + return -1; + if (ts[0].tv_nsec == UTIME_OMIT) + ts[0] = get_stat_atime (&st); + else if (ts[1].tv_nsec == UTIME_OMIT) + ts[1] = get_stat_mtime (&st); + /* Note that st is good, in case utimensat gives ENOSYS. */ + adjustment_needed++; + } +# endif /* __linux__ */ + result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW); +# ifdef __linux__ + /* Work around a kernel bug: + http://bugzilla.redhat.com/442352 + http://bugzilla.redhat.com/449910 + It appears that utimensat can mistakenly return 280 rather + than -1 upon ENOSYS failure. + FIXME: remove in 2010 or whenever the offending kernels + are no longer in common use. */ + if (0 < result) + errno = ENOSYS; +# endif + if (result == 0 || errno != ENOSYS) + { + utimensat_works_really = 1; + lutimensat_works_really = 1; + return result; + } + } + lutimensat_works_really = -1; +#endif /* HAVE_UTIMENSAT */ + + /* The platform lacks an interface to set file timestamps with + nanosecond resolution, so do the best we can, discarding any + fractional part of the timestamp. */ + + if (adjustment_needed || REPLACE_FUNC_STAT_FILE) + { + if (adjustment_needed != 3 && lstat (file, &st)) + return -1; + if (ts && update_timespec (&st, &ts)) + return 0; + } + + /* On Linux, lutimes is a thin wrapper around utimensat, so there is + no point trying lutimes if utimensat failed with ENOSYS. */ +#if HAVE_LUTIMES && !HAVE_UTIMENSAT + { + struct timeval timeval[2]; + struct timeval const *t; + int result; + if (ts) + { + timeval[0].tv_sec = ts[0].tv_sec; + timeval[0].tv_usec = ts[0].tv_nsec / 1000; + timeval[1].tv_sec = ts[1].tv_sec; + timeval[1].tv_usec = ts[1].tv_nsec / 1000; + t = timeval; + } + else + t = NULL; + + result = lutimes (file, t); + if (result == 0 || errno != ENOSYS) + return result; + } +#endif /* HAVE_LUTIMES && !HAVE_UTIMENSAT */ + + /* Out of luck for symlinks, but we still handle regular files. */ + if (!(adjustment_needed || REPLACE_FUNC_STAT_FILE) && lstat (file, &st)) + return -1; + if (!S_ISLNK (st.st_mode)) + return fdutimens (file, -1, ts); + errno = ENOSYS; + return -1; } only in patch2: unchanged: --- tar-1.22.orig/tests/testsuite +++ tar-1.22/tests/testsuite @@ -1,58 +1,78 @@ #! /bin/sh +# Generated from testsuite.at by GNU Autoconf 2.65. +# +# Copyright (C) 2009 Free Software Foundation, Inc. # -# 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. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# 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=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -61,20 +81,18 @@ # 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 +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 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -85,354 +103,321 @@ 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; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + 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 +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -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'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac 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 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -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 - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -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 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - 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 -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 - + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -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 +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS - -: -(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 +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} } +as_unset=as_fn_unset -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" -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 - : +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - 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 - + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(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 -} +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. + as_expr=false fi -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. + as_basename=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false 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 -} - +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_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. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -449,8 +434,7 @@ 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; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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 @@ -460,49 +444,40 @@ 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 +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; 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 +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 + mkdir conf$$.dir 2>/dev/null 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 || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -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' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -510,7 +485,7 @@ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -527,12 +502,12 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -547,32 +522,13 @@ + + 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. @@ -583,9 +539,14 @@ at_debug_args= # -e sets to true at_errexit_p=false -# Shall we be verbose? +# Shall we be verbose? ':' means no, empty means yes. at_verbose=: -at_quiet=echo +at_quiet= +# Running several jobs in parallel, 0 means as many as test groups. +at_jobs=1 +at_traceon=: +at_trace_echo=: +at_check_filter_trace=: # Shall we keep the debug scripts? Must be `:' when the suite is # run by a debug script, so that the script doesn't remove itself. @@ -596,31 +557,27 @@ at_version_p=false # List test groups? at_list_p=false +# --clean +at_clean=false # Test groups to run at_groups= +# Whether a write failure occurred +at_write_fail=0 -# The directory we are in. +# The directory we run the suite in. Default to . if no -C option. 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 +# An absolute reference to this testsuite script. +case $as_myself in + [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;; + * ) at_myself=$at_dir/$as_myself ;; +esac +# Whether -C is in effect. +at_change_dir=false # 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 73 74 75 76 77' +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 73 74 75 76 77 78 79' # 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. @@ -631,8 +588,8 @@ 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 T-null; -7;indexfile.at:26;tar --index-file=this_is_a_very_long_file_name_which_raises_issues.c --file=-;stdout indexfile; +6;T-null.at:21;files-from: 0-separated file without -0;files-from null t-null; +7;indexfile.at:26;tar --index-file=FILE --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; @@ -665,46 +622,72 @@ 37;rename05.at:24;renamed subdirectories;incremental rename05 rename; 38;chtype.at:27;changed file types in incrementals;incremental chtype; 39;ignfail.at:23;ignfail;ignfail; -40;link01.at:33;link count gt 2;link01; -41;longv7.at:24;long names in V7 archives;longname longv7; -42;long01.at:28;long file names divisible by block size;longname long512; -43;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01; -44;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02; -45;lustar03.at:21;ustar: splitting long names;longname ustar lustar03; -46;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01; -47;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02; -48;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03; -49;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental multiv04; -50;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync; -51;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06; -52;old.at:23;old archives;old; -53;recurse.at:21;recurse;recurse; -54;same-order01.at:26;working -C with --same-order;same-order same-order01; -55;same-order02.at:25;multiple -C options;same-order same-order02; -56;shortrec.at:25;short records;shortrec; -57;sparse01.at:21;sparse files;sparse sparse01; -58;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02; -59;sparse03.at:21;storing sparse files > 8G;sparse sparse03; -60;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv; -61;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multiv sparsemvp sparsemvp00; -62;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01; -63;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multiv sparsemvp sparsemvp10; -64;update.at:27;update unchanged directories;update; -65;volume.at:23;volume;volume volcheck; -66;volsize.at:29;volume header size;volume volsize; -67;comprec.at:21;compressed format recognition;comprec; -68;shortfile.at:26;short input files;shortfile shortfile0; -69;shortupd.at:29;updating short archives;shortfile shortfile1 shortupd; -70;truncate.at:29;truncate;truncate filechange; -71;grow.at:24;grow;grow filechange; -72;gtarfail.at:21;gtarfail;star gtarfail; -73;gtarfail2.at:21;gtarfail2;star gtarfail2; -74;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail; -75;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g; -76;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g; -77;pax-big-10g.at:21;pax-big-10g;star pax-big-10g; +40;link01.at:33;link count gt 2;hardlinks link01; +41;link02.at:32;preserve hard links with --remove-files;hardlinks link02; +42;link03.at:24;working -l with --remove-files;hardlinks link03; +43;longv7.at:24;long names in V7 archives;longname longv7; +44;long01.at:28;long file names divisible by block size;longname long512; +45;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01; +46;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02; +47;lustar03.at:21;ustar: splitting long names;longname ustar lustar03; +48;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01; +49;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02; +50;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03; +51;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental multiv04; +52;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync; +53;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06; +54;old.at:23;old archives;old; +55;recurse.at:21;recurse;recurse; +56;same-order01.at:26;working -C with --same-order;same-order same-order01; +57;same-order02.at:25;multiple -C options;same-order same-order02; +58;shortrec.at:25;short records;shortrec; +59;sparse01.at:21;sparse files;sparse sparse01; +60;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02; +61;sparse03.at:21;storing sparse files > 8G;sparse sparse03; +62;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv; +63;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multiv sparsemvp sparsemvp00; +64;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01; +65;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multiv sparsemvp sparsemvp10; +66;update.at:27;update unchanged directories;update; +67;volume.at:23;volume;volume volcheck; +68;volsize.at:29;volume header size;volume volsize; +69;comprec.at:21;compressed format recognition;comprec; +70;shortfile.at:26;short input files;shortfile shortfile0; +71;shortupd.at:29;updating short archives;shortfile shortfile1 shortupd; +72;truncate.at:29;truncate;truncate filechange; +73;grow.at:24;grow;grow filechange; +74;gtarfail.at:21;gtarfail;star gtarfail; +75;gtarfail2.at:21;gtarfail2;star gtarfail2; +76;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail; +77;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g; +78;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g; +79;pax-big-10g.at:21;pax-big-10g;star pax-big-10g; " +# at_fn_validate_ranges file... +# ----------------------------- +# Validate and normalize the test group number contained in each variable +# NAME. Leading zeroes are treated as decimal. +at_fn_validate_ranges () +{ + for at_grp + do + eval at_value=\$$at_grp + if test $at_value -lt 1 || test $at_value -gt 79; then + $as_echo "invalid test group: $at_value" >&2 + exit 1 + fi + case $at_value in + 0*) # We want to treat leading 0 as decimal, like expr and test, but + # AS_VAR_ARITH treats it as octal if it uses $(( )). + # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the + # expr fork, but it is not worth the effort to determine if the + # shell supports XSI when the user can just avoid leading 0. + eval $at_grp='`expr $at_value + 0`' ;; + esac + done +} + at_prev= for at_option do @@ -735,10 +718,7 @@ ;; --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 + at_clean=: ;; --debug | -d ) @@ -751,30 +731,35 @@ ;; --verbose | -v ) - at_verbose=echo; at_quiet=: + at_verbose=; at_quiet=: ;; --trace | -x ) - at_traceon='set -x'; at_traceoff='set +x' + at_traceon='set -x' + at_trace_echo=echo + at_check_filter_trace=at_fn_filter_trace ;; [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) - at_groups="$at_groups$at_option " + at_fn_validate_ranges at_option + as_fn_append 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 " | \ + at_fn_validate_ranges at_range_start + at_range=`$as_echo " $at_groups_all " | \ sed -e 's/^.* \('$at_range_start' \)/\1/'` - at_groups="$at_groups$at_range " + as_fn_append 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 " | \ + at_fn_validate_ranges at_range_end + at_range=`$as_echo " $at_groups_all " | \ sed -e 's/\( '$at_range_end'\) .*$/\1/'` - at_groups="$at_groups$at_range " + as_fn_append at_groups "$at_range " ;; [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ @@ -790,10 +775,36 @@ at_range_end=$at_range_start at_range_start=$at_tmp fi - at_range=`echo " $at_groups_all " | \ + at_fn_validate_ranges at_range_start at_range_end + at_range=`$as_echo " $at_groups_all " | \ sed -e 's/^.*\( '$at_range_start' \)/\1/' \ -e 's/\( '$at_range_end'\) .*$/\1/'` - at_groups="$at_groups$at_range " + as_fn_append at_groups "$at_range " + ;; + + # Directory selection. + --directory | -C ) + at_prev=--directory + ;; + --directory=* ) + at_change_dir=: + at_dir=$at_optarg + ;; + + # Parallel execution. + --jobs | -j ) + at_jobs=0 + ;; + --jobs=* | -j[0-9]* ) + if test -n "$at_optarg"; then + at_jobs=$at_optarg + else + at_jobs=`expr X$at_option : 'X-j\(.*\)'` + fi + case $at_jobs in *[!0-9]*) + at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` + as_fn_error "non-numeric argument to $at_optname: $at_jobs" ;; + esac ;; # Keywords. @@ -817,85 +828,70 @@ ;; esac # It is on purpose that we match the test group titles too. - at_groups_selected=`echo "$at_groups_selected" | + at_groups_selected=`$as_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_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//' | + tr "$as_nl" ' ' + ` + as_fn_append at_groups "$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'" + case $at_envvar in + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$at_envvar'" ;; + esac + at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` + # Export now, but save eval for later and for debug scripts. export $at_envvar - # Propagate to debug scripts. - at_debug_args="$at_debug_args $at_envvar='$at_value'" + as_fn_append at_debug_args " $at_envvar='$at_value'" ;; - *) echo "$as_me: invalid option: $at_option" >&2 - echo "Try \`$0 --help' for more information." >&2 + *) $as_echo "$as_me: invalid option: $at_option" >&2 + $as_echo "Try \`$0 --help' for more information." >&2 exit 1 ;; esac done +# Verify our last option didn't require an argument +if test -n "$at_prev"; then : + as_fn_error "\`$at_prev' requires an argument." +fi + # 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 - }'` + # Sort the tests, removing duplicates. + at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu` fi # Help message. if $at_help_p; then - cat <<_ATEOF + cat <<_ATEOF || at_write_fail=1 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] Run all the tests, or the selected TESTS, given by numeric ranges, and save a detailed log file. Upon failure, create debugging scripts. -You should not change environment variables unless explicitly passed -as command line arguments. Set \`AUTOTEST_PATH' to select the executables +Do not change environment variables directly. Instead, set them via +command line arguments. Set \`AUTOTEST_PATH' to select the executables to exercise. Each relative directory is expanded as build and source -directories relatively to the top level of this distribution. E.g., +directories relative to the top level of this distribution. +E.g., from within the build directory /tmp/foo-1.0, invoking this: $ $0 AUTOTEST_PATH=bin -possibly amounts into +is equivalent to the following, assuming the source directory is /src/foo-1.0: - PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH + PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0 _ATEOF -cat <<_ATEOF +cat <<_ATEOF || at_write_fail=1 Operation modes: -h, --help print the help message, then exit @@ -903,29 +899,34 @@ -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 +cat <<_ATEOF || at_write_fail=1 Execution tuning: + -C, --directory=DIR + change to directory DIR before starting + -j, --jobs[=N] + Allow N jobs at once; infinite jobs with no arg (default 1) -k, --keywords=KEYWORDS - select the tests matching all the comma-separated KEYWORDS - multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD + 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 + default for debugging scripts -d, --debug inhibit clean up and top-level logging - default for debugging scripts + default for debugging scripts -x, --trace enable tests shell tracing _ATEOF -cat <<_ATEOF +cat <<_ATEOF || at_write_fail=1 Report bugs to . +General help using GNU software: . _ATEOF - exit 0 + exit $at_write_fail fi # List of tests. if $at_list_p; then - cat <<_ATEOF + cat <<_ATEOF || at_write_fail=1 GNU tar 1.22 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME @@ -935,63 +936,184 @@ # 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" | + # at_groups needs to be space-separated for this script to work. + case $at_groups in + *"$as_nl"* ) + at_groups=`$as_echo "$at_groups" | tr "$as_nl" ' '` ;; + esac + $as_echo "$at_groups$as_nl$at_help_all" | awk 'BEGIN { FS = ";" } NR == 1 { - for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1 + for (n = split ($ 0, a, " "); n; n--) + selected[a[n]] = 1 next } - { + NF > 0 { if (selected[$ 1]) { printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 - if ($ 4) printf " %s\n", $ 4 + if ($ 4) { + lmax = 79 + indent = " " + line = indent + len = length (line) + n = split ($ 4, a, " ") + for (i = 1; i <= n; i++) { + l = length (a[i]) + 1 + if (i > 1 && len + l > lmax) { + print line + line = indent " " a[i] + len = length (line) + } else { + line = line " " a[i] + len += l + } + } + if (n) + print line + } } - }' - exit 0 + }' || at_write_fail=1 + exit $at_write_fail fi if $at_version_p; then - echo "$as_me (GNU tar 1.22)" - cat <<\_ACEOF + $as_echo "$as_me (GNU tar 1.22)" && + cat <<\_ATEOF || at_write_fail=1 -Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -Foundation, Inc. +Copyright (C) 2009 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 +_ATEOF + exit $at_write_fail +fi + +# Should we print banners? at_groups is space-separated for entire test, +# newline-separated if only a subset of the testsuite is run. +case $at_groups in + *' '*' '* | *"$as_nl"*"$as_nl"* ) + at_print_banners=: ;; + * ) at_print_banners=false ;; +esac +# Text for banner N, set to empty once printed. + +# Take any -C into account. +if $at_change_dir ; then + if test x- = "x$at_dir" ; then + at_dir=./- + fi + test x != "x$at_dir" && cd "$at_dir" \ + || as_fn_error "unable to change directory" + at_dir=`pwd` +fi + +# Load the config files for any default variable assignments. +for at_file in atconfig atlocal +do + test -r $at_file || continue + . ./$at_file || as_fn_error "invalid content: $at_file" +done + +# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: +: ${at_top_build_prefix=$at_top_builddir} + +# Perform any assignments requested during argument parsing. +eval "$at_debug_args" + +# atconfig delivers names relative to the directory the test suite is +# in, but the groups themselves are run in testsuite-dir/group-dir. +if test -n "$at_top_srcdir"; then + builddir=../.. + for at_dir_var in srcdir top_srcdir top_build_prefix + do + eval at_val=\$at_$at_dir_var + case $at_val in + [\\/$]* | ?:[\\/]* ) at_prefix= ;; + *) at_prefix=../../ ;; + esac + eval "$at_dir_var=\$at_prefix\$at_val" + done +fi + +## -------------------- ## +## Directory structure. ## +## -------------------- ## + +# This is the set of directories and files used by this script +# (non-literals are capitalized): +# +# TESTSUITE - the testsuite +# TESTSUITE.log - summarizes the complete testsuite run +# TESTSUITE.dir/ - created during a run, remains after -d or failed test +# + at-groups/ - during a run: status of all groups in run +# | + NNN/ - during a run: meta-data about test group NNN +# | | + check-line - location (source file and line) of current AT_CHECK +# | | + status - exit status of current AT_CHECK +# | | + stdout - stdout of current AT_CHECK +# | | + stder1 - stderr, including trace +# | | + stderr - stderr, with trace filtered out +# | | + test-source - portion of testsuite that defines group +# | | + times - timestamps for computing duration +# | | + pass - created if group passed +# | | + xpass - created if group xpassed +# | | + fail - created if group failed +# | | + xfail - created if group xfailed +# | | + skip - created if group skipped +# + at-stop - during a run: end the run if this file exists +# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction +# + 0..NNN/ - created for each group NNN, remains after -d or failed test +# | + TESTSUITE.log - summarizes the group results +# | + ... - files created during the group + +# The directory the whole suite works in. +# Should be absolute to let the user `cd' at will. +at_suite_dir=$at_dir/$as_me.dir +# The file containing the suite. +at_suite_log=$at_dir/$as_me.log +# The directory containing helper files per test group. +at_helper_dir=$at_suite_dir/at-groups +# Stop file: if it exists, do not start new jobs. +at_stop_file=$at_suite_dir/at-stop +# The fifo used for the job dispatcher. +at_job_fifo=$at_suite_dir/at-job-fifo + +if $at_clean; then + test -d "$at_suite_dir" && + find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; + rm -f -r "$at_suite_dir" "$at_suite_log" + exit $? fi # Don't take risks: use only absolute directories in PATH. # -# For stand-alone test suites, AUTOTEST_PATH is relative to `.'. +# For stand-alone test suites (ie. atconfig was not found), +# AUTOTEST_PATH is relative to `.'. # # For embedded test suites, AUTOTEST_PATH is relative to the top level # of the package. Then expand it into build/src parts, since users # may create executables in both places. -AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"` +AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"` at_path= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $AUTOTEST_PATH $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR + test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR case $as_dir in [\\/]* | ?:[\\/]* ) - at_path=$at_path$as_dir + as_fn_append at_path "$as_dir" ;; * ) if test -z "$at_top_build_prefix"; then # Stand-alone test suite. - at_path=$at_path$as_dir + as_fn_append 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 + as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR" + as_fn_append at_path "$at_top_srcdir/$as_dir" fi ;; esac -done + done IFS=$as_save_IFS @@ -999,31 +1121,32 @@ # # There might be directories that don't exist, but don't redirect # builtins' (eg., cd) stderr directly: Ultrix's sh hates that. -PATH= +at_new_path= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $at_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - 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 ;; + test -d "$as_dir" || continue +case $as_dir in + [\\/]* | ?:[\\/]* ) ;; + * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; esac -done +case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in + *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; + $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; + *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;; +esac + done IFS=$as_save_IFS +PATH=$at_new_path export PATH # Setting up the FDs. -# 5 is the log file. Not to be overwritten if `-d'. + +# 5 is the log file. Not to be overwritten if `-d'. if $at_debug_p; then at_suite_log=/dev/null else @@ -1045,14 +1168,16 @@ _ASBOX echo - echo "$as_me: command line was:" - echo " $ $0 $at_cli_args" + $as_echo "$as_me: command line was:" + $as_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. + # portable), which would result in no output here. Prune directories + # matching the package tarname, since they tend to be leftovers from + # `make dist' or `make distcheck' and contain redundant or stale logs. if test -n "$at_top_srcdir"; then cat <<\_ASBOX ## ----------- ## @@ -1060,14 +1185,16 @@ ## ----------- ## _ASBOX echo - for at_file in `find "$at_top_srcdir" -name ChangeLog -print` + for at_file in `find "$at_top_srcdir" -name "tar-*" -prune -o -name ChangeLog -print` do - echo "$as_me: $at_file:" + $as_echo "$as_me: $at_file:" sed 's/^/| /;10q' $at_file echo done - { + fi + + { cat <<_ASUNAME ## --------- ## ## Platform. ## @@ -1097,23 +1224,172 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } - echo - fi + echo # Contents of the config files. for at_file in atconfig atlocal do test -r $at_file || continue - echo "$as_me: $at_file:" + $as_echo "$as_me: $at_file:" sed 's/^/| /' $at_file echo done +} >&5 + + +## ------------------------- ## +## Autotest shell functions. ## +## ------------------------- ## + +# at_fn_banner NUMBER +# ------------------- +# Output banner NUMBER, provided the testsuite is running multiple groups and +# this particular banner has not yet been printed. +at_fn_banner () +{ + $at_print_banners || return 0 + eval at_banner_text=\$at_banner_text_$1 + test "x$at_banner_text" = x && return 0 + eval at_banner_text_$1= + $as_echo "$as_nl$at_banner_text$as_nl" +} # at_fn_banner + +# at_fn_check_prepare_notrace REASON LINE +# --------------------------------------- +# Perform AT_CHECK preparations for the command at LINE for an untraceable +# command; REASON is the reason for disabling tracing. +at_fn_check_prepare_notrace () +{ + $at_trace_echo "Not enabling shell tracing (command contains $1)" + $as_echo "$2" >"$at_check_line_file" + at_check_trace=: at_check_filter=: + : >"$at_stdout"; : >"$at_stderr" +} + +# at_fn_check_prepare_trace LINE +# ------------------------------ +# Perform AT_CHECK preparations for the command at LINE for a traceable +# command. +at_fn_check_prepare_trace () +{ + $as_echo "$1" >"$at_check_line_file" + at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace + : >"$at_stdout"; : >"$at_stderr" +} + +# at_fn_check_prepare_dynamic COMMAND LINE +# ---------------------------------------- +# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate +# preparation function. +at_fn_check_prepare_dynamic () +{ + case $1 in + *$as_nl*) + at_fn_check_prepare_notrace 'an embedded newline' "$2" ;; + *) + at_fn_check_prepare_trace "$2" ;; + esac +} + +# at_fn_filter_trace +# ------------------ +# Remove the lines in the file "$at_stderr" generated by "set -x" and print +# them to stderr. +at_fn_filter_trace () +{ + mv "$at_stderr" "$at_stder1" + grep '^ *+' "$at_stder1" >&2 + grep -v '^ *+' "$at_stder1" >"$at_stderr" +} + +# at_fn_log_failure FILE-LIST +# --------------------------- +# Copy the files in the list on stdout with a "> " prefix, and exit the shell +# with a failure exit code. +at_fn_log_failure () +{ + for file + do $as_echo "$file:"; sed 's/^/> /' "$file"; done + echo 1 > "$at_status_file" + exit 1 +} + +# at_fn_check_skip EXIT-CODE LINE +# ------------------------------- +# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit +# the test group subshell with that same exit code. Use LINE in any report +# about test failure. +at_fn_check_skip () +{ + case $1 in + 99) echo 99 > "$at_status_file"; at_failed=: + $as_echo "$2: hard failure"; exit 99;; + 77) echo 77 > "$at_status_file"; exit 77;; + esac +} + +# at_fn_check_status EXPECTED EXIT-CODE LINE +# ------------------------------------------ +# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing. +# Otherwise, if it is 77 or 99, exit the test group subshell with that same +# exit code; if it is anything else print an error message referring to LINE, +# and fail the test. +at_fn_check_status () +{ + case $2 in + $1 ) ;; + 77) echo 77 > "$at_status_file"; exit 77;; + 99) echo 99 > "$at_status_file"; at_failed=: + $as_echo "$3: hard failure"; exit 99;; + *) $as_echo "$3: exit code was $2, expected $1" + at_failed=:;; + esac +} + +# at_fn_diff_devnull FILE +# ----------------------- +# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff +# invocations. +at_fn_diff_devnull () +{ + test -s "$1" || return 0 + $at_diff "$at_devnull" "$1" +} + +# at_fn_test NUMBER +# ----------------- +# Parse out test NUMBER from the tail of this file. +at_fn_test () +{ + eval at_sed=\$at_sed$1 + sed "$at_sed" "$at_myself" > "$at_test_source" +} + +# at_fn_create_debugging_script +# ----------------------------- +# Create the debugging script $at_group_dir/run which will reproduce the +# current test group. +at_fn_create_debugging_script () +{ + { + echo "#! /bin/sh" && + echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' && + $as_echo "cd '$at_dir'" && + $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" && + echo 'exit 1' + } >"$at_group_dir/run" && + chmod +x "$at_group_dir/run" +} +## -------------------------------- ## +## End of autotest shell functions. ## +## -------------------------------- ## +{ cat <<\_ASBOX ## ---------------- ## ## Tested programs. ## @@ -1126,25 +1402,28 @@ for at_program in : $at_tested do test "$at_program" = : && continue - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $at_program in + [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;; + * ) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -f "$as_dir/$at_program" && break -done + test -f "$as_dir/$at_program" && break + done IFS=$as_save_IFS - if test -f "$as_dir/$at_program"; then + at_program_=$as_dir/$at_program ;; + esac + if test -f "$at_program_"; then { - echo "$at_srcdir/testsuite.at:104: $as_dir/$at_program --version" - "$as_dir/$at_program" --version + $as_echo "$at_srcdir/testsuite.at:104: $at_program_ --version" + "$at_program_" --version &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; }; } + as_fn_error "cannot find $at_program" "$LINENO" 5 fi done @@ -1158,20 +1437,11 @@ 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 +$as_echo "$as_me: starting at: $at_start_date" >&5 # 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; }; } +as_dir="$at_suite_dir"; as_fn_mkdir_p || + as_fn_error "cannot create \`$at_suite_dir'" "$LINENO" 5 # Can we diff with `/dev/null'? DU 5.0 refuses. if diff /dev/null /dev/null >/dev/null 2>&1; then @@ -1189,220 +1459,636 @@ at_diff=diff fi +# Get the last needed group. +for at_group in : $at_groups; do :; done + +# Extract the start and end lines of each test group at the tail +# of this file +awk ' +BEGIN { FS="" } +/^#AT_START_/ { + start = NR +} +/^#AT_STOP_/ { + test = substr ($ 0, 10) + print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" + if (test == "'"$at_group"'") exit +}' "$at_myself" > "$at_suite_dir/at-source-lines" && +. "$at_suite_dir/at-source-lines" || + as_fn_error "cannot create test line number cache" "$LINENO" 5 +rm -f "$at_suite_dir/at-source-lines" + +# Set number of jobs for `-j'; avoid more jobs than test groups. +set X $at_groups; shift; at_max_jobs=$# +if test $at_max_jobs -eq 0; then + at_jobs=1 +fi +if test $at_jobs -ne 1 && + { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then + at_jobs=$at_max_jobs +fi + +# If parallel mode, don't output banners, don't split summary lines. +if test $at_jobs -ne 1; then + at_print_banners=false + at_quiet=: +fi + +# Set up helper dirs. +rm -rf "$at_helper_dir" && +mkdir "$at_helper_dir" && +cd "$at_helper_dir" && +{ test -z "$at_groups" || mkdir $at_groups; } || +as_fn_error "testsuite directory setup failed" "$LINENO" 5 + +# Functions for running a test group. We leave the actual +# test group execution outside of a shell function in order +# to avoid hitting zsh 4.x exit status bugs. + +# at_fn_group_prepare +# ------------------- +# Prepare running a test group. +at_fn_group_prepare () +{ + # The directory for additional per-group helper files. + at_job_dir=$at_helper_dir/$at_group + # The file containing the location of the last AT_CHECK. + at_check_line_file=$at_job_dir/check-line + # The file containing the exit status of the last command. + at_status_file=$at_job_dir/status + # The files containing the output of the tested commands. + at_stdout=$at_job_dir/stdout + at_stder1=$at_job_dir/stder1 + at_stderr=$at_job_dir/stderr + # The file containing the code for a test group. + at_test_source=$at_job_dir/test-source + # The file containing dates. + at_times_file=$at_job_dir/times -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 - ;; + # Clearly separate the test groups when verbose. + $at_first || $at_verbose echo - *) - at_group_normalized=$at_group + at_group_normalized=$at_group - while :; do + eval 'while :; do case $at_group_normalized in #( - $at_format*) break;; + '"$at_format"'*) break;; esac at_group_normalized=0$at_group_normalized - done + 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 + # Create a fresh directory for the next test group, and enter. + # If one already exists, the user may have invoked ./run from + # within that directory; we remove the contents, but not the + # directory itself, so that we aren't pulling the rug out from + # under the shell's notion of the current directory. + at_group_dir=$at_suite_dir/$at_group_normalized + at_group_log=$at_group_dir/$as_me.log + if test -d "$at_group_dir"; then + find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \; + rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??* +fi || + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned." >&5 +$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned." >&2;} + # Be tolerant if the above `rm' was not able to remove the directory. + as_dir="$at_group_dir"; as_fn_mkdir_p echo 0 > "$at_status_file" - # 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 + # the standard output; in quiet mode only write to the log. + if test -z "$at_verbose"; then at_tee_pipe='tee -a "$at_group_log"' else at_tee_pipe='cat >> "$at_group_log"' fi +} - 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_fn_group_postprocess +# ----------------------- +# Perform cleanup after running a test group. +at_fn_group_postprocess () +{ + # Be sure to come back to the suite directory, in particular + # since below we might `rm' the group directory we are in currently. + cd "$at_suite_dir" + if test ! -f "$at_check_line_file"; then + sed "s/^ */$as_me: WARNING: /" <<_ATEOF + A failure happened in a test group before any test could be + run. This means that test suite is improperly designed. Please + report this failure to . +_ATEOF + $as_echo "$at_setup_line" >"$at_check_line_file" + at_status=99 + fi + $at_verbose $as_echo_n "$at_group. $at_setup_line: " + $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" + case $at_xfail:$at_status in + *:99) + at_msg='FAILED ('`cat "$at_check_line_file"`')' + at_res=fail + at_errexit=$at_errexit_p + ;; + yes:0) + at_msg="UNEXPECTED PASS" + at_res=xpass + at_errexit=$at_errexit_p + ;; + no:0) + at_msg="ok" + at_res=pass + at_errexit=false + ;; + *:77) + at_msg='skipped ('`cat "$at_check_line_file"`')' + at_res=skip + at_errexit=false + ;; + yes:*) + at_msg='expected failure ('`cat "$at_check_line_file"`')' + at_res=xfail + at_errexit=false + ;; + no:*) + at_msg='FAILED ('`cat "$at_check_line_file"`')' + at_res=fail + at_errexit=$at_errexit_p + ;; + esac + echo "$at_res" > "$at_job_dir/$at_res" + # In parallel mode, output the summary line only afterwards. + if test $at_jobs -ne 1 && test -n "$at_verbose"; then + $as_echo "$at_desc_line $at_msg" + else + # Make sure there is a separator even with long titles. + $as_echo " $at_msg" + fi + at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" + case $at_status in + 0|77) + # $at_times_file is only available if the group succeeded. + # We're not including the group log, so the success message + # is written in the global log separately. But we also + # write to the group log in case they're using -d. + if test -f "$at_times_file"; then + at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' + rm -f "$at_times_file" + fi + $as_echo "$at_log_msg" >> "$at_group_log" + $as_echo "$at_log_msg" >&5 -$at_traceoff -echo "$at_srcdir/version.at:21: tar --version | sed 1q" -echo version.at:21 >"$at_check_line_file" + # Cleanup the group directory, unless the user wants the files. + if $at_debug_p; then + at_fn_create_debugging_script + else + if test -d "$at_group_dir"; then + find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; + rm -fr "$at_group_dir" + fi + rm -f "$at_test_source" + fi + ;; + *) + # Upon failure, include the log into the testsuite's global + # log. The failure message is written in the group log. It + # is later included in the global log. + $as_echo "$at_log_msg" >> "$at_group_log" + + # Upon failure, keep the group directory for autopsy, and create + # the debugging script. With -e, do not start any further tests. + at_fn_create_debugging_script + if $at_errexit; then + echo stop > "$at_stop_file" + fi + ;; + esac +} -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 +## ------------ ## +## Driver loop. ## +## ------------ ## + + +if (set -m && set +m && set +b) >/dev/null 2>&1; then + set +b + at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- +else + at_job_control_on=: at_job_control_off=: at_job_group= +fi + +for at_signal in 1 2 15; do + trap 'set +x; set +e + $at_job_control_off + at_signal='"$at_signal"' + echo stop > "$at_stop_file" + trap "" $at_signal + at_pgids= + for at_pgid in `jobs -p 2>/dev/null`; do + at_pgids="$at_pgids $at_job_group$at_pgid" + done + test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null + wait + if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then + echo >&2 + fi + at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` + set x $at_signame + test 0 -gt 2 && at_signame=$at_signal + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5 +$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;} + as_fn_arith 128 + $at_signal && exit_status=$as_val + as_fn_exit $exit_status' $at_signal +done -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "tar (GNU tar) 1.22 -" | $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' +rm -f "$at_stop_file" +at_first=: -============================================================== -WARNING: Not using the proper version, *all* checks dubious... -============================================================== -_EOT +if test $at_jobs -ne 1 && + rm -f "$at_job_fifo" && + test -n "$at_job_group" && + ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null +then + # FIFO job dispatcher. + trap 'at_pids= + for at_pid in `jobs -p`; do + at_pids="$at_pids $at_job_group$at_pid" + done + if test -n "$at_pids"; then + at_sig=TSTP + test "${TMOUT+set}" = set && at_sig=STOP + kill -$at_sig $at_pids 2>/dev/null + fi + kill -STOP $$ + test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP - echo 1 > "$at_status_file" - exit 1 + echo + # Turn jobs into a list of numbers, starting from 1. + at_joblist=`$as_echo " $at_groups_all " | \ + sed 's/\( '$at_jobs'\) .*/\1/'` + + set X $at_joblist + shift + for at_group in $at_groups; do + $at_job_control_on 2>/dev/null + ( + # Start one test group. + $at_job_control_off + exec 6>"$at_job_fifo" + trap 'set +x; set +e + trap "" PIPE + echo stop > "$at_stop_file" + echo token >&6 + as_fn_exit 141' PIPE + at_fn_group_prepare + if cd "$at_group_dir" && + at_fn_test $at_group && + . "$at_test_source" # AT_JOB_FIFO_FD>&- + then :; else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 +$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} + at_failed=: + fi + at_fn_group_postprocess + echo token >&6 + ) & + $at_job_control_off + if $at_first; then + at_first=false + exec 6<"$at_job_fifo" + fi + shift # Consume one token. + if test $# -gt 0; then :; else + read at_token <&6 || break + set x $* + fi + test -f "$at_stop_file" && break + done + # Read back the remaining ($at_jobs - 1) tokens. + set X $at_joblist + shift + if test $# -gt 0; then + shift + for at_job + do + read at_token + done <&6 + fi + exec 6<&- + wait else - rm -f $XFAILFILE + # Run serially, avoid forks and other potential surprises. + for at_group in $at_groups; do + at_fn_group_prepare + if cd "$at_group_dir" && + at_fn_test $at_group && + . "$at_test_source"; then :; else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 +$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} + at_failed=: + fi + at_fn_group_postprocess + test -f "$at_stop_file" && break + at_first=false + done fi -$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"` - ;; +# Wrap up the test suite with summary statistics. +cd "$at_helper_dir" - 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 +# Use ?..???? when the list must remain sorted, the faster * otherwise. +at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` +at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` +at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` +at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do + echo $f; done | sed '/?/d; s,/xpass,,'` +at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do + echo $f; done | sed '/?/d; s,/fail,,'` + +set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list +shift; at_group_count=$# +set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$* +set X $at_xfail_list; shift; at_xfail_count=$# +set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* +set X $at_skip_list; shift; at_skip_count=$# + +as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val +as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val +as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val +# Back to the top directory. +cd "$at_dir" +rm -rf "$at_helper_dir" +# Compute the duration of the suite. +at_stop_date=`date` +at_stop_time=`date +%s 2>/dev/null` +$as_echo "$as_me: ending at: $at_stop_date" >&5 +case $at_start_time,$at_stop_time in + [0-9]*,[0-9]*) + as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val + as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val + as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val + as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val + as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val + at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" + $as_echo "$as_me: test suite duration: $at_duration" >&5 + ;; +esac +echo +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." ;; - $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 * + # 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 -test -z "`sort < /dev/null 2>&1`" || exit 77 + 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 -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" +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 "$at_myself" $at_fail_list --list + echo + fi + if test $at_skip_count != 0; then + echo "Skipped tests:" + $SHELL "$at_myself" $at_skip_list --list + echo + fi + if test $at_xpass_count != 0; then + echo "Unexpected passes:" + $SHELL "$at_myself" $at_xpass_list --list + echo + fi + if test $at_fail_count != 0; then + cat <<\_ASBOX +## ---------------------- ## +## Detailed failed tests. ## +## ---------------------- ## +_ASBOX + echo + for at_group in $at_fail_list + do + at_group_normalized=$at_group + + eval 'while :; do + case $at_group_normalized in #( + '"$at_format"'*) break;; + esac + at_group_normalized=0$at_group_normalized + done' + + cat "$at_suite_dir/$at_group_normalized/$as_me.log" + echo + done + echo + fi + if test -n "$at_top_srcdir"; then + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## ${at_top_build_prefix}config.log ## +_ASBOX + sed 's/^/| /' ${at_top_build_prefix}config.log + echo + fi + } >&5 + + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## $as_me.log was created. ## +_ASBOX + + echo + if $at_debug_p; then + at_msg='per-test log files' + else + at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'" + fi + $as_echo "Please send $at_msg and all information you think might help: + + To: + Subject: [GNU tar 1.22] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} + +You may investigate any problem if you feel able to do so, in which +case the test suite provides a good starting point. Its output may +be found below \`${at_testdir+${at_testdir}/}$as_me.dir'. +" + exit 1 +fi + +exit 0 + +## ------------- ## +## Actual tests. ## +## ------------- ## +#AT_START_1 +# 1. version.at:19: tar version +at_setup_line='version.at:19' +at_desc="tar version" +at_desc_line=" 1: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "1. version.at:19: testing ..." + $at_traceon + + +{ set +x +$as_echo "$at_srcdir/version.at:21: tar --version | sed 1q" +at_fn_check_prepare_trace "version.at:21" +( $at_check_trace; tar --version | sed 1q +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.22 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/version.at:21" +if $at_failed; then : + cat >$XFAILFILE <<'_EOT' + +============================================================== +WARNING: Not using the proper version, *all* checks dubious... +============================================================== +_EOT -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' +else + rm -f $XFAILFILE fi +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_1 +#AT_START_2 +# 2. pipe.at:29: decompressing from stdin +at_setup_line='pipe.at:29' +at_desc="decompressing from stdin" +at_desc_line=" 2: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "2. pipe.at:29: testing ..." + $at_traceon + -if test -n "$at_trace_this"; then - ( $at_traceon; + + + + + + + { set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory @@ -1411,15 +2097,12 @@ tar cf archive directory|sort mv directory orig cat archive | tar xfv - | sort -echo "separator" +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 - ( :; +echo \"separator\" +cmp orig/file2 directory/file2)" +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -1441,73 +2124,38 @@ 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 +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +echo >>"$at_stdout"; $as_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: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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/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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "pipe.at:33" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - -$at_traceoff -echo "$at_srcdir/pipe.at:33: +{ set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -1517,7 +2165,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory @@ -1530,15 +2178,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -1560,22 +2201,48 @@ 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 +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo >>"$at_stdout"; $as_echo "directory/ +directory/file1 +directory/file2 +separator +separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "pipe.at:33" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/pipe.at:33: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory @@ -1584,134 +2251,12 @@ 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 -echo stderr:; tee stderr <"$at_stderr" -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: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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/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\" +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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -1733,73 +2278,38 @@ 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 +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +echo >>"$at_stdout"; $as_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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "pipe.at:33" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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/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: +{ set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -1809,7 +2319,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory @@ -1822,42 +2332,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -1879,73 +2355,38 @@ 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 +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +echo >>"$at_stdout"; $as_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: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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/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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "pipe.at:33" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - -$at_traceoff -echo "$at_srcdir/pipe.at:33: +{ set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -1955,7 +2396,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory @@ -1968,42 +2409,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2025,230 +2432,144 @@ 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 +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +echo >>"$at_stdout"; $as_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: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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/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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "pipe.at:33" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_2 +#AT_START_3 +# 3. options.at:24: mixing options +at_setup_line='options.at:24' +at_desc="mixing options" +at_desc_line=" 3: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "3. options.at:24: testing ..." + $at_traceon -$at_traceoff -echo "$at_srcdir/options.at:27: +{ set +x +$as_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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "options.at:27" +( $at_check_trace; 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/options.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_3 +#AT_START_4 +# 4. options02.at:26: interspersed options +at_setup_line='options02.at:26' +at_desc="interspersed options" +at_desc_line=" 4: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "4. options02.at:26: testing ..." + $at_traceon -$at_traceoff -echo "$at_srcdir/options02.at:29: +{ set +x +$as_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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "options02.at:29" +( $at_check_trace; 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 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/options02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_4 +#AT_START_5 +# 5. T-empty.at:26: files-from: empty entries +at_setup_line='T-empty.at:26' +at_desc="files-from: empty entries" +at_desc_line=" 5: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "5. T-empty.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "5. T-empty.at:26: testing ..." + $at_traceon @@ -2262,8 +2583,8 @@ - $at_traceoff -echo "$at_srcdir/T-empty.at:36: + { set +x +$as_echo "$at_srcdir/T-empty.at:36: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2273,7 +2594,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 genfile --file jeden @@ -2282,15 +2603,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "T-empty.at:36" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2308,73 +2622,40 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/T-empty.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } # Testing one format is enough - $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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_5 +#AT_START_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_desc_line=" 6: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "6. T-null.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "6. T-null.at:21: testing ..." + $at_traceon @@ -2386,8 +2667,8 @@ - $at_traceoff -echo "$at_srcdir/T-null.at:28: + { set +x +$as_echo "$at_srcdir/T-null.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2397,7 +2678,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 echo dwa > temp @@ -2412,44 +2693,8 @@ tar cfTv archive file-list | sort )" -echo T-null.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 * - - -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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "T-null.at:28" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2473,55 +2718,45 @@ 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=: +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character +" | \ + $at_diff - "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/T-null.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_fn_check_status 0 $at_status "$at_srcdir/T-null.at:28" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_6 +#AT_START_7 +# 7. indexfile.at:26: tar --index-file=FILE --file=- +at_setup_line='indexfile.at:26' +at_desc="tar --index-file=FILE --file=-" +at_desc_line=" 7: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "7. indexfile.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "7. indexfile.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2540,38 +2775,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2589,34 +2794,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2635,38 +2829,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2684,34 +2848,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2730,38 +2883,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2779,34 +2902,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -2825,38 +2937,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -2874,34 +2956,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2920,38 +2991,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2969,58 +3010,48 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_7 +#AT_START_8 +# 8. verbose.at:26: tar cvf - +at_setup_line='verbose.at:26' +at_desc="tar cvf -" +at_desc_line=" 8: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "8. verbose.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "8. verbose.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3035,34 +3066,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3076,34 +3081,24 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3118,34 +3113,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3159,34 +3128,24 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3201,34 +3160,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3242,34 +3175,24 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3284,34 +3207,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3325,34 +3222,24 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3367,34 +3254,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3408,58 +3269,49 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_8 +#AT_START_9 +# 9. append.at:21: append +at_setup_line='append.at:21' +at_desc="append" +at_desc_line=" 9: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "9. append.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "9. append.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/append.at:24: + { set +x +$as_echo "$at_srcdir/append.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3472,32 +3324,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append.at:24" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3509,32 +3337,21 @@ 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 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append.at:24: + { set +x +$as_echo "$at_srcdir/append.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3547,32 +3364,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3584,32 +3377,21 @@ 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 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/append.at:24: + { set +x +$as_echo "$at_srcdir/append.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3622,32 +3404,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3659,32 +3417,21 @@ 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 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append.at:24: + { set +x +$as_echo "$at_srcdir/append.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3697,32 +3444,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3734,32 +3457,21 @@ 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 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/append.at:24: + { set +x +$as_echo "$at_srcdir/append.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3772,32 +3484,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3809,49 +3497,39 @@ 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 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:24" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_9 +#AT_START_10 +# 10. append01.at:29: appending files with long names +at_setup_line='append01.at:29' +at_desc="appending files with long names" +at_desc_line=" 10: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "10. append01.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "10. append01.at:29: testing ..." + $at_traceon @@ -3859,8 +3537,8 @@ - $at_traceoff -echo "$at_srcdir/append01.at:34: + { set +x +$as_echo "$at_srcdir/append01.at:34: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3875,15 +3553,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3897,56 +3568,26 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append01.at:34: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H 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\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * @@ -3956,34 +3597,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3997,32 +3612,21 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append01.at:34: + { set +x +$as_echo "$at_srcdir/append01.at:34: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4037,34 +3641,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4078,32 +3656,21 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/append01.at:34: + { set +x +$as_echo "$at_srcdir/append01.at:34: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4118,15 +3685,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4140,75 +3700,46 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } - $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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_10 +#AT_START_11 +# 11. append02.at:40: append vs. create +at_setup_line='append02.at:40' +at_desc="append vs. create" +at_desc_line=" 11: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "11. append02.at:40: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "11. append02.at:40: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/append02.at:43: + { set +x +$as_echo "$at_srcdir/append02.at:43: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4240,51 +3771,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:43" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4315,33 +3803,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:43" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append02.at:43: + { set +x +$as_echo "$at_srcdir/append02.at:43: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4373,51 +3850,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:43" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4448,33 +3882,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:43" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append02.at:43: + { set +x +$as_echo "$at_srcdir/append02.at:43: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4506,51 +3929,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:43" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4581,33 +3961,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:43" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append02.at:43: + { set +x +$as_echo "$at_srcdir/append02.at:43: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4639,15 +4008,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:43" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4678,74 +4040,27 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 +Creating archive.2 +Comparing archives +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:43" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append02.at:43: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu 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\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * @@ -4772,51 +4087,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:43" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4847,57 +4119,47 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:43" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_11 +#AT_START_12 +# 12. exclude.at:23: exclude +at_setup_line='exclude.at:23' +at_desc="exclude" +at_desc_line=" 12: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "12. exclude.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "12. exclude.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/exclude.at:26: + { set +x +$as_echo "$at_srcdir/exclude.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4907,7 +4169,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir dir @@ -4938,60 +4200,8 @@ tar tf archive.tar | sort 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 * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir dir -echo blues > dir/blues -echo jazz > dir/jazz -mkdir dir/folk -echo tagfile > dir/folk/tagfile -echo sanjuan > dir/folk/sanjuan -mkdir dir/rock -echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG -echo "test" > dir/rock/file - -for option in exclude-caches exclude-caches-under exclude-caches-all -do - echo OPTION $option - tar -cf archive.tar --$option -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done - -for option in exclude-tag exclude-tag-under exclude-tag-all -do - echo OPTION $option - tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude.at:26" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5031,13 +4241,12 @@ echo ARCHIVE tar tf archive.tar | sort 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "OPTION exclude-caches dir/ dir/blues dir/folk/ @@ -5139,48 +4348,39 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_12 +#AT_START_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_desc_line=" 13: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "13. delete01.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "13. delete01.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/delete01.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -5194,33 +4394,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -5233,31 +4408,20 @@ 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 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/delete01.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -5271,33 +4435,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -5310,31 +4449,20 @@ 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 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/delete01.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5348,33 +4476,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5387,31 +4490,20 @@ 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 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/delete01.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5425,33 +4517,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5464,31 +4531,20 @@ 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 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/delete01.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5502,15 +4558,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5523,73 +4572,45 @@ 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 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_13 +#AT_START_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_desc_line=" 14: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "14. delete02.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "14. delete02.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/delete02.at:26: + { set +x +$as_echo "$at_srcdir/delete02.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -5606,36 +4627,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -5651,36 +4644,25 @@ 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 +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 2 3 separator 1 3 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete02.at:26: + { set +x +$as_echo "$at_srcdir/delete02.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -5697,36 +4679,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -5742,36 +4696,25 @@ 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 +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 2 3 separator 1 3 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/delete02.at:26: + { set +x +$as_echo "$at_srcdir/delete02.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5788,36 +4731,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5833,36 +4748,25 @@ 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 +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 2 3 separator 1 3 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete02.at:26: + { set +x +$as_echo "$at_srcdir/delete02.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5879,36 +4783,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5924,36 +4800,25 @@ 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 +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 2 3 separator 1 3 -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete02.at:26: + { set +x +$as_echo "$at_srcdir/delete02.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5970,36 +4835,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -6015,53 +4852,43 @@ 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 +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 2 3 separator 1 3 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_14 +#AT_START_15 +# 15. delete03.at:21: deleting members with long names +at_setup_line='delete03.at:21' +at_desc="deleting members with long names" +at_desc_line=" 15: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "15. delete03.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "15. delete03.at:21: testing ..." + $at_traceon @@ -6069,8 +4896,8 @@ - $at_traceoff -echo "$at_srcdir/delete03.at:26: + { set +x +$as_echo "$at_srcdir/delete03.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -6089,38 +4916,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -6138,13 +4935,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4 @@ -6152,24 +4948,14 @@ ./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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete03.at:26: + { set +x +$as_echo "$at_srcdir/delete03.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -6188,38 +4974,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -6237,13 +4993,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4 @@ -6251,24 +5006,14 @@ ./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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete03.at:26: + { set +x +$as_echo "$at_srcdir/delete03.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -6287,15 +5032,8 @@ 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; +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -6313,85 +5051,52 @@ 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 * +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_15 +#AT_START_16 +# 16. delete04.at:23: deleting a large last member +at_setup_line='delete04.at:23' +at_desc="deleting a large last member" +at_desc_line=" 16: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "16. delete04.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "16. delete04.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/delete04.at:26: + { set +x +$as_echo "$at_srcdir/delete04.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6414,42 +5119,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6471,13 +5142,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 file3 file4 @@ -6486,24 +5156,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete04.at:26: + { set +x +$as_echo "$at_srcdir/delete04.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -6526,42 +5186,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -6583,13 +5209,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 file3 file4 @@ -6598,24 +5223,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/delete04.at:26: + { set +x +$as_echo "$at_srcdir/delete04.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -6638,42 +5253,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -6695,13 +5276,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 file3 file4 @@ -6710,24 +5290,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete04.at:26: + { set +x +$as_echo "$at_srcdir/delete04.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -6750,42 +5320,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -6807,13 +5343,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 file3 file4 @@ -6822,24 +5357,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/delete04.at:26: + { set +x +$as_echo "$at_srcdir/delete04.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -6862,42 +5387,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -6919,13 +5410,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 file3 file4 @@ -6934,48 +5424,39 @@ 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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_16 +#AT_START_17 +# 17. delete05.at:27: deleting non-existing member +at_setup_line='delete05.at:27' +at_desc="deleting non-existing member" +at_desc_line=" 17: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "17. delete05.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "17. delete05.at:27: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/delete05.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6993,37 +5474,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7040,34 +5492,24 @@ # 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/delete05.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7085,15 +5527,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7110,61 +5545,29 @@ # 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/delete05.at:30: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar 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: Exiting with failure status due to 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\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * @@ -7177,37 +5580,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7224,34 +5598,24 @@ # 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/delete05.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7269,37 +5633,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7316,34 +5651,24 @@ # 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/delete05.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7361,37 +5686,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7408,58 +5704,49 @@ # 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_17 +#AT_START_18 +# 18. extrac01.at:23: extract over an existing directory +at_setup_line='extrac01.at:23' +at_desc="extract over an existing directory" +at_desc_line=" 18: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "18. extrac01.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "18. extrac01.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/extrac01.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7473,33 +5760,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7512,30 +5774,18 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/extrac01.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7549,33 +5799,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7588,30 +5813,18 @@ 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 - +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/extrac01.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7625,15 +5838,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7646,48 +5852,18 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/extrac01.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7701,33 +5877,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7740,30 +5891,18 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/extrac01.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7777,33 +5916,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7816,47 +5930,36 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_18 +#AT_START_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_desc_line=" 19: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "19. extrac02.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "19. extrac02.at:23: testing ..." + $at_traceon @@ -7864,8 +5967,8 @@ - $at_traceoff -echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/extrac02.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7881,35 +5984,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7924,30 +6000,18 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/extrac02.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7963,35 +6027,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8006,30 +6043,18 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/extrac02.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8045,35 +6070,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8088,30 +6086,18 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/extrac02.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8127,35 +6113,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8170,30 +6129,18 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/extrac02.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8209,35 +6156,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8252,54 +6172,43 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_19 +#AT_START_20 +# 20. extrac03.at:23: extraction loops +at_setup_line='extrac03.at:23' +at_desc="extraction loops" +at_desc_line=" 20: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "20. extrac03.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "20. extrac03.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/extrac03.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8312,32 +6221,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8349,33 +6234,22 @@ 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/ +tar -xPvf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ separator directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/extrac03.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8388,32 +6262,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8425,33 +6275,22 @@ 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/ +tar -xPvf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ separator directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/extrac03.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8464,32 +6303,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8501,33 +6316,22 @@ 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/ +tar -xPvf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ separator directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/extrac03.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8540,32 +6344,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8577,33 +6357,22 @@ 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/ +tar -xPvf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ separator directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/extrac03.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8616,15 +6385,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8636,74 +6398,47 @@ 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 +tar -xPvf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_20 +#AT_START_21 +# 21. extrac04.at:23: extract + fnmatch +at_setup_line='extrac04.at:23' +at_desc="extract + fnmatch" +at_desc_line=" 21: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "21. extrac04.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "21. extrac04.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { set +x +$as_echo "$at_srcdir/extrac04.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8713,7 +6448,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 touch file1 mkdir directory @@ -8728,44 +6463,8 @@ --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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8789,33 +6488,22 @@ --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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file2 directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { set +x +$as_echo "$at_srcdir/extrac04.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8825,7 +6513,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 touch file1 mkdir directory @@ -8840,44 +6528,8 @@ --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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8901,33 +6553,22 @@ --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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file2 directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { set +x +$as_echo "$at_srcdir/extrac04.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8937,7 +6578,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 touch file1 mkdir directory @@ -8952,44 +6593,8 @@ --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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -9013,33 +6618,22 @@ --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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file2 directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { set +x +$as_echo "$at_srcdir/extrac04.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9049,7 +6643,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 touch file1 mkdir directory @@ -9064,44 +6658,8 @@ --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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9125,33 +6683,22 @@ --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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file2 directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { set +x +$as_echo "$at_srcdir/extrac04.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -9161,7 +6708,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 touch file1 mkdir directory @@ -9176,44 +6723,8 @@ --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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -9237,50 +6748,40 @@ --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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file2 directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_21 +#AT_START_22 +# 22. extrac05.at:30: extracting selected members from pax +at_setup_line='extrac05.at:30' +at_desc="extracting selected members from pax" +at_desc_line=" 22: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "22. extrac05.at:30: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "22. extrac05.at:30: testing ..." + $at_traceon @@ -9292,8 +6793,8 @@ - $at_traceoff -echo "$at_srcdir/extrac05.at:38: + { set +x +$as_echo "$at_srcdir/extrac05.at:38: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9317,43 +6818,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac05.at:38" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9376,56 +6842,46 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "jeden cztery -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac05.at:38" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_22 +#AT_START_23 +# 23. extrac06.at:33: mode of extracted directories +at_setup_line='extrac06.at:33' +at_desc="mode of extracted directories" +at_desc_line=" 23: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "23. extrac06.at:33: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "23. extrac06.at:33: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { set +x +$as_echo "$at_srcdir/extrac06.at:36: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -9462,56 +6918,8 @@ # 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:36" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -9547,34 +6955,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 755 755 755 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { set +x +$as_echo "$at_srcdir/extrac06.at:36: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -9611,56 +7008,8 @@ # 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:36" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -9696,34 +7045,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 755 755 755 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { set +x +$as_echo "$at_srcdir/extrac06.at:36: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -9760,56 +7098,8 @@ # 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:36" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -9845,34 +7135,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 755 755 755 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { set +x +$as_echo "$at_srcdir/extrac06.at:36: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9909,56 +7188,8 @@ # 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:36" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9994,34 +7225,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 755 755 755 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { set +x +$as_echo "$at_srcdir/extrac06.at:36: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10058,56 +7278,8 @@ # 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:36" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10143,58 +7315,48 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 755 755 755 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:36" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_23 +#AT_START_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_desc_line=" 24: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "24. extrac07.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "24. extrac07.at:27: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { set +x +$as_echo "$at_srcdir/extrac07.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -10220,15 +7382,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -10253,67 +7408,29 @@ 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 - -chmod +w dir - -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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Prepare the directory +Create the archive +Extract +dir/ +dir/foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30" +if $at_failed; then : + else ustar fi +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { set +x +$as_echo "$at_srcdir/extrac07.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10339,45 +7456,8 @@ 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 - -chmod +w dir - -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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10402,37 +7482,29 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Prepare the directory Create the archive Extract dir/ dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30" +if $at_failed; then : - echo 1 > "$at_status_file" - exit 1 else ustar fi +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { set +x +$as_echo "$at_srcdir/extrac07.at:30: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10458,45 +7530,8 @@ 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 - -chmod +w dir - -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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10521,37 +7556,29 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Prepare the directory Create the archive Extract dir/ dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30" +if $at_failed; then : - echo 1 > "$at_status_file" - exit 1 else ustar fi +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { set +x +$as_echo "$at_srcdir/extrac07.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10577,45 +7604,8 @@ 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 - -chmod +w dir - -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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10640,37 +7630,29 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Prepare the directory Create the archive Extract dir/ dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30" +if $at_failed; then : - echo 1 > "$at_status_file" - exit 1 else ustar fi +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { set +x +$as_echo "$at_srcdir/extrac07.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10696,45 +7678,8 @@ 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 - -chmod +w dir - -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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10759,141 +7704,106 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Prepare the directory Create the archive Extract dir/ dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30" +if $at_failed; then : - echo 1 > "$at_status_file" - exit 1 else ustar fi - -$at_traceon +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_24 +#AT_START_25 +# 25. gzip.at:23: gzip +at_setup_line='gzip.at:23' +at_desc="gzip" +at_desc_line=" 25: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "25. gzip.at:23: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/gzip.at:28: +{ set +x +$as_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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:28" +( $at_check_trace; 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 " +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo " gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Exiting with failure status due to 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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/gzip.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_25 +#AT_START_26 +# 26. incremental.at:23: incremental +at_setup_line='incremental.at:23' +at_desc="incremental" +at_desc_line=" 26: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "26. incremental.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "26. incremental.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/incremental.at:26: + { set +x +$as_echo "$at_srcdir/incremental.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10917,7 +7827,7 @@ # 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 +sleep 2 tar cf archive --listed=list structure tar cfv archive --listed=list structure @@ -10929,15 +7839,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "incremental.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10961,7 +7864,7 @@ # 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 +sleep 2 tar cf archive --listed=list structure tar cfv archive --listed=list structure @@ -10972,17 +7875,28 @@ sleep 2 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ +separator +structure/ +structure/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incremental.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * @@ -10997,11 +7911,11 @@ # 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 +# 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 +sleep 2 tar cf archive --listed=list structure tar cfv archive --listed=list structure @@ -11012,39 +7926,14 @@ sleep 2 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: +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "incremental.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -11059,11 +7948,11 @@ # 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 +# 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 +sleep 2 tar cf archive --listed=list structure tar cfv archive --listed=list structure @@ -11074,118 +7963,23 @@ sleep 2 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 -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure -) ) >"$at_stdout" 2>"$at_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 -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "structure/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ separator structure/ structure/file -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/incremental.at:26: + { set +x +$as_echo "$at_srcdir/incremental.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11209,7 +8003,7 @@ # 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 +sleep 2 tar cf archive --listed=list structure tar cfv archive --listed=list structure @@ -11221,15 +8015,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "incremental.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11253,47 +8040,7 @@ # command, behaviour of tar becomes variable, depending whether the system # clock ticked over to the next second between creating the file and # backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure -) ) >"$at_stdout" 2>"$at_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 @@ -11304,58 +8051,48 @@ sleep 2 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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ separator structure/ structure/file -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_26 +#AT_START_27 +# 27. incr01.at:27: restore broken symlinks from incremental +at_setup_line='incr01.at:27' +at_desc="restore broken symlinks from incremental" +at_desc_line=" 27: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "27. incr01.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "27. incr01.at:27: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/incr01.at:30: + { set +x +$as_echo "$at_srcdir/incr01.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11377,41 +8114,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11432,35 +8136,24 @@ 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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/bar separator directory/ tar: Deleting \`directory/bar' -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/incr01.at:30: + { set +x +$as_echo "$at_srcdir/incr01.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11482,41 +8175,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11537,35 +8197,24 @@ 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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/bar separator directory/ tar: Deleting \`directory/bar' -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/incr01.at:30: + { set +x +$as_echo "$at_srcdir/incr01.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11587,41 +8236,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11642,59 +8258,49 @@ 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/ +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/bar separator directory/ tar: Deleting \`directory/bar' -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_27 +#AT_START_28 +# 28. incr02.at:32: restoring timestamps from incremental +at_setup_line='incr02.at:32' +at_desc="restoring timestamps from incremental" +at_desc_line=" 28: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "28. incr02.at:32: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "28. incr02.at:32: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/incr02.at:35: + { set +x +$as_echo "$at_srcdir/incr02.at:35: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11739,15 +8345,8 @@ # 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "incr02.at:35" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11791,17 +8390,23 @@ # 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr02.at:35: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * @@ -11822,74 +8427,7 @@ # 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 +# 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. @@ -11908,64 +8446,8 @@ # 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "incr02.at:35" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12009,30 +8491,18 @@ # 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/incr02.at:35: + { set +x +$as_echo "$at_srcdir/incr02.at:35: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12077,64 +8547,8 @@ # 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "incr02.at:35" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12178,54 +8592,43 @@ # 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } - $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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_28 +#AT_START_29 +# 29. listed01.at:26: --listed for individual files +at_setup_line='listed01.at:26' +at_desc="--listed for individual files" +at_desc_line=" 29: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "29. listed01.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "29. listed01.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/listed01.at:29: + { set +x +$as_echo "$at_srcdir/listed01.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12259,53 +8662,8 @@ 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 2 - -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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12338,33 +8696,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/file1 separator directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/listed01.at:29: + { set +x +$as_echo "$at_srcdir/listed01.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12398,15 +8745,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12439,95 +8779,47 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/file1 +separator +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* -tar tf archive.1 || exit 1 -sleep 2 -genfile --length 10240 --pattern zeros --file directory/file2 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_29 +#AT_START_30 +# 30. listed02.at:28: working --listed +at_setup_line='listed02.at:28' +at_desc="working --listed" +at_desc_line=" 30: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "30. listed02.at:28: testing ..." + $at_traceon -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: + { set +x +$as_echo "$at_srcdir/listed02.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12537,7 +8829,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 echo Create directories @@ -12592,84 +8884,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:31" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12733,16 +8949,16 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create directories Creating main archive tart/ tart/c0/ @@ -12798,24 +9014,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/listed02.at:31: + { set +x +$as_echo "$at_srcdir/listed02.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12825,7 +9031,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 echo Create directories @@ -12880,84 +9086,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13021,16 +9151,16 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create directories Creating main archive tart/ tart/c0/ @@ -13086,48 +9216,39 @@ 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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_30 +#AT_START_31 +# 31. incr03.at:28: renamed files in incrementals +at_setup_line='incr03.at:28' +at_desc="renamed files in incrementals" +at_desc_line=" 31: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "31. incr03.at:28: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "31. incr03.at:28: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/incr03.at:31: + { set +x +$as_echo "$at_srcdir/incr03.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -13137,7 +9258,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory genfile --file=directory/x @@ -13165,57 +9286,8 @@ 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 - -sleep 1 - -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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -13252,13 +9324,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 directory/ directory/x directory/y @@ -13273,24 +9344,14 @@ 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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/incr03.at:31: + { set +x +$as_echo "$at_srcdir/incr03.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13300,7 +9361,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory genfile --file=directory/x @@ -13328,15 +9389,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13373,87 +9427,34 @@ 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 * - +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 +directory/ +directory/x +directory/y +Listing of archive.2 +directory/ +directory/z +Directory after first restore +directory +directory/x +directory/y +Directory after second restore +directory +directory/y +directory/z +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y - -sleep 1 - -tar -cf archive.1 -g db directory - -mv directory/x directory/z -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: + { set +x +$as_echo "$at_srcdir/incr03.at:31: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -13463,7 +9464,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory genfile --file=directory/x @@ -13491,57 +9492,8 @@ 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 - -sleep 1 - -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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -13578,13 +9530,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 directory/ directory/x directory/y @@ -13599,41 +9550,32 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_31 +#AT_START_32 +# 32. incr04.at:29: proper icontents initialization +at_setup_line='incr04.at:29' +at_desc="proper icontents initialization" +at_desc_line=" 32: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "32. incr04.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "32. incr04.at:29: testing ..." + $at_traceon @@ -13641,8 +9583,8 @@ - $at_traceoff -echo "$at_srcdir/incr04.at:34: + { set +x +$as_echo "$at_srcdir/incr04.at:34: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -13666,43 +9608,8 @@ 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 || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - - -sleep 1 - -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -13725,15 +9632,15 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump a/ a/b/ a/b/one_31_chars_long_file_name_001 @@ -13881,24 +9788,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/incr04.at:34: + { set +x +$as_echo "$at_srcdir/incr04.at:34: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13922,43 +9819,8 @@ 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 || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - - -sleep 1 - -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13981,15 +9843,15 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump a/ a/b/ a/b/one_31_chars_long_file_name_001 @@ -14137,24 +9999,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/incr04.at:34: + { set +x +$as_echo "$at_srcdir/incr04.at:34: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14178,43 +10030,8 @@ 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 || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - - -sleep 1 - -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14237,15 +10054,15 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump a/ a/b/ a/b/one_31_chars_long_file_name_001 @@ -14393,48 +10210,39 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_32 +#AT_START_33 +# 33. rename01.at:24: renamed dirs in incrementals +at_setup_line='rename01.at:24' +at_desc="renamed dirs in incrementals" +at_desc_line=" 33: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "33. rename01.at:24: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "33. rename01.at:24: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/rename01.at:27: + { set +x +$as_echo "$at_srcdir/rename01.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -14444,7 +10252,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo @@ -14474,15 +10282,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -14521,109 +10322,55 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/file1 +foo/file2 +foo/bar/file +Creating incremental archive +foo/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/file +foo/file1 +foo/file2 +End directory listing 1 +Begin directory listing 2 +foo +foo/baz +foo/baz/file +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename01.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +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 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 \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo @@ -14653,59 +10400,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -14744,15 +10440,15 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive foo/ foo/bar/ foo/file1 @@ -14775,24 +10471,14 @@ 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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/rename01.at:27: + { set +x +$as_echo "$at_srcdir/rename01.at:27: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14802,7 +10488,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo @@ -14832,59 +10518,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14923,15 +10558,15 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive foo/ foo/bar/ foo/file1 @@ -14954,48 +10589,39 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27" +$at_failed && at_fn_log_failure +$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_33 +#AT_START_34 +# 34. rename02.at:24: move between hierarchies +at_setup_line='rename02.at:24' +at_desc="move between hierarchies" +at_desc_line=" 34: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "34. rename02.at:24: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "34. rename02.at:24: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/rename02.at:27: + { set +x +$as_echo "$at_srcdir/rename02.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15005,7 +10631,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo genfile --file foo/file1 @@ -15039,63 +10665,8 @@ 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 - -sleep 1 - -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo - -mv foo/bar/baz foo - -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo - -mv foo old - -tar xfg arch.1 /dev/null 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15138,16 +10709,16 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive foo/ foo/bar/ foo/bar/baz/ @@ -15180,24 +10751,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/rename02.at:27: + { set +x +$as_echo "$at_srcdir/rename02.at:27: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -15207,7 +10768,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo genfile --file foo/file1 @@ -15241,15 +10802,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -15292,64 +10846,16 @@ 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 - -sleep 1 - -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo - -mv foo/bar/baz foo - -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo - -mv foo old - -tar xfg arch.1 /dev/null 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive foo/ foo/bar/ foo/bar/baz/ @@ -15382,24 +10888,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/rename02.at:27: + { set +x +$as_echo "$at_srcdir/rename02.at:27: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -15409,7 +10905,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo genfile --file foo/file1 @@ -15443,63 +10939,8 @@ 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 - -sleep 1 - -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo - -mv foo/bar/baz foo - -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo - -mv foo old - -tar xfg arch.1 /dev/null 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -15542,16 +10983,16 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive foo/ foo/bar/ foo/bar/baz/ @@ -15584,48 +11025,39 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -$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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_34 +#AT_START_35 +# 35. rename03.at:23: cyclic renames +at_setup_line='rename03.at:23' +at_desc="cyclic renames" +at_desc_line=" 35: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "35. rename03.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "35. rename03.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/rename03.at:26: + { set +x +$as_echo "$at_srcdir/rename03.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15635,7 +11067,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo @@ -15681,75 +11113,8 @@ 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 - -sleep 1 - -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 - -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) - -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 - -tar xfg arch.1 /dev/null - -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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15804,12 +11169,11 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "First dump tar: foo/a: Directory is new tar: foo/b: Directory is new tar: foo/c: Directory is new @@ -15817,8 +11181,9 @@ 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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump foo/ foo/a/ foo/b/ @@ -15859,24 +11224,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/rename03.at:26: + { set +x +$as_echo "$at_srcdir/rename03.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -15886,7 +11241,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo @@ -15932,75 +11287,8 @@ 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 - -sleep 1 - -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 - -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) - -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 - -tar xfg arch.1 /dev/null - -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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16055,12 +11343,11 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "First dump tar: foo/a: Directory is new tar: foo/b: Directory is new tar: foo/c: Directory is new @@ -16068,8 +11355,9 @@ 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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump foo/ foo/a/ foo/b/ @@ -16110,24 +11398,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/rename03.at:26: + { set +x +$as_echo "$at_srcdir/rename03.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16137,7 +11415,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo @@ -16183,15 +11461,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16246,72 +11517,11 @@ 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 - -sleep 1 - -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 - -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) - -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 - -tar xfg arch.1 /dev/null - -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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "First dump tar: foo/a: Directory is new tar: foo/b: Directory is new tar: foo/c: Directory is new @@ -16319,8 +11529,9 @@ 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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump foo/ foo/a/ foo/b/ @@ -16361,48 +11572,39 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26" +$at_failed && at_fn_log_failure +$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. rename04.at:27: renamed directory containing subdirectories - at_setup_line='rename04.at:27' - at_desc="renamed directory containing subdirectories" - $at_quiet $ECHO_N " 36: renamed directory containing subdirectories $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_35 +#AT_START_36 +# 36. rename04.at:27: renamed directory containing subdirectories +at_setup_line='rename04.at:27' +at_desc="renamed directory containing subdirectories" +at_desc_line=" 36: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "36. rename04.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "36. rename04.at:27: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/rename04.at:30: + { set +x +$as_echo "$at_srcdir/rename04.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -16412,7 +11614,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 decho Creating directory structure @@ -16440,57 +11642,8 @@ tar -xf archive.2 -g db.2 find dir | sort )" -echo rename04.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 - - -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort - -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -16527,19 +11680,19 @@ decho Second restore tar -xf archive.2 -g db.2 find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive First restore Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive @@ -16550,24 +11703,14 @@ Second restore dir dir/subdir -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename04.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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/rename04.at:30: + { set +x +$as_echo "$at_srcdir/rename04.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16577,7 +11720,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 decho Creating directory structure @@ -16605,57 +11748,8 @@ tar -xf archive.2 -g db.2 find dir | sort )" -echo rename04.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 - - -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort - -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16692,19 +11786,19 @@ decho Second restore tar -xf archive.2 -g db.2 find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive First restore Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive @@ -16715,24 +11809,14 @@ Second restore dir dir/subdir -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename04.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/rename04.at:30: + { set +x +$as_echo "$at_srcdir/rename04.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16742,7 +11826,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 decho Creating directory structure @@ -16770,57 +11854,8 @@ tar -xf archive.2 -g db.2 find dir | sort )" -echo rename04.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 - - -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort - -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16857,19 +11892,19 @@ decho Second restore tar -xf archive.2 -g db.2 find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive First restore Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive @@ -16880,48 +11915,39 @@ Second restore dir dir/subdir -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename04.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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$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. rename05.at:24: renamed subdirectories - at_setup_line='rename05.at:24' - at_desc="renamed subdirectories" - $at_quiet $ECHO_N " 37: renamed subdirectories $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_36 +#AT_START_37 +# 37. rename05.at:24: renamed subdirectories +at_setup_line='rename05.at:24' +at_desc="renamed subdirectories" +at_desc_line=" 37: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "37. rename05.at:24: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "37. rename05.at:24: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/rename05.at:27: + { set +x +$as_echo "$at_srcdir/rename05.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -16931,7 +11957,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 decho Creating directory structure @@ -16960,15 +11986,8 @@ tar -xf archive.2 -g db.2 find dir | sort )" -echo rename05.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; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17006,22 +12025,47 @@ decho Second restore tar -xf archive.2 -g db.2 find dir | 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir.0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename05.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 decho Creating directory structure @@ -17049,144 +12093,16 @@ decho Second restore tar -xf archive.2 -g db.2 find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir.0 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename05.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/rename05.at:27: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort - -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -)" -echo rename05.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 - - -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort - -decho Second restore -tar -xf archive.2 -g db.2 -find dir | 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 * +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 @@ -17217,19 +12133,19 @@ decho Second restore tar -xf archive.2 -g db.2 find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive First restore Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive @@ -17240,24 +12156,14 @@ Second restore dir dir/subdir.0 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename05.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/rename05.at:27: + { set +x +$as_echo "$at_srcdir/rename05.at:27: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17267,7 +12173,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 decho Creating directory structure @@ -17296,58 +12202,8 @@ tar -xf archive.2 -g db.2 find dir | sort )" -echo rename05.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 - - -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort - -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17385,19 +12241,19 @@ decho Second restore tar -xf archive.2 -g db.2 find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive First restore Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure Creating initial archive Renaming Creating incremental archive @@ -17408,48 +12264,39 @@ Second restore dir dir/subdir.0 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename05.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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -$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. 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 " 38: changed file types in incrementals $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_37 +#AT_START_38 +# 38. chtype.at:27: changed file types in incrementals +at_setup_line='chtype.at:27' +at_desc="changed file types in incrementals" +at_desc_line=" 38: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "38. chtype.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "38. chtype.at:27: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/chtype.at:30: + { set +x +$as_echo "$at_srcdir/chtype.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17459,7 +12306,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 @@ -17489,15 +12336,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17536,22 +12376,38 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup +Second backup +Restore archive.1 +Restore archive.2 +directory +directory/a +directory/a/a +directory/a/b +directory/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/chtype.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 @@ -17580,44 +12436,14 @@ 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: +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -17651,26 +12477,38 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup +Second backup +Restore archive.1 +Restore archive.2 +directory +directory/a +directory/a/a +directory/a/b +directory/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/chtype.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 @@ -17699,17 +12537,14 @@ 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 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -17743,13 +12578,12 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup Second backup Restore archive.1 Restore archive.2 @@ -17758,211 +12592,39 @@ 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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory - -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -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 || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory - -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -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 || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory - -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -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"` - ;; - - 39 ) # 39. ignfail.at:23: ignfail - at_setup_line='ignfail.at:23' - at_desc="ignfail" - $at_quiet $ECHO_N " 39: ignfail $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_38 +#AT_START_39 +# 39. ignfail.at:23: ignfail +at_setup_line='ignfail.at:23' +at_desc="ignfail" +at_desc_line=" 39: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "39. ignfail.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "39. ignfail.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/ignfail.at:26: + { set +x +$as_echo "$at_srcdir/ignfail.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -17973,12 +12635,12 @@ # 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 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 touch file @@ -18013,15 +12675,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -18071,17 +12726,86 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/ignfail.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -18126,12 +12850,11 @@ status=$? chmod 700 directory test $status = 0 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "----- +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- tar: file: Cannot open: Permission denied tar: Exiting with failure status due to previous errors ----- @@ -18141,41 +12864,31 @@ tar: Exiting with failure status due to 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_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/ignfail.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/ignfail.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +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 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 touch file @@ -18210,20 +12923,13 @@ 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 +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -18268,67 +12974,11 @@ 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 "----- +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- tar: file: Cannot open: Permission denied tar: Exiting with failure status due to previous errors ----- @@ -18338,41 +12988,31 @@ tar: Exiting with failure status due to 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_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/ignfail.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { set +x +$as_echo "$at_srcdir/ignfail.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" +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 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 touch file @@ -18407,75 +13047,13 @@ 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 +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -18520,12 +13098,11 @@ status=$? chmod 700 directory test $status = 0 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "----- +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- tar: file: Cannot open: Permission denied tar: Exiting with failure status due to previous errors ----- @@ -18535,41 +13112,31 @@ tar: Exiting with failure status due to 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_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/ignfail.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { set +x +$as_echo "$at_srcdir/ignfail.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +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 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 touch file @@ -18604,75 +13171,13 @@ 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 +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -18717,12 +13222,11 @@ status=$? chmod 700 directory test $status = 0 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "----- +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- tar: file: Cannot open: Permission denied tar: Exiting with failure status due to previous errors ----- @@ -18732,251 +13236,69 @@ tar: Exiting with failure status due to 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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_39 +#AT_START_40 +# 40. link01.at:33: link count gt 2 +at_setup_line='link01.at:33' +at_desc="link count gt 2" +at_desc_line=" 40: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "40. link01.at:33: testing ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/link01.at:36: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. +mkdir directory +mkdir directory/test1 +mkdir directory/test2 -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +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 -touch file -mkdir directory -touch directory/file +rm -r directory +tar xf archive -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 +ls directory/test1 )" -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: Exiting with failure status due to previous errors ------ -tar: file: Warning: Cannot open: Permission denied ------ -tar: directory: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: directory: Warning: Cannot open: Permission denied -" | $at_diff - "$at_stderr" || at_failed=: -$at_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"` - ;; - - 40 ) # 40. link01.at:33: link count gt 2 - at_setup_line='link01.at:33' - at_desc="link count gt 2" - $at_quiet $ECHO_N " 40: link count gt 2 $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "40. link01.at:33: testing ..." - $at_traceon - - - - - - $at_traceoff -echo "$at_srcdir/link01.at:36: +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -18993,21 +13315,25 @@ tar xf archive ls directory/test1 -)" -echo link01.at:36 >"$at_check_line_file" +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + { set +x +$as_echo "$at_srcdir/link01.at:36: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * @@ -19024,17 +13350,14 @@ 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 +)" +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -19051,36 +13374,25 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/link01.at:36: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/link01.at:36: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * @@ -19098,20 +13410,13 @@ 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 +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -19128,17 +13433,25 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link01.at:36: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * @@ -19155,36 +13468,14 @@ 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 +)" +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -19201,21 +13492,25 @@ tar xf archive ls directory/test1 -)" -echo link01.at:36 >"$at_check_line_file" +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + { set +x +$as_echo "$at_srcdir/link01.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * @@ -19232,17 +13527,14 @@ 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 +)" +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -19259,89 +13551,203 @@ tar xf archive ls directory/test1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_40 +#AT_START_41 +# 41. link02.at:32: preserve hard links with --remove-files +at_setup_line='link02.at:32' +at_desc="preserve hard links with --remove-files" +at_desc_line=" 41: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "41. link02.at:32: testing ..." + $at_traceon + - $at_traceoff -echo "$at_srcdir/link01.at:36: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + + + { set +x +$as_echo "$at_srcdir/link02.at:35: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } -tar cf archive directory/test1/test.txt directory/test1/test.txt + { set +x +$as_echo "$at_srcdir/link02.at:35: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -rm -r directory -tar xf archive +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -ls directory/test1 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link02.at:35: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' )" -echo link01.at:36 >"$at_check_line_file" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } -if test -n "$at_trace_this"; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/link02.at:35: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +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 - ( :; +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -19350,44 +13756,28 @@ 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 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/link01.at:36: + { set +x +$as_echo "$at_srcdir/link02.at:35: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19396,56 +13786,15 @@ 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 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' )" -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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19454,62 +13803,46 @@ 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 - +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. 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 " 41: long names in V7 archives $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_41 +#AT_START_42 +# 42. link03.at:24: working -l with --remove-files +at_setup_line='link03.at:24' +at_desc="working -l with --remove-files" +at_desc_line=" 42: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "41. longv7.at:24: testing ..." - $at_traceon - +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "42. link03.at:24: testing ..." + $at_traceon @@ -19517,8 +13850,8 @@ - $at_traceoff -echo "$at_srcdir/longv7.at:30: + { set +x +$as_echo "$at_srcdir/link03.at:34: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -19527,22 +13860,27 @@ 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 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' )" -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; +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -19551,88 +13889,269 @@ 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 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link03.at:34: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H oldgnu\" 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: Exiting with failure status due to 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 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * - 42 ) # 42. 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 " 42: long file names divisible by block size $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "42. long01.at:28: testing ..." - $at_traceon +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + { set +x +$as_echo "$at_srcdir/link03.at:34: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link03.at:34: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 - $at_traceoff -echo "$at_srcdir/long01.at:36: +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link03.at:34: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19642,20 +14161,26 @@ rm -rf * -install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 -echo test > endfile +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 -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" +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 -if test -n "$at_trace_this"; then - ( $at_traceon; +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19665,60 +14190,154 @@ rm -rf * -install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 -echo test > endfile +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 -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 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +link file1 file2 +link file2 file3 +link file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_42 +#AT_START_43 +# 43. longv7.at:24: long names in V7 archives +at_setup_line='longv7.at:24' +at_desc="long names in V7 archives" +at_desc_line=" 43: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "43. longv7.at:24: testing ..." + $at_traceon + + + + + + + + + { set +x +$as_echo "$at_srcdir/longv7.at:30: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +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 -install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 -echo test > endfile +tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems +echo separator +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "longv7.at:30" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -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 +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 -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 +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=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c: file name is too long (max 99); not dumped +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +this_is_a_very_long_name_for_a_directory_which_causes_problems/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/longv7.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_43 +#AT_START_44 +# 44. 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_desc_line=" 44: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "44. long01.at:28: testing ..." + $at_traceon + + + + + + + + + + { set +x +$as_echo "$at_srcdir/long01.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * @@ -19728,20 +14347,41 @@ 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_fn_check_prepare_notrace 'an embedded newline' "long01.at:36" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -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; +install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 +echo test > endfile + +tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde +endfile +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/long01.at:36: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * @@ -19750,12 +14390,9 @@ 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 - ( :; +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19769,49 +14406,39 @@ 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 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. lustar01.at:21: ustar: unsplittable file name - at_setup_line='lustar01.at:21' - at_desc="ustar: unsplittable file name" - $at_quiet $ECHO_N " 43: ustar: unsplittable file name $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_44 +#AT_START_45 +# 45. lustar01.at:21: ustar: unsplittable file name +at_setup_line='lustar01.at:21' +at_desc="ustar: unsplittable file name" +at_desc_line=" 45: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "43. lustar01.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "45. lustar01.at:21: testing ..." + $at_traceon @@ -19819,8 +14446,8 @@ - $at_traceoff -echo "$at_srcdir/lustar01.at:27: + { set +x +$as_echo "$at_srcdir/lustar01.at:27: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19832,31 +14459,8 @@ genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix )" -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 || exit 77 -tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "lustar01.at:27" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19867,49 +14471,39 @@ genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix -) ) >"$at_stdout" 2>"$at_stderr" - 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix: file name is too long (cannot be split); not dumped tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -$at_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_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/lustar01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. lustar02.at:21: ustar: unsplittable path name - at_setup_line='lustar02.at:21' - at_desc="ustar: unsplittable path name" - $at_quiet $ECHO_N " 44: ustar: unsplittable path name $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_45 +#AT_START_46 +# 46. lustar02.at:21: ustar: unsplittable path name +at_setup_line='lustar02.at:21' +at_desc="ustar: unsplittable path name" +at_desc_line=" 46: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "44. lustar02.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "46. lustar02.at:21: testing ..." + $at_traceon @@ -19921,8 +14515,8 @@ - $at_traceoff -echo "$at_srcdir/lustar02.at:32: + { set +x +$as_echo "$at_srcdir/lustar02.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19935,32 +14529,8 @@ install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be )" -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 || exit 77 -tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "lustar02.at:32" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19972,49 +14542,39 @@ install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be -) ) >"$at_stdout" 2>"$at_stderr" - 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/: file name is too long (cannot be split); not dumped tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -$at_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_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/lustar02.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$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. lustar03.at:21: ustar: splitting long names - at_setup_line='lustar03.at:21' - at_desc="ustar: splitting long names" - $at_quiet $ECHO_N " 45: ustar: splitting long names $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_46 +#AT_START_47 +# 47. lustar03.at:21: ustar: splitting long names +at_setup_line='lustar03.at:21' +at_desc="ustar: splitting long names" +at_desc_line=" 47: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "45. lustar03.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "47. lustar03.at:21: testing ..." + $at_traceon @@ -20024,8 +14584,8 @@ - $at_traceoff -echo "$at_srcdir/lustar03.at:29: + { set +x +$as_echo "$at_srcdir/lustar03.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -20040,34 +14600,8 @@ 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 || exit 77 -echo "Create archive" -tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be -echo "List archive" -tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "lustar03.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -20081,51 +14615,41 @@ 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 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create archive List archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/ this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/lustar03.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. multiv01.at:23: multivolume dumps from pipes - at_setup_line='multiv01.at:23' - at_desc="multivolume dumps from pipes" - $at_quiet $ECHO_N " 46: multivolume dumps from pipes $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_47 +#AT_START_48 +# 48. multiv01.at:23: multivolume dumps from pipes +at_setup_line='multiv01.at:23' +at_desc="multivolume dumps from pipes" +at_desc_line=" 48: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "46. multiv01.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "48. multiv01.at:23: testing ..." + $at_traceon @@ -20135,8 +14659,8 @@ - $at_traceoff -echo "$at_srcdir/multiv01.at:30: + { set +x +$as_echo "$at_srcdir/multiv01.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20175,15 +14699,8 @@ 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; +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20221,73 +14738,18 @@ 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 * +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -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: + { set +x +$as_echo "$at_srcdir/multiv01.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20326,58 +14788,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20415,30 +14827,18 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/multiv01.at:30: + { set +x +$as_echo "$at_srcdir/multiv01.at:30: mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20477,58 +14877,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30" +( $at_check_trace; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20566,54 +14916,43 @@ 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 - +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - 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. multiv02.at:28: skipping a straddling member - at_setup_line='multiv02.at:28' - at_desc="skipping a straddling member" - $at_quiet $ECHO_N " 47: skipping a straddling member $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_48 +#AT_START_49 +# 49. multiv02.at:28: skipping a straddling member +at_setup_line='multiv02.at:28' +at_desc="skipping a straddling member" +at_desc_line=" 49: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "47. multiv02.at:28: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "49. multiv02.at:28: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv02.at:31: + { set +x +$as_echo "$at_srcdir/multiv02.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20633,39 +14972,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20684,32 +14992,21 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator en -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/multiv02.at:31: + { set +x +$as_echo "$at_srcdir/multiv02.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20729,39 +15026,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20780,32 +15046,21 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator en -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/multiv02.at:31: + { set +x +$as_echo "$at_srcdir/multiv02.at:31: mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20825,39 +15080,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31" +( $at_check_trace; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20876,56 +15100,46 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator en -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -$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. multiv03.at:30: MV archive & long filenames - at_setup_line='multiv03.at:30' - at_desc="MV archive & long filenames" - $at_quiet $ECHO_N " 48: MV archive & long filenames $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_49 +#AT_START_50 +# 50. multiv03.at:30: MV archive & long filenames +at_setup_line='multiv03.at:30' +at_desc="MV archive & long filenames" +at_desc_line=" 50: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "48. multiv03.at:30: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "50. multiv03.at:30: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv03.at:33: + { set +x +$as_echo "$at_srcdir/multiv03.at:33: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20965,15 +15179,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21012,74 +15219,18 @@ 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 < ../expout <"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter $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_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/multiv03.at:33: + { set +x +$as_echo "$at_srcdir/multiv03.at:33: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -21119,59 +15270,8 @@ 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 < ../expout <"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -21210,54 +15310,43 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter $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 - +at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } - 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. 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 " 49: split directory members in a MV archive $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_50 +#AT_START_51 +# 51. 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_desc_line=" 51: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "49. multiv04.at:36: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "51. multiv04.at:36: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv04.at:39: + { set +x +$as_echo "$at_srcdir/multiv04.at:39: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21283,45 +15372,8 @@ 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); }' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21346,34 +15398,23 @@ 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/ +tar -MRt -f arc.1 -f arc.2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ separator block 0: directory/ block 35: ** Block of NULs ** -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/multiv04.at:39: + { set +x +$as_echo "$at_srcdir/multiv04.at:39: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -21399,45 +15440,8 @@ 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); }' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -21462,59 +15466,49 @@ 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/ +tar -MRt -f arc.1 -f arc.2) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ separator block 0: directory/ block 35: ** Block of NULs ** -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } - 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. multiv05.at:26: Restoring after an out of sync volume - at_setup_line='multiv05.at:26' - at_desc="Restoring after an out of sync volume" - $at_quiet $ECHO_N " 50: Restoring after an out of sync volume $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_51 +#AT_START_52 +# 52. multiv05.at:26: Restoring after an out of sync volume +at_setup_line='multiv05.at:26' +at_desc="Restoring after an out of sync volume" +at_desc_line=" 52: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "50. multiv05.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "52. multiv05.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv05.at:30: + { set +x +$as_echo "$at_srcdir/multiv05.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21552,57 +15546,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multiv05.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21639,14 +15584,14 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: \`trzy' is not continued on this volume +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive separator jeden dwa @@ -21660,48 +15605,39 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv05.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. multiv06.at:27: Multivolumes with L=record_size - at_setup_line='multiv06.at:27' - at_desc="Multivolumes with L=record_size" - $at_quiet $ECHO_N " 51: Multivolumes with L=record_size $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_52 +#AT_START_53 +# 53. multiv06.at:27: Multivolumes with L=record_size +at_setup_line='multiv06.at:27' +at_desc="Multivolumes with L=record_size" +at_desc_line=" 53: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "51. multiv06.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "53. multiv06.at:27: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv06.at:30: + { set +x +$as_echo "$at_srcdir/multiv06.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21717,15 +15653,8 @@ tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file decho Testing archive tar -t -M -farc.1 -farc.2 -farc.3)" -echo multiv06.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; +at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21740,62 +15669,32 @@ decho Creating archive tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +tar -t -M -farc.1 -farc.2 -farc.3) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating file +Creating archive +Testing archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating file +Creating archive +Testing archive +file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/multiv06.at:30: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating file -Creating archive -Testing archive -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating file -Creating archive -Testing archive -file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv06.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/multiv06.at:30: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * @@ -21806,35 +15705,8 @@ tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file decho Testing archive tar -t -M -farc.1 -farc.2 -farc.3)" -echo multiv06.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 pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * - -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30" +( $at_check_trace; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -21849,132 +15721,97 @@ decho Creating archive tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating file +tar -t -M -farc.1 -farc.2 -farc.3) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating file Creating archive Testing archive -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating file Creating archive Testing archive file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv06.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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. old.at:23: old archives - at_setup_line='old.at:23' - at_desc="old archives" - $at_quiet $ECHO_N " 52: old archives $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "52. old.at:23: testing ..." - $at_traceon + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_53 +#AT_START_54 +# 54. old.at:23: old archives +at_setup_line='old.at:23' +at_desc="old archives" +at_desc_line=" 54: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "54. old.at:23: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/old.at:27: +{ set +x +$as_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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "old.at:27" +( $at_check_trace; mkdir directory tar cfvo archive directory || exit 1 tar tf archive - ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/ -" | $at_diff - "$at_stdout" || at_failed=: -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"` - ;; - - 53 ) # 53. recurse.at:21: recurse - at_setup_line='recurse.at:21' - at_desc="recurse" - $at_quiet $ECHO_N " 53: recurse $ECHO_C" - at_xfail=no +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/old.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_54 +#AT_START_55 +# 55. recurse.at:21: recurse +at_setup_line='recurse.at:21' +at_desc="recurse" +at_desc_line=" 55: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "53. recurse.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "55. recurse.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { set +x +$as_echo "$at_srcdir/recurse.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -21988,15 +15825,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22009,49 +15839,20 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { set +x +$as_echo "$at_srcdir/recurse.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22065,33 +15866,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22104,31 +15880,20 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { set +x +$as_echo "$at_srcdir/recurse.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22142,33 +15907,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22181,31 +15921,20 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { set +x +$as_echo "$at_srcdir/recurse.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22219,33 +15948,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22258,31 +15962,20 @@ 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 - +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { set +x +$as_echo "$at_srcdir/recurse.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22296,33 +15989,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22335,55 +16003,45 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. 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 " 54: working -C with --same-order $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_55 +#AT_START_56 +# 56. same-order01.at:26: working -C with --same-order +at_setup_line='same-order01.at:26' +at_desc="working -C with --same-order" +at_desc_line=" 56: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "54. same-order01.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "56. same-order01.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/same-order01.at:29: + { set +x +$as_echo "$at_srcdir/same-order01.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22393,7 +16051,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 genfile -l 1024 -f file1 @@ -22405,15 +16063,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22434,22 +16085,31 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/same-order01.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 genfile -l 1024 -f file1 @@ -22460,37 +16120,14 @@ 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: +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -22506,98 +16143,31 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/same-order01.at:29: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +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 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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 genfile -l 1024 -f file1 @@ -22609,41 +16179,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22664,32 +16201,21 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/same-order01.at:29: + { set +x +$as_echo "$at_srcdir/same-order01.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22699,7 +16225,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 genfile -l 1024 -f file1 @@ -22711,41 +16237,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22766,32 +16259,21 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/same-order01.at:29: + { set +x +$as_echo "$at_srcdir/same-order01.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22801,7 +16283,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 genfile -l 1024 -f file1 @@ -22813,41 +16295,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22868,56 +16317,46 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29" +$at_failed && at_fn_log_failure +$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"` - ;; - - 55 ) # 55. same-order02.at:25: multiple -C options - at_setup_line='same-order02.at:25' - at_desc="multiple -C options" - $at_quiet $ECHO_N " 55: multiple -C options $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_56 +#AT_START_57 +# 57. same-order02.at:25: multiple -C options +at_setup_line='same-order02.at:25' +at_desc="multiple -C options" +at_desc_line=" 57: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "55. same-order02.at:25: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "57. same-order02.at:25: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/same-order02.at:28: + { set +x +$as_echo "$at_srcdir/same-order02.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22940,42 +16379,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22997,33 +16402,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/same-order02.at:28: + { set +x +$as_echo "$at_srcdir/same-order02.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23046,42 +16440,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23103,33 +16463,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/same-order02.at:28: + { set +x +$as_echo "$at_srcdir/same-order02.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -23152,15 +16501,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -23182,17 +16524,27 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/same-order02.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * @@ -23203,97 +16555,15 @@ 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 +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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23315,33 +16585,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/same-order02.at:28: + { set +x +$as_echo "$at_srcdir/same-order02.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -23364,42 +16623,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -23421,50 +16646,40 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$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. shortrec.at:25: short records - at_setup_line='shortrec.at:25' - at_desc="short records" - $at_quiet $ECHO_N " 56: short records $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_57 +#AT_START_58 +# 58. shortrec.at:25: short records +at_setup_line='shortrec.at:25' +at_desc="short records" +at_desc_line=" 58: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "56. shortrec.at:25: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "58. shortrec.at:25: testing ..." + $at_traceon @@ -23472,8 +16687,8 @@ - $at_traceoff -echo "$at_srcdir/shortrec.at:28: + { set +x +$as_echo "$at_srcdir/shortrec.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -23491,37 +16706,8 @@ 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 - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive - -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -23538,68 +16724,32 @@ tar -t -f - < archive rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -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: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "shortrec.at:28" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - -$at_traceoff -echo "$at_srcdir/shortrec.at:28: +{ set +x +$as_echo "$at_srcdir/shortrec.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23617,37 +16767,8 @@ 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 - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive - -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23664,68 +16785,32 @@ tar -t -f - < archive rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -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: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "shortrec.at:28" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - -$at_traceoff -echo "$at_srcdir/shortrec.at:28: +{ set +x +$as_echo "$at_srcdir/shortrec.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -23743,37 +16828,8 @@ 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 - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive - -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -23790,68 +16846,32 @@ tar -t -f - < archive rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -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_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "shortrec.at:28" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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: +{ set +x +$as_echo "$at_srcdir/shortrec.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23869,15 +16889,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23894,95 +16907,37 @@ tar -t -f - < archive 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "shortrec.at:28" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/shortrec.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu 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 - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive - -rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -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: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$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\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * @@ -23995,37 +16950,8 @@ 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 - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive - -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24042,95 +16968,60 @@ tar -t -f - < archive rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -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: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$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; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" +at_fn_check_prepare_trace "shortrec.at:28" +( $at_check_trace; grep -v '^.*tar: Record size = ' stderr; exit 0 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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"` - ;; - - 57 ) # 57. sparse01.at:21: sparse files - at_setup_line='sparse01.at:21' - at_desc="sparse files" - $at_quiet $ECHO_N " 57: sparse files $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_58 +#AT_START_59 +# 59. sparse01.at:21: sparse files +at_setup_line='sparse01.at:21' +at_desc="sparse files" +at_desc_line=" 59: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "57. sparse01.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "59. sparse01.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/sparse01.at:24: + { set +x +$as_echo "$at_srcdir/sparse01.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -24152,15 +17043,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -24181,56 +17065,18 @@ 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=: +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_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_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/sparse01.at:24: + { set +x +$as_echo "$at_srcdir/sparse01.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24252,41 +17098,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24307,30 +17120,18 @@ 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=: +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_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_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/sparse01.at:24: + { set +x +$as_echo "$at_srcdir/sparse01.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -24352,41 +17153,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -24407,27 +17175,15 @@ 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=: +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_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_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } @@ -24450,22 +17206,23 @@ done - $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. 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 " 58: extracting sparse file over a pipe $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_59 +#AT_START_60 +# 60. sparse02.at:21: extracting sparse file over a pipe +at_setup_line='sparse02.at:21' +at_desc="extracting sparse file over a pipe" +at_desc_line=" 60: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "58. sparse02.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "60. sparse02.at:21: testing ..." + $at_traceon @@ -24475,8 +17232,8 @@ - $at_traceoff -echo "$at_srcdir/sparse02.at:28: + { set +x +$as_echo "$at_srcdir/sparse02.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -24492,35 +17249,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -24535,31 +17265,20 @@ 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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/sparse02.at:28: + { set +x +$as_echo "$at_srcdir/sparse02.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24575,15 +17294,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24598,17 +17310,25 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/sparse02.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * @@ -24618,36 +17338,14 @@ 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: +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * @@ -24657,92 +17355,38 @@ tar xfO archive | cat - > sparsecopy || exit 1 cmp sparsefile sparsecopy -)" -echo sparse02.at:28 >"$at_check_line_file" +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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"` - ;; - - 59 ) # 59. sparse03.at:21: storing sparse files > 8G - at_setup_line='sparse03.at:21' - at_desc="storing sparse files > 8G" - $at_quiet $ECHO_N " 59: storing sparse files > 8G $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_60 +#AT_START_61 +# 61. sparse03.at:21: storing sparse files > 8G +at_setup_line='sparse03.at:21' +at_desc="storing sparse files > 8G" +at_desc_line=" 61: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "59. sparse03.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "61. sparse03.at:21: testing ..." + $at_traceon @@ -24753,8 +17397,8 @@ - $at_traceoff -echo "$at_srcdir/sparse03.at:29: + { set +x +$as_echo "$at_srcdir/sparse03.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -24776,41 +17420,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "sparse03.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -24831,27 +17442,15 @@ 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=: +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_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 +at_fn_check_status 0 $at_status "$at_srcdir/sparse03.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } @@ -24874,22 +17473,23 @@ done - $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. 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 " 60: sparse files in MV archives $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_61 +#AT_START_62 +# 62. sparsemv.at:21: sparse files in MV archives +at_setup_line='sparsemv.at:21' +at_desc="sparse files in MV archives" +at_desc_line=" 62: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "60. sparsemv.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "62. sparsemv.at:21: testing ..." + $at_traceon @@ -24902,8 +17502,8 @@ - $at_traceoff -echo "$at_srcdir/sparsemv.at:31: + { set +x +$as_echo "$at_srcdir/sparsemv.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24931,47 +17531,8 @@ echo \"Compare archive\" tar --record-size=512 -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 --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 - -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24998,13 +17559,12 @@ tar --record-size=512 -t -M -f arc.1 -f arc.2 echo "Compare archive" tar --record-size=512 -d -M -f arc.1 -f arc.2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks Create archive Test archive sparsefile @@ -25014,24 +17574,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/sparsemv.at:31: + { set +x +$as_echo "$at_srcdir/sparsemv.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25059,47 +17609,8 @@ echo \"Compare archive\" tar --record-size=512 -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 --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 - -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25126,13 +17637,12 @@ tar --record-size=512 -t -M -f arc.1 -f arc.2 echo "Compare archive" tar --record-size=512 -d -M -f arc.1 -f arc.2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks Create archive Test archive sparsefile @@ -25142,49 +17652,40 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. 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 " 61: sparse files in PAX MV archives, v.0.0 $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_62 +#AT_START_63 +# 63. 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_desc_line=" 63: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "61. spmvp00.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "63. spmvp00.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/spmvp00.at:24: + { set +x +$as_echo "$at_srcdir/spmvp00.at:24: mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -25212,47 +17713,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "spmvp00.at:24" +( $at_check_trace; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -25279,15 +17741,15 @@ 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 -echo >>"$at_stderr"; echo "tar: Record size = 12 blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Record size = 12 blocks tar: Record size = 12 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks Create archive Test archive sparsefile @@ -25297,49 +17759,40 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/spmvp00.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. 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 " 62: sparse files in PAX MV archives, v.0.1 $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_63 +#AT_START_64 +# 64. 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_desc_line=" 64: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "62. spmvp01.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "64. spmvp01.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/spmvp01.at:24: + { set +x +$as_echo "$at_srcdir/spmvp01.at:24: mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -25367,47 +17820,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "spmvp01.at:24" +( $at_check_trace; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -25434,15 +17848,15 @@ 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 -echo >>"$at_stderr"; echo "tar: Record size = 12 blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Record size = 12 blocks tar: Record size = 12 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks Create archive Test archive sparsefile @@ -25452,49 +17866,40 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/spmvp01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. 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 " 63: sparse files in PAX MV archives, v.1.0 $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_64 +#AT_START_65 +# 65. 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_desc_line=" 65: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "63. spmvp10.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "65. spmvp10.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/spmvp10.at:24: + { set +x +$as_echo "$at_srcdir/spmvp10.at:24: mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -25522,47 +17927,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "spmvp10.at:24" +( $at_check_trace; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -25589,15 +17955,15 @@ 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 -echo >>"$at_stderr"; echo "tar: Record size = 12 blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Record size = 12 blocks tar: Record size = 12 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks Create archive Test archive sparsefile @@ -25607,48 +17973,39 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/spmvp10.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. update.at:27: update unchanged directories - at_setup_line='update.at:27' - at_desc="update unchanged directories" - $at_quiet $ECHO_N " 64: update unchanged directories $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_65 +#AT_START_66 +# 66. update.at:27: update unchanged directories +at_setup_line='update.at:27' +at_desc="update unchanged directories" +at_desc_line=" 66: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "64. update.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "66. update.at:27: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/update.at:30: + { set +x +$as_echo "$at_srcdir/update.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -25658,7 +18015,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 @@ -25670,41 +18027,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:30" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -25725,35 +18049,24 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator directory/ directory/file1 directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/update.at:30: + { set +x +$as_echo "$at_srcdir/update.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25763,7 +18076,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 @@ -25775,41 +18088,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25830,35 +18110,24 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator directory/ directory/file1 directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/update.at:30: + { set +x +$as_echo "$at_srcdir/update.at:30: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -25868,7 +18137,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 @@ -25880,41 +18149,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:30" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -25935,35 +18171,24 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator directory/ directory/file1 directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/update.at:30: + { set +x +$as_echo "$at_srcdir/update.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -25973,7 +18198,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 @@ -25985,41 +18210,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:30" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26040,35 +18232,24 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator directory/ directory/file1 directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/update.at:30: + { set +x +$as_echo "$at_srcdir/update.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26078,7 +18259,7 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 @@ -26090,41 +18271,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26145,59 +18293,49 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator directory/ directory/file1 directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update.at:30" +$at_failed && at_fn_log_failure +$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. volume.at:23: volume - at_setup_line='volume.at:23' - at_desc="volume" - $at_quiet $ECHO_N " 65: volume $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_66 +#AT_START_67 +# 67. volume.at:23: volume +at_setup_line='volume.at:23' +at_desc="volume" +at_desc_line=" 67: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "65. volume.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "67. volume.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/volume.at:26: + { set +x +$as_echo "$at_srcdir/volume.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26222,15 +18360,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "volume.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26254,17 +18385,33 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: Volume \`label' does not match \`lab' +tar: Error is not recoverable: exiting now +----- +tar: Volume \`label' does not match \`bel' +tar: Error is not recoverable: exiting now +----- +tar: Volume \`label' does not match \`babel' +tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volume.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/volume.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * @@ -26276,108 +18423,16 @@ echo 1>&2 ----- tar xfV archive lab -test $? = 2 || exit 1 +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 +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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "volume.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26401,12 +18456,11 @@ echo 1>&2 ----- tar xfV archive babel test $? = 2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "----- +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- tar: Volume \`label' does not match \`lab' tar: Error is not recoverable: exiting now ----- @@ -26415,49 +18469,40 @@ ----- 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 +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volume.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } - 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. volsize.at:29: volume header size - at_setup_line='volsize.at:29' - at_desc="volume header size" - $at_quiet $ECHO_N " 66: volume header size $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_67 +#AT_START_68 +# 68. volsize.at:29: volume header size +at_setup_line='volsize.at:29' +at_desc="volume header size" +at_desc_line=" 68: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "66. volsize.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "68. volsize.at:29: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/volsize.at:32: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -26467,11 +18512,11 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +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 +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 @@ -26481,43 +18526,8 @@ 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 --utc -tvf $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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -26540,15 +18550,15 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Record size = 5 blocks tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -26557,24 +18567,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/volsize.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26584,11 +18584,11 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +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 +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 @@ -26598,43 +18598,8 @@ 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 --utc -tvf $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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26657,15 +18622,15 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Record size = 5 blocks tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -26674,24 +18639,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/volsize.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -26701,11 +18656,11 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +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 +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 @@ -26715,43 +18670,8 @@ 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 --utc -tvf $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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -26774,15 +18694,15 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Record size = 5 blocks tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -26791,24 +18711,14 @@ 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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/volsize.at:32: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26818,11 +18728,11 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +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 +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 @@ -26832,43 +18742,8 @@ 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 --utc -tvf $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 - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26891,15 +18766,15 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Record size = 5 blocks tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -26908,24 +18783,14 @@ 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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/volsize.at:32: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26935,11 +18800,11 @@ rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +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 +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 @@ -26949,15 +18814,8 @@ 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; +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26980,94 +18838,57 @@ 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 * +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Record size = 5 blocks +tar: Record size = 5 blocks +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing +abc/not-a-file.gif +abc/CCC +Verbose Listing +V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- +-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC +Extracted directory +abc +abc/CCC +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -test -z "`sort < /dev/null 2>&1`" || exit 77 -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 - -echo Short Listing -tar tf $TEST_DATA_DIR/abc.tar -echo Verbose Listing -tar --utc -tvf $TEST_DATA_DIR/abc.tar -echo Extracted directory -tar xf $TEST_DATA_DIR/abc.tar -find abc|sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks -tar: Record size = 5 blocks -" | $at_diff - "$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-08 22:07 abc/not-a-file.gif--Volume Header-- --rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC -Extracted directory -abc -abc/CCC -" | $at_diff - "$at_stdout" || at_failed=: -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"` - ;; - - 67 ) # 67. comprec.at:21: compressed format recognition - at_setup_line='comprec.at:21' - at_desc="compressed format recognition" - $at_quiet $ECHO_N " 67: compressed format recognition $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_68 +#AT_START_69 +# 69. comprec.at:21: compressed format recognition +at_setup_line='comprec.at:21' +at_desc="compressed format recognition" +at_desc_line=" 69: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "67. comprec.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "69. comprec.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/comprec.at:25: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27087,39 +18908,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27138,33 +18928,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/comprec.at:25: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27184,39 +18963,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27235,33 +18983,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/comprec.at:25: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27281,39 +19018,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27332,33 +19038,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/comprec.at:25: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27378,39 +19073,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27429,33 +19093,22 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/comprec.at:25: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27475,39 +19128,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27526,57 +19148,47 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25" +$at_failed && at_fn_log_failure +$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. shortfile.at:26: short input files - at_setup_line='shortfile.at:26' - at_desc="short input files" - $at_quiet $ECHO_N " 68: short input files $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_69 +#AT_START_70 +# 70. shortfile.at:26: short input files +at_setup_line='shortfile.at:26' +at_desc="short input files" +at_desc_line=" 70: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "68. shortfile.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "70. shortfile.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/shortfile.at:29: + { set +x +$as_echo "$at_srcdir/shortfile.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27588,31 +19200,8 @@ genfile --length 511 --file foo || exit 5 tar tf foo )" -echo shortfile.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 --length 511 --file foo || exit 5 -tar tf foo -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortfile.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27623,56 +19212,46 @@ genfile --length 511 --file foo || exit 5 tar tf foo -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "tar: This does not look like a tar archive +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 2) ;; - *) echo "$at_srcdir/shortfile.at:29: 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_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/shortfile.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. shortupd.at:29: updating short archives - at_setup_line='shortupd.at:29' - at_desc="updating short archives" - $at_quiet $ECHO_N " 69: updating short archives $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_70 +#AT_START_71 +# 71. shortupd.at:29: updating short archives +at_setup_line='shortupd.at:29' +at_desc="updating short archives" +at_desc_line=" 71: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "69. shortupd.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "71. shortupd.at:29: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/shortupd.at:32: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27684,31 +19263,8 @@ touch foo tar uf archive foo )" -echo shortupd.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 * - -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:32" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27719,30 +19275,18 @@ touch foo tar uf archive foo -) ) >"$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/shortupd.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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/shortupd.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27754,15 +19298,8 @@ touch foo tar uf archive foo )" -echo shortupd.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; +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:32" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27773,46 +19310,18 @@ touch foo tar uf archive 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 * - -touch foo -tar uf archive foo -) ) >"$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/shortupd.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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/shortupd.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27824,31 +19333,8 @@ touch foo tar uf archive foo )" -echo shortupd.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 * - -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:32" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27859,30 +19345,18 @@ touch foo tar uf archive foo -) ) >"$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/shortupd.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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/shortupd.at:32: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27894,31 +19368,8 @@ touch foo tar uf archive foo )" -echo shortupd.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 * - -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:32" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27929,30 +19380,18 @@ touch foo tar uf archive foo -) ) >"$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/shortupd.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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/shortupd.at:32: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27964,31 +19403,8 @@ touch foo tar uf archive foo )" -echo shortupd.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 * - -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:32" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27999,54 +19415,43 @@ touch foo tar uf archive foo -) ) >"$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/shortupd.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_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:32" +$at_failed && at_fn_log_failure +$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. truncate.at:29: truncate - at_setup_line='truncate.at:29' - at_desc="truncate" - $at_quiet $ECHO_N " 70: truncate $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_71 +#AT_START_72 +# 72. truncate.at:29: truncate +at_setup_line='truncate.at:29' +at_desc="truncate" +at_desc_line=" 72: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "70. truncate.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "72. truncate.at:29: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/truncate.at:32: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28063,36 +19468,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28108,38 +19485,28 @@ 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 +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/truncate.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28156,36 +19523,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28201,38 +19540,28 @@ 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 +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/truncate.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28249,36 +19578,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28294,38 +19595,28 @@ 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 +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/truncate.at:32: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28342,36 +19633,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28387,38 +19650,28 @@ 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 +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/truncate.at:32: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28435,36 +19688,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28480,62 +19705,53 @@ 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 +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } - $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. grow.at:24: grow - at_setup_line='grow.at:24' - at_desc="grow" - $at_quiet $ECHO_N " 71: grow $ECHO_C" - at_xfail=no + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_72 +#AT_START_73 +# 73. grow.at:24: grow +at_setup_line='grow.at:24' +at_desc="grow" +at_desc_line=" 73: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "71. grow.at:24: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "73. grow.at:24: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/grow.at:27: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28549,15 +19765,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28570,51 +19779,23 @@ 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 * +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -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: + { set +x +$as_echo "$at_srcdir/grow.at:27: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28628,15 +19809,8 @@ 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; +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28649,51 +19823,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -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 - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/grow.at:27: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28707,33 +19853,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28746,33 +19867,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/grow.at:27: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28786,33 +19897,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28825,33 +19911,23 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -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_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -$at_traceon - - $at_traceoff -echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/grow.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28865,33 +19941,8 @@ 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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28904,179 +19955,122 @@ 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 +) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } - 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"` - ;; - - 72 ) # 72. gtarfail.at:21: gtarfail - at_setup_line='gtarfail.at:21' - at_desc="gtarfail" - $at_quiet $ECHO_N " 72: gtarfail $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "72. gtarfail.at:21: testing ..." - $at_traceon + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_73 +#AT_START_74 +# 74. gtarfail.at:21: gtarfail +at_setup_line='gtarfail.at:21' +at_desc="gtarfail" +at_desc_line=" 74: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "74. gtarfail.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/gtarfail.at:26: +{ set +x +$as_echo "$at_srcdir/gtarfail.at:26: -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 +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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "gtarfail.at:26" +( $at_check_trace; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar - ) >"$at_stdout" 2>"$at_stderr" - 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 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone 518 2001-05-25 14:41 vedpowered.gif -rw-r--r-- jes/glone 6825 1997-04-29 00:19 cd.gif -rw-r--r-- jes/glone 33354 1999-06-22 12:17 DSCN0049c.JPG -rw-r--r-- jes/glone 86159 2001-06-05 18:16 Window1.jpg -rw-r--r-- jes/glone 1310 2001-05-25 13:05 vipower.gif -rw-rw-rw- jes/glone 148753 1998-09-15 13:08 billyboy.jpg -" | $at_diff - "$at_stdout" || at_failed=: -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"` - ;; - - 73 ) # 73. gtarfail2.at:21: gtarfail2 - at_setup_line='gtarfail2.at:21' - at_desc="gtarfail2" - $at_quiet $ECHO_N " 73: gtarfail2 $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "73. gtarfail2.at:21: testing ..." - $at_traceon +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/gtarfail.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_74 +#AT_START_75 +# 75. gtarfail2.at:21: gtarfail2 +at_setup_line='gtarfail2.at:21' +at_desc="gtarfail2" +at_desc_line=" 75: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "75. gtarfail2.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/gtarfail2.at:26: +{ set +x +$as_echo "$at_srcdir/gtarfail2.at:26: -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 +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; +at_fn_check_prepare_notrace 'an embedded newline' "gtarfail2.at:26" +( $at_check_trace; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar - ) >"$at_stdout" 2>"$at_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 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "-rwxr-xr-x jes/glone 214 2001-09-21 14:08 .clean lrwxrwxrwx jes/cats 0 1998-05-07 12:39 RULES -> makefiles/RULES drwxr-sr-x jes/glone 0 2001-12-10 00:00 build/ -rw-r--r-- jes/glone 312019 2001-12-10 00:00 build/smake-1.2.tar.gz @@ -29086,83 +20080,50 @@ -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"` - ;; - - 74 ) # 74. multi-fail.at:21: multi-fail - at_setup_line='multi-fail.at:21' - at_desc="multi-fail" - $at_quiet $ECHO_N " 74: multi-fail $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "74. multi-fail.at:21: testing ..." - $at_traceon +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/gtarfail2.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_75 +#AT_START_76 +# 76. multi-fail.at:21: multi-fail +at_setup_line='multi-fail.at:21' +at_desc="multi-fail" +at_desc_line=" 76: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "76. multi-fail.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/multi-fail.at:26: +{ set +x +$as_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-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 +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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multi-fail.at:26" +( $at_check_trace; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -29174,13 +20135,12 @@ 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/ +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs 0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/ -rw-r--r-- joerg/bs 1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull -rw-r--r-- joerg/bs 1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d -rw-r--r-- joerg/bs 1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d @@ -29232,79 +20192,48 @@ -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"` - ;; - - 75 ) # 75. 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 " 75: ustar-big-2g $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "75. ustar-big-2g.at:21: testing ..." - $at_traceon +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multi-fail.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_76 +#AT_START_77 +# 77. ustar-big-2g.at:21: ustar-big-2g +at_setup_line='ustar-big-2g.at:21' +at_desc="ustar-big-2g" +at_desc_line=" 77: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "77. ustar-big-2g.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/ustar-big-2g.at:26: +{ set +x +$as_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 +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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-2g.at:26" +( $at_check_trace; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29314,29 +20243,18 @@ tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2 - ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big +echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big -rw-r--r-- jes/glone 0 2002-06-15 14:53 file -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } @@ -29352,62 +20270,41 @@ done - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 76 ) # 76. 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 " 76: ustar-big-8g $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "76. ustar-big-8g.at:21: testing ..." - $at_traceon + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_77 +#AT_START_78 +# 78. ustar-big-8g.at:21: ustar-big-8g +at_setup_line='ustar-big-8g.at:21' +at_desc="ustar-big-8g" +at_desc_line=" 78: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "78. ustar-big-8g.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/ustar-big-8g.at:26: +{ set +x +$as_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 +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 - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-8g.at:26" +( $at_check_trace; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29417,29 +20314,18 @@ tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2 - ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1 +echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1 -rw-r--r-- jes/glone 0 2002-06-15 14:53 file -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } @@ -29455,47 +20341,41 @@ done - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 77 ) # 77. 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 " 77: pax-big-10g $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "77. pax-big-10g.at:21: testing ..." - $at_traceon + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_78 +#AT_START_79 +# 79. pax-big-10g.at:21: pax-big-10g +at_setup_line='pax-big-10g.at:21' +at_desc="pax-big-10g" +at_desc_line=" 79: $at_desc " +$at_quiet $as_echo_n "$at_desc_line" +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "79. pax-big-10g.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/pax-big-10g.at:26: +{ set +x +$as_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 +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; +at_fn_check_prepare_notrace 'an embedded newline' "pax-big-10g.at:26" +( $at_check_trace; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29505,44 +20385,18 @@ 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 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g +echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g -rw-r--r-- jes/glone 0 2002-06-15 14:53 file -" | $at_diff - "$at_stdout" || at_failed=: -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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } @@ -29558,315 +20412,8 @@ 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 . -_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: " - echo " Subject: [GNU tar 1.22] $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 - - - + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_79