X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tests%2Ftestsuite;h=4c0d7bec0a863789e50b3266a8ecc587953bf93d;hb=HEAD;hp=d6c964784082e69073e78feb3b2f1ed6836d8a0c;hpb=dda6367c9eac71da8f2ab1c60b3df60f19ce4755;p=debian%2Ftar diff --git a/tests/testsuite b/tests/testsuite index d6c96478..4c0d7bec 100755 --- a/tests/testsuite +++ b/tests/testsuite @@ -1,17 +1,17 @@ #! /bin/sh -# Generated from testsuite.at by GNU Autoconf 2.63. +# Generated from testsuite.at by GNU Autoconf 2.69. +# +# Copyright (C) 2009-2012 Free Software Foundation, Inc. # -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# 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=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -19,23 +19,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 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 - as_nl=' ' export as_nl @@ -43,7 +35,13 @@ export as_nl 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 -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# 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 @@ -54,7 +52,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -77,13 +75,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -93,15 +84,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -113,12 +105,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# 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='> ' @@ -130,330 +126,319 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# 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 || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - # 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 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - 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=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_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=: - # 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 ;; + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - fi +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 - done +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset - 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 +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit - 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 +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -fi -fi +} # as_fn_mkdir_p +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(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 STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -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 bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - +# 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/= @@ -470,10 +455,12 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { { $as_echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -$as_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; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -482,29 +469,18 @@ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" 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 @@ -519,49 +495,29 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -591,6 +547,11 @@ at_errexit_p=false # Shall we be verbose? ':' means no, empty means yes. at_verbose=: at_quiet= +# Running several jobs in parallel, 0 means as many as test groups. +at_jobs=1 +at_traceon=: +at_trace_echo=: +at_check_filter_trace=: # Shall we keep the debug scripts? Must be `:' when the suite is # run by a debug script, so that the script doesn't remove itself. @@ -605,6 +566,8 @@ at_list_p=false at_clean=false # Test groups to run at_groups= +# Whether to rerun failed tests. +at_recheck= # Whether a write failure occurred at_write_fail=0 @@ -618,151 +581,239 @@ esac # Whether -C is in effect. at_change_dir=false +# Whether to enable colored test results. +at_color=no # List of the tested programs. at_tested='tar' -# 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118' # As many question marks as there are digits in the last test group number. # Used to normalize the test group numbers so that `ls' lists them in # numerical order. at_format='???' # Description of all the test groups. -at_help_all="1;version.at:19;tar version;; -2;pipe.at:30;decompressing from stdin;pipe; -3;options.at:24;mixing options;options options00; -4;options02.at:26;interspersed options;options options02; -5;T-empty.at:26;files-from: empty entries;files-from empty; -6;T-null.at:21;files-from: 0-separated file without -0;files-from null 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; -11;append02.at:54;append vs. create;append append02 append-gnu; -12;append03.at:19;append with name transformation;append append03; -13;xform-h.at:30;transforming hard links on create;transform xform xform-h; -14;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume; -15;exclude.at:23;exclude;exclude; -16;exclude01.at:17;exclude wildcards;exclude exclude01; -17;exclude02.at:17;exclude: anchoring;exclude exclude02; -18;exclude03.at:17;exclude: wildcards match slash;exclude exclude03; -19;exclude04.at:17;exclude: case insensitive;exclude exclude04; -20;exclude05.at:19;exclude: lots of excludes;exclude exclude05; -21;exclude06.at:24;exclude: long files in pax archives;exclude exclude06; -22;delete01.at:23;deleting a member after a big one;delete delete01; -23;delete02.at:23;deleting a member from stdin archive;delete delete02; -24;delete03.at:21;deleting members with long names;delete delete03; -25;delete04.at:23;deleting a large last member;delete delete04; -26;delete05.at:27;deleting non-existing member;delete delete05; -27;extrac01.at:23;extract over an existing directory;extract extract01; -28;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink; -29;extrac03.at:23;extraction loops;extract extract03; -30;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch; -31;extrac05.at:30;extracting selected members from pax;extract extract05; -32;extrac06.at:33;mode of extracted directories;extract extract06 directory mode; -33;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink; -34;extrac08.at:33;restoring mode on existing directory;extract extrac08; -35;extrac09.at:22;no need to save dir with unreadable . and ..;extract extrac09; -36;extrac10.at:27;-C and delayed setting of metadata;extract extrac10; -37;extrac11.at:23;scarce file descriptors;extract extrac11; -38;extrac12.at:23;extract dot permissions;extract extrac12; -39;extrac13.at:24;extract over symlinks;extract extrac13; -40;extrac14.at:23;extract -C symlink;extract extrac14; -41;extrac15.at:23;extract parent mkdir failure;extract extrac15; -42;extrac16.at:24;extract empty directory with -C;extract extrac16; -43;extrac17.at:19;name matching/transformation ordering;extract extrac17; -44;label01.at:19;single-volume label;label label01; -45;label02.at:19;multi-volume label;label label02 multi-label multivolume multiv; -46;label03.at:25;test-label option;label label03 test-label; -47;label04.at:25;label with non-create option;label label04; -48;label05.at:22;label with non-create option;label label05; -49;backup01.at:33;extracting existing dir with --backup;extract backup backup01; -50;gzip.at:23;gzip;gzip; -51;incremental.at:23;incremental;incremental incr00; -52;incr01.at:27;restore broken symlinks from incremental;incremental incr01; -53;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02; -54;listed01.at:26;--listed for individual files;listed incremental listed01; -55;listed02.at:28;working --listed;listed incremental listed02; -56;listed03.at:22;incremental dump when the parent directory is unreadable;listed incremental listed03; -57;incr03.at:28;renamed files in incrementals;incremental incr03 rename; -58;incr04.at:29;proper icontents initialization;incremental incr04 icontents; -59;incr05.at:19;incremental dumps with -C;incremental incr05; -60;incr06.at:19;incremental dumps of nested directories;incremental incr06; -61;filerem01.at:34;file removed as we read it (ca. 22 seconds);create incremental filechange filerem filerem01; -62;filerem02.at:24;toplevel file removed (ca. 24 seconds);create incremental filechange filerem filerem02; -63;rename01.at:24;renamed dirs in incrementals;incremental rename rename01; -64;rename02.at:24;move between hierarchies;incremental rename rename02; -65;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename; -66;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename; -67;rename05.at:24;renamed subdirectories;incremental rename05 rename; -68;chtype.at:27;changed file types in incrementals;incremental chtype; -69;ignfail.at:23;ignfail;ignfail; -70;link01.at:33;link count gt 2;hardlinks link01; -71;link02.at:32;preserve hard links with --remove-files;hardlinks link02; -72;link03.at:24;working -l with --remove-files;hardlinks link03; -73;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04; -74;longv7.at:24;long names in V7 archives;longname longv7; -75;long01.at:28;long file names divisible by block size;longname long512; -76;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01; -77;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02; -78;lustar03.at:21;ustar: splitting long names;longname ustar lustar03; -79;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01; -80;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02; -81;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03; -82;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental multiv04; -83;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync; -84;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06; -85;multiv07.at:26;volumes split at an extended header;multivolume multiv multiv07 xsplit; -86;multiv08.at:23;multivolume header creation;multivolume multiv multiv08; -87;old.at:23;old archives;old; -88;recurse.at:21;recurse;recurse; -89;same-order01.at:26;working -C with --same-order;same-order same-order01; -90;same-order02.at:25;multiple -C options;same-order same-order02; -91;shortrec.at:25;short records;shortrec; -92;sparse01.at:21;sparse files;sparse sparse01; -93;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02; -94;sparse03.at:21;storing sparse files > 8G;sparse sparse03; -95;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv; -96;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00; -97;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01; -98;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10; -99;update.at:28;update unchanged directories;update update00; -100;update01.at:29;update directories;update update01; -101;update02.at:26;update changed files;update update02; -102;volume.at:23;volume;volume volcheck; -103;volsize.at:29;volume header size;volume volsize; -104;comprec.at:21;compressed format recognition;comprec; -105;shortfile.at:26;short input files;shortfile shortfile0; -106;shortupd.at:29;updating short archives;shortfile shortfile1 shortupd; -107;truncate.at:29;truncate;truncate filechange; -108;grow.at:24;grow;grow filechange; -109;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip; -110;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip; -111;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03; -112;sigpipe.at:19;sigpipe handling;sigpipe; -113;gtarfail.at:21;gtarfail;star gtarfail; -114;gtarfail2.at:21;gtarfail2;star gtarfail2; -115;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail; -116;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g; -117;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g; -118;pax-big-10g.at:21;pax-big-10g;star pax-big-10g; +at_help_all="1;version.at:20;tar version;; +2;pipe.at:29;decompressing from stdin;pipe; +3;options.at:25;mixing options;options options00; +4;options02.at:27;interspersed options;options options02; +5;opcomp01.at:21;occurrence compatibility;opcomp opcomp01; +6;opcomp02.at:21;occurrence compatibility;opcomp opcomp02; +7;opcomp03.at:21;--verify compatibility;opcomp opcomp03; +8;opcomp04.at:21;compress option compatibility;opcomp opcomp04; +9;opcomp05.at:21;--pax-option compatibility;opcomp opcomp05; +10;opcomp06.at:21;--pax-option compatibility;opcomp opcomp06; +11;T-mult.at:21;multiple file lists;files-from t-mult; +12;T-nest.at:21;nested file lists;files-from t-nest; +13;T-rec.at:21;recursive file lists;files-from t-rec; +14;T-recurse.at:27;files-from & recurse: toggle;recurse t-recurse files-from; +15;T-recurse.at:66;toggle --recursion (not) from -T;recurse t-recurse t-recurse2 files-from; +16;T-cd.at:21;-C in file lists;files-from t-cd; +17;T-empty.at:26;empty entries;files-from empty-line; +18;T-null.at:21;0-separated file without -0;files-from null t-null; +19;T-null2.at:17;--null enables verbatim reading;files-from null t-null2 t-verbatim; +20;T-zfile.at:26;empty file;files-from empty-file; +21;T-nonl.at:27;entries with missing newlines;files-from nonewline nonl t-nonl; +22;T-dir00.at:28;recursive extraction from --files-from;files-from extract t-dir t-dir00; +23;T-dir01.at:28;trailing slash in --files-from;files-from extract t-dir t-dir01; +24;indexfile.at:26;tar --index-file=FILE --file=-;stdout indexfile; +25;verbose.at:26;tar cvf -;stdout verbose; +26;gzip.at:24;gzip;gzip; +27;recurse.at:21;recurse;recurse; +28;recurs02.at:30;recurse: toggle;recurse options recurse02; +29;shortrec.at:26;short records;shortrec; +30;numeric.at:18;--numeric-owner basic tests;options numeric numeric-owner; +31;same-order01.at:27;working -C with --same-order;same-order same-order01; +32;same-order02.at:26;multiple -C options;same-order same-order02; +33;append.at:22;append;append append00; +34;append01.at:29;appending files with long names;append append01; +35;append02.at:55;append vs. create;append append02 append-gnu; +36;append03.at:21;append with name transformation;append append03; +37;append04.at:29;append with verify;append append04 verify append-verify; +38;append05.at:32;append after changed blocking;append append05 blocking; +39;xform-h.at:30;transforming hard links on create;transform xform xform-h; +40;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume; +41;xform02.at:21;transforming escaped delimiters on create;transform xform delimiter; +42;exclude.at:23;exclude;exclude; +43;exclude01.at:19;exclude wildcards;exclude exclude01; +44;exclude02.at:19;exclude: anchoring;exclude exclude02; +45;exclude03.at:19;exclude: wildcards match slash;exclude exclude03; +46;exclude04.at:19;exclude: case insensitive;exclude exclude04; +47;exclude05.at:21;exclude: lots of excludes;exclude exclude05; +48;exclude06.at:26;exclude: long files in pax archives;exclude exclude06; +49;exclude07.at:19;exclude: --exclude-backups option;exclude exclude07; +50;exclude08.at:36;--exclude-tag option;exclude exclude-tag exclude08; +51;exclude09.at:37;--exclude-tag option and --listed-incremental;exclude exclude-tag listed incremental exclude09; +52;exclude10.at:38;--exclude-tag option in incremental pass;exclude exclude-tag listed incremental exclude10; +53;exclude11.at:36;--exclude-tag-under option;exclude exclude-tag exclude-tag-under exclude11; +54;exclude12.at:37;--exclude-tag-under and --listed-incremental;exclude exclude-tag exclude-tag-under listed incremental exclude12; +55;exclude13.at:39;--exclude-tag-under option in incremental pass;exclude exclude-tag exclude-tag-under listed incremental exclude13; +56;exclude14.at:36;--exclude-tag-all option;exclude exclude-tag exclude-tag-all exclude14; +57;exclude15.at:36;--exclude-tag-all and --listed-incremental;exclude exclude-tag exclude-tag-all listed incremental exclude15; +58;exclude16.at:38;--exclude-tag-all option in incremental pass;exclude exclude-tag exclude-tag-all listed incremental exclude16; +59;delete01.at:24;deleting a member after a big one;delete delete01; +60;delete02.at:24;deleting a member from stdin archive;delete delete02; +61;delete03.at:21;deleting members with long names;delete delete03; +62;delete04.at:24;deleting a large last member;delete delete04; +63;delete05.at:28;deleting non-existing member;delete delete05; +64;extrac01.at:24;extract over an existing directory;extract extract01; +65;extrac02.at:24;extracting symlinks over an existing file;extract extract02 symlink; +66;extrac03.at:23;extraction loops;extract extract03; +67;extrac04.at:24;extract + fnmatch;extract extract04 fnmatch; +68;extrac05.at:31;extracting selected members from pax;extract extract05; +69;extrac06.at:34;mode of extracted directories;extract extract06 directory mode; +70;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink; +71;extrac08.at:33;restoring mode on existing directory;extract extrac08; +72;extrac09.at:34;extracting even when . and .. are unreadable;extract extrac09; +73;extrac10.at:29;-C and delayed setting of metadata;extract extrac10; +74;extrac11.at:25;scarce file descriptors;extract extrac11; +75;extrac12.at:25;extract dot permissions;extract extrac12; +76;extrac13.at:26;extract over symlinks;extract extrac13; +77;extrac14.at:25;extract -C symlink;extract extrac14; +78;extrac15.at:25;extract parent mkdir failure;extract extrac15; +79;extrac16.at:26;extract empty directory with -C;extract extrac16; +80;extrac17.at:21;name matching/transformation ordering;extract extrac17; +81;extrac18.at:34;keep-old-files;extract extrac18 old-files keep-old-files; +82;extrac19.at:21;skip-old-files;extract extrac19 old-files skip-old-files; +83;backup01.at:33;extracting existing dir with --backup;extract backup backup01; +84;label01.at:21;single-volume label;label label01; +85;label02.at:21;multi-volume label;label label02 multi-label multivolume multiv; +86;label03.at:27;test-label option;label label03 test-label; +87;label04.at:27;label with non-create option;label label04; +88;label05.at:24;label with non-create option;label label05; +89;incremental.at:23;incremental;incremental listed incr00; +90;incr01.at:27;restore broken symlinks from incremental;incremental incr01; +91;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02; +92;listed01.at:27;--listed for individual files;listed incremental listed01; +93;listed02.at:29;working --listed;listed incremental listed02; +94;listed03.at:24;incremental dump when the parent directory is unreadable;listed incremental listed03; +95;listed04.at:26;--listed-incremental and --one-file-system;listed incremental listed04; +96;listed05.at:33;--listed-incremental and remounted directories;listed incremental listed05; +97;incr03.at:29;renamed files in incrementals;incremental incr03 rename; +98;incr04.at:30;proper icontents initialization;incremental incr04 icontents; +99;incr05.at:21;incremental dumps with -C;incremental incr05; +100;incr06.at:21;incremental dumps of nested directories;incremental incr06; +101;incr07.at:18;incremental restores with -C;incremental extract incr07; +102;incr08.at:38;filename normalization;incremental create incr08; +103;incr09.at:26;incremental with alternating -C;incremental create incr09; +104;incr10.at:18;concatenated incremental archives (deletes);incremental concat cat incr10; +105;incr11.at:25;concatenated incremental archives (renames);incremental concat cat incr11; +106;filerem01.at:36;file removed as we read it (ca. 22 seconds);create incremental listed filechange filerem filerem01; +107;filerem02.at:26;toplevel file removed (ca. 24 seconds);create incremental listed filechange filerem filerem02; +108;rename01.at:25;renamed dirs in incrementals;incremental rename rename01; +109;rename02.at:25;move between hierarchies;incremental rename rename02; +110;rename03.at:24;cyclic renames;incremental rename rename03 cyclic-rename; +111;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename; +112;rename05.at:24;renamed subdirectories;incremental rename05 rename; +113;chtype.at:27;changed file types in incrementals;incremental listed chtype; +114;ignfail.at:24;ignfail;ignfail; +115;link01.at:34;link count gt 2;hardlinks link01; +116;link02.at:32;preserve hard links with --remove-files;hardlinks link02; +117;link03.at:24;working -l with --remove-files;hardlinks link03; +118;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04; +119;longv7.at:25;long names in V7 archives;longname longv7; +120;long01.at:28;long file names divisible by block size;longname long512; +121;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01; +122;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02; +123;lustar03.at:21;ustar: splitting long names;longname ustar lustar03; +124;old.at:23;old archives;old; +125;time01.at:20;time: tricky time stamps;time time01; +126;time02.at:20;time: clamping mtime;time time02; +127;multiv01.at:24;multivolume dumps from pipes;multivolume multiv multiv01; +128;multiv02.at:29;skipping a straddling member;multivolume multiv multiv02; +129;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03; +130;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental listed multiv04; +131;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync; +132;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06; +133;multiv07.at:28;volumes split at an extended header;multivolume multiv multiv07 xsplit; +134;multiv08.at:25;multivolume header creation;multivolume multiv multiv08; +135;multiv09.at:26;bad next volume;multivolume multiv multiv09; +136;owner.at:21;--owner and --group;owner; +137;map.at:21;--owner-map and --group-map;owner map; +138;sparse01.at:22;sparse files;sparse sparse01; +139;sparse02.at:22;extracting sparse file over a pipe;sparse sparse02; +140;sparse03.at:21;storing sparse files > 8G;sparse sparse03; +141;sparse04.at:21;storing long sparse file names;sparse sparse04; +142;sparse05.at:21;listing sparse files bigger than 2^33 B;sparse sparse05; +143;sparse06.at:21;storing sparse file using seek method;sparse sparse06; +144;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv; +145;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00; +146;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01; +147;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10; +148;update.at:28;update unchanged directories;update update00; +149;update01.at:29;update directories;update update01; +150;update02.at:26;update changed files;update update02; +151;verify.at:25;verify;verify; +152;volume.at:24;volume;volume volcheck; +153;volsize.at:29;volume header size;volume volsize; +154;comprec.at:22;compressed format recognition;comprec; +155;shortfile.at:26;short input files;shortfile shortfile0; +156;shortupd.at:31;updating short archives;shortfile shortfile1 shortupd; +157;truncate.at:29;truncate;truncate filechange; +158;grow.at:24;grow;grow filechange; +159;sigpipe.at:21;sigpipe handling;sigpipe; +160;comperr.at:18;compressor program failure;compress comperr; +161;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip; +162;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip; +163;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03; +164;remfiles04a.at:25;remove-files with -C:rel in -c/non-incr. mode;create remove-files remfiles04 remfiles04a; +165;remfiles04b.at:33;remove-files with -C:rel in -c/incr. mode;create incremental remove-files remfiles04 remfiles04b; +166;remfiles04c.at:33;remove-files with -C:rel in -r mode;create append remove-files remfiles04 remfiles04c; +167;remfiles05a.at:34;remove-files with -C:rel,rel in -c/non-incr. mode;create remove-files remfiles05 remfiles05a; +168;remfiles05b.at:25;remove-files with -C:rel,rel in -c/incr. mode;create incremental remove-files remfiles05 remfiles05b; +169;remfiles05c.at:25;remove-files with -C:rel,rel in -r mode;create append remove-files remfiles05 remfiles05c; +170;remfiles06a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles06 remfiles06a; +171;remfiles06b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles06 remfiles06b; +172;remfiles06c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles06 remfiles06c; +173;remfiles07a.at:25;remove-files with -C:abs,rel in -c/non-incr. mode;create remove-files remfiles07 remfiles07a; +174;remfiles07b.at:25;remove-files with -C:abs,rel in -c/incr. mode;create incremental remove-files remfiles07 remfiles07b; +175;remfiles07c.at:25;remove-files with -C:abs,rel in -r mode;create append remove-files remfiles07 remfiles07c; +176;remfiles08a.at:28;remove-files deleting two subdirs in -c/non-incr. mode;create remove-files remfiles08 remfiles08a; +177;remfiles08b.at:31;remove-files deleting two subdirs in -c/incr. mode;create incremental remove-files remfiles08 remfiles08b; +178;remfiles08c.at:28;remove-files deleting two subdirs in -r mode;create append remove-files remfiles08 remfiles08c; +179;remfiles09a.at:25;remove-files on full directory in -c/non-incr. mode;create remove-files remfiles09 remfiles09a; +180;remfiles09b.at:29;remove-files on full directory in -c/incr. mode;create incremental remove-files remfiles09 remfiles09b; +181;remfiles09c.at:25;remove-files on full directory in -r mode;create append remove-files remfiles09 remfiles09c; +182;remfiles10.at:20;remove-files;create remove-files remfiles10; +183;xattr01.at:25;xattrs: basic functionality;xattrs xattr01; +184;xattr02.at:25;xattrs: change directory with -C option;xattrs xattr02; +185;xattr03.at:25;xattrs: trusted.* attributes;xattrs xattr03; +186;xattr04.at:26;xattrs: s/open/openat/ regression;xattrs xattr04; +187;xattr05.at:28;xattrs: keywords with '=' and '%';xattrs xattr05; +188;acls01.at:25;acls: basic functionality;xattrs acls acls01; +189;acls02.at:25;acls: work with -C;xattrs acls acls02; +190;acls03.at:30;acls: default ACLs;xattrs acls acls03; +191;selnx01.at:25;selinux: basic store/restore;xattrs selinux selnx01; +192;selacl01.at:25;acls/selinux: special files & fifos;xattrs selinux acls selacls01; +193;capabs_raw01.at:25;capabilities: binary store/restore;xattrs capabilities capabs_raw01; +194;onetop01.at:21;tar --one-top-level;extract onetop onetop01; +195;onetop02.at:21;tar --one-top-level --show-transformed;extract onetop onetop02; +196;onetop03.at:21;tar --one-top-level --transform;extract onetop onetop03; +197;onetop04.at:21;tar --one-top-level --transform;extract onetop onetop04; +198;onetop05.at:21;tar --one-top-level restoring permissions;extract onetop onetop05; +199;gtarfail.at:22;gtarfail;star gtarfail; +200;gtarfail2.at:22;gtarfail2;star gtarfail2; +201;multi-fail.at:22;multi-fail;star multivolume multiv multi-fail; +202;ustar-big-2g.at:22;ustar-big-2g;star ustar-big-2g; +203;ustar-big-8g.at:22;ustar-big-8g;star ustar-big-8g; +204;pax-big-10g.at:22;pax-big-10g;star pax-big-10g; " +# List of the all the test groups. +at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'` -# at_func_validate_ranges [NAME...] -# --------------------------------- -# Validate and normalize the test group number contained in each -# variable NAME. Leading zeroes are treated as decimal. -at_func_validate_ranges () +# at_fn_validate_ranges NAME... +# ----------------------------- +# Validate and normalize the test group number contained in each variable +# NAME. Leading zeroes are treated as decimal. +at_fn_validate_ranges () { for at_grp do eval at_value=\$$at_grp - if test $at_value -lt 1 || test $at_value -gt 118; then + if test $at_value -lt 1 || test $at_value -gt 204; then $as_echo "invalid test group: $at_value" >&2 exit 1 fi case $at_value in 0*) # We want to treat leading 0 as decimal, like expr and test, but - # at_func_arith treats it as octal if it uses $(( )). + # 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. @@ -781,8 +832,8 @@ do fi case $at_option in - *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;; - *) at_optarg= ;; + *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;; + *) at_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -804,6 +855,19 @@ do at_clean=: ;; + --color ) + at_color=always + ;; + --color=* ) + case $at_optarg in + no | never | none) at_color=never ;; + auto | tty | if-tty) at_color=auto ;; + always | yes | force) at_color=always ;; + *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'` + as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;; + esac + ;; + --debug | -d ) at_debug_p=: ;; @@ -818,29 +882,31 @@ do ;; --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_func_validate_ranges at_option - at_groups="$at_groups$at_option " + at_fn_validate_ranges at_option + as_fn_append at_groups "$at_option$as_nl" ;; # Ranges [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) at_range_start=`echo $at_option |tr -d X-` - at_func_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 " + at_fn_validate_ranges at_range_start + at_range=`$as_echo "$at_groups_all" | \ + sed -ne '/^'$at_range_start'$/,$p'` + as_fn_append at_groups "$at_range$as_nl" ;; -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) at_range_end=`echo $at_option |tr -d X-` - at_func_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 " + at_fn_validate_ranges at_range_end + at_range=`$as_echo "$at_groups_all" | \ + sed -ne '1,/^'$at_range_end'$/p'` + as_fn_append at_groups "$at_range$as_nl" ;; [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ @@ -856,11 +922,10 @@ do at_range_end=$at_range_start at_range_start=$at_tmp fi - at_func_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 " + at_fn_validate_ranges at_range_start at_range_end + at_range=`$as_echo "$at_groups_all" | \ + sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'` + as_fn_append at_groups "$at_range$as_nl" ;; # Directory selection. @@ -870,6 +935,25 @@ do --directory=* ) at_change_dir=: at_dir=$at_optarg + if test x- = "x$at_dir" ; then + at_dir=./- + fi + ;; + + # Parallel execution. + --jobs | -j ) + at_jobs=0 + ;; + --jobs=* | -j[0-9]* ) + if test -n "$at_optarg"; then + at_jobs=$at_optarg + else + at_jobs=`expr X$at_option : 'X-j\(.*\)'` + fi + case $at_jobs in *[!0-9]*) + at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` + as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;; + esac ;; # Keywords. @@ -896,11 +980,12 @@ do at_groups_selected=`$as_echo "$at_groups_selected" | grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` done - # Smash the newlines. - at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//' | - tr "$as_nl" ' ' - ` - at_groups="$at_groups$at_groups_selected " + # Smash the keywords. + at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'` + as_fn_append at_groups "$at_groups_selected$as_nl" + ;; + --recheck) + at_recheck=: ;; *=*) @@ -908,14 +993,12 @@ do # Reject names that are not valid shell variable names. case $at_envvar in '' | [0-9]* | *[!_$as_cr_alnum]* ) - { { $as_echo "$as_me:$LINENO: error: invalid variable name: $at_envvar" >&5 -$as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;} - { (exit 1); exit 1; }; } ;; + 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 - at_debug_args="$at_debug_args $at_envvar='$at_value'" + as_fn_append at_debug_args " $at_envvar='$at_value'" ;; *) $as_echo "$as_me: invalid option: $at_option" >&2 @@ -926,19 +1009,42 @@ $as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;} done # Verify our last option didn't require an argument -if test -n "$at_prev"; then - { { $as_echo "$as_me:$LINENO: error: \`$at_prev' requires an argument." >&5 -$as_echo "$as_me: error: \`$at_prev' requires an argument." >&2;} - { (exit 1); exit 1; }; } +if test -n "$at_prev"; then : + as_fn_error $? "\`$at_prev' requires an argument" fi +# The file containing the suite. +at_suite_log=$at_dir/$as_me.log # Selected test groups. -if test -z "$at_groups"; then +if test -z "$at_groups$at_recheck"; then at_groups=$at_groups_all else + if test -n "$at_recheck" && test -r "$at_suite_log"; then + at_oldfails=`sed -n ' + /^Failed tests:$/,/^Skipped tests:$/{ + s/^[ ]*\([1-9][0-9]*\):.*/\1/p + } + /^Unexpected passes:$/,/^## Detailed failed tests/{ + s/^[ ]*\([1-9][0-9]*\):.*/\1/p + } + /^## Detailed failed tests/q + ' "$at_suite_log"` + as_fn_append at_groups "$at_oldfails$as_nl" + fi # Sort the tests, removing duplicates. - at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu` + at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'` +fi + +if test x"$at_color" = xalways \ + || { test x"$at_color" = xauto && test -t 1; }; then + at_red=`printf '\033[0;31m'` + at_grn=`printf '\033[0;32m'` + at_lgn=`printf '\033[1;32m'` + at_blu=`printf '\033[1;34m'` + at_std=`printf '\033[m'` +else + at_red= at_grn= at_lgn= at_blu= at_std= fi # Help message. @@ -949,16 +1055,17 @@ 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 || at_write_fail=1 @@ -973,9 +1080,14 @@ cat <<_ATEOF || at_write_fail=1 Execution tuning: -C, --directory=DIR change to directory DIR before starting + --color[=never|auto|always] + enable colored test results on terminal, or always + -j, --jobs[=N] + Allow N jobs at once; infinite jobs with no arg (default 1) -k, --keywords=KEYWORDS select the tests matching all the comma-separated KEYWORDS multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD + --recheck select all tests that failed or passed unexpectedly last time -e, --errexit abort as soon as a test fails; implies --debug -v, --verbose force more detailed output default for debugging scripts @@ -986,6 +1098,7 @@ _ATEOF cat <<_ATEOF || at_write_fail=1 Report bugs to . +General help using GNU software: . _ATEOF exit $at_write_fail fi @@ -993,64 +1106,150 @@ fi # List of tests. if $at_list_p; then cat <<_ATEOF || at_write_fail=1 -GNU tar 1.25 test suite test groups: +GNU tar 1.29 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS _ATEOF - # Passing at_groups is tricky. We cannot use it to form a literal string - # or regexp because of the limitation of AIX awk. And Solaris' awk - # doesn't grok more than 99 fields in a record, so we have to use `split'. - # 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 + # Pass an empty line as separator between selected groups and help. + $as_echo "$at_groups$as_nl$as_nl$at_help_all" | + awk 'NF == 1 && FS != ";" { + selected[$ 1] = 1 next } - { + /^$/ { FS = ";" } + NF > 0 { if (selected[$ 1]) { printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 - if ($ 4) 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 + } } }' || at_write_fail=1 exit $at_write_fail fi if $at_version_p; then - $as_echo "$as_me (GNU tar 1.25)" && - cat <<\_ACEOF || at_write_fail=1 + $as_echo "$as_me (GNU tar 1.29)" && + cat <<\_ATEOF || at_write_fail=1 -Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This test suite is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -_ACEOF +_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=: ;; +# Should we print banners? Yes if more than one test is run. +case $at_groups in #( + *$as_nl* ) + at_print_banners=: ;; #( * ) at_print_banners=false ;; esac -# Text for banner N, set to empty once printed. +# Text for banner N, set to a single space once printed. +# Banner 1. testsuite.at:208 +# Category starts at test group 5. +at_banner_text_1="Option compatibility" +# Banner 2. testsuite.at:216 +# Category starts at test group 11. +at_banner_text_2="The -T option" +# Banner 3. testsuite.at:230 +# Category starts at test group 24. +at_banner_text_3="Various options" +# Banner 4. testsuite.at:239 +# Category starts at test group 31. +at_banner_text_4="The --same-order option" +# Banner 5. testsuite.at:243 +# Category starts at test group 33. +at_banner_text_5="Append" +# Banner 6. testsuite.at:251 +# Category starts at test group 39. +at_banner_text_6="Transforms" +# Banner 7. testsuite.at:256 +# Category starts at test group 42. +at_banner_text_7="Exclude" +# Banner 8. testsuite.at:275 +# Category starts at test group 59. +at_banner_text_8="Deletions" +# Banner 9. testsuite.at:282 +# Category starts at test group 64. +at_banner_text_9="Extracting" +# Banner 10. testsuite.at:304 +# Category starts at test group 84. +at_banner_text_10="Volume label operations" +# Banner 11. testsuite.at:311 +# Category starts at test group 89. +at_banner_text_11="Incremental archives" +# Banner 12. testsuite.at:330 +# Category starts at test group 106. +at_banner_text_12="Files removed while archiving" +# Banner 13. testsuite.at:334 +# Category starts at test group 108. +at_banner_text_13="Renames" +# Banner 14. testsuite.at:342 +# Category starts at test group 114. +at_banner_text_14="Ignore failing reads" +# Banner 15. testsuite.at:345 +# Category starts at test group 115. +at_banner_text_15="Link handling" +# Banner 16. testsuite.at:351 +# Category starts at test group 119. +at_banner_text_16="Specific archive formats" +# Banner 17. testsuite.at:362 +# Category starts at test group 127. +at_banner_text_17="Multivolume archives" +# Banner 18. testsuite.at:373 +# Category starts at test group 136. +at_banner_text_18="Owner and Groups" +# Banner 19. testsuite.at:377 +# Category starts at test group 138. +at_banner_text_19="Sparse files" +# Banner 20. testsuite.at:389 +# Category starts at test group 148. +at_banner_text_20="Updates" +# Banner 21. testsuite.at:394 +# Category starts at test group 151. +at_banner_text_21="Verifying the archive" +# Banner 22. testsuite.at:397 +# Category starts at test group 152. +at_banner_text_22="Volume operations" +# Banner 23. testsuite.at:401 +# Category starts at test group 154. +at_banner_text_23="" +# Banner 24. testsuite.at:411 +# Category starts at test group 161. +at_banner_text_24="Removing files after archiving" +# Banner 25. testsuite.at:435 +# Category starts at test group 183. +at_banner_text_25="Extended attributes" +# Banner 26. testsuite.at:451 +# Category starts at test group 194. +at_banner_text_26="One top level" +# Banner 27. testsuite.at:458 +# Category starts at test group 199. +at_banner_text_27="Star tests" # Take any -C into account. if $at_change_dir ; then - if test x- = "x$at_dir" ; then - at_dir=./- - fi test x != "x$at_dir" && cd "$at_dir" \ - || { { $as_echo "$as_me:$LINENO: error: unable to change directory" >&5 -$as_echo "$as_me: error: unable to change directory" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "unable to change directory" at_dir=`pwd` fi @@ -1058,13 +1257,11 @@ fi for at_file in atconfig atlocal do test -r $at_file || continue - . ./$at_file || { { $as_echo "$as_me:$LINENO: error: invalid content: $at_file" >&5 -$as_echo "$as_me: error: invalid content: $at_file" >&2;} - { (exit 1); exit 1; }; } + . ./$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} +: "${at_top_build_prefix=$at_top_builddir}" # Perform any assignments requested during argument parsing. eval "$at_debug_args" @@ -1075,8 +1272,7 @@ if test -n "$at_top_srcdir"; then builddir=../.. for at_dir_var in srcdir top_srcdir top_build_prefix do - at_val=`eval 'as_val=${'at_$at_dir_var'} - $as_echo "$as_val"'` + eval at_val=\$at_$at_dir_var case $at_val in [\\/$]* | ?:[\\/]* ) at_prefix= ;; *) at_prefix=../../ ;; @@ -1085,9 +1281,9 @@ if test -n "$at_top_srcdir"; then done fi -## ------------------- ## -## Directory structure ## -## ------------------- ## +## -------------------- ## +## Directory structure. ## +## -------------------- ## # This is the set of directories and files used by this script # (non-literals are capitalized): @@ -1118,12 +1314,14 @@ fi # 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. +# The file containing the suite ($at_dir might have changed since earlier). at_suite_log=$at_dir/$as_me.log # The directory containing helper files per test group. at_helper_dir=$at_suite_dir/at-groups # Stop file: if it exists, do not start new jobs. at_stop_file=$at_suite_dir/at-stop +# The fifo used for the job dispatcher. +at_job_fifo=$at_suite_dir/at-job-fifo if $at_clean; then test -d "$at_suite_dir" && @@ -1147,23 +1345,23 @@ 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 @@ -1177,7 +1375,7 @@ for as_dir in $at_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -d "$as_dir" || continue + test -d "$as_dir" || continue case $as_dir in [\\/]* | ?:[\\/]* ) ;; * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; @@ -1185,15 +1383,18 @@ esac case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; - *) at_new_path=$at_new_path$PATH_SEPARATOR$as_dir ;; + *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;; esac -done + done IFS=$as_save_IFS PATH=$at_new_path export PATH # Setting up the FDs. + + + # 5 is the log file. Not to be overwritten if `-d'. if $at_debug_p; then at_suite_log=/dev/null @@ -1203,43 +1404,28 @@ fi exec 5>>"$at_suite_log" # Banners and logs. -cat <<\_ASBOX -## ------------------------ ## -## GNU tar 1.25 test suite. ## -## ------------------------ ## -_ASBOX +$as_echo "## ------------------------ ## +## GNU tar 1.29 test suite. ## +## ------------------------ ##" { - cat <<\_ASBOX -## ------------------------ ## -## GNU tar 1.25 test suite. ## -## ------------------------ ## -_ASBOX + $as_echo "## ------------------------ ## +## GNU tar 1.29 test suite. ## +## ------------------------ ##" echo $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. 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 -## ----------- ## -## ChangeLogs. ## -## ----------- ## -_ASBOX + # If ChangeLog exists, list a few lines in case it might help determining + # the exact version. + if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then + $as_echo "## ---------- ## +## ChangeLog. ## +## ---------- ##" + echo + sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog" echo - for at_file in `find "$at_top_srcdir" -name "tar-*" -prune -o -name ChangeLog -print` - do - $as_echo "$as_me: $at_file:" - sed 's/^/| /;10q' $at_file - echo - done - fi { @@ -1272,8 +1458,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } @@ -1290,53 +1476,80 @@ IFS=$as_save_IFS } >&5 -## --------------- ## -## Shell functions ## -## --------------- ## +## ------------------------- ## +## Autotest shell functions. ## +## ------------------------- ## -# at_func_banner NUMBER -# --------------------- -# Output banner NUMBER, provided the testsuite is running multiple groups -# and this particular banner has not yet been printed. -at_func_banner () +# 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_func_banner + test "x$at_banner_text" = "x " && return 0 + eval "at_banner_text_$1=\" \"" + if test -z "$at_banner_text"; then + $at_first || echo + else + $as_echo "$as_nl$at_banner_text$as_nl" + fi +} # at_fn_banner -# at_func_check_newline COMMAND -# ----------------------------- -# Test if COMMAND includes a newline and, if so, print a message and return -# exit code 1 -at_func_check_newline () +# 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 () { - case "$1" in - *' -'*) echo 'Not enabling shell tracing (command contains an embedded newline)' - return 1 ;; - *) return 0 ;; - esac + $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_func_filter_trace EXIT-CODE +# at_fn_check_prepare_trace LINE # ------------------------------ -# Split the contents of file "$at_stder1" into the "set -x" trace (on stderr) -# and the other lines (on file "$at_stderr"). Return the exit code EXIT-CODE. -at_func_filter_trace () +# 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" - return $1 } -# at_func_log_failure FILE-LIST -# ----------------------------- +# 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_func_log_failure () +at_fn_log_failure () { for file do $as_echo "$file:"; sed 's/^/> /' "$file"; done @@ -1344,56 +1557,62 @@ at_func_log_failure () exit 1 } -# at_func_check_skip EXIT-CODE -# ---------------------------- -# Check whether EXIT-CODE is the special exit code 77, and if so exit the shell -# with that same exit code. -at_func_check_skip () +# 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_func_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 exit the shell with that same exit code; if it is -# anything else print an error message and fail the test. -at_func_check_status () +# 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_func_diff_devnull FILE -# ------------------------- -# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless -# diff invocations. -at_func_diff_devnull () +# 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_func_test NUMBER -# ------------------- +# at_fn_test NUMBER +# ----------------- # Parse out test NUMBER from the tail of this file. -at_func_test () +at_fn_test () { eval at_sed=\$at_sed$1 sed "$at_sed" "$at_myself" > "$at_test_source" } -# at_func_create_debugging_script -# ------------------------------- +# at_fn_create_debugging_script +# ----------------------------- # Create the debugging script $at_group_dir/run which will reproduce the # current test group. -at_func_create_debugging_script () +at_fn_create_debugging_script () { { echo "#! /bin/sh" && @@ -1405,34 +1624,13 @@ at_func_create_debugging_script () chmod +x "$at_group_dir/run" } -# at_func_arith -# ------------- -# Arithmetic evaluation, avoids expr if the shell is sane. The -# interpretation of leading zeroes is unspecified. -# -# subshell and eval are needed to keep Solaris sh from bailing out: -if ( eval 'test $(( 1 + 1 )) = 2' ) 2>/dev/null; then - # With "$@", bash does not split positional parameters: - eval 'at_func_arith () - { - at_func_arith_result=$(( $* )) - }' -else - at_func_arith () - { - at_func_arith_result=`expr "$@"` - } -fi - -## ---------------------- ## -## End of shell functions ## -## ---------------------- ## +## -------------------------------- ## +## End of autotest shell functions. ## +## -------------------------------- ## { - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Tested programs. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo } >&5 @@ -1440,34 +1638,35 @@ _ASBOX 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 { - $as_echo "$at_srcdir/testsuite.at:104: $as_dir/$at_program --version" - "$as_dir/$at_program" --version &5 2>&1 else - { { $as_echo "$as_me:$LINENO: error: cannot find $at_program" >&5 -$as_echo "$as_me: error: cannot find $at_program" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find $at_program" "$LINENO" 5 fi done { - cat <<\_ASBOX -## ------------------ ## + $as_echo "## ------------------ ## ## Running the tests. ## -## ------------------ ## -_ASBOX +## ------------------ ##" } >&5 at_start_date=`date` @@ -1475,11 +1674,8 @@ at_start_time=`date +%s 2>/dev/null` $as_echo "$as_me: starting at: $at_start_date" >&5 # Create the master directory if it doesn't already exist. -test -d "$at_suite_dir" || - mkdir "$at_suite_dir" || - { { $as_echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5 -$as_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 @@ -1513,28 +1709,40 @@ BEGIN { FS="" } if (test == "'"$at_group"'") exit }' "$at_myself" > "$at_suite_dir/at-source-lines" && . "$at_suite_dir/at-source-lines" || - { { $as_echo "$as_me:$LINENO: error: cannot create test line number cache" >&5 -$as_echo "$as_me: error: cannot create test line number cache" >&2;} - { (exit 1); exit 1; }; } + 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_echo "$as_me:$LINENO: error: testsuite directory setup failed" >&5 -$as_echo "$as_me: error: testsuite directory setup failed" >&2;} - { (exit 1); exit 1; }; } +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_func_group_prepare -# --------------------- -# Prepare running a test group -at_func_group_prepare () +# at_fn_group_prepare +# ------------------- +# Prepare for running a test group. +at_fn_group_prepare () { # The directory for additional per-group helper files. at_job_dir=$at_helper_dir/$at_group @@ -1568,56 +1776,20 @@ at_func_group_prepare () # 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" || - { $as_echo "$as_me:$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;} - fi + 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" - 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=`$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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$at_group_dir"; as_fn_mkdir_p echo 0 > "$at_status_file" @@ -1630,9 +1802,29 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} fi } -# at_func_group_postprocess -# ------------------------- -at_func_group_postprocess () +# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER] +# ------------------------------------------------- +# Declare the test group ORDINAL, located at LINE with group description DESC, +# and residing under BANNER. Use PAD to align the status column. +at_fn_group_banner () +{ + at_setup_line="$2" + test -n "$5" && at_fn_banner $5 + at_desc="$3" + case $1 in + [0-9]) at_desc_line=" $1: ";; + [0-9][0-9]) at_desc_line=" $1: " ;; + *) at_desc_line="$1: " ;; + esac + as_fn_append at_desc_line "$3$4" + $at_quiet $as_echo_n "$at_desc_line" + echo "# -*- compilation -*-" >> "$at_group_log" +} + +# at_fn_group_postprocess +# ----------------------- +# Perform cleanup after running a test group. +at_fn_group_postprocess () { # Be sure to come back to the suite directory, in particular # since below we might `rm' the group directory we are in currently. @@ -1645,6 +1837,7 @@ at_func_group_postprocess () 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" @@ -1653,31 +1846,41 @@ _ATEOF at_msg="UNEXPECTED PASS" at_res=xpass at_errexit=$at_errexit_p + at_color=$at_red ;; no:0) at_msg="ok" at_res=pass at_errexit=false + at_color=$at_grn ;; *:77) at_msg='skipped ('`cat "$at_check_line_file"`')' at_res=skip at_errexit=false + at_color=$at_blu + ;; + no:* | *:99) + at_msg='FAILED ('`cat "$at_check_line_file"`')' + at_res=fail + at_errexit=$at_errexit_p + at_color=$at_red ;; yes:*) at_msg='expected failure ('`cat "$at_check_line_file"`')' at_res=xfail at_errexit=false - ;; - no:*) - at_msg='FAILED ('`cat "$at_check_line_file"`')' - at_res=fail - at_errexit=$at_errexit_p + at_color=$at_lgn ;; esac echo "$at_res" > "$at_job_dir/$at_res" - # Make sure there is a separator even with long titles. - $as_echo " $at_msg" + # In parallel mode, output the summary line only afterwards. + if test $at_jobs -ne 1 && test -n "$at_verbose"; then + $as_echo "$at_desc_line $at_color$at_msg$at_std" + else + # Make sure there is a separator even with long titles. + $as_echo " $at_color$at_msg$at_std" + fi at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" case $at_status in 0|77) @@ -1692,9 +1895,13 @@ _ATEOF $as_echo "$at_log_msg" >> "$at_group_log" $as_echo "$at_log_msg" >&5 - # Cleanup the group directory, unless the user wants the files. - if $at_debug_p; then - at_func_create_debugging_script + # Cleanup the group directory, unless the user wants the files + # or the success was unexpected. + if $at_debug_p || test $at_res = xpass; then + at_fn_create_debugging_script + if test $at_res = xpass && $at_errexit; then + echo stop > "$at_stop_file" + fi else if test -d "$at_group_dir"; then find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; @@ -1711,7 +1918,7 @@ _ATEOF # Upon failure, keep the group directory for autopsy, and create # the debugging script. With -e, do not start any further tests. - at_func_create_debugging_script + at_fn_create_debugging_script if $at_errexit; then echo stop > "$at_stop_file" fi @@ -1724,22 +1931,134 @@ _ATEOF ## Driver loop. ## ## ------------ ## + +if (set -m && set +m && set +b) >/dev/null 2>&1; then + set +b + at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- +else + at_job_control_on=: at_job_control_off=: at_job_group= +fi + +for at_signal in 1 2 15; do + trap 'set +x; set +e + $at_job_control_off + at_signal='"$at_signal"' + echo stop > "$at_stop_file" + trap "" $at_signal + at_pgids= + for at_pgid in `jobs -p 2>/dev/null`; do + at_pgids="$at_pgids $at_job_group$at_pgid" + done + test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null + wait + if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then + echo >&2 + fi + at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` + set x $at_signame + test 0 -gt 2 && at_signame=$at_signal + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5 +$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;} + as_fn_arith 128 + $at_signal && exit_status=$as_val + as_fn_exit $exit_status' $at_signal +done + rm -f "$at_stop_file" at_first=: -for at_group in $at_groups; do - at_func_group_prepare - if cd "$at_group_dir" && - at_func_test $at_group && - . "$at_test_source"; then :; else - { $as_echo "$as_me:$LINENO: WARNING: unable to parse test group: $at_group" >&5 +if test $at_jobs -ne 1 && + rm -f "$at_job_fifo" && + test -n "$at_job_group" && + ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null +then + # FIFO job dispatcher. + + trap 'at_pids= + for at_pid in `jobs -p`; do + at_pids="$at_pids $at_job_group$at_pid" + done + if test -n "$at_pids"; then + at_sig=TSTP + test "${TMOUT+set}" = set && at_sig=STOP + kill -$at_sig $at_pids 2>/dev/null + fi + kill -STOP $$ + test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP + + echo + # Turn jobs into a list of numbers, starting from 1. + at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p` + + set X $at_joblist + shift + for at_group in $at_groups; do + $at_job_control_on 2>/dev/null + ( + # Start one test group. + $at_job_control_off + if $at_first; then + exec 7>"$at_job_fifo" + else + exec 6<&- + fi + trap 'set +x; set +e + trap "" PIPE + echo stop > "$at_stop_file" + echo >&7 + as_fn_exit 141' PIPE + at_fn_group_prepare + if cd "$at_group_dir" && + at_fn_test $at_group && + . "$at_test_source" + then :; else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} - at_failed=: + at_failed=: + fi + at_fn_group_postprocess + echo >&7 + ) & + $at_job_control_off + if $at_first; then + at_first=false + exec 6<"$at_job_fifo" 7>"$at_job_fifo" + fi + shift # Consume one token. + if test $# -gt 0; then :; else + read at_token <&6 || break + set x $* + fi + test -f "$at_stop_file" && break + done + exec 7>&- + # Read back the remaining ($at_jobs - 1) tokens. + set X $at_joblist + shift + if test $# -gt 0; then + shift + for at_job + do + read at_token + done <&6 fi - at_func_group_postprocess - test -f "$at_stop_file" && break - at_first=false -done + exec 6<&- + wait +else + # Run serially, avoid forks and other potential surprises. + for at_group in $at_groups; do + at_fn_group_prepare + if cd "$at_group_dir" && + at_fn_test $at_group && + . "$at_test_source"; then :; else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 +$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} + at_failed=: + fi + at_fn_group_postprocess + test -f "$at_stop_file" && break + at_first=false + done +fi # Wrap up the test suite with summary statistics. cd "$at_helper_dir" @@ -1760,12 +2079,9 @@ 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=$# -at_func_arith $at_group_count - $at_skip_count -at_run_count=$at_func_arith_result -at_func_arith $at_xpass_count + $at_fail_count -at_unexpected_count=$at_func_arith_result -at_func_arith $at_xfail_count + $at_fail_count -at_total_fail_count=$at_func_arith_result +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" @@ -1777,35 +2093,26 @@ 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]*) - at_func_arith $at_stop_time - $at_start_time - at_duration_s=$at_func_arith_result - at_func_arith $at_duration_s / 60 - at_duration_m=$at_func_arith_result - at_func_arith $at_duration_m / 60 - at_duration_h=$at_func_arith_result - at_func_arith $at_duration_s % 60 - at_duration_s=$at_func_arith_result - at_func_arith $at_duration_m % 60 - at_duration_m=$at_func_arith_result + 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 -## ------------- ## +$as_echo "## ------------- ## ## Test results. ## -## ------------- ## -_ASBOX +## ------------- ##" echo { echo - cat <<\_ASBOX -## ------------- ## + $as_echo "## ------------- ## ## Test results. ## -## ------------- ## -_ASBOX +## ------------- ##" echo } >&5 @@ -1823,12 +2130,14 @@ if $at_errexit_p && test $at_unexpected_count != 0; then at_result="$at_result $at_were run, one failed" fi at_result="$at_result unexpectedly and inhibited subsequent tests." + at_color=$at_red else # Don't you just love exponential explosion of the number of cases? + at_color=$at_red case $at_xpass_count:$at_fail_count:$at_xfail_count in # So far, so good. - 0:0:0) at_result="$at_result $at_were successful." ;; - 0:0:*) at_result="$at_result behaved as expected." ;; + 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;; + 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;; # Some unexpected failures 0:*:0) at_result="$at_result $at_were run, @@ -1874,18 +2183,16 @@ $at_skip_count tests were skipped." ;; esac if test $at_unexpected_count = 0; then - echo "$at_result" + echo "$at_color$at_result$at_std" echo "$at_result" >&5 else - echo "ERROR: $at_result" >&2 + echo "${at_color}ERROR: $at_result$at_std" >&2 echo "ERROR: $at_result" >&5 { echo - cat <<\_ASBOX -## ------------------------ ## + $as_echo "## ------------------------ ## ## Summary of the failures. ## -## ------------------------ ## -_ASBOX +## ------------------------ ##" # Summary of failed and skipped tests. if test $at_fail_count != 0; then @@ -1904,11 +2211,9 @@ _ASBOX echo fi if test $at_fail_count != 0; then - cat <<\_ASBOX -## ---------------------- ## + $as_echo "## ---------------------- ## ## Detailed failed tests. ## -## ---------------------- ## -_ASBOX +## ---------------------- ##" echo for at_group in $at_fail_list do @@ -1940,19 +2245,21 @@ _ASBOX _ASBOX echo - $as_echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help: + 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.25] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} + Subject: [GNU tar 1.29] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} + +You may investigate any problem if you feel able to do so, in which +case the test suite provides a good starting point. Its output may +be found below \`${at_testdir+${at_testdir}/}$as_me.dir'. " - 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' - $as_echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'." - echo - fi - exit 1 + exit 1 fi exit 0 @@ -1961,35 +2268,27 @@ exit 0 ## Actual tests. ## ## ------------- ## #AT_START_1 -# 1. version.at:19: tar version -at_setup_line='version.at:19' -at_desc="tar version" -$at_quiet $as_echo_n " 1: $at_desc " +at_fn_group_banner 1 'version.at:20' \ + "tar version" " " at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "1. version.at:19: testing ..." + $as_echo "1. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff -$as_echo "$at_srcdir/version.at:21: tar --version | sed 1q" -echo version.at:21 >"$at_check_line_file" - -if test -n "$at_traceon"; then - ( $at_traceon; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.25 +{ set +x +$as_echo "$at_srcdir/version.at:22: tar --version | sed 1q" +at_fn_check_prepare_notrace 'a shell pipeline' "version.at:22" +( $at_check_trace; tar --version | sed 1q +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.29 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/version.at:21" -if $at_failed; then +at_fn_check_status 0 $at_status "$at_srcdir/version.at:22" +if $at_failed; then : cat >$XFAILFILE <<'_EOT' ============================================================== @@ -2000,26 +2299,22 @@ _EOT else rm -f $XFAILFILE fi - -$at_failed && at_func_log_failure +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_1 #AT_START_2 -# 2. pipe.at:30: decompressing from stdin -at_setup_line='pipe.at:30' -at_desc="decompressing from stdin" -$at_quiet $as_echo_n " 2: $at_desc " +at_fn_group_banner 2 'pipe.at:29' \ + "decompressing from stdin" " " at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "2. pipe.at:30: testing ..." + $as_echo "2. $at_setup_line: testing $at_desc ..." $at_traceon @@ -2027,8 +2322,8 @@ echo "# -*- compilation -*-" >> "$at_group_log" - { $at_traceoff -$as_echo "$at_srcdir/pipe.at:34: + { set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2038,7 +2333,7 @@ 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 @@ -2051,11 +2346,8 @@ echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:34 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2077,36 +2369,11 @@ cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 13 --file directory/file2 -tar cf archive directory -mv directory orig -cat archive | tar xfv - --warning=no-timestamp | sort -echo "separator" -cmp orig/file1 directory/file1 -echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 @@ -2114,13 +2381,12 @@ separator separator " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/pipe.at:34: + { set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2130,7 +2396,7 @@ 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 @@ -2143,36 +2409,8 @@ echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:34 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 13 --file directory/file2 -tar cf archive directory -mv directory orig -cat archive | tar xfv - --warning=no-timestamp | sort -echo "separator" -cmp orig/file1 directory/file1 -echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2194,11 +2432,11 @@ cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 @@ -2206,13 +2444,12 @@ separator separator " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/pipe.at:34: + { set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2222,7 +2459,7 @@ 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 @@ -2235,11 +2472,8 @@ echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:34 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2261,36 +2495,11 @@ cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 13 --file directory/file2 -tar cf archive directory -mv directory orig -cat archive | tar xfv - --warning=no-timestamp | sort -echo "separator" -cmp orig/file1 directory/file1 -echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 @@ -2298,13 +2507,12 @@ separator separator " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/pipe.at:34: + { set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -2314,7 +2522,7 @@ 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 @@ -2327,11 +2535,8 @@ echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:34 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -2353,36 +2558,11 @@ cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 13 --file directory/file2 -tar cf archive directory -mv directory orig -cat archive | tar xfv - --warning=no-timestamp | sort -echo "separator" -cmp orig/file1 directory/file1 -echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 @@ -2390,13 +2570,12 @@ separator separator " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/pipe.at:34: + { set +x +$as_echo "$at_srcdir/pipe.at:33: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2406,7 +2585,7 @@ 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 @@ -2419,11 +2598,8 @@ echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:34 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2445,36 +2621,11 @@ cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 13 --file directory/file2 -tar cf archive directory -mv directory orig -cat archive | tar xfv - --warning=no-timestamp | sort -echo "separator" -cmp orig/file1 directory/file1 -echo "separator" -cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +cmp orig/file2 directory/file2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 @@ -2482,195 +2633,416 @@ separator separator " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | 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_quiet $as_echo_n " 3: $at_desc " +at_fn_group_banner 3 'options.at:25' \ + "mixing options" " " at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "3. options.at:24: testing ..." + $as_echo "3. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff -$as_echo "$at_srcdir/options.at:27: +{ set +x +$as_echo "$at_srcdir/options.at:28: echo > file1 TAR_OPTIONS=--numeric-owner tar chof archive file1 tar tf archive " -echo options.at:27 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -echo > file1 -TAR_OPTIONS=--numeric-owner tar chof archive file1 -tar tf archive - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "options.at:28" +( $at_check_trace; echo > file1 TAR_OPTIONS=--numeric-owner tar chof archive file1 tar tf archive - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/options.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/options.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | 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_quiet $as_echo_n " 4: $at_desc " +at_fn_group_banner 4 'options02.at:27' \ + "interspersed options" " " at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "4. options02.at:26: testing ..." + $as_echo "4. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff -$as_echo "$at_srcdir/options02.at:29: +{ set +x +$as_echo "$at_srcdir/options02.at:30: echo > file1 tar c file1 -f archive tar tf archive " -echo options02.at:29 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -echo > file1 -tar c file1 -f archive -tar tf archive - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "options02.at:30" +( $at_check_trace; echo > file1 tar c file1 -f archive tar tf archive - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/options02.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/options02.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | 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_quiet $as_echo_n " 5: $at_desc " +at_fn_group_banner 5 'opcomp01.at:21' \ + "occurrence compatibility" " " 1 at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "5. T-empty.at:26: testing ..." + $as_echo "5. $at_setup_line: testing $at_desc ..." $at_traceon -cat >file-list <<'_ATEOF' -jeden -dwa +{ set +x +$as_echo "$at_srcdir/opcomp01.at:24: +tar --occurrence=1 -cf test.tar . +" +at_fn_check_prepare_notrace 'an embedded newline' "opcomp01.at:24" +( $at_check_trace; +tar --occurrence=1 -cf test.tar . -trzy -_ATEOF +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: '--occurrence' cannot be used with '-c' +Try 'tar --help' or 'tar --usage' for more information. +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/opcomp01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_5 +#AT_START_6 +at_fn_group_banner 6 'opcomp02.at:21' \ + "occurrence compatibility" " " 1 +at_xfail=no +( + $as_echo "6. $at_setup_line: testing $at_desc ..." + $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/T-empty.at:36: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * +{ set +x +$as_echo "$at_srcdir/opcomp02.at:24: +tar --occurrence=1 -tf test.tar +" +at_fn_check_prepare_notrace 'an embedded newline' "opcomp02.at:24" +( $at_check_trace; +tar --occurrence=1 -tf test.tar -test -z "`sort < /dev/null 2>&1`" || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: --occurrence is meaningless without a file list +Try 'tar --help' or 'tar --usage' for more information. +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/opcomp02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -genfile --file jeden -genfile --file dwa -genfile --file trzy + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_6 +#AT_START_7 +at_fn_group_banner 7 'opcomp03.at:21' \ + "--verify compatibility" " " 1 +at_xfail=no +( + $as_echo "7. $at_setup_line: testing $at_desc ..." + $at_traceon -tar cfvT archive ../file-list | sort -)" -echo T-empty.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + +{ set +x +$as_echo "$at_srcdir/opcomp03.at:24: +tar -tWf test.tar . +" +at_fn_check_prepare_notrace 'an embedded newline' "opcomp03.at:24" +( $at_check_trace; +tar -tWf test.tar . + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: '--verify' cannot be used with '-t' +Try 'tar --help' or 'tar --usage' for more information. +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/opcomp03.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_7 +#AT_START_8 +at_fn_group_banner 8 'opcomp04.at:21' \ + "compress option compatibility" " " 1 +at_xfail=no +( + $as_echo "8. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +{ set +x +$as_echo "$at_srcdir/opcomp04.at:24: + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + +genfile --file file +tar czf test.tar file +genfile --file newfile +tar rzf test.tar newfile +" +at_fn_check_prepare_notrace 'an embedded newline' "opcomp04.at:24" +( $at_check_trace; + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + +genfile --file file +tar czf test.tar file +genfile --file newfile +tar rzf test.tar newfile + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Cannot update compressed archives +Try 'tar --help' or 'tar --usage' for more information. +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/opcomp04.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_8 +#AT_START_9 +at_fn_group_banner 9 'opcomp05.at:21' \ + "--pax-option compatibility" " " 1 +at_xfail=no +( + $as_echo "9. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +{ set +x +$as_echo "$at_srcdir/opcomp05.at:24: +tar -Hgnu -cf test.tar --pax-option user:=root . +" +at_fn_check_prepare_notrace 'an embedded newline' "opcomp05.at:24" +( $at_check_trace; +tar -Hgnu -cf test.tar --pax-option user:=root . + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: --pax-option can be used only on POSIX archives +Try 'tar --help' or 'tar --usage' for more information. +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/opcomp05.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_9 +#AT_START_10 +at_fn_group_banner 10 'opcomp06.at:21' \ + "--pax-option compatibility" " " 1 +at_xfail=no +( + $as_echo "10. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +{ set +x +$as_echo "$at_srcdir/opcomp06.at:24: + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + +genfile --file file +tar -cf test.tar --acls -Hgnu file +" +at_fn_check_prepare_notrace 'a $(...) command substitution' "opcomp06.at:24" +( $at_check_trace; + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + +genfile --file file +tar -cf test.tar --acls -Hgnu file + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: --acls can be used only on POSIX archives +Try 'tar --help' or 'tar --usage' for more information. +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/opcomp06.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_10 +#AT_START_11 +at_fn_group_banner 11 'T-mult.at:21' \ + "multiple file lists" " " 2 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "11. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/T-mult.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +>file1 +>file2 +>file3 +>file4 +cat >F1 <<'_ATEOF' +file1 +file2 +_ATEOF -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -genfile --file jeden -genfile --file dwa -genfile --file trzy +cat >F2 <<'_ATEOF' +file3 +file4 +_ATEOF -tar cfvT archive ../file-list | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +tar cf archive -T F1 -T F2 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-mult.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2679,62 +3051,60 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +>file1 +>file2 +>file3 +>file4 +cat >F1 <<'_ATEOF' +file1 +file2 +_ATEOF -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -genfile --file jeden -genfile --file dwa -genfile --file trzy +cat >F2 <<'_ATEOF' +file3 +file4 +_ATEOF -tar cfvT archive ../file-list | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dwa -jeden -trzy +tar cf archive -T F1 -T F2 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/T-empty.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-mult.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - # Testing one format is enough - $at_traceoff + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$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_quiet $as_echo_n " 6: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_11 +#AT_START_12 +at_fn_group_banner 12 'T-nest.at:21' \ + "nested file lists" " " 2 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "6. T-null.at:21: testing ..." + $as_echo "12. $at_setup_line: testing $at_desc ..." $at_traceon -cat >expout <<'_ATEOF' -jeden\ndwa -trzy -_ATEOF - - - { $at_traceoff -$as_echo "$at_srcdir/T-null.at:28: + { set +x +$as_echo "$at_srcdir/T-nest.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2743,27 +3113,26 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +>file1 +>file2 +>file3 +>file4 +cat >F1 <<'_ATEOF' +file1 +-T F2 +file2 +_ATEOF -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 +cat >F2 <<'_ATEOF' +file3 +file4 +_ATEOF -tar cfTv archive file-list | sort +tar cf archive -T F1 +tar tf archive )" -echo T-null.at:28 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "T-nest.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2772,87 +3141,150 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +>file1 +>file2 +>file3 +>file4 +cat >F1 <<'_ATEOF' +file1 +-T F2 +file2 +_ATEOF -test -z "`sort < /dev/null 2>&1`" || exit 77 +cat >F2 <<'_ATEOF' +file3 +file4 +_ATEOF + +tar cf archive -T F1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file3 +file4 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/T-nest.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -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_func_filter_trace $? -else - ( :; + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_12 +#AT_START_13 +at_fn_group_banner 13 'T-rec.at:21' \ + "recursive file lists" " " 2 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "13. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/T-rec.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +>file1 +>file2 +cat >F1 <<'_ATEOF' +file1 +-T F2 +_ATEOF -test -z "`sort < /dev/null 2>&1`" || exit 77 +cat >F2 <<'_ATEOF' +file2 +-T F1 +_ATEOF +tar cf archive -T F1 +echo \$? +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-rec.at:24" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -echo dwa > temp -echo trzy >> temp -cat temp | tr '\n' '\0' > temp1 -echo jeden > file-list -cat temp1 >> file-list +>file1 +>file2 +cat >F1 <<'_ATEOF' +file1 +-T F2 +_ATEOF -genfile -f "jeden -dwa" || exit 77 -genfile -f trzy +cat >F2 <<'_ATEOF' +file2 +-T F1 +_ATEOF -tar cfTv archive file-list | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character +tar cf archive -T F1 +echo $? +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: F1: file list requested from F2 already read from command line +tar: Exiting with failure status due to previous errors " | \ $at_diff - "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/T-null.at:28" - -$at_failed && at_func_log_failure +echo >>"$at_stdout"; $as_echo "2 +file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/T-rec.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - # Testing one format is enough - $at_traceoff + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$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_quiet $as_echo_n " 7: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_13 +#AT_START_14 +at_fn_group_banner 14 'T-recurse.at:27' \ + "files-from & recurse: toggle" " " 2 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "7. indexfile.at:26: testing ..." + $as_echo "14. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2861,42 +3293,37 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo \"Creating the archive\" -tar -c -v -f - --index-file=idx directory > archive -echo \"Testing the archive\" -tar -tf archive -)" -echo indexfile.at:29 >"$at_check_line_file" +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F2B <<'_ATEOF' +directory2/ +_ATEOF -mkdir directory -genfile --file=directory/a --length=1035 -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive +a=archive +tar cf \"\$a\" --files-from F1 +tar tf \"\$a\" -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +a=archive2 +tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B +tar tf \"\$a\" +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2905,33 +3332,53 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating the archive -Testing the archive -directory/ -directory/a +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF + + +cat >F2B <<'_ATEOF' +directory2/ +_ATEOF + + +a=archive +tar cf "$a" --files-from F1 +tar tf "$a" + +a=archive2 +tar cf "$a" --no-recursion -T F2A --recursion -T F2B +tar tf "$a" +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2940,42 +3387,37 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo \"Creating the archive\" -tar -c -v -f - --index-file=idx directory > archive -echo \"Testing the archive\" -tar -tf archive -)" -echo indexfile.at:29 >"$at_check_line_file" +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F2B <<'_ATEOF' +directory2/ +_ATEOF -mkdir directory -genfile --file=directory/a --length=1035 -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive +a=archive +tar cf \"\$a\" --files-from F1 +tar tf \"\$a\" -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +a=archive2 +tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B +tar tf \"\$a\" +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2984,33 +3426,53 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating the archive -Testing the archive -directory/ -directory/a +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF + + +cat >F2B <<'_ATEOF' +directory2/ +_ATEOF + + +a=archive +tar cf "$a" --files-from F1 +tar tf "$a" + +a=archive2 +tar cf "$a" --no-recursion -T F2A --recursion -T F2B +tar tf "$a" +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:30: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3019,42 +3481,37 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo \"Creating the archive\" -tar -c -v -f - --index-file=idx directory > archive -echo \"Testing the archive\" -tar -tf archive -)" -echo indexfile.at:29 >"$at_check_line_file" +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F2B <<'_ATEOF' +directory2/ +_ATEOF -mkdir directory -genfile --file=directory/a --length=1035 -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive +a=archive +tar cf \"\$a\" --files-from F1 +tar tf \"\$a\" -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +a=archive2 +tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B +tar tf \"\$a\" +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3063,33 +3520,53 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating the archive -Testing the archive -directory/ -directory/a +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF + + +cat >F2B <<'_ATEOF' +directory2/ +_ATEOF + + +a=archive +tar cf "$a" --files-from F1 +tar tf "$a" + +a=archive2 +tar cf "$a" --no-recursion -T F2A --recursion -T F2B +tar tf "$a" +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3098,42 +3575,37 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo \"Creating the archive\" -tar -c -v -f - --index-file=idx directory > archive -echo \"Testing the archive\" -tar -tf archive -)" -echo indexfile.at:29 >"$at_check_line_file" +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F2B <<'_ATEOF' +directory2/ +_ATEOF -mkdir directory -genfile --file=directory/a --length=1035 -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive +a=archive +tar cf \"\$a\" --files-from F1 +tar tf \"\$a\" -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +a=archive2 +tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B +tar tf \"\$a\" +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3142,33 +3614,53 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating the archive -Testing the archive -directory/ -directory/a +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF + + +cat >F2B <<'_ATEOF' +directory2/ +_ATEOF + + +a=archive +tar cf "$a" --files-from F1 +tar tf "$a" + +a=archive2 +tar cf "$a" --no-recursion -T F2A --recursion -T F2B +tar tf "$a" +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/indexfile.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3177,21 +3669,37 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -echo \"Creating the archive\" -tar -c -v -f - --index-file=idx directory > archive -echo \"Testing the archive\" -tar -tf archive -)" -echo indexfile.at:29 >"$at_check_line_file" +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + +cat >F2B <<'_ATEOF' +directory2/ +_ATEOF + + +a=archive +tar cf \"\$a\" --files-from F1 +tar tf \"\$a\" + +a=archive2 +tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B +tar tf \"\$a\" +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3200,78 +3708,74 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file -mkdir directory -genfile --file=directory/a --length=1035 +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +--recursion +directory2/ +_ATEOF -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +cat >F2A <<'_ATEOF' +directory1/ +_ATEOF -mkdir directory -genfile --file=directory/a --length=1035 +cat >F2B <<'_ATEOF' +directory2/ +_ATEOF -echo "Creating the archive" -tar -c -v -f - --index-file=idx directory > archive -echo "Testing the archive" -tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating the archive -Testing the archive -directory/ -directory/a +a=archive +tar cf "$a" --files-from F1 +tar tf "$a" + +a=archive2 +tar cf "$a" --no-recursion -T F2A --recursion -T F2B +tar tf "$a" +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$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_quiet $as_echo_n " 8: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_14 +#AT_START_15 +at_fn_group_banner 15 'T-recurse.at:66' \ + "toggle --recursion (not) from -T" " " 2 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "8. verbose.at:26: testing ..." + $as_echo "15. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:69: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3280,34 +3784,26 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive -tar tf archive -)" -echo verbose.at:29 >"$at_check_line_file" +mkdir directory1 directory2 +touch directory1/file directory2/file -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3316,30 +3812,39 @@ 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 +mkdir directory1 directory2 +touch directory1/file directory2/file + +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF + + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:69: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3348,34 +3853,26 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive -tar tf archive -)" -echo verbose.at:29 >"$at_check_line_file" +mkdir directory1 directory2 +touch directory1/file directory2/file -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3384,30 +3881,39 @@ 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 +mkdir directory1 directory2 +touch directory1/file directory2/file + +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF + + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:69: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3416,34 +3922,26 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive -tar tf archive -)" -echo verbose.at:29 >"$at_check_line_file" +mkdir directory1 directory2 +touch directory1/file directory2/file -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3452,30 +3950,39 @@ 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 +mkdir directory1 directory2 +touch directory1/file directory2/file + +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF + + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:69: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3484,34 +3991,26 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive -tar tf archive -)" -echo verbose.at:29 >"$at_check_line_file" +mkdir directory1 directory2 +touch directory1/file directory2/file -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3520,30 +4019,39 @@ 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 +mkdir directory1 directory2 +touch directory1/file directory2/file + +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF + + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/verbose.at:29: + { set +x +$as_echo "$at_srcdir/T-recurse.at:69: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3552,34 +4060,26 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive -tar tf archive -)" -echo verbose.at:29 >"$at_check_line_file" +mkdir directory1 directory2 +touch directory1/file directory2/file -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF -genfile --file file --length 10240 -echo Creating the archive -tar cvf - file > archive -echo Testing the archive + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3588,172 +4088,223 @@ 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 +mkdir directory1 directory2 +touch directory1/file directory2/file + +cat >F1 <<'_ATEOF' +--no-recursion +directory1/ +_ATEOF + + +cat >F2 <<'_ATEOF' +directory2/ +_ATEOF + + +tar cf archive -T F1 --recursion -T F2 tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_8 -#AT_START_9 -# 9. append.at:21: append -at_setup_line='append.at:21' -at_desc="append" -$at_quiet $as_echo_n " 9: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_15 +#AT_START_16 +at_fn_group_banner 16 'T-cd.at:21' \ + "-C in file lists" " " 2 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "9. append.at:21: testing ..." + $as_echo "16. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/append.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + { set +x +$as_echo "$at_srcdir/T-cd.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive)" -echo append.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +>file1 +mkdir dir +>dir/file2 +>dir/file3 +cat >F1 <<'_ATEOF' +file1 +-C dir +. +_ATEOF + +tar cf archive -T F1 +tar tf archive | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-cd.at:24" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +>file1 +mkdir dir +>dir/file2 +>dir/file3 +cat >F1 <<'_ATEOF' +file1 +-C dir +. +_ATEOF + +tar cf archive -T F1 +tar tf archive | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "./ +./file2 +./file3 +file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append.at:24" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-cd.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive)" -echo append.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_16 +#AT_START_17 +at_fn_group_banner 17 'T-empty.at:26' \ + "empty entries" " " 2 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "17. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +cat >file-list <<'_ATEOF' +jeden +dwa + +trzy +_ATEOF + + + + + { set +x +$as_echo "$at_srcdir/T-empty.at:36: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +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_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + +genfile --file jeden +genfile --file dwa +genfile --file trzy + +tar cfvT archive ../file-list +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-empty.at:36" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 + + +genfile --file jeden +genfile --file dwa +genfile --file trzy + +tar cfvT archive ../file-list +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "jeden +dwa +trzy " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append.at:24" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-empty.at:36" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append.at:24: + + # Testing one format is enough + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_17 +#AT_START_18 +at_fn_group_banner 18 'T-null.at:21' \ + "0-separated file without -0" " " 2 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "18. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/T-null.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3761,16 +4312,24 @@ export TEST_TAR_FORMAT TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive)" -echo append.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +echo jeden > temp +echo dwa >> temp +echo trzy >> temp +cat temp | tr '\\n' '\\0' > file-list + +genfile -f jeden +genfile -f dwa +genfile -f trzy + +tar cfTv archive file-list +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-null.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3778,221 +4337,401 @@ 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_func_filter_trace $? -else - ( :; + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +echo jeden > temp +echo dwa >> temp +echo trzy >> temp +cat temp | tr '\n' '\0' > file-list + +genfile -f jeden +genfile -f dwa +genfile -f trzy + +tar cfTv archive file-list +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "jeden +dwa +trzy +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/T-null.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + # Testing one format is enough + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_18 +#AT_START_19 +at_fn_group_banner 19 'T-null2.at:17' \ + "--null enables verbatim reading" " " 2 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "19. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# According to the docs, --null should read each line from the file +# list verbatim. This feature was broken by commit 26538c9b (tar version +# 1.27). + + + + { set +x +$as_echo "$at_srcdir/T-null2.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append.at:24" -$at_failed && at_func_log_failure -$at_traceon; } +cat >file-list <<'_ATEOF' +a +-b +--c d +_ATEOF - { $at_traceoff -$as_echo "$at_srcdir/append.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive)" -echo append.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +genfile -f a +genfile -f -b +genfile -f '--c d' + +cat file-list | tr '\\n' '\\0' | tar -c -f archive -v --null -T - +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-null2.at:24" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + +cat >file-list <<'_ATEOF' +a +-b +--c d +_ATEOF + + +genfile -f a +genfile -f -b +genfile -f '--c d' + +cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T - +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a +-b +--c d +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/T-null2.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + # Testing one format is enough + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_19 +#AT_START_20 +at_fn_group_banner 20 'T-zfile.at:26' \ + "empty file" " " 2 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "20. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/T-zfile.at:29: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append.at:24" -$at_failed && at_func_log_failure -$at_traceon; } +genfile --length=0 --file empty +genfile --file a +genfile --file b +cat >valid <<'_ATEOF' +a +b +_ATEOF - { $at_traceoff -$as_echo "$at_srcdir/append.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +tar cf archive -T empty -T valid +tar tf archive +echo \"==\" +tar cf archive -T valid -T empty +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-zfile.at:29" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive)" -echo append.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +genfile --length=0 --file empty +genfile --file a +genfile --file b +cat >valid <<'_ATEOF' +a +b +_ATEOF + + +tar cf archive -T empty -T valid +tar tf archive +echo "==" +tar cf archive -T valid -T empty +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a +b +== +a +b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/T-zfile.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + + # Testing one format is enough + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_20 +#AT_START_21 +at_fn_group_banner 21 'T-nonl.at:27' \ + "entries with missing newlines" " " 2 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "21. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/T-nonl.at:30: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +genfile --length=0 --file empty +\$as_echo_n c > 1.nonl +echo d > 2.nonl +\$as_echo_n e >> 2.nonl +touch a b c d e +cat >filelist <<'_ATEOF' +a +b +_ATEOF + + +tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist +tar tf archive +echo == +tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "T-nonl.at:30" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -touch file1 - touch file2 - tar cf archive file1 - tar rf archive file2 - tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 + +genfile --length=0 --file empty +$as_echo_n c > 1.nonl +echo d > 2.nonl +$as_echo_n e >> 2.nonl +touch a b c d e +cat >filelist <<'_ATEOF' +a +b +_ATEOF + + +tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist +tar tf archive +echo == +tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "c +d +e +a +b +== +d +e +a +b +c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append.at:24" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-nonl.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$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_quiet $as_echo_n " 10: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_21 +#AT_START_22 +at_fn_group_banner 22 'T-dir00.at:28' \ + "recursive extraction from --files-from" " " 2 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "10. append01.at:29: testing ..." + $as_echo "22. $at_setup_line: testing $at_desc ..." $at_traceon + { set +x +$as_echo "$at_srcdir/T-dir00.at:30: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - { $at_traceoff -$as_echo "$at_srcdir/append01.at:34: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive -)" -echo append01.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/T-dir00.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4001,27 +4740,32 @@ 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" -fi -at_status=$? -at_failed=false -at_func_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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append01.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append01.at:34: + { set +x +$as_echo "$at_srcdir/T-dir00.at:30: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4030,34 +4774,19 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive -)" -echo append01.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4066,27 +4795,32 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append01.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append01.at:34: + { set +x +$as_echo "$at_srcdir/T-dir00.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4095,34 +4829,19 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive -)" -echo append01.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4131,27 +4850,32 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append01.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append01.at:34: + { set +x +$as_echo "$at_srcdir/T-dir00.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4160,34 +4884,19 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX -touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 -tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 -tar tf archive -)" -echo append01.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4196,51 +4905,51 @@ 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" -fi -at_status=$? -at_failed=false -at_func_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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append01.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_10 -#AT_START_11 -# 11. append02.at:54: append vs. create -at_setup_line='append02.at:54' -at_desc="append vs. create" -$at_quiet $as_echo_n " 11: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_22 +#AT_START_23 +at_fn_group_banner 23 'T-dir01.at:28' \ + "trailing slash in --files-from" " " 2 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "11. append02.at:54: testing ..." + $as_echo "23. $at_setup_line: testing $at_desc ..." $at_traceon - - { $at_traceoff -$as_echo "$at_srcdir/append02.at:57: + { set +x +$as_echo "$at_srcdir/T-dir01.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4249,68 +4958,19 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile --file file1 -genfile --file file2 - -# Make sure file timestamps in the archive will not differ -MTIME=\"--mtime=@0\" - -# For PAX archives, we need to make sure extended header names are -# reproducible and that their contents won't change with time -if test \$TEST_TAR_FORMAT = posix; then - TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\" -fi - -echo Creating archive.1 -tar \$MTIME -cf archive.1 file1 file2 - -echo Creating archive.2 -tar \$MTIME -cf archive.2 -T /dev/null -tar \$MTIME -rf archive.2 file1 -tar \$MTIME -rf archive.2 file2 - -echo Comparing archives -cmp archive.1 archive.2 -)" -echo append02.at:57 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -echo Comparing archives -cmp archive.1 archive.2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4319,45 +4979,32 @@ 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 +test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Comparing archives -cmp archive.1 archive.2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating archive.1 -Creating archive.2 -Comparing archives +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append02.at:57: + { set +x +$as_echo "$at_srcdir/T-dir01.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4366,68 +5013,19 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile --file file1 -genfile --file file2 - -# Make sure file timestamps in the archive will not differ -MTIME=\"--mtime=@0\" - -# For PAX archives, we need to make sure extended header names are -# reproducible and that their contents won't change with time -if test \$TEST_TAR_FORMAT = posix; then - TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\" -fi - -echo Creating archive.1 -tar \$MTIME -cf archive.1 file1 file2 - -echo Creating archive.2 -tar \$MTIME -cf archive.2 -T /dev/null -tar \$MTIME -rf archive.2 file1 -tar \$MTIME -rf archive.2 file2 - -echo Comparing archives -cmp archive.1 archive.2 -)" -echo append02.at:57 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -echo Comparing archives -cmp archive.1 archive.2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4436,45 +5034,32 @@ 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 +test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Comparing archives -cmp archive.1 archive.2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating archive.1 -Creating archive.2 -Comparing archives +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append02.at:57: + { set +x +$as_echo "$at_srcdir/T-dir01.at:30: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4483,34 +5068,19 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile --file file1 -genfile --file file2 - -# Make sure file timestamps in the archive will not differ -MTIME=\"--mtime=@0\" - -# For PAX archives, we need to make sure extended header names are -# reproducible and that their contents won't change with time -if test \$TEST_TAR_FORMAT = posix; then - TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\" -fi - -echo Creating archive.1 -tar \$MTIME -cf archive.1 file1 file2 - -echo Creating archive.2 -tar \$MTIME -cf archive.2 -T /dev/null -tar \$MTIME -rf archive.2 file1 -tar \$MTIME -rf archive.2 file2 -echo Comparing archives -cmp archive.1 archive.2 -)" -echo append02.at:57 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4519,79 +5089,32 @@ 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" +test -z "`sort < /dev/null 2>&1`" || exit 77 -# 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 +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -genfile --file file1 -genfile --file file2 - -# Make sure file timestamps in the archive will not differ -MTIME="--mtime=@0" - -# For PAX archives, we need to make sure extended header names are -# reproducible and that their contents won't change with time -if test $TEST_TAR_FORMAT = posix; then - TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime" -fi - -echo Creating archive.1 -tar $MTIME -cf archive.1 file1 file2 - -echo Creating archive.2 -tar $MTIME -cf archive.2 -T /dev/null -tar $MTIME -rf archive.2 file1 -tar $MTIME -rf archive.2 file2 - -echo Comparing archives -cmp archive.1 archive.2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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_func_check_status 0 $at_status "$at_srcdir/append02.at:57" - -$at_failed && at_func_log_failure -$at_traceon; } - - { $at_traceoff -$as_echo "$at_srcdir/append02.at:57: + { set +x +$as_echo "$at_srcdir/T-dir01.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4600,68 +5123,19 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --file file1 -genfile --file file2 - -# Make sure file timestamps in the archive will not differ -MTIME=\"--mtime=@0\" - -# For PAX archives, we need to make sure extended header names are -# reproducible and that their contents won't change with time -if test \$TEST_TAR_FORMAT = posix; then - TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\" -fi - -echo Creating archive.1 -tar \$MTIME -cf archive.1 file1 file2 - -echo Creating archive.2 -tar \$MTIME -cf archive.2 -T /dev/null -tar \$MTIME -rf archive.2 file1 -tar \$MTIME -rf archive.2 file2 - -echo Comparing archives -cmp archive.1 archive.2 -)" -echo append02.at:57 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -genfile --file file1 -genfile --file file2 - -# Make sure file timestamps in the archive will not differ -MTIME="--mtime=@0" - -# For PAX archives, we need to make sure extended header names are -# reproducible and that their contents won't change with time -if test $TEST_TAR_FORMAT = posix; then - TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime" -fi - -echo Creating archive.1 -tar $MTIME -cf archive.1 file1 file2 -echo Creating archive.2 -tar $MTIME -cf archive.2 -T /dev/null -tar $MTIME -rf archive.2 file1 -tar $MTIME -rf archive.2 file2 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -echo Comparing archives -cmp archive.1 archive.2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4670,45 +5144,32 @@ 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 +test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Comparing archives -cmp archive.1 archive.2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating archive.1 -Creating archive.2 -Comparing archives +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append02.at:57: + { set +x +$as_echo "$at_srcdir/T-dir01.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4717,68 +5178,19 @@ 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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -echo Comparing archives -cmp archive.1 archive.2 +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort )" -echo append02.at:57 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4787,71 +5199,52 @@ 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 +test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Comparing archives -cmp archive.1 archive.2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating archive.1 -Creating archive.2 -Comparing archives +mkdir dir +genfile -f dir/file1 +genfile -f dir/file2 +tar cf archive dir +rm -rf dir +echo dir/ > list +tar xfTv archive list | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file1 +dir/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_11 -#AT_START_12 -# 12. append03.at:19: append with name transformation -at_setup_line='append03.at:19' -at_desc="append with name transformation" -$at_quiet $as_echo_n " 12: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_23 +#AT_START_24 +at_fn_group_banner 24 'indexfile.at:26' \ + "tar --index-file=FILE --file=-" " " 3 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "12. append03.at:19: testing ..." + $as_echo "24. $at_setup_line: testing $at_desc ..." $at_traceon -# Description: Make sure filenames are transformed during append. - - { $at_traceoff -$as_echo "$at_srcdir/append03.at:24: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4860,20 +5253,18 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -)" -echo append03.at:24 >"$at_check_line_file" +mkdir directory +genfile --file=directory/a --length=1035 + +echo \"Creating the archive\" +tar -c -v -f - --index-file=idx directory > archive -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +echo \"Testing the archive\" +tar -tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4882,54 +5273,32 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * +mkdir directory +genfile --file=directory/a --length=1035 -genfile --file file.1 -genfile --file file.2 +echo "Creating the archive" +tar -c -v -f - --index-file=idx directory > archive -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Appending -plik.1 -Testing -plik.1 -plik.2 -plik.1 +echo "Testing the archive" +tar -tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +directory/ +directory/a " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append03.at:24" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append03.at:24: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4938,20 +5307,18 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -)" -echo append03.at:24 >"$at_check_line_file" +mkdir directory +genfile --file=directory/a --length=1035 + +echo \"Creating the archive\" +tar -c -v -f - --index-file=idx directory > archive -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +echo \"Testing the archive\" +tar -tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4960,54 +5327,32 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +mkdir directory +genfile --file=directory/a --length=1035 -genfile --file file.1 -genfile --file file.2 +echo "Creating the archive" +tar -c -v -f - --index-file=idx directory > archive -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Appending -plik.1 -Testing -plik.1 -plik.2 -plik.1 +echo "Testing the archive" +tar -tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +directory/ +directory/a " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append03.at:24" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append03.at:24: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5016,20 +5361,18 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -)" -echo append03.at:24 >"$at_check_line_file" +mkdir directory +genfile --file=directory/a --length=1035 + +echo \"Creating the archive\" +tar -c -v -f - --index-file=idx directory > archive -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +echo \"Testing the archive\" +tar -tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5038,54 +5381,32 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * +mkdir directory +genfile --file=directory/a --length=1035 -genfile --file file.1 -genfile --file file.2 +echo "Creating the archive" +tar -c -v -f - --index-file=idx directory > archive -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Appending -plik.1 -Testing -plik.1 -plik.2 -plik.1 +echo "Testing the archive" +tar -tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +directory/ +directory/a " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append03.at:24" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append03.at:24: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5094,20 +5415,18 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -)" -echo append03.at:24 >"$at_check_line_file" +mkdir directory +genfile --file=directory/a --length=1035 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +echo \"Creating the archive\" +tar -c -v -f - --index-file=idx directory > archive + +echo \"Testing the archive\" +tar -tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5116,54 +5435,32 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * +mkdir directory +genfile --file=directory/a --length=1035 -genfile --file file.1 -genfile --file file.2 +echo "Creating the archive" +tar -c -v -f - --index-file=idx directory > archive -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Appending -plik.1 -Testing -plik.1 -plik.2 -plik.1 +echo "Testing the archive" +tar -tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +directory/ +directory/a " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append03.at:24" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/append03.at:24: + { set +x +$as_echo "$at_srcdir/indexfile.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5172,20 +5469,18 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -)" -echo append03.at:24 >"$at_check_line_file" +mkdir directory +genfile --file=directory/a --length=1035 + +echo \"Creating the archive\" +tar -c -v -f - --index-file=idx directory > archive -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +echo \"Testing the archive\" +tar -tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5194,80 +5489,53 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --file file.1 -genfile --file file.2 -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +mkdir directory +genfile --file=directory/a --length=1035 -genfile --file file.1 -genfile --file file.2 +echo "Creating the archive" +tar -c -v -f - --index-file=idx directory > archive -tar -c -f archive --transform 's/file/plik/' file.* -echo Appending -tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 -echo Testing -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Appending -plik.1 -Testing -plik.1 -plik.2 -plik.1 +echo "Testing the archive" +tar -tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +directory/ +directory/a " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/append03.at:24" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_12 -#AT_START_13 -# 13. xform-h.at:30: transforming hard links on create -at_setup_line='xform-h.at:30' -at_desc="transforming hard links on create" -$at_quiet $as_echo_n " 13: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_24 +#AT_START_25 +at_fn_group_banner 25 'verbose.at:26' \ + "tar cvf -" " " 3 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "13. xform-h.at:30: testing ..." + $as_echo "25. $at_setup_line: testing $at_desc ..." $at_traceon - - - { $at_traceoff -$as_echo "$at_srcdir/xform-h.at:39: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -5276,62 +5544,14 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir basedir -echo \"hello\" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive )" -echo xform-h.at:39 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -5340,45 +5560,29 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Default transform scope -test -Transforming hard links -test -Not transforming hard links -basedir/test +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/xform-h.at:39: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -5387,62 +5591,14 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir basedir -echo \"hello\" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive )" -echo xform-h.at:39 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -5451,45 +5607,29 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Default transform scope -test -Transforming hard links -test -Not transforming hard links -basedir/test +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/xform-h.at:39: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5498,62 +5638,14 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir basedir -echo \"hello\" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive )" -echo xform-h.at:39 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5562,45 +5654,29 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Default transform scope -test -Transforming hard links -test -Not transforming hard links -basedir/test +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/xform-h.at:39: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5609,62 +5685,14 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir basedir -echo \"hello\" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive )" -echo xform-h.at:39 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5673,45 +5701,29 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Default transform scope -test -Transforming hard links -test -Not transforming hard links -basedir/test +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/xform-h.at:39: + { set +x +$as_echo "$at_srcdir/verbose.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5720,31 +5732,14 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir basedir -echo \"hello\" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - - -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' - +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive )" -echo xform-h.at:39 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5753,134 +5748,279 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link - - -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' +genfile --file file --length 10240 +echo Creating the archive +tar cvf - file > archive +echo Testing the archive +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive +Testing the archive +file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_25 +#AT_START_26 +at_fn_group_banner 26 'gzip.at:24' \ + "gzip" " " 3 +at_xfail=no +( + $as_echo "26. $at_setup_line: testing $at_desc ..." + $at_traceon -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -mkdir basedir -echo "hello" > basedir/test -ln basedir/test basedir/test_link +unset TAR_OPTIONS -echo "Default transform scope" -tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' +{ set +x +$as_echo "$at_srcdir/gzip.at:29: +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -echo "Transforming hard links" -tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' +tar xfvz /dev/null 2>err +RC=\$? +sed -n '/^tar:/p' err >&2 +exit \$RC +" +at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:29" +( $at_check_trace; +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -echo "Not transforming hard links" -tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link -tar tvf archive | sed -n 's/.*test_link link to //p' +tar xfvz /dev/null 2>err +RC=$? +sed -n '/^tar:/p' err >&2 +exit $RC -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Default transform scope -test -Transforming hard links -test -Not transforming hard links -basedir/test +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Child returned status 1 +tar: Error is not recoverable: exiting now " | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" - -$at_failed && at_func_log_failure + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/gzip.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - - - - - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_13 -#AT_START_14 -# 14. xform01.at:26: transformations and GNU volume labels -at_setup_line='xform01.at:26' -at_desc="transformations and GNU volume labels" -$at_quiet $as_echo_n " 14: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_26 +#AT_START_27 +at_fn_group_banner 27 'recurse.at:21' \ + "recurse" " " 3 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "14. xform01.at:26: testing ..." + $as_echo "27. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/xform01.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/recurse.at:24: +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 * -genfile --file file -tar -cf archive.tar -V /label/ file -tar tf archive.tar +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive )" -echo xform01.at:29 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile --file file -tar -cf archive.tar -V /label/ file -tar tf archive.tar -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurse.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurse.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurse.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurse.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5889,137 +6029,182 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --file file -tar -cf archive.tar -V /label/ file -tar tf archive.tar -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "/label/ -file +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/xform01.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_14 -#AT_START_15 -# 15. exclude.at:23: exclude -at_setup_line='exclude.at:23' -at_desc="exclude" -$at_quiet $as_echo_n " 15: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_27 +#AT_START_28 +at_fn_group_banner 28 'recurs02.at:30' \ + "recurse: toggle" " " 3 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "15. exclude.at:23: testing ..." + $as_echo "28. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/exclude.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -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 +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -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 +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 )" -echo exclude.at:26 >"$at_check_line_file" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' - false; }; then - ( $at_traceon; +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurs02.at:33: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +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_func_filter_trace $? -else - ( :; +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -6028,177 +6213,172 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -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 +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -for option in exclude-tag exclude-tag-under exclude-tag-all -do - echo OPTION $option - tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "OPTION exclude-caches -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -OPTION exclude-caches-under -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -dir/rock/ -tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -dir/rock/ -OPTION exclude-caches-all -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -OPTION exclude-tag -dir/ -dir/blues -dir/folk/ -dir/folk/tagfile -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/folk/tagfile -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -OPTION exclude-tag-under -dir/ -dir/blues -dir/folk/ -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -OPTION exclude-tag-all -dir/ -dir/blues -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped -ARCHIVE -dir/ -dir/blues -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +tar cf archive directory1 directory2 +tar tf archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +directory1/ +directory2/ +directory2/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_15 -#AT_START_16 -# 16. exclude01.at:17: exclude wildcards -at_setup_line='exclude01.at:17' -at_desc="exclude wildcards" -$at_quiet $as_echo_n " 16: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_28 +#AT_START_29 +at_fn_group_banner 29 'shortrec.at:26' \ + "short records" " " 3 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "16. exclude01.at:17: testing ..." + $as_echo "29. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/exclude01.at:20: + { set +x +$as_echo "$at_srcdir/shortrec.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6207,46 +6387,17 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* - -tar cf archive --exclude=testdir/dir1/\\* \\ - --no-wildcards \\ - --exclude=testdir/dir2/\\* \\ - --wildcards \\ - --exclude=testdir/dir3/\\* \\ - testdir -tar tf archive | sort - -echo \"NEXT\" -tar cf archive testdir -tar t \"testdir/dir1/*\" -f archive | sort - -echo \"NEXT\" -tar cf archive testdir/dir1 -tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort - -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards \"testdir/dir1/*\" -f archive | sort - -rm -rf testdir +rm -r directory )" -echo exclude01.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6255,651 +6406,738 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort - -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort - -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +rm -r directory +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/shortrec.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -test -z "`sort < /dev/null 2>&1`" || exit 77 - +rm -r directory +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort +rm -r directory +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/shortrec.at:29: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort +rm -r directory +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir2/ -testdir/dir2/file2 -testdir/dir3/ -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -testdir/dir1/file1 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" +rm -r directory +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/shortrec.at:29: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null + +rm -r directory +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -$at_failed && at_func_log_failure +rm -r directory +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude01.at:20: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/shortrec.at:29: +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 * +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -test -z "`sort < /dev/null 2>&1`" || exit 77 +rm -r directory +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* +rm -r directory +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -tar cf archive --exclude=testdir/dir1/\\* \\ - --no-wildcards \\ - --exclude=testdir/dir2/\\* \\ - --wildcards \\ - --exclude=testdir/dir3/\\* \\ - testdir -tar tf archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t \"testdir/dir1/*\" -f archive | sort -echo \"NEXT\" -tar cf archive testdir/dir1 -tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards \"testdir/dir1/*\" -f archive | sort + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_29 +#AT_START_30 +at_fn_group_banner 30 'numeric.at:18' \ + "--numeric-owner basic tests" " " 3 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "30. $at_setup_line: testing $at_desc ..." + $at_traceon -rm -rf testdir -)" -echo exclude01.at:20 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + + + + + { set +x +$as_echo "$at_srcdir/numeric.at:29: +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 * +mkdir dir +genfile --file dir/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +MYUID=\$(id -u) || exit 77 +MYGID=\$(id -g) || exit 77 +MYUSR=\$(id -un) || exit 77 +MYGRP=\$(id -gn) || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +decho --create +tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +decho --list +tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' + +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +MYUID=$(id -u) || exit 77 +MYGID=$(id -g) || exit 77 +MYUSR=$(id -un) || exit 77 +MYGRP=$(id -gn) || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +decho --create +tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +decho --list +tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir2/ -testdir/dir2/file2 -testdir/dir3/ -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -testdir/dir1/file1 + +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "--create +--list +--diff +--extract +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "--create +OK +OK +OK +OK +--list +OK +OK +OK +OK +--diff +OK +OK +OK +OK +--extract +OK +OK +OK +OK " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude01.at:20: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { set +x +$as_echo "$at_srcdir/numeric.at:29: +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 * +mkdir dir +genfile --file dir/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +MYUID=\$(id -u) || exit 77 +MYGID=\$(id -g) || exit 77 +MYUSR=\$(id -un) || exit 77 +MYGRP=\$(id -gn) || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* +decho --create +tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -tar cf archive --exclude=testdir/dir1/\\* \\ - --no-wildcards \\ - --exclude=testdir/dir2/\\* \\ - --wildcards \\ - --exclude=testdir/dir3/\\* \\ - testdir -tar tf archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t \"testdir/dir1/*\" -f archive | sort +decho --list +tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -echo \"NEXT\" -tar cf archive testdir/dir1 -tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards \"testdir/dir1/*\" -f archive | sort +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -rm -rf testdir -)" -echo exclude01.at:20 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' + +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +MYUID=$(id -u) || exit 77 +MYGID=$(id -g) || exit 77 +MYUSR=$(id -un) || exit 77 +MYGRP=$(id -gn) || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +decho --create +tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +decho --list +tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "--create +--list +--diff +--extract +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "--create +OK +OK +OK +OK +--list +OK +OK +OK +OK +--diff +OK +OK +OK +OK +--extract +OK +OK +OK +OK +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/numeric.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +MYUID=\$(id -u) || exit 77 +MYGID=\$(id -g) || exit 77 +MYUSR=\$(id -un) || exit 77 +MYGRP=\$(id -gn) || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +decho --create +tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +decho --list +tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir2/ -testdir/dir2/file2 -testdir/dir3/ -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -testdir/dir1/file1 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" -$at_failed && at_func_log_failure -$at_traceon; } +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' - { $at_traceoff -$as_echo "$at_srcdir/exclude01.at:20: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +MYUID=$(id -u) || exit 77 +MYGID=$(id -g) || exit 77 +MYUSR=$(id -un) || exit 77 +MYGRP=$(id -gn) || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* +decho --create +tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -tar cf archive --exclude=testdir/dir1/\\* \\ - --no-wildcards \\ - --exclude=testdir/dir2/\\* \\ - --wildcards \\ - --exclude=testdir/dir3/\\* \\ - testdir -tar tf archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t \"testdir/dir1/*\" -f archive | sort +decho --list +tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -echo \"NEXT\" -tar cf archive testdir/dir1 -tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards \"testdir/dir1/*\" -f archive | sort +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -rm -rf testdir -)" -echo exclude01.at:20 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "--create +--list +--diff +--extract +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "--create +OK +OK +OK +OK +--list +OK +OK +OK +OK +--diff +OK +OK +OK +OK +--extract +OK +OK +OK +OK +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/numeric.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +MYUID=\$(id -u) || exit 77 +MYGID=\$(id -g) || exit 77 +MYUSR=\$(id -un) || exit 77 +MYGRP=\$(id -gn) || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +decho --create +tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +decho --list +tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}' +tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}' + +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +MYUID=$(id -u) || exit 77 +MYGID=$(id -g) || exit 77 +MYUSR=$(id -un) || exit 77 +MYGRP=$(id -gn) || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +decho --create +tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +decho --list +tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +decho --diff +tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir2/ -testdir/dir2/file2 -testdir/dir3/ -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -testdir/dir1/file1 + +decho --extract +tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}' +tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}' + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "--create +--list +--diff +--extract +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "--create +OK +OK +OK +OK +--list +OK +OK +OK +OK +--diff +OK +OK +OK +OK +--extract +OK +OK +OK +OK " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude01.at:20: -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_30 +#AT_START_31 +at_fn_group_banner 31 'same-order01.at:27' \ + "working -C with --same-order" " " 4 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "31. $at_setup_line: testing $at_desc ..." + $at_traceon -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* -tar cf archive --exclude=testdir/dir1/\\* \\ - --no-wildcards \\ - --exclude=testdir/dir2/\\* \\ - --wildcards \\ - --exclude=testdir/dir3/\\* \\ - testdir -tar tf archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t \"testdir/dir1/*\" -f archive | sort -echo \"NEXT\" -tar cf archive testdir/dir1 -tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards \"testdir/dir1/*\" -f archive | sort + { set +x +$as_echo "$at_srcdir/same-order01.at:30: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * -rm -rf testdir -)" -echo exclude01.at:20 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * @@ -6907,137 +7145,115 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +ls directory|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/same-order01.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H 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 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -tar cf archive --exclude=testdir/dir1/\* \ - --no-wildcards \ - --exclude=testdir/dir2/\* \ - --wildcards \ - --exclude=testdir/dir3/\* \ - testdir -tar tf archive | sort +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -echo "NEXT" -tar cf archive testdir -tar t "testdir/dir1/*" -f archive | sort +ls directory|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -echo "NEXT" -tar cf archive testdir/dir1 -tar t --no-wildcards "testdir/dir1/*" -f archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards "testdir/dir1/*" -f archive | sort +test -z "`sort < /dev/null 2>&1`" || exit 77 -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir2/ -testdir/dir2/file2 -testdir/dir3/ -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -NEXT -testdir/dir1/* -testdir/dir1/file1 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" -$at_failed && at_func_log_failure -$at_traceon; } +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 +ls directory|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + { set +x +$as_echo "$at_srcdir/same-order01.at:30: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_16 -#AT_START_17 -# 17. exclude02.at:17: exclude: anchoring -at_setup_line='exclude02.at:17' -at_desc="exclude: anchoring" -$at_quiet $as_echo_n " 17: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "17. exclude02.at:17: testing ..." - $at_traceon +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 - { $at_traceoff -$as_echo "$at_srcdir/exclude02.at:20: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +ls directory|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -7045,51 +7261,57 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -tar cf archive --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -echo \"SUB 1\" -tar cf archive --no-anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort +ls directory|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -echo \"SUB 2\" -tar cf archive --anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort + { set +x +$as_echo "$at_srcdir/same-order01.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -echo \"SUB 3\" -tar cf archive testdir file1.txt -tar t \"file1.txt\" -f archive | sort -echo \"SUB 4\" -tar t --no-anchored \"file1.txt\" -f archive | sort +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -echo \"SUB 5\" -tar t --anchored \"file1.txt\" -f archive | sort -rm -rf testdir file1.txt +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -)" -echo exclude02.at:20 >"$at_check_line_file" +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +ls directory|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -7097,49 +7319,57 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort +ls directory|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort + { set +x +$as_echo "$at_srcdir/same-order01.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort -rm -rf testdir file1.txt +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * @@ -7147,122 +7377,141 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort +ls directory|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_31 +#AT_START_32 +at_fn_group_banner 32 'same-order02.at:26' \ + "multiple -C options" " " 4 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "32. $at_setup_line: testing $at_desc ..." + $at_traceon -rm -rf testdir file1.txt -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file2 -SUB 1 -testdir/ -testdir/file2 -SUB 2 -testdir/ -testdir/file1.txt -testdir/file2 -SUB 3 -file1.txt -SUB 4 -file1.txt -testdir/file1.txt -SUB 5 -file1.txt -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude02.at:20: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + { set +x +$as_echo "$at_srcdir/same-order02.at:29: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir en +mkdir to +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 +ls en +echo separator +ls to +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -tar cf archive --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -echo \"SUB 1\" -tar cf archive --no-anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort +mkdir en +mkdir to -echo \"SUB 2\" -tar cf archive --anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 -echo \"SUB 3\" -tar cf archive testdir file1.txt -tar t \"file1.txt\" -f archive | sort +ls en +echo separator +ls to +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -echo \"SUB 4\" -tar t --no-anchored \"file1.txt\" -f archive | sort + { set +x +$as_echo "$at_srcdir/same-order02.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -echo \"SUB 5\" -tar t --anchored \"file1.txt\" -f archive | sort +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -rm -rf testdir file1.txt +mkdir en +mkdir to -)" -echo exclude02.at:20 >"$at_check_line_file" +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +ls en +echo separator +ls to +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7271,124 +7520,37 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - +mkdir en +mkdir to -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort - -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort - -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort - -rm -rf testdir file1.txt - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -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 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort - -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort - -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort - -rm -rf testdir file1.txt +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file2 -SUB 1 -testdir/ -testdir/file2 -SUB 2 -testdir/ -testdir/file1.txt -testdir/file2 -SUB 3 -file1.txt -SUB 4 -file1.txt -testdir/file1.txt -SUB 5 -file1.txt +ls en +echo separator +ls to +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator +file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude02.at:20: + { set +x +$as_echo "$at_srcdir/same-order02.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7397,100 +7559,24 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 1\" -tar cf archive --no-anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 2\" -tar cf archive --anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 3\" -tar cf archive testdir file1.txt -tar t \"file1.txt\" -f archive | sort - -echo \"SUB 4\" -tar t --no-anchored \"file1.txt\" -f archive | sort - -echo \"SUB 5\" -tar t --anchored \"file1.txt\" -f archive | sort +mkdir en +mkdir to -rm -rf testdir file1.txt +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 +ls en +echo separator +ls to )" -echo exclude02.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort - -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort - -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort - -rm -rf testdir file1.txt - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7499,74 +7585,37 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort - -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort - -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort +mkdir en +mkdir to -rm -rf testdir file1.txt +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file2 -SUB 1 -testdir/ -testdir/file2 -SUB 2 -testdir/ -testdir/file1.txt -testdir/file2 -SUB 3 -file1.txt -SUB 4 -file1.txt -testdir/file1.txt -SUB 5 -file1.txt +ls en +echo separator +ls to +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator +file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude02.at:20: + { set +x +$as_echo "$at_srcdir/same-order02.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7575,100 +7624,24 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 1\" -tar cf archive --no-anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 2\" -tar cf archive --anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 3\" -tar cf archive testdir file1.txt -tar t \"file1.txt\" -f archive | sort - -echo \"SUB 4\" -tar t --no-anchored \"file1.txt\" -f archive | sort - -echo \"SUB 5\" -tar t --anchored \"file1.txt\" -f archive | sort +mkdir en +mkdir to -rm -rf testdir file1.txt +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 +ls en +echo separator +ls to )" -echo exclude02.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort - -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort - -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort - -rm -rf testdir file1.txt - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7677,74 +7650,37 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort - -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort - -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort - -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort +mkdir en +mkdir to -rm -rf testdir file1.txt +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file2 -SUB 1 -testdir/ -testdir/file2 -SUB 2 -testdir/ -testdir/file1.txt -testdir/file2 -SUB 3 -file1.txt -SUB 4 -file1.txt -testdir/file1.txt -SUB 5 -file1.txt +ls en +echo separator +ls to +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator +file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude02.at:20: + { set +x +$as_echo "$at_srcdir/same-order02.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7753,50 +7689,24 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 - -tar cf archive --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 1\" -tar cf archive --no-anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 2\" -tar cf archive --anchored \\ - --exclude=\"file1.txt\" \\ - testdir -tar tf archive | sort - -echo \"SUB 3\" -tar cf archive testdir file1.txt -tar t \"file1.txt\" -f archive | sort - -echo \"SUB 4\" -tar t --no-anchored \"file1.txt\" -f archive | sort - -echo \"SUB 5\" -tar t --anchored \"file1.txt\" -f archive | sort +mkdir en +mkdir to -rm -rf testdir file1.txt +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 +ls en +echo separator +ls to )" -echo exclude02.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7805,48 +7715,232 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir en +mkdir to +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 +ls en +echo separator +ls to +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_32 +#AT_START_33 +at_fn_group_banner 33 'append.at:22' \ + "append" " " 5 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "33. $at_setup_line: testing $at_desc ..." + $at_traceon -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort -rm -rf testdir file1.txt -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + + { set +x +$as_echo "$at_srcdir/append.at:25: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "append.at:25" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append.at:25: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "append.at:25" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append.at:25: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "append.at:25" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append.at:25: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "append.at:25" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append.at:25: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "append.at:25" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7854,193 +7948,279 @@ export TEST_TAR_FORMAT TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +touch file1 + touch file2 + tar cf archive file1 + tar rf archive file2 + tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } -test -z "`sort < /dev/null 2>&1`" || exit 77 -rm -rf testdir -mkdir -p testdir -touch file1.txt -touch testdir/file1.txt -touch testdir/file2 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_33 +#AT_START_34 +at_fn_group_banner 34 'append01.at:29' \ + "appending files with long names" " " 5 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "34. $at_setup_line: testing $at_desc ..." + $at_traceon -tar cf archive --exclude="file1.txt" \ - testdir -tar tf archive | sort -echo "SUB 1" -tar cf archive --no-anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort -echo "SUB 2" -tar cf archive --anchored \ - --exclude="file1.txt" \ - testdir -tar tf archive | sort -echo "SUB 3" -tar cf archive testdir file1.txt -tar t "file1.txt" -f archive | sort -echo "SUB 4" -tar t --no-anchored "file1.txt" -f archive | sort -echo "SUB 5" -tar t --anchored "file1.txt" -f archive | sort -rm -rf testdir file1.txt + { set +x +$as_echo "$at_srcdir/append01.at:34: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file2 -SUB 1 -testdir/ -testdir/file2 -SUB 2 -testdir/ -testdir/file1.txt -testdir/file2 -SUB 3 -file1.txt -SUB 4 -file1.txt -testdir/file1.txt -SUB 5 -file1.txt +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/append01.at:34: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_17 -#AT_START_18 -# 18. exclude03.at:17: exclude: wildcards match slash -at_setup_line='exclude03.at:17' -at_desc="exclude: wildcards match slash" -$at_quiet $as_echo_n " 18: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "18. exclude03.at:17: testing ..." - $at_traceon - + { set +x +$as_echo "$at_srcdir/append01.at:34: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + { set +x +$as_echo "$at_srcdir/append01.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * - { $at_traceoff -$as_echo "$at_srcdir/exclude03.at:20: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX +touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 +This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } -test -z "`sort < /dev/null 2>&1`" || exit 77 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\\*f\\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* -tar cf archive --exclude='testdir*f*1' \\ - --no-wildcards-match-slash \\ - --exclude='testdir*f*2' \\ - --wildcards-match-slash \\ - --exclude='testdir*f*3' \\ - testdir -tar tf archive | sort -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_34 +#AT_START_35 +at_fn_group_banner 35 'append02.at:55' \ + "append vs. create" " " 5 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "35. $at_setup_line: testing $at_desc ..." + $at_traceon -echo \"NEXT\" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort -echo \"NEXT\" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort -rm -rf testdir -)" -echo exclude03.at:20 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/append02.at:58: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +# Make sure file timestamps in the archive will not differ +MTIME=\"--mtime=@0\" -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +# 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 "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar \$MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar \$MTIME -cf archive.2 -T /dev/null +tar \$MTIME -rf archive.2 file1 +tar \$MTIME -rf archive.2 file2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +echo Comparing archives +cmp archive.1 archive.2 +)" +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8049,70 +8229,44 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +# Make sure file timestamps in the archive will not differ +MTIME="--mtime=@0" -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +# 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 "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar $MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar $MTIME -cf archive.2 -T /dev/null +tar $MTIME -rf archive.2 file1 +tar $MTIME -rf archive.2 file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir1/* -testdir/dir2/ -testdir/dir2/* -testdir/dir2/file2 -testdir/dir3/ -testdir/dir3/* -NEXT -testdir/*f*1 -testdir/dir1/file1 -NEXT -testdir/*f*1 -NEXT -testdir/*f*1 -testdir/dir1/file1 +echo Comparing archives +cmp archive.1 archive.2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 +Creating archive.2 +Comparing archives " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude03.at:20: + { set +x +$as_echo "$at_srcdir/append02.at:58: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8121,92 +8275,31 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - +# Make sure file timestamps in the archive will not differ +MTIME=\"--mtime=@0\" -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\\*f\\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* +# 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 -tar cf archive --exclude='testdir*f*1' \\ - --no-wildcards-match-slash \\ - --exclude='testdir*f*2' \\ - --wildcards-match-slash \\ - --exclude='testdir*f*3' \\ - testdir -tar tf archive | sort - -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort - -echo \"NEXT\" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort - -echo \"NEXT\" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar \$MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar \$MTIME -cf archive.2 -T /dev/null +tar \$MTIME -rf archive.2 file1 +tar \$MTIME -rf archive.2 file2 +echo Comparing archives +cmp archive.1 archive.2 )" -echo exclude03.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort - -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort - -echo "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort - -rm -rf testdir - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8215,70 +8308,44 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +# Make sure file timestamps in the archive will not differ +MTIME="--mtime=@0" -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +# 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 "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar $MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar $MTIME -cf archive.2 -T /dev/null +tar $MTIME -rf archive.2 file1 +tar $MTIME -rf archive.2 file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir1/* -testdir/dir2/ -testdir/dir2/* -testdir/dir2/file2 -testdir/dir3/ -testdir/dir3/* -NEXT -testdir/*f*1 -testdir/dir1/file1 -NEXT -testdir/*f*1 -NEXT -testdir/*f*1 -testdir/dir1/file1 +echo Comparing archives +cmp archive.1 archive.2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 +Creating archive.2 +Comparing archives " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude03.at:20: + { set +x +$as_echo "$at_srcdir/append02.at:58: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8287,92 +8354,31 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\\*f\\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* - -tar cf archive --exclude='testdir*f*1' \\ - --no-wildcards-match-slash \\ - --exclude='testdir*f*2' \\ - --wildcards-match-slash \\ - --exclude='testdir*f*3' \\ - testdir -tar tf archive | sort - -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +# Make sure file timestamps in the archive will not differ +MTIME=\"--mtime=@0\" -echo \"NEXT\" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +# 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 \"NEXT\" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar \$MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar \$MTIME -cf archive.2 -T /dev/null +tar \$MTIME -rf archive.2 file1 +tar \$MTIME -rf archive.2 file2 +echo Comparing archives +cmp archive.1 archive.2 )" -echo exclude03.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort - -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort - -echo "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort - -rm -rf testdir - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8381,70 +8387,44 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +# Make sure file timestamps in the archive will not differ +MTIME="--mtime=@0" -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +# 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 "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar $MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar $MTIME -cf archive.2 -T /dev/null +tar $MTIME -rf archive.2 file1 +tar $MTIME -rf archive.2 file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir1/* -testdir/dir2/ -testdir/dir2/* -testdir/dir2/file2 -testdir/dir3/ -testdir/dir3/* -NEXT -testdir/*f*1 -testdir/dir1/file1 -NEXT -testdir/*f*1 -NEXT -testdir/*f*1 -testdir/dir1/file1 +echo Comparing archives +cmp archive.1 archive.2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 +Creating archive.2 +Comparing archives " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude03.at:20: + { set +x +$as_echo "$at_srcdir/append02.at:58: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8453,92 +8433,31 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\\*f\\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* - -tar cf archive --exclude='testdir*f*1' \\ - --no-wildcards-match-slash \\ - --exclude='testdir*f*2' \\ - --wildcards-match-slash \\ - --exclude='testdir*f*3' \\ - testdir -tar tf archive | sort - -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +# Make sure file timestamps in the archive will not differ +MTIME=\"--mtime=@0\" -echo \"NEXT\" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +# 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 \"NEXT\" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar \$MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar \$MTIME -cf archive.2 -T /dev/null +tar \$MTIME -rf archive.2 file1 +tar \$MTIME -rf archive.2 file2 +echo Comparing archives +cmp archive.1 archive.2 )" -echo exclude03.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort - -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort - -echo "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort - -rm -rf testdir - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8547,70 +8466,44 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* - -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +# Make sure file timestamps in the archive will not differ +MTIME="--mtime=@0" -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +# 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 "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar $MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar $MTIME -cf archive.2 -T /dev/null +tar $MTIME -rf archive.2 file1 +tar $MTIME -rf archive.2 file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir1/* -testdir/dir2/ -testdir/dir2/* -testdir/dir2/file2 -testdir/dir3/ -testdir/dir3/* -NEXT -testdir/*f*1 -testdir/dir1/file1 -NEXT -testdir/*f*1 -NEXT -testdir/*f*1 -testdir/dir1/file1 +echo Comparing archives +cmp archive.1 archive.2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 +Creating archive.2 +Comparing archives " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude03.at:20: + { set +x +$as_echo "$at_srcdir/append02.at:58: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8619,46 +8512,31 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\\*f\\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\\* -touch testdir/dir2/file2 -touch testdir/dir2/\\* -touch testdir/dir3/file3 -touch testdir/dir3/\\* - -tar cf archive --exclude='testdir*f*1' \\ - --no-wildcards-match-slash \\ - --exclude='testdir*f*2' \\ - --wildcards-match-slash \\ - --exclude='testdir*f*3' \\ - testdir -tar tf archive | sort - -echo \"NEXT\" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +# Make sure file timestamps in the archive will not differ +MTIME=\"--mtime=@0\" -echo \"NEXT\" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +# 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 \"NEXT\" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo Creating archive.1 +tar \$MTIME -cf archive.1 file1 file2 -rm -rf testdir +echo Creating archive.2 +tar \$MTIME -cf archive.2 -T /dev/null +tar \$MTIME -rf archive.2 file1 +tar \$MTIME -rf archive.2 file2 +echo Comparing archives +cmp archive.1 archive.2 )" -echo exclude03.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8667,312 +8545,430 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +genfile --file file1 +genfile --file file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 +# 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 -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* +echo Creating archive.1 +tar $MTIME -cf archive.1 file1 file2 -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort +echo Creating archive.2 +tar $MTIME -cf archive.2 -T /dev/null +tar $MTIME -rf archive.2 file1 +tar $MTIME -rf archive.2 file2 -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort +echo Comparing archives +cmp archive.1 archive.2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 +Creating archive.2 +Comparing archives +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort -echo "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_35 +#AT_START_36 +at_fn_group_banner 36 'append03.at:21' \ + "append with name transformation" " " 5 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "36. $at_setup_line: testing $at_desc ..." + $at_traceon -test -z "`sort < /dev/null 2>&1`" || exit 77 +# Description: Make sure filenames are transformed during append. -rm -rf testdir -mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 -touch testdir/\*f\*1 -touch testdir/dir1/file1 -touch testdir/dir1/\* -touch testdir/dir2/file2 -touch testdir/dir2/\* -touch testdir/dir3/file3 -touch testdir/dir3/\* -tar cf archive --exclude='testdir*f*1' \ - --no-wildcards-match-slash \ - --exclude='testdir*f*2' \ - --wildcards-match-slash \ - --exclude='testdir*f*3' \ - testdir -tar tf archive | sort -echo "NEXT" -tar cf archive testdir -tar t --wildcards 'testdir/*f*1' -f archive | sort + { set +x +$as_echo "$at_srcdir/append03.at:26: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * -echo "NEXT" -tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +genfile --file file.1 +genfile --file file.2 -echo "NEXT" -tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -rm -rf testdir +genfile --file file.1 +genfile --file file.2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir1/ -testdir/dir1/* -testdir/dir2/ -testdir/dir2/* -testdir/dir2/file2 -testdir/dir3/ -testdir/dir3/* -NEXT -testdir/*f*1 -testdir/dir1/file1 -NEXT -testdir/*f*1 -NEXT -testdir/*f*1 -testdir/dir1/file1 +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Appending +plik.1 +Testing +plik.1 +plik.2 +plik.1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/append03.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * +genfile --file file.1 +genfile --file file.2 +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_18 -#AT_START_19 -# 19. exclude04.at:17: exclude: case insensitive -at_setup_line='exclude04.at:17' -at_desc="exclude: case insensitive" -$at_quiet $as_echo_n " 19: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "19. exclude04.at:17: testing ..." - $at_traceon - +genfile --file file.1 +genfile --file file.2 +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Appending +plik.1 +Testing +plik.1 +plik.2 +plik.1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + { set +x +$as_echo "$at_srcdir/append03.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +genfile --file file.1 +genfile --file file.2 - { $at_traceoff -$as_echo "$at_srcdir/exclude04.at:20: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +genfile --file file.1 +genfile --file file.2 -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Appending +plik.1 +Testing +plik.1 +plik.2 +plik.1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + { set +x +$as_echo "$at_srcdir/append03.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +genfile --file file.1 +genfile --file file.2 -tar cf archive --exclude=FILE2 \\ - --exclude=file1 \\ - --ignore-case \\ - --exclude=file3 \\ - --no-ignore-case \\ - --exclude=FILE2 \\ - --exclude=file4 \\ - testdir -tar tf archive | sort +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -echo \"SUB 1\" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +genfile --file file.1 +genfile --file file.2 -echo \"SUB 2\" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Appending +plik.1 +Testing +plik.1 +plik.2 +plik.1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -echo \"SUB 3\" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + { set +x +$as_echo "$at_srcdir/append03.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -rm -rf testdir +genfile --file file.1 +genfile --file file.2 +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive )" -echo exclude04.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +genfile --file file.1 +genfile --file file.2 -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar -c -f archive --transform 's/file/plik/' file.* +echo Appending +tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1 +echo Testing +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Appending +plik.1 +Testing +plik.1 +plik.2 +plik.1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_36 +#AT_START_37 +at_fn_group_banner 37 'append04.at:29' \ + "append with verify" " " 5 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "37. $at_setup_line: testing $at_desc ..." + $at_traceon -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort -rm -rf testdir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + + { set +x +$as_echo "$at_srcdir/append04.at:32: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +# Create two empty files: +touch file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +# Create an archive: +tar cpfW archive.tar file1 file2 -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +# Append it to the already created archive: +tar rpfW archive.tar file3 -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +# Verify content of the new archive: +tar -tf archive.tar +)" +at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +# Create two empty files: +touch file1 file2 -rm -rf testdir +# Create an archive: +tar cpfW archive.tar file1 file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir/ -testdir/dir/File1 -testdir/dir/File2 -testdir/dir/File4 -testdir/file2 -SUB 1 -testdir/dir/File2 -SUB 2 -testdir/dir/File2 -testdir/file2 -SUB 3 -testdir/dir/File2 +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 + +# Append it to the already created archive: +tar rpfW archive.tar file3 + +# Verify content of the new archive: +tar -tf archive.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +== +file1 +file2 +file3 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude04.at:20: + { set +x +$as_echo "$at_srcdir/append04.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8981,49 +8977,26 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +# Create two empty files: +touch file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 - -tar cf archive --exclude=FILE2 \\ - --exclude=file1 \\ - --ignore-case \\ - --exclude=file3 \\ - --no-ignore-case \\ - --exclude=FILE2 \\ - --exclude=file4 \\ - testdir -tar tf archive | sort - -echo \"SUB 1\" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort - -echo \"SUB 2\" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +# Create an archive: +tar cpfW archive.tar file1 file2 -echo \"SUB 3\" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 -rm -rf testdir +# Append it to the already created archive: +tar rpfW archive.tar file3 +# Verify content of the new archive: +tar -tf archive.tar )" -echo exclude04.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -9032,391 +9005,628 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +# Create two empty files: +touch file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - +# Create an archive: +tar cpfW archive.tar file1 file2 -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 + +# Append it to the already created archive: +tar rpfW archive.tar file3 + +# Verify content of the new archive: +tar -tf archive.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +== +file1 +file2 +file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort + { set +x +$as_echo "$at_srcdir/append04.at:32: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +# Create two empty files: +touch file1 file2 -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +# Create an archive: +tar cpfW archive.tar file1 file2 -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 -rm -rf testdir +# Append it to the already created archive: +tar rpfW archive.tar file3 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +# Verify content of the new archive: +tar -tf archive.tar +)" +at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +# Create two empty files: +touch file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - +# Create an archive: +tar cpfW archive.tar file1 file2 -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 + +# Append it to the already created archive: +tar rpfW archive.tar file3 + +# Verify content of the new archive: +tar -tf archive.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +== +file1 +file2 +file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort + { set +x +$as_echo "$at_srcdir/append04.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +# Create two empty files: +touch file1 file2 -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +# Create an archive: +tar cpfW archive.tar file1 file2 -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 -rm -rf testdir +# Append it to the already created archive: +tar rpfW archive.tar file3 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir/ -testdir/dir/File1 -testdir/dir/File2 -testdir/dir/File4 -testdir/file2 -SUB 1 -testdir/dir/File2 -SUB 2 -testdir/dir/File2 -testdir/file2 -SUB 3 -testdir/dir/File2 +# Verify content of the new archive: +tar -tf archive.tar +)" +at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +# Create two empty files: +touch file1 file2 + +# Create an archive: +tar cpfW archive.tar file1 file2 + +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 + +# Append it to the already created archive: +tar rpfW archive.tar file3 + +# Verify content of the new archive: +tar -tf archive.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +== +file1 +file2 +file3 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude04.at:20: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { set +x +$as_echo "$at_srcdir/append04.at:32: +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 * +# Create two empty files: +touch file1 file2 -test -z "`sort < /dev/null 2>&1`" || exit 77 +# Create an archive: +tar cpfW archive.tar file1 file2 +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +# Append it to the already created archive: +tar rpfW archive.tar file3 -tar cf archive --exclude=FILE2 \\ - --exclude=file1 \\ - --ignore-case \\ - --exclude=file3 \\ - --no-ignore-case \\ - --exclude=FILE2 \\ - --exclude=file4 \\ - testdir -tar tf archive | sort +# Verify content of the new archive: +tar -tf archive.tar +)" +at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -echo \"SUB 1\" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +# Create two empty files: +touch file1 file2 -echo \"SUB 2\" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +# Create an archive: +tar cpfW archive.tar file1 file2 -echo \"SUB 3\" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +# Verify created archive by listing its content: +tar -tf archive.tar +echo == +# Create another empty file: +touch file3 + +# Append it to the already created archive: +tar rpfW archive.tar file3 + +# Verify content of the new archive: +tar -tf archive.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +== +file1 +file2 +file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -rm -rf testdir -)" -echo exclude04.at:20 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_37 +#AT_START_38 +at_fn_group_banner 38 'append05.at:32' \ + "append after changed blocking" " " 5 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "38. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/append05.at:35: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +for f in a b c d e f g h i +do + echo \$f > \$f +done -test -z "`sort < /dev/null 2>&1`" || exit 77 +decho 'creating archive' +tar -cf archive -b1 a b c +tar tf archive -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort +decho 'adding g h i' +tar -vrf archive -b5 g h i -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +decho 'resulting archive' +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +for f in a b c d e f g h i +do + echo $f > $f +done -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +decho 'creating archive' +tar -cf archive -b1 a b c -rm -rf testdir +tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive + +decho 'adding g h i' +tar -vrf archive -b5 g h i + +decho 'resulting archive' +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "creating archive +adding d e f +adding g h i +resulting archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "creating archive +a +b +c +adding d e f +d +e +f +== +a +b +c +d +e +f +adding g h i +g +h +i +resulting archive +a +b +c +d +e +f +g +h +i +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append05.at:35: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +for f in a b c d e f g h i +do + echo \$f > \$f +done -test -z "`sort < /dev/null 2>&1`" || exit 77 +decho 'creating archive' +tar -cf archive -b1 a b c +tar tf archive -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort +decho 'adding g h i' +tar -vrf archive -b5 g h i -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +decho 'resulting archive' +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +for f in a b c d e f g h i +do + echo $f > $f +done -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +decho 'creating archive' +tar -cf archive -b1 a b c -rm -rf testdir +tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir/ -testdir/dir/File1 -testdir/dir/File2 -testdir/dir/File4 -testdir/file2 -SUB 1 -testdir/dir/File2 -SUB 2 -testdir/dir/File2 -testdir/file2 -SUB 3 -testdir/dir/File2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive -$at_failed && at_func_log_failure -$at_traceon; } +decho 'adding g h i' +tar -vrf archive -b5 g h i - { $at_traceoff -$as_echo "$at_srcdir/exclude04.at:20: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +decho 'resulting archive' +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "creating archive +adding d e f +adding g h i +resulting archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "creating archive +a +b +c +adding d e f +d +e +f +== +a +b +c +d +e +f +adding g h i +g +h +i +resulting archive +a +b +c +d +e +f +g +h +i +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append05.at:35: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +for f in a b c d e f g h i +do + echo \$f > \$f +done -test -z "`sort < /dev/null 2>&1`" || exit 77 +decho 'creating archive' +tar -cf archive -b1 a b c +tar tf archive -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive -tar cf archive --exclude=FILE2 \\ - --exclude=file1 \\ - --ignore-case \\ - --exclude=file3 \\ - --no-ignore-case \\ - --exclude=FILE2 \\ - --exclude=file4 \\ - testdir -tar tf archive | sort +decho 'adding g h i' +tar -vrf archive -b5 g h i -echo \"SUB 1\" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +decho 'resulting archive' +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -echo \"SUB 2\" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +for f in a b c d e f g h i +do + echo $f > $f +done -echo \"SUB 3\" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +decho 'creating archive' +tar -cf archive -b1 a b c -rm -rf testdir +tar tf archive -)" -echo exclude04.at:20 >"$at_check_line_file" +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive + +decho 'adding g h i' +tar -vrf archive -b5 g h i -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +decho 'resulting archive' +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "creating archive +adding d e f +adding g h i +resulting archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "creating archive +a +b +c +adding d e f +d +e +f +== +a +b +c +d +e +f +adding g h i +g +h +i +resulting archive +a +b +c +d +e +f +g +h +i +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/append05.at:35: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +for f in a b c d e f g h i +do + echo \$f > \$f +done -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 - -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +decho 'creating archive' +tar -cf archive -b1 a b c -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +tar tf archive -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive -rm -rf testdir +decho 'adding g h i' +tar -vrf archive -b5 g h i -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +decho 'resulting archive' +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9425,70 +9635,73 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +for f in a b c d e f g h i +do + echo $f > $f +done -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 - -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +decho 'creating archive' +tar -cf archive -b1 a b c -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +tar tf archive -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive -rm -rf testdir +decho 'adding g h i' +tar -vrf archive -b5 g h i -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir/ -testdir/dir/File1 -testdir/dir/File2 -testdir/dir/File4 -testdir/file2 -SUB 1 -testdir/dir/File2 -SUB 2 -testdir/dir/File2 -testdir/file2 -SUB 3 -testdir/dir/File2 +decho 'resulting archive' +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "creating archive +adding d e f +adding g h i +resulting archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "creating archive +a +b +c +adding d e f +d +e +f +== +a +b +c +d +e +f +adding g h i +g +h +i +resulting archive +a +b +c +d +e +f +g +h +i " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude04.at:20: + { set +x +$as_echo "$at_srcdir/append05.at:35: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -9497,49 +9710,29 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +for f in a b c d e f g h i +do + echo \$f > \$f +done -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 - -tar cf archive --exclude=FILE2 \\ - --exclude=file1 \\ - --ignore-case \\ - --exclude=file3 \\ - --no-ignore-case \\ - --exclude=FILE2 \\ - --exclude=file4 \\ - testdir -tar tf archive | sort - -echo \"SUB 1\" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +decho 'creating archive' +tar -cf archive -b1 a b c -echo \"SUB 2\" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +tar tf archive -echo \"SUB 3\" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive -rm -rf testdir +decho 'adding g h i' +tar -vrf archive -b5 g h i +decho 'resulting archive' +tar tf archive )" -echo exclude04.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -9548,219 +9741,126 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +for f in a b c d e f g h i +do + echo $f > $f +done -test -z "`sort < /dev/null 2>&1`" || exit 77 - +decho 'creating archive' +tar -cf archive -b1 a b c -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 +tar tf archive -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort +decho 'adding d e f' +tar -vrf archive -b3 d e f +echo == +tar tf archive -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +decho 'adding g h i' +tar -vrf archive -b5 g h i -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort - -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort - -rm -rf testdir - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir -mkdir -p testdir/dir -touch testdir/file1 -touch testdir/file2 -touch testdir/file3 -touch testdir/file4 -touch testdir/dir/File1 -touch testdir/dir/File2 -touch testdir/dir/File3 -touch testdir/dir/File4 - -tar cf archive --exclude=FILE2 \ - --exclude=file1 \ - --ignore-case \ - --exclude=file3 \ - --no-ignore-case \ - --exclude=FILE2 \ - --exclude=file4 \ - testdir -tar tf archive | sort - -echo "SUB 1" -tar cf archive testdir -tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort - -echo "SUB 2" -tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort - -echo "SUB 3" -tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort - -rm -rf testdir - -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/dir/ -testdir/dir/File1 -testdir/dir/File2 -testdir/dir/File4 -testdir/file2 -SUB 1 -testdir/dir/File2 -SUB 2 -testdir/dir/File2 -testdir/file2 -SUB 3 -testdir/dir/File2 +decho 'resulting archive' +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "creating archive +adding d e f +adding g h i +resulting archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "creating archive +a +b +c +adding d e f +d +e +f +== +a +b +c +d +e +f +adding g h i +g +h +i +resulting archive +a +b +c +d +e +f +g +h +i " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_19 -#AT_START_20 -# 20. exclude05.at:19: exclude: lots of excludes -at_setup_line='exclude05.at:19' -at_desc="exclude: lots of excludes" -$at_quiet $as_echo_n " 20: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_38 +#AT_START_39 +at_fn_group_banner 39 'xform-h.at:30' \ + "transforming hard links on create" " " 6 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "20. exclude05.at:19: testing ..." + $as_echo "39. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/exclude05.at:22: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ - while read name - do - genfile --file \$name - done - -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile - -tar cf archive --anchored --exclude-from=exclfile \\ - testdir -tar tf archive | sort - -echo \"NEXT\" -tar cf archive --exclude-from=exclfile \\ - testdir -tar tf archive | sort - -rm -rf testdir exclfile -)" -echo exclude05.at:22 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/xform-h.at:39: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done +echo \"Default transform scope\" +tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort +echo \"Transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo \"Not transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +)" +at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -9769,54 +9869,44 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file10 -testdir/file11 -testdir/file9 -NEXT -testdir/ -testdir/file10 -testdir/file11 -testdir/file9 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude05.at:22: + { set +x +$as_echo "$at_srcdir/xform-h.at:39: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -9825,74 +9915,28 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ - while read name - do - genfile --file \$name - done +echo \"Default transform scope\" +tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \\ - testdir -tar tf archive | sort +echo \"Transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo \"NEXT\" -tar cf archive --exclude-from=exclfile \\ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo \"Not transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' )" -echo exclude05.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done - -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort - -rm -rf testdir exclfile - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -9901,54 +9945,44 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file10 -testdir/file11 -testdir/file9 -NEXT -testdir/ -testdir/file10 -testdir/file11 -testdir/file9 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude05.at:22: + { set +x +$as_echo "$at_srcdir/xform-h.at:39: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -9957,74 +9991,28 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ - while read name - do - genfile --file \$name - done +echo \"Default transform scope\" +tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \\ - testdir -tar tf archive | sort +echo \"Transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo \"NEXT\" -tar cf archive --exclude-from=exclfile \\ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo \"Not transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' )" -echo exclude05.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done - -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort - -rm -rf testdir exclfile - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10033,54 +10021,44 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file10 -testdir/file11 -testdir/file9 -NEXT -testdir/ -testdir/file10 -testdir/file11 -testdir/file9 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude05.at:22: + { set +x +$as_echo "$at_srcdir/xform-h.at:39: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10089,74 +10067,28 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ - while read name - do - genfile --file \$name - done +echo \"Default transform scope\" +tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \\ - testdir -tar tf archive | sort +echo \"Transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo \"NEXT\" -tar cf archive --exclude-from=exclfile \\ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo \"Not transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' )" -echo exclude05.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done - -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort - -rm -rf testdir exclfile - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10165,54 +10097,44 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file10 -testdir/file11 -testdir/file9 -NEXT -testdir/ -testdir/file10 -testdir/file11 -testdir/file9 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/exclude05.at:22: + { set +x +$as_echo "$at_srcdir/xform-h.at:39: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10221,74 +10143,28 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"Default transform scope\" +tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ - while read name - do - genfile --file \$name - done - -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \\ - testdir -tar tf archive | sort +echo \"Transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo \"NEXT\" -tar cf archive --exclude-from=exclfile \\ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo \"Not transforming hard links\" +tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' )" -echo exclude05.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 - - -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done - -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort - -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort - -rm -rf testdir exclfile - -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10297,180 +10173,128 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -rm -rf testdir exclfile -mkdir -p testdir -awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ - while read name - do - genfile --file $name - done +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile -tar cf archive --anchored --exclude-from=exclfile \ - testdir -tar tf archive | sort +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -echo "NEXT" -tar cf archive --exclude-from=exclfile \ - testdir -tar tf archive | sort -rm -rf testdir exclfile +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "testdir/ -testdir/file10 -testdir/file11 -testdir/file9 -NEXT -testdir/ -testdir/file10 -testdir/file11 -testdir/file9 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_20 -#AT_START_21 -# 21. exclude06.at:24: exclude: long files in pax archives -at_setup_line='exclude06.at:24' -at_desc="exclude: long files in pax archives" -$at_quiet $as_echo_n " 21: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_39 +#AT_START_40 +at_fn_group_banner 40 'xform01.at:26' \ + "transformations and GNU volume labels" " " 6 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "21. exclude06.at:24: testing ..." + $as_echo "40. $at_setup_line: testing $at_desc ..." $at_traceon - - - { $at_traceoff -$as_echo "$at_srcdir/exclude06.at:29: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax + { set +x +$as_echo "$at_srcdir/xform01.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * - -install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77 -genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt -genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c - -tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen -mkdir out -tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp -find out -type f +genfile --file file +tar -cf archive.tar -V /label/ file +tar tf archive.tar )" -echo exclude06.at:29 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * - - -install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77 -genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt -genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c - -tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen -mkdir out -tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp -find out -type f -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax +at_fn_check_prepare_notrace 'an embedded newline' "xform01.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77 -genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt -genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c - -tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen -mkdir out -tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp -find out -type f -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "out/one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c +genfile --file file +tar -cf archive.tar -V /label/ file +tar tf archive.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "/label/ +file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/exclude06.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform01.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_21 -#AT_START_22 -# 22. 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 $as_echo_n " 22: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_40 +#AT_START_41 +at_fn_group_banner 41 'xform02.at:21' \ + "transforming escaped delimiters on create" " " 6 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "22. delete01.at:23: testing ..." + $as_echo "41. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/xform02.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -10479,32 +10303,13 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; +genfile --file file +tar cvf /dev/null file \\ + --transform='s/file/other\\/name/' \\ + --show-transformed-name +)" +at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -10513,25 +10318,24 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 +genfile --file file +tar cvf /dev/null file \ + --transform='s/file/other\/name/' \ + --show-transformed-name +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "other/name " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/xform02.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10540,32 +10344,13 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; +genfile --file file +tar cvf /dev/null file \\ + --transform='s/file/other\\/name/' \\ + --show-transformed-name +)" +at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10574,25 +10359,24 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 +genfile --file file +tar cvf /dev/null file \ + --transform='s/file/other\/name/' \ + --show-transformed-name +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "other/name " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/xform02.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10601,32 +10385,13 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; +genfile --file file +tar cvf /dev/null file \\ + --transform='s/file/other\\/name/' \\ + --show-transformed-name +)" +at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10635,25 +10400,24 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 +genfile --file file +tar cvf /dev/null file \ + --transform='s/file/other\/name/' \ + --show-transformed-name +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "other/name " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/xform02.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10662,32 +10426,13 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; +genfile --file file +tar cvf /dev/null file \\ + --transform='s/file/other\\/name/' \\ + --show-transformed-name +)" +at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10696,25 +10441,24 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 +genfile --file file +tar cvf /dev/null file \ + --transform='s/file/other\/name/' \ + --show-transformed-name +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "other/name " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete01.at:26: + { set +x +$as_echo "$at_srcdir/xform02.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10723,32 +10467,13 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +genfile --file file +tar cvf /dev/null file \\ + --transform='s/file/other\\/name/' \\ + --show-transformed-name +)" +at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10757,533 +10482,374 @@ 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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 +genfile --file file +tar cvf /dev/null file \ + --transform='s/file/other\/name/' \ + --show-transformed-name +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "other/name " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_22 -#AT_START_23 -# 23. 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 $as_echo_n " 23: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_41 +#AT_START_42 +at_fn_group_banner 42 'exclude.at:23' \ + "exclude" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "23. delete02.at:23: testing ..." + $as_echo "42. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/delete02.at:26: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "1 -2 -3 -separator -1 -3 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" - -$at_failed && at_func_log_failure -$at_traceon; } - - { $at_traceoff -$as_echo "$at_srcdir/delete02.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/exclude.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 * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile -l 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_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "1 -2 -3 -separator -1 -3 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" +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 -$at_failed && at_func_log_failure -$at_traceon; } +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 - { $at_traceoff -$as_echo "$at_srcdir/delete02.at:26: +for option in exclude-tag exclude-tag-under exclude-tag-all +do + echo OPTION \$option + tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude.at:26" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "1 -2 -3 -separator -1 -3 +mkdir dir +echo blues > dir/blues +echo jazz > dir/jazz +mkdir dir/folk +echo tagfile > dir/folk/tagfile +echo sanjuan > dir/folk/sanjuan +mkdir dir/rock +echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG +echo "test" > dir/rock/file + +for option in exclude-caches exclude-caches-under exclude-caches-all +do + echo OPTION $option + tar -cf archive.tar --$option -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done + +for option in exclude-tag exclude-tag-under exclude-tag-all +do + echo OPTION $option + tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "OPTION exclude-caches +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +OPTION exclude-caches-under +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +dir/rock/ +tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +dir/rock/ +OPTION exclude-caches-all +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +OPTION exclude-tag +dir/ +dir/blues +dir/folk/ +dir/folk/tagfile +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/folk/tagfile +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +OPTION exclude-tag-under +dir/ +dir/blues +dir/folk/ +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +OPTION exclude-tag-all +dir/ +dir/blues +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped +ARCHIVE +dir/ +dir/blues +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude.at:26" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete02.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "1 -2 -3 -separator -1 -3 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_42 +#AT_START_43 +at_fn_group_banner 43 'exclude01.at:19' \ + "exclude wildcards" " " 7 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "43. $at_setup_line: testing $at_desc ..." + $at_traceon -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete02.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/exclude01.at:22: +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 * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "1 -2 -3 -separator -1 -3 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" - -$at_failed && at_func_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"` -#AT_STOP_23 -#AT_START_24 -# 24. delete03.at:21: deleting members with long names -at_setup_line='delete03.at:21' -at_desc="deleting members with long names" -$at_quiet $as_echo_n " 24: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "24. delete03.at:21: testing ..." - $at_traceon +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort - { $at_traceoff -$as_echo "$at_srcdir/delete03.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +rm -rf testdir +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX -rm -f \$prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch \$prefix\$i -done -tar -cf archive ./\$prefix* && - tar --delete -f archive ./\${prefix}5 && - tar -tf archive -)" -echo delete03.at:26 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort -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" -fi -at_status=$? -at_failed=false -at_func_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 +rm -rf testdir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete03.at:26: + { set +x +$as_echo "$at_srcdir/exclude01.at:22: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11293,41 +10859,42 @@ export TAR_OPTIONS rm -rf * -prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX -rm -f \$prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch \$prefix\$i -done -tar -cf archive ./\$prefix* && - tar --delete -f archive ./\${prefix}5 && - tar -tf archive -)" -echo delete03.at:26 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* -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_func_filter_trace $? -else - ( :; +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort + +rm -rf testdir +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11337,483 +10904,221 @@ export TAR_OPTIONS rm -rf * -prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX -rm -f $prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch $prefix$i -done -tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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_func_check_status 0 $at_status "$at_srcdir/delete03.at:26" - -$at_failed && at_func_log_failure -$at_traceon; } +test -z "`sort < /dev/null 2>&1`" || exit 77 - { $at_traceoff -$as_echo "$at_srcdir/delete03.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* -prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX -rm -f \$prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch \$prefix\$i -done -tar -cf archive ./\$prefix* && - tar --delete -f archive ./\${prefix}5 && - tar -tf archive -)" -echo delete03.at:26 >"$at_check_line_file" +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort -if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' - false; }; 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 "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort -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" -fi -at_status=$? -at_failed=false -at_func_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 +rm -rf testdir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/exclude01.at:22: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_24 -#AT_START_25 -# 25. delete04.at:23: deleting a large last member -at_setup_line='delete04.at:23' -at_desc="deleting a large last member" -$at_quiet $as_echo_n " 25: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "25. delete04.at:23: testing ..." - $at_traceon +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort - { $at_traceoff -$as_echo "$at_srcdir/delete04.at:26: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort -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 +rm -rf testdir )" -echo delete04.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +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_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" +test -z "`sort < /dev/null 2>&1`" || exit 77 -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete04.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort -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_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete04.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { set +x +$as_echo "$at_srcdir/exclude01.at:22: +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 * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* -$at_failed && at_func_log_failure -$at_traceon; } +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort - { $at_traceoff -$as_echo "$at_srcdir/delete04.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort -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_func_filter_trace $? -else - ( :; +rm -rf testdir +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11822,42 +11127,65 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete04.at:26: + { set +x +$as_echo "$at_srcdir/exclude01.at:22: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11866,50 +11194,43 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort + +rm -rf testdir +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11918,66 +11239,86 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_25 -#AT_START_26 -# 26. delete05.at:27: deleting non-existing member -at_setup_line='delete05.at:27' -at_desc="deleting non-existing member" -$at_quiet $as_echo_n " 26: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_43 +#AT_START_44 +at_fn_group_banner 44 'exclude02.at:19' \ + "exclude: anchoring" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "26. delete05.at:27: testing ..." + $as_echo "44. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/exclude02.at:22: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -11986,40 +11327,47 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 -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_func_filter_trace $? -else - ( :; +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -12028,33 +11376,73 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/exclude02.at:22: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12063,40 +11451,47 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 -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_func_filter_trace $? -else - ( :; +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12105,33 +11500,73 @@ 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" -fi -at_status=$? -at_failed=false -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 +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/exclude02.at:22: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -12140,40 +11575,47 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 -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_func_filter_trace $? -else - ( :; +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -12182,33 +11624,73 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/exclude02.at:22: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12217,40 +11699,47 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 -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_func_filter_trace $? -else - ( :; +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12259,33 +11748,73 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/delete05.at:30: + { set +x +$as_echo "$at_srcdir/exclude02.at:22: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12294,40 +11823,47 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 -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_func_filter_trace $? -else - ( :; +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12336,57 +11872,94 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_26 -#AT_START_27 -# 27. extrac01.at:23: extract over an existing directory -at_setup_line='extrac01.at:23' -at_desc="extract over an existing directory" -$at_quiet $as_echo_n " 27: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_44 +#AT_START_45 +at_fn_group_banner 45 'exclude03.at:19' \ + "exclude: wildcards match slash" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "27. extrac01.at:23: testing ..." + $as_echo "45. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/exclude03.at:22: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -12395,32 +11968,43 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -12429,23 +12013,69 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/exclude03.at:22: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12454,32 +12084,43 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12488,23 +12129,69 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/exclude03.at:22: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -12513,32 +12200,43 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -12547,57 +12245,114 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -$at_failed && at_func_log_failure -$at_traceon; } +test -z "`sort < /dev/null 2>&1`" || exit 77 - { $at_traceoff -$as_echo "$at_srcdir/extrac01.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/exclude03.at:22: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12606,23 +12361,69 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac01.at:26: + { set +x +$as_echo "$at_srcdir/exclude03.at:22: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12631,32 +12432,43 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12665,49 +12477,90 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_27 -#AT_START_28 -# 28. 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 $as_echo_n " 28: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_45 +#AT_START_46 +at_fn_group_banner 46 'exclude04.at:19' \ + "exclude: case insensitive" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "28. extrac02.at:23: testing ..." + $as_echo "46. $at_setup_line: testing $at_desc ..." $at_traceon -# FIXME: Skip if symlinks are not supported on the system - - { $at_traceoff -$as_echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/exclude04.at:22: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -12716,36 +12569,46 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -12754,25 +12617,69 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/exclude04.at:22: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12781,36 +12688,46 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12819,25 +12736,69 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/exclude04.at:22: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -12846,63 +12807,117 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/exclude04.at:22: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12911,36 +12926,46 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12949,25 +12974,69 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac02.at:28: + { set +x +$as_echo "$at_srcdir/exclude04.at:22: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12976,36 +13045,46 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 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_func_filter_trace $? -else - ( :; + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -13014,49 +13093,90 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_28 -#AT_START_29 -# 29. extrac03.at:23: extraction loops -at_setup_line='extrac03.at:23' -at_desc="extraction loops" -$at_quiet $as_echo_n " 29: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_46 +#AT_START_47 +at_fn_group_banner 47 'exclude05.at:21' \ + "exclude: lots of excludes" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "29. extrac03.at:23: testing ..." + $as_echo "47. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/exclude05.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -13065,30 +13185,34 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp)" -echo extrac03.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -13097,26 +13221,53 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/../directory/ -separator -directory/../directory/ + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/exclude05.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13125,30 +13276,34 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp)" -echo extrac03.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13157,26 +13312,53 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/../directory/ -separator -directory/../directory/ + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/exclude05.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -13185,58 +13367,89 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp)" -echo extrac03.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/../directory/ -separator -directory/../directory/ + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/exclude05.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -13245,30 +13458,34 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp)" -echo extrac03.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -13277,26 +13494,53 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/../directory/ -separator -directory/../directory/ + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac03.at:26: + { set +x +$as_echo "$at_srcdir/exclude05.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -13305,30 +13549,34 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp)" -echo extrac03.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -13337,106 +13585,167 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/../directory/ -separator -directory/../directory/ + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_29 -#AT_START_30 -# 30. extrac04.at:23: extract + fnmatch -at_setup_line='extrac04.at:23' -at_desc="extract + fnmatch" -$at_quiet $as_echo_n " 30: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_47 +#AT_START_48 +at_fn_group_banner 48 'exclude06.at:26' \ + "exclude: long files in pax archives" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "30. extrac04.at:23: testing ..." + $as_echo "48. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac04.at:26: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + + + { set +x +$as_echo "$at_srcdir/exclude06.at:31: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77 +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c -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 +tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen +mkdir out +tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp +find out -type f )" -echo extrac04.at:26 >"$at_check_line_file" +at_fn_check_prepare_notrace 'an embedded newline' "exclude06.at:31" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * + + +install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77 +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c + +tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen +mkdir out +tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp +find out -type f +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "out/one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude06.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_48 +#AT_START_49 +at_fn_group_banner 49 'exclude07.at:19' \ + "exclude: --exclude-backups option" " " 7 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "49. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/exclude07.at:22: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file \"dir/.#file\" +genfile --file \"dir/#file#\" -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_func_filter_trace $? -else - ( :; +tar -v -c -f archive --exclude-backups dir +)" +at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -13445,38 +13754,28 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/file2 -directory/subdirectory/ +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file "dir/.#file" +genfile --file "dir/#file#" + +tar -v -c -f archive --exclude-backups dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac04.at:26: + { set +x +$as_echo "$at_srcdir/exclude07.at:22: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13485,54 +13784,16 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file \"dir/.#file\" +genfile --file \"dir/#file#\" -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 +tar -v -c -f archive --exclude-backups dir )" -echo extrac04.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13541,38 +13802,28 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/file2 -directory/subdirectory/ +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file "dir/.#file" +genfile --file "dir/#file#" + +tar -v -c -f archive --exclude-backups dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac04.at:26: + { set +x +$as_echo "$at_srcdir/exclude07.at:22: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -13581,54 +13832,16 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file \"dir/.#file\" +genfile --file \"dir/#file#\" -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 +tar -v -c -f archive --exclude-backups dir )" -echo extrac04.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -13637,38 +13850,28 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/file2 -directory/subdirectory/ +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file "dir/.#file" +genfile --file "dir/#file#" + +tar -v -c -f archive --exclude-backups dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac04.at:26: + { set +x +$as_echo "$at_srcdir/exclude07.at:22: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -13677,27 +13880,16 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file \"dir/.#file\" +genfile --file \"dir/#file#\" -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 +tar -v -c -f archive --exclude-backups dir )" -echo extrac04.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -13706,191 +13898,241 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file "dir/.#file" +genfile --file "dir/#file#" + +tar -v -c -f archive --exclude-backups dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22" +$at_failed && at_fn_log_failure +$at_traceon; } -test -z "`sort < /dev/null 2>&1`" || exit 77 + { set +x +$as_echo "$at_srcdir/exclude07.at:22: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file \"dir/.#file\" +genfile --file \"dir/#file#\" + +tar -v -c -f archive --exclude-backups dir +)" +at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/file2 -directory/subdirectory/ +mkdir dir +genfile --file dir/file +genfile --file dir/file~ +genfile --file "dir/.#file" +genfile --file "dir/#file#" + +tar -v -c -f archive --exclude-backups dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac04.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_49 +#AT_START_50 +at_fn_group_banner 50 'exclude08.at:36' \ + "--exclude-tag option" " " 7 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "50. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/exclude08.at:39: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +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 -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 +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort )" -echo extrac04.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/subdir/excludeme +etest/top-level-file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/exclude08.at:39: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/file2 -directory/subdirectory/ +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/subdir/excludeme +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/exclude08.at:39: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_30 -#AT_START_31 -# 31. extrac05.at:30: extracting selected members from pax -at_setup_line='extrac05.at:30' -at_desc="extracting selected members from pax" -$at_quiet $as_echo_n " 31: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "31. extrac05.at:30: testing ..." - $at_traceon - - - -cat >list <<'_ATEOF' -jeden -cztery -_ATEOF +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/subdir/excludeme +etest/top-level-file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac05.at:38: + { set +x +$as_echo "$at_srcdir/exclude08.at:39: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -13899,26 +14141,14 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77 -genfile --length 118 --file jeden -genfile --length 223 --file dwa -genfile --length 517 --file trzy -genfile --length 110 --file cztery - -tar cf archive jeden dwa trzy cztery || exit 1 - -mkdir dir -cd dir -tar xvfT ../archive ../../list --warning=no-timestamp || exit 1 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -cd .. +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort )" -echo extrac05.at:38 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -13927,299 +14157,327 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77 -genfile --length 118 --file jeden -genfile --length 223 --file dwa -genfile --length 517 --file trzy -genfile --length 110 --file cztery - -tar cf archive jeden dwa trzy cztery || exit 1 -mkdir dir -cd dir +test -z "`sort < /dev/null 2>&1`" || exit 77 -tar xvfT ../archive ../../list --warning=no-timestamp || exit 1 +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/subdir/excludeme +etest/top-level-file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } -cd .. -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { set +x +$as_echo "$at_srcdir/exclude08.at:39: +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 * -genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77 -genfile --length 118 --file jeden -genfile --length 223 --file dwa -genfile --length 517 --file trzy -genfile --length 110 --file cztery -tar cf archive jeden dwa trzy cztery || exit 1 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -mkdir dir -cd dir +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -tar xvfT ../archive ../../list --warning=no-timestamp || exit 1 -cd .. -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "jeden -cztery +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/subdir/excludeme +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac05.at:38" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_31 -#AT_START_32 -# 32. extrac06.at:33: mode of extracted directories -at_setup_line='extrac06.at:33' -at_desc="mode of extracted directories" -$at_quiet $as_echo_n " 32: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_50 +#AT_START_51 +at_fn_group_banner 51 'exclude09.at:37' \ + "--exclude-tag option and --listed-incremental" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "32. extrac06.at:33: testing ..." + $as_echo "51. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac06.at:36: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + { set +x +$as_echo "$at_srcdir/exclude09.at:40: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -# Force umask -umask 022 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude09.at:40" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory -# Archive it -tar cf arc directory +test -z "`sort < /dev/null 2>&1`" || exit 77 -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory +mkexcltest etest +tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new +tar: etest/subdir: Directory is new +tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/subdir/excludeme +etest/top-level-file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude09.at:40" +$at_failed && at_fn_log_failure +$at_traceon; } -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory -# After both restores, the directory mode should be 755 -)" -echo extrac06.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_51 +#AT_START_52 +at_fn_group_banner 52 'exclude10.at:38' \ + "--exclude-tag option in incremental pass" " " 7 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "52. $at_setup_line: testing $at_desc ..." + $at_traceon -# 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 + { set +x +$as_echo "$at_srcdir/exclude10.at:41: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +mkexcltest etest +rm etest/subdir/excludeme +decho \"# Level 0\" +tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort +touch etest/subdir/excludeme +touch etest/subdir/otherfile -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +decho \"# Level 1\" +cp snar-0 snar-1 +tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude10.at:41" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -# Force umask -umask 022 +test -z "`sort < /dev/null 2>&1`" || exit 77 -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" +mkexcltest etest +rm etest/subdir/excludeme +decho "# Level 0" +tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort +touch etest/subdir/excludeme +touch etest/subdir/otherfile -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory +decho "# Level 1" +cp snar-0 snar-1 +tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Level 0 +tar: etest: Directory is new +tar: etest/subdir: Directory is new +# Level 1 +tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Level 0 +etest/ +etest/subdir/ +etest/subdir/subdir-file +etest/top-level-file +# Level 1 +etest/ +etest/subdir/ +etest/subdir/excludeme +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude10.at:41" +$at_failed && at_fn_log_failure +$at_traceon; } -# Archive it -tar cf arc directory -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_52 +#AT_START_53 +at_fn_group_banner 53 'exclude11.at:36' \ + "--exclude-tag-under option" " " 7 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "53. $at_setup_line: testing $at_desc ..." + $at_traceon -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "777 -755 -755 -755 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac06.at:36: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + + { set +x +$as_echo "$at_srcdir/exclude11.at:39: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z "`sort < /dev/null 2>&1`" || exit 77 -# After both restores, the directory mode should be 755 -)" -echo extrac06.at:36 >"$at_check_line_file" +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/top-level-file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/exclude11.at:39: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -14229,50 +14487,28 @@ export TAR_OPTIONS rm -rf * -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z "`sort < /dev/null 2>&1`" || exit 77 -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "777 -755 -755 -755 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac06.at:36: + { set +x +$as_echo "$at_srcdir/exclude11.at:39: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -14282,38 +14518,13 @@ export TAR_OPTIONS rm -rf * -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -# After both restores, the directory mode should be 755 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort )" -echo extrac06.at:36 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -14323,89 +14534,28 @@ export TAR_OPTIONS rm -rf * -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z "`sort < /dev/null 2>&1`" || exit 77 -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "777 -755 -755 -755 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac06.at:36: + { set +x +$as_echo "$at_srcdir/exclude11.at:39: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14415,77 +14565,13 @@ export TAR_OPTIONS rm -rf * -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -# After both restores, the directory mode should be 755 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort )" -echo extrac06.at:36 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14495,50 +14581,28 @@ export TAR_OPTIONS rm -rf * -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z "`sort < /dev/null 2>&1`" || exit 77 -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "777 -755 -755 -755 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac06.at:36: + { set +x +$as_echo "$at_srcdir/exclude11.at:39: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -14548,38 +14612,13 @@ export TAR_OPTIONS rm -rf * -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory - -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -# After both restores, the directory mode should be 755 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort )" -echo extrac06.at:36 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -14589,265 +14628,212 @@ export TAR_OPTIONS rm -rf * -# Force umask -umask 022 +test -z "`sort < /dev/null 2>&1`" || exit 77 -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/top-level-file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory -# Archive it -tar cf arc directory -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_53 +#AT_START_54 +at_fn_group_banner 54 'exclude12.at:37' \ + "--exclude-tag-under and --listed-incremental" " " 7 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "54. $at_setup_line: testing $at_desc ..." + $at_traceon -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + + + + { set +x +$as_echo "$at_srcdir/exclude12.at:40: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude12.at:40" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -# ... and attempt to restore it twice -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory -tar xf arc directory --warning=no-timestamp -genfile --stat=mode:777 directory +test -z "`sort < /dev/null 2>&1`" || exit 77 -# After both restores, the directory mode should be 755 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "777 -755 -755 -755 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new +tar: etest/subdir: Directory is new +tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/subdir/ +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude12.at:40" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_32 -#AT_START_33 -# 33. 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 $as_echo_n " 33: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_54 +#AT_START_55 +at_fn_group_banner 55 'exclude13.at:39' \ + "--exclude-tag-under option in incremental pass" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "33. extrac07.at:27: testing ..." + $as_echo "55. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac07.at:30: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { set +x +$as_echo "$at_srcdir/exclude13.at:42: +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 * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod a-w dir - -echo Create the archive -tar cf archive dir || exit 1 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -chmod +w dir +mkexcltest etest +rm etest/subdir/excludeme +decho \"# Level 0\" +tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort +touch etest/subdir/excludeme +touch etest/subdir/otherfile -echo Extract -mkdir out -tar -C out -xvf archive +decho \"# Level 1\" +cp snar-0 snar-1 +tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort )" -echo extrac07.at:30 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod a-w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir - -echo Extract -mkdir out -tar -C out -xvf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude13.at:42" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod a-w dir - -echo Create the archive -tar cf archive dir || exit 1 +test -z "`sort < /dev/null 2>&1`" || exit 77 -chmod +w dir +mkexcltest etest +rm etest/subdir/excludeme +decho "# Level 0" +tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort +touch etest/subdir/excludeme +touch etest/subdir/otherfile -echo Extract -mkdir out -tar -C out -xvf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Prepare the directory -Create the archive -Extract -dir/ -dir/foo +decho "# Level 1" +cp snar-0 snar-1 +tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Level 0 +tar: etest: Directory is new +tar: etest/subdir: Directory is new +# Level 1 +tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Level 0 +etest/ +etest/subdir/ +etest/subdir/subdir-file +etest/top-level-file +# Level 1 +etest/ +etest/subdir/ " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac07.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude13.at:42" +$at_failed && at_fn_log_failure $at_traceon; } - # Testing one format is enough - $at_traceoff + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_33 -#AT_START_34 -# 34. extrac08.at:33: restoring mode on existing directory -at_setup_line='extrac08.at:33' -at_desc="restoring mode on existing directory" -$at_quiet $as_echo_n " 34: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_55 +#AT_START_56 +at_fn_group_banner 56 'exclude14.at:36' \ + "--exclude-tag-all option" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "34. extrac08.at:33: testing ..." + $as_echo "56. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac08.at:36: + { set +x +$as_echo "$at_srcdir/exclude14.at:39: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -14856,40 +14842,14 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -)" -echo extrac08.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -14898,31 +14858,28 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/file -755 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac08.at:36: + { set +x +$as_echo "$at_srcdir/exclude14.at:39: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -14931,40 +14888,14 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -)" -echo extrac08.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -14973,31 +14904,28 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/file -755 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac08.at:36: + { set +x +$as_echo "$at_srcdir/exclude14.at:39: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -15006,20 +14934,14 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -)" -echo extrac08.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -15028,73 +14950,44 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/top-level-file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/exclude14.at:39: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/file -755 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" - -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac08.at:36: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort )" -echo extrac08.at:36 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -15103,51 +14996,28 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/file -755 +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac08.at:36: + { set +x +$as_echo "$at_srcdir/exclude14.at:39: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15156,40 +15026,14 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -)" -echo extrac08.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15198,55 +15042,49 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -umask 000 -mkdir dir -chmod 755 dir -echo bla > dir/file -tar cf test.tar dir -chmod 700 dir -tar xfv test.tar --warning=no-timestamp -genfile --stat=mode.777 dir -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/file -755 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/top-level-file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_34 -#AT_START_35 -# 35. extrac09.at:22: no need to save dir with unreadable . and .. -at_setup_line='extrac09.at:22' -at_desc="no need to save dir with unreadable . and .." -$at_quiet $as_echo_n " 35: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_56 +#AT_START_57 +at_fn_group_banner 57 'exclude15.at:36' \ + "--exclude-tag-all and --listed-incremental" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "35. extrac09.at:22: testing ..." + $as_echo "57. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac09.at:25: + { set +x +$as_echo "$at_srcdir/exclude15.at:39: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15256,34 +15094,13 @@ export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -mkdir dir -mkdir dir/sub -mkdir dir/sub/extract -genfile --file dir/sub/f -cd dir/sub - -tar -cf archive.tar f +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -chmod a-r . .. -tar -xvf archive.tar -C extract f -status=\$? -chmod a+r . .. -cmp f extract/f || status=\$? -exit \$status +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort )" -echo extrac09.at:25 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude15.at:39" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15293,144 +15110,321 @@ export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkexcltest etest +tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new +tar: etest/subdir: Directory is new +tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "etest/ +etest/top-level-file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exclude15.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } -mkdir dir -mkdir dir/sub -mkdir dir/sub/extract -genfile --file dir/sub/f -cd dir/sub -tar -cf archive.tar f -chmod a-r . .. -tar -xvf archive.tar -C extract f -status=$? -chmod a+r . .. -cmp f extract/f || status=$? -exit $status -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_57 +#AT_START_58 +at_fn_group_banner 58 'exclude16.at:38' \ + "--exclude-tag-all option in incremental pass" " " 7 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "58. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/exclude16.at:41: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 +mkexcltest etest +rm etest/subdir/excludeme +decho \"# Level 0\" +tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort +touch etest/subdir/excludeme +touch etest/subdir/otherfile -mkdir dir -mkdir dir/sub -mkdir dir/sub/extract -genfile --file dir/sub/f -cd dir/sub +decho \"# Level 1\" +cp snar-0 snar-1 +tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "exclude16.at:41" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -tar -cf archive.tar f -chmod a-r . .. -tar -xvf archive.tar -C extract f -status=$? -chmod a+r . .. -cmp f extract/f || status=$? -exit $status -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "f +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkexcltest etest +rm etest/subdir/excludeme +decho "# Level 0" +tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort +touch etest/subdir/excludeme +touch etest/subdir/otherfile + +decho "# Level 1" +cp snar-0 snar-1 +tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Level 0 +tar: etest: Directory is new +tar: etest/subdir: Directory is new +# Level 1 +tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Level 0 +etest/ +etest/subdir/ +etest/subdir/subdir-file +etest/top-level-file +# Level 1 +etest/ " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac09.at:25" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/exclude16.at:41" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_35 -#AT_START_36 -# 36. extrac10.at:27: -C and delayed setting of metadata -at_setup_line='extrac10.at:27' -at_desc="-C and delayed setting of metadata" -$at_quiet $as_echo_n " 36: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_58 +#AT_START_59 +at_fn_group_banner 59 'delete01.at:24' \ + "deleting a member after a big one" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "36. extrac10.at:27: testing ..." + $as_echo "59. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac10.at:30: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/delete01.at:27: +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 d x x/y -echo foo >d/d1 -echo bar >e +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -tar -cf archive.tar d e && -tar -xf archive.tar -C x d -C y e && -diff -r d x/d && -diff e x/y/e -)" -echo extrac10.at:30 >"$at_check_line_file" +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/delete01.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/delete01.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/delete01.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/delete01.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir d x x/y -echo foo >d/d1 -echo bar >e - -tar -cf archive.tar d e && -tar -xf archive.tar -C x d -C y e && -diff -r d x/d && -diff e x/y/e -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15439,328 +15433,271 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir d x x/y -echo foo >d/d1 -echo bar >e - -tar -cf archive.tar d e && -tar -xf archive.tar -C x d -C y e && -diff -r d x/d && -diff e x/y/e -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac10.at:30" - -$at_failed && at_func_log_failure +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_36 -#AT_START_37 -# 37. extrac11.at:23: scarce file descriptors -at_setup_line='extrac11.at:23' -at_desc="scarce file descriptors" -$at_quiet $as_echo_n " 37: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_59 +#AT_START_60 +at_fn_group_banner 60 'delete02.at:24' \ + "deleting a member from stdin archive" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "37. extrac11.at:23: testing ..." + $as_echo "60. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac11.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/delete02.at:27: +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 * -exec \$dir/\$file || exit - files=\"\$files \$file\" - done -done - -# Check that \"ulimit\" itself works. Close file descriptors before -# invoking ulimit, to work around a bug (or a \"feature\") in some shells, -# where they squirrel away dups of file descriptors into FD 10 and up -# before closing the originals. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 100 && - tar -cf archive1.tar a && - tar -xf archive1.tar -C dest1 a - ) && - diff -r a dest1/a -) >/dev/null 2>&1 || - exit 77 +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -# Another test that \"ulimit\" itself works: -# tar should fail when completely starved of file descriptors. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 4 && - tar -cf archive2.tar a && - tar -xf archive2.tar -C dest2 a - ) && - diff -r a dest2/a -) >/dev/null 2>&1 && - exit 77 +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -# Tar should work when there are few, but enough, file descriptors. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 10 && - tar -cf archive3.tar a && - tar -xf archive3.tar -C dest3 a - ) && - diff -r a dest3/a >/dev/null 2>&1 -) || { diff -r a dest3/a; exit 1; } -)" -echo extrac11.at:26 >"$at_check_line_file" + { set +x +$as_echo "$at_srcdir/delete02.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec $dir/$file || exit - files="$files $file" - done -done - -# Check that "ulimit" itself works. Close file descriptors before -# invoking ulimit, to work around a bug (or a "feature") in some shells, -# where they squirrel away dups of file descriptors into FD 10 and up -# before closing the originals. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 100 && - tar -cf archive1.tar a && - tar -xf archive1.tar -C dest1 a - ) && - diff -r a dest1/a -) >/dev/null 2>&1 || - exit 77 - -# Another test that "ulimit" itself works: -# tar should fail when completely starved of file descriptors. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 4 && - tar -cf archive2.tar a && - tar -xf archive2.tar -C dest2 a - ) && - diff -r a dest2/a -) >/dev/null 2>&1 && - exit 77 +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -# Tar should work when there are few, but enough, file descriptors. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 10 && - tar -cf archive3.tar a && - tar -xf archive3.tar -C dest3 a - ) && - diff -r a dest3/a >/dev/null 2>&1 -) || { diff -r a dest3/a; exit 1; } -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/delete02.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -exec $dir/$file || exit - files="$files $file" - done -done - -# Check that "ulimit" itself works. Close file descriptors before -# invoking ulimit, to work around a bug (or a "feature") in some shells, -# where they squirrel away dups of file descriptors into FD 10 and up -# before closing the originals. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 100 && - tar -cf archive1.tar a && - tar -xf archive1.tar -C dest1 a - ) && - diff -r a dest1/a -) >/dev/null 2>&1 || - exit 77 - -# Another test that "ulimit" itself works: -# tar should fail when completely starved of file descriptors. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 4 && - tar -cf archive2.tar a && - tar -xf archive2.tar -C dest2 a - ) && - diff -r a dest2/a -) >/dev/null 2>&1 && - exit 77 - -# Tar should work when there are few, but enough, file descriptors. -( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && - ulimit -n 10 && - tar -cf archive3.tar a && - tar -xf archive3.tar -C dest3 a - ) && - diff -r a dest3/a >/dev/null 2>&1 -) || { diff -r a dest3/a; exit 1; } -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac11.at:26" +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -$at_failed && at_func_log_failure +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - - - - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_37 -#AT_START_38 -# 38. extrac12.at:23: extract dot permissions -at_setup_line='extrac12.at:23' -at_desc="extract dot permissions" -$at_quiet $as_echo_n " 38: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "38. extrac12.at:23: testing ..." - $at_traceon - - - - - - { $at_traceoff -$as_echo "$at_srcdir/extrac12.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/delete02.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir src dst -echo file1 >src/file1 -echo file2 >src/file2 -chmod a-w src +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -tar --no-recursion -cf archive.tar -C src . ./file1 file2 && -tar -xf archive.tar -C dst && -cmp src/file1 dst/file1 && -cmp src/file2 dst/file2 -)" -echo extrac12.at:26 >"$at_check_line_file" +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/delete02.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir src dst -echo file1 >src/file1 -echo file2 >src/file2 -chmod a-w src - -tar --no-recursion -cf archive.tar -C src . ./file1 file2 && -tar -xf archive.tar -C dst && -cmp src/file1 dst/file1 && -cmp src/file2 dst/file2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15769,52 +15706,55 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir src dst -echo file1 >src/file1 -echo file2 >src/file2 -chmod a-w src - -tar --no-recursion -cf archive.tar -C src . ./file1 file2 && -tar -xf archive.tar -C dst && -cmp src/file1 dst/file1 && -cmp src/file2 dst/file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac12.at:26" - -$at_failed && at_func_log_failure +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_38 -#AT_START_39 -# 39. extrac13.at:24: extract over symlinks -at_setup_line='extrac13.at:24' -at_desc="extract over symlinks" -$at_quiet $as_echo_n " 39: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_60 +#AT_START_61 +at_fn_group_banner 61 'delete03.at:21' \ + "deleting members with long names" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "39. extrac13.at:24: testing ..." + $as_echo "61. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac13.at:27: + + + { set +x +$as_echo "$at_srcdir/delete03.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15823,34 +15763,18 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir src dst1 dst2 dst3 -echo file1 >src/file1 -ln -s target1 dst1/file1 -echo target1 >dst1/target1 -echo target1 >target1 - -tar -cf archive.tar -C src . && -tar -xf archive.tar -C dst1 --warning=no-timestamp && -diff src/file1 dst1/file1 && -diff target1 dst1/target1 - -ln -s target1 dst2/file1 -echo target1 >dst2/target1 -tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp && -diff src/file1 dst2/file1 && -diff target1 dst2/target1 -ln -s target1 dst3/file1 -echo target1 >dst3/target1 -tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp && -diff src/file1 dst3/file1 && -diff src/file1 dst3/target1 +prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX +rm -f \$prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch \$prefix\$i +done +tar -cf archive ./\$prefix* && + tar --delete -f archive ./\${prefix}5 && + tar -tf archive )" -echo extrac13.at:27 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15859,353 +15783,466 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir src dst1 dst2 dst3 -echo file1 >src/file1 -ln -s target1 dst1/file1 -echo target1 >dst1/target1 -echo target1 >target1 - -tar -cf archive.tar -C src . && -tar -xf archive.tar -C dst1 --warning=no-timestamp && -diff src/file1 dst1/file1 && -diff target1 dst1/target1 -ln -s target1 dst2/file1 -echo target1 >dst2/target1 -tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp && -diff src/file1 dst2/file1 && -diff target1 dst2/target1 +prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -ln -s target1 dst3/file1 -echo target1 >dst3/target1 -tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp && -diff src/file1 dst3/file1 && -diff src/file1 dst3/target1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/delete03.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 * -mkdir src dst1 dst2 dst3 -echo file1 >src/file1 -ln -s target1 dst1/file1 -echo target1 >dst1/target1 -echo target1 >target1 - -tar -cf archive.tar -C src . && -tar -xf archive.tar -C dst1 --warning=no-timestamp && -diff src/file1 dst1/file1 && -diff target1 dst1/target1 - -ln -s target1 dst2/file1 -echo target1 >dst2/target1 -tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp && -diff src/file1 dst2/file1 && -diff target1 dst2/target1 - -ln -s target1 dst3/file1 -echo target1 >dst3/target1 -tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp && -diff src/file1 dst3/file1 && -diff src/file1 dst3/target1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac13.at:27" - -$at_failed && at_func_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"` -#AT_STOP_39 -#AT_START_40 -# 40. extrac14.at:23: extract -C symlink -at_setup_line='extrac14.at:23' -at_desc="extract -C symlink" -$at_quiet $as_echo_n " 40: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "40. extrac14.at:23: testing ..." - $at_traceon - - - - - { $at_traceoff -$as_echo "$at_srcdir/extrac14.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX +rm -f \$prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch \$prefix\$i +done +tar -cf archive ./\$prefix* && + tar --delete -f archive ./\${prefix}5 && + tar -tf archive +)" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir dest -ln -s dest symlink -echo foo >foo -tar -cf archive.tar foo && -tar -xf archive.tar -C symlink --warning=no-timestamp && -cmp foo dest/foo -)" -echo extrac14.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/delete03.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir dest -ln -s dest symlink -echo foo >foo -tar -cf archive.tar foo && -tar -xf archive.tar -C symlink --warning=no-timestamp && -cmp foo dest/foo -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX +rm -f \$prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch \$prefix\$i +done +tar -cf archive ./\$prefix* && + tar --delete -f archive ./\${prefix}5 && + tar -tf archive +)" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir dest -ln -s dest symlink -echo foo >foo -tar -cf archive.tar foo && -tar -xf archive.tar -C symlink --warning=no-timestamp && -cmp foo dest/foo -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac14.at:26" -$at_failed && at_func_log_failure +prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8 +./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_40 -#AT_START_41 -# 41. extrac15.at:23: extract parent mkdir failure -at_setup_line='extrac15.at:23' -at_desc="extract parent mkdir failure" -$at_quiet $as_echo_n " 41: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_61 +#AT_START_62 +at_fn_group_banner 62 'delete04.at:24' \ + "deleting a large last member" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "41. extrac15.at:23: testing ..." + $as_echo "62. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/extrac15.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/delete04.at:27: +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 * - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -mkdir src src/a src/a/b dest dest/a -touch src/a/b/c -chmod a-w dest/a - -tar -cf archive.tar -C src a/b/c && -if tar -xf archive.tar -C dest a/b/c -then (exit 1) -else (exit 0) -fi +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive )" -echo extrac15.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -mkdir src src/a src/a/b dest dest/a -touch src/a/b/c -chmod a-w dest/a - -tar -cf archive.tar -C src a/b/c && -if tar -xf archive.tar -C dest a/b/c -then (exit 1) -else (exit 0) -fi -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/delete04.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 * +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -mkdir src src/a src/a/b dest dest/a -touch src/a/b/c -chmod a-w dest/a - -tar -cf archive.tar -C src a/b/c && -if tar -xf archive.tar -C dest a/b/c -then (exit 1) -else (exit 0) -fi -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: a/b: Cannot mkdir: Permission denied -tar: a/b/c: Cannot open: No such file or directory -tar: Exiting with failure status due to previous errors +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 " | \ - $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac15.at:26" - -$at_failed && at_func_log_failure + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/delete04.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_41 -#AT_START_42 -# 42. extrac16.at:24: extract empty directory with -C -at_setup_line='extrac16.at:24' -at_desc="extract empty directory with -C" -$at_quiet $as_echo_n " 42: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "42. extrac16.at:24: testing ..." - $at_traceon - - - - - - { $at_traceoff -$as_echo "$at_srcdir/extrac16.at:27: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/delete04.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir src src/a src/a/b dest -touch src/a/c - -tar -cf archive.tar -C src a && -tar -xf archive.tar -C dest +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive )" -echo extrac16.at:27 >"$at_check_line_file" +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/delete04.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir src src/a src/a/b dest -touch src/a/c - -tar -cf archive.tar -C src a && -tar -xf archive.tar -C dest -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -16214,58 +16251,62 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir src src/a src/a/b dest -touch src/a/c - -tar -cf archive.tar -C src a && -tar -xf archive.tar -C dest -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac16.at:27" - -$at_failed && at_func_log_failure +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_42 -#AT_START_43 -# 43. extrac17.at:19: name matching/transformation ordering -at_setup_line='extrac17.at:19' -at_desc="name matching/transformation ordering" -$at_quiet $as_echo_n " 43: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_62 +#AT_START_63 +at_fn_group_banner 63 'delete05.at:28' \ + "deleting non-existing member" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "43. extrac17.at:19: testing ..." + $as_echo "63. $at_setup_line: testing $at_desc ..." $at_traceon -# Description: Tar 1.24 changed the ordering of name matching and -# name transformation so that the former saw already transformed -# file names (see commit 9c194c99 and exclude06.at). This reverted -# ordering made it impossible to match file names in certain cases. -# In particular, the testcase below would not extract anything. -# -# Reported-by: "Gabor Z. Papp" -# References: , <20101026175126.29028@Pirx.gnu.org.ua> -# http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html - - { $at_traceoff -$as_echo "$at_srcdir/extrac17.at:32: + { set +x +$as_echo "$at_srcdir/delete05.at:31: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -16274,40 +16315,17 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ - dir/subdir1/ +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive )" -echo extrac17.at:32 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir - -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -16316,29 +16334,32 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac17.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac17.at:32: + { set +x +$as_echo "$at_srcdir/delete05.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16347,40 +16368,17 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ - dir/subdir1/ +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive )" -echo extrac17.at:32 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir - -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16389,29 +16387,32 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac17.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac17.at:32: + { set +x +$as_echo "$at_srcdir/delete05.at:31: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -16420,40 +16421,17 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ - dir/subdir1/ +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive )" -echo extrac17.at:32 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir - -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -16462,29 +16440,32 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac17.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac17.at:32: + { set +x +$as_echo "$at_srcdir/delete05.at:31: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16493,20 +16474,17 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ - dir/subdir1/ +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive )" -echo extrac17.at:32 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16515,49 +16493,32 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir - -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac17.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/extrac17.at:32: + { set +x +$as_echo "$at_srcdir/delete05.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -16566,40 +16527,17 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ - dir/subdir1/ +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive )" -echo extrac17.at:32 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir - -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -16608,116 +16546,92 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir dir dir/subdir1 dir/subdir2 out -genfile --file dir/subdir1/file1 -genfile --file dir/subdir2/file2 - -tar cf dir.tar dir +genfile -l 1024 -f en +genfile -l 1024 -f to -tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ - dir/subdir1/ -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/extrac17.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_43 -#AT_START_44 -# 44. label01.at:19: single-volume label -at_setup_line='label01.at:19' -at_desc="single-volume label" -$at_quiet $as_echo_n " 44: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_63 +#AT_START_64 +at_fn_group_banner 64 'extrac01.at:24' \ + "extract over an existing directory" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "44. label01.at:19: testing ..." + $as_echo "64. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/label01.at:22: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/extrac01.at:27: +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 * -genfile --file foo -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 )" -echo label01.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile --file foo -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Test -foo -bar -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label01.at:22" - -$at_failed && at_func_log_failure -$at_traceon; } - - { $at_traceoff -$as_echo "$at_srcdir/label01.at:22: +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac01.at:27: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16726,16 +16640,13 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile --file foo -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 )" -echo label01.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16744,43 +16655,61 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile --file foo -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac01.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile --file foo -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Test -foo -bar -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label01.at:22" - -$at_failed && at_func_log_failure -$at_traceon; } +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * - { $at_traceoff -$as_echo "$at_srcdir/label01.at:22: +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac01.at:27: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16789,16 +16718,13 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --file foo -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 )" -echo label01.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16807,137 +16733,127 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile --file foo -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac01.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile --file foo -genfile --file bar -tar -cf archive --label=Test foo bar -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Test -foo -bar -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label01.at:22" +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -$at_failed && at_func_log_failure +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_44 -#AT_START_45 -# 45. label02.at:19: multi-volume label -at_setup_line='label02.at:19' -at_desc="multi-volume label" -$at_quiet $as_echo_n " 45: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_64 +#AT_START_65 +at_fn_group_banner 65 'extrac02.at:24' \ + "extracting symlinks over an existing file" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "45. label02.at:19: testing ..." + $as_echo "65. $at_setup_line: testing $at_desc ..." $at_traceon +# FIXME: Skip if symlinks are not supported on the system - { $at_traceoff -$as_echo "$at_srcdir/label02.at:22: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * - -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar -)" -echo label02.at:22 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/extrac02.at:29: +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 * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Test Volume 1 -foo -bar -baz -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label02.at:22" - -$at_failed && at_func_log_failure -$at_traceon; } - - { $at_traceoff -$as_echo "$at_srcdir/label02.at:22: +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac02.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16946,18 +16862,15 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive )" -echo label02.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16966,48 +16879,67 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac02.at:29: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Test Volume 1 -foo -bar -baz -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label02.at:22" - -$at_failed && at_func_log_failure -$at_traceon; } +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * - { $at_traceoff -$as_echo "$at_srcdir/label02.at:22: +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac02.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17016,18 +16948,15 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive )" -echo label02.at:22 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17036,218 +16965,129 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac02.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --length 0 --file foo -genfile --length 12288 --file bar -genfile --length 12288 --file baz -tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Test Volume 1 -foo -bar -baz -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label02.at:22" +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -$at_failed && at_func_log_failure +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_45 -#AT_START_46 -# 46. label03.at:25: test-label option -at_setup_line='label03.at:25' -at_desc="test-label option" -$at_quiet $as_echo_n " 46: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_65 +#AT_START_66 +at_fn_group_banner 66 'extrac03.at:23' \ + "extraction loops" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "46. label03.at:25: testing ..." + $as_echo "66. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/label03.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/extrac03.at:26: +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 * -exec <&- -genfile --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho \"# Display label\" -tar --test-label --file=iamanarchive; echo \$? -decho \"# Display label: unlabeled\" -tar --test-label --file=unlabeled.tar; echo \$? -decho \"# Test label: success\" -tar --test-label --file=iamanarchive 'iamalabel'; echo \$? -decho \"# Test label: failure\" -tar --test-label --file=iamanarchive 'amalabel'; echo \$? -decho \"# Test label: unlabeled\" -tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? -decho \"# Test label, verbose: success\" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? -decho \"# Test label, verbose: failure\" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? -decho \"# Test label: multiple arguments\" -tar --test-label --file=iamanarchive a iamalabel b; echo \$? -decho \"# Test label: wildcards\" -tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? -)" -echo label03.at:28 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho "# Display label" -tar --test-label --file=iamanarchive; echo $? -decho "# Display label: unlabeled" -tar --test-label --file=unlabeled.tar; echo $? -decho "# Test label: success" -tar --test-label --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label: failure" -tar --test-label --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: unlabeled" -tar --test-label --file=unlabeled.tar 'amalabel'; echo $? -decho "# Test label, verbose: success" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label, verbose: failure" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: multiple arguments" -tar --test-label --file=iamanarchive a iamalabel b; echo $? -decho "# Test label: wildcards" -tar --test-label --file=iamanarchive --wildcards '*label'; echo $? -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho "# Display label" -tar --test-label --file=iamanarchive; echo $? -decho "# Display label: unlabeled" -tar --test-label --file=unlabeled.tar; echo $? -decho "# Test label: success" -tar --test-label --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label: failure" -tar --test-label --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: unlabeled" -tar --test-label --file=unlabeled.tar 'amalabel'; echo $? -decho "# Test label, verbose: success" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label, verbose: failure" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: multiple arguments" -tar --test-label --file=iamanarchive a iamalabel b; echo $? -decho "# Test label: wildcards" -tar --test-label --file=iamanarchive --wildcards '*label'; echo $? -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Display label -# Display label: unlabeled -# Test label: success -# Test label: failure -# Test label: unlabeled -# Test label, verbose: success -# Test label, verbose: failure -tar: Archive label mismatch -# Test label: multiple arguments -# Test label: wildcards -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Display label -iamalabel -0 -# Display label: unlabeled -0 -# Test label: success -0 -# Test label: failure -1 -# Test label: unlabeled -1 -# Test label, verbose: success -iamalabel -0 -# Test label, verbose: failure -iamalabel -1 -# Test label: multiple arguments -0 -# Test label: wildcards -0 +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label03.at:28" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/label03.at:28: + { set +x +$as_echo "$at_srcdir/extrac03.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17256,34 +17096,12 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho \"# Display label\" -tar --test-label --file=iamanarchive; echo \$? -decho \"# Display label: unlabeled\" -tar --test-label --file=unlabeled.tar; echo \$? -decho \"# Test label: success\" -tar --test-label --file=iamanarchive 'iamalabel'; echo \$? -decho \"# Test label: failure\" -tar --test-label --file=iamanarchive 'amalabel'; echo \$? -decho \"# Test label: unlabeled\" -tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? -decho \"# Test label, verbose: success\" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? -decho \"# Test label, verbose: failure\" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? -decho \"# Test label: multiple arguments\" -tar --test-label --file=iamanarchive a iamalabel b; echo \$? -decho \"# Test label: wildcards\" -tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? -)" -echo label03.at:28 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17292,108 +17110,66 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho "# Display label" -tar --test-label --file=iamanarchive; echo $? -decho "# Display label: unlabeled" -tar --test-label --file=unlabeled.tar; echo $? -decho "# Test label: success" -tar --test-label --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label: failure" -tar --test-label --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: unlabeled" -tar --test-label --file=unlabeled.tar 'amalabel'; echo $? -decho "# Test label, verbose: success" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label, verbose: failure" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: multiple arguments" -tar --test-label --file=iamanarchive a iamalabel b; echo $? -decho "# Test label: wildcards" -tar --test-label --file=iamanarchive --wildcards '*label'; echo $? -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac03.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho "# Display label" -tar --test-label --file=iamanarchive; echo $? -decho "# Display label: unlabeled" -tar --test-label --file=unlabeled.tar; echo $? -decho "# Test label: success" -tar --test-label --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label: failure" -tar --test-label --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: unlabeled" -tar --test-label --file=unlabeled.tar 'amalabel'; echo $? -decho "# Test label, verbose: success" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label, verbose: failure" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: multiple arguments" -tar --test-label --file=iamanarchive a iamalabel b; echo $? -decho "# Test label: wildcards" -tar --test-label --file=iamanarchive --wildcards '*label'; echo $? -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Display label -# Display label: unlabeled -# Test label: success -# Test label: failure -# Test label: unlabeled -# Test label, verbose: success -# Test label, verbose: failure -tar: Archive label mismatch -# Test label: multiple arguments -# Test label: wildcards -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Display label -iamalabel -0 -# Display label: unlabeled -0 -# Test label: success -0 -# Test label: failure -1 -# Test label: unlabeled -1 -# Test label, verbose: success -iamalabel -0 -# Test label, verbose: failure -iamalabel -1 -# Test label: multiple arguments -0 -# Test label: wildcards -0 +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label03.at:28" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/label03.at:28: + { set +x +$as_echo "$at_srcdir/extrac03.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17402,34 +17178,12 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho \"# Display label\" -tar --test-label --file=iamanarchive; echo \$? -decho \"# Display label: unlabeled\" -tar --test-label --file=unlabeled.tar; echo \$? -decho \"# Test label: success\" -tar --test-label --file=iamanarchive 'iamalabel'; echo \$? -decho \"# Test label: failure\" -tar --test-label --file=iamanarchive 'amalabel'; echo \$? -decho \"# Test label: unlabeled\" -tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? -decho \"# Test label, verbose: success\" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? -decho \"# Test label, verbose: failure\" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? -decho \"# Test label: multiple arguments\" -tar --test-label --file=iamanarchive a iamalabel b; echo \$? -decho \"# Test label: wildcards\" -tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? -)" -echo label03.at:28 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17438,402 +17192,13398 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho "# Display label" -tar --test-label --file=iamanarchive; echo $? -decho "# Display label: unlabeled" -tar --test-label --file=unlabeled.tar; echo $? -decho "# Test label: success" -tar --test-label --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label: failure" -tar --test-label --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: unlabeled" -tar --test-label --file=unlabeled.tar 'amalabel'; echo $? -decho "# Test label, verbose: success" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label, verbose: failure" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: multiple arguments" -tar --test-label --file=iamanarchive a iamalabel b; echo $? -decho "# Test label: wildcards" -tar --test-label --file=iamanarchive --wildcards '*label'; echo $? -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac03.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -tar -c --label='iamalabel' --file iamanarchive file -tar -c --file unlabeled.tar file -decho "# Display label" -tar --test-label --file=iamanarchive; echo $? -decho "# Display label: unlabeled" -tar --test-label --file=unlabeled.tar; echo $? -decho "# Test label: success" -tar --test-label --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label: failure" -tar --test-label --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: unlabeled" -tar --test-label --file=unlabeled.tar 'amalabel'; echo $? -decho "# Test label, verbose: success" -tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? -decho "# Test label, verbose: failure" -tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? -decho "# Test label: multiple arguments" -tar --test-label --file=iamanarchive a iamalabel b; echo $? -decho "# Test label: wildcards" -tar --test-label --file=iamanarchive --wildcards '*label'; echo $? -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Display label -# Display label: unlabeled -# Test label: success -# Test label: failure -# Test label: unlabeled -# Test label, verbose: success -# Test label, verbose: failure -tar: Archive label mismatch -# Test label: multiple arguments -# Test label: wildcards -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Display label -iamalabel -0 -# Display label: unlabeled -0 -# Test label: success -0 -# Test label: failure -1 -# Test label: unlabeled -1 -# Test label, verbose: success -iamalabel -0 -# Test label, verbose: failure -iamalabel -1 -# Test label: multiple arguments -0 -# Test label: wildcards -0 +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label03.at:28" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_46 -#AT_START_47 -# 47. label04.at:25: label with non-create option -at_setup_line='label04.at:25' -at_desc="label with non-create option" -$at_quiet $as_echo_n " 47: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_66 +#AT_START_67 +at_fn_group_banner 67 'extrac04.at:24' \ + "extract + fnmatch" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "47. label04.at:25: testing ..." + $as_echo "67. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/label04.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/extrac04.at:27: +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 * -exec <&- -genfile --file file -decho \"# Create volume\" -tar -c -f archive --label='New volume' file -decho \"# Update: wrong label\" -tar -rf archive --label='My volume' file; echo \$? -decho \"# Update: right label\" -tar -rf archive --label='New volume' file + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort )" -echo label04.at:28 >"$at_check_line_file" +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/file2 +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac04.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive --label='New volume' file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive --label='New volume' file -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive --label='New volume' file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive --label='New volume' file -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Create volume -# Update: wrong label -tar: Volume \`New volume' does not match \`My volume' -tar: Error is not recoverable: exiting now -# Update: right label -" | \ + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/file2 +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac04.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/file2 +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac04.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/file2 +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac04.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/file2 +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_67 +#AT_START_68 +at_fn_group_banner 68 'extrac05.at:31' \ + "extracting selected members from pax" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "68. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +cat >list <<'_ATEOF' +jeden +cztery +_ATEOF + + + + + { set +x +$as_echo "$at_srcdir/extrac05.at:39: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77 +genfile --length 118 --file jeden +genfile --length 223 --file dwa +genfile --length 517 --file trzy +genfile --length 110 --file cztery + +tar cf archive jeden dwa trzy cztery || exit 1 + +mkdir dir +cd dir + +tar xvfT ../archive ../../list --warning=no-timestamp || exit 1 + +cd .. +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac05.at:39" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77 +genfile --length 118 --file jeden +genfile --length 223 --file dwa +genfile --length 517 --file trzy +genfile --length 110 --file cztery + +tar cf archive jeden dwa trzy cztery || exit 1 + +mkdir dir +cd dir + +tar xvfT ../archive ../../list --warning=no-timestamp || exit 1 + +cd .. +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "jeden +cztery +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac05.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_68 +#AT_START_69 +at_fn_group_banner 69 'extrac06.at:34' \ + "mode of extracted directories" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "69. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac06.at:37: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac06.at:37: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac06.at:37: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac06.at:37: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac06.at:37: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_69 +#AT_START_70 +at_fn_group_banner 70 'extrac07.at:27' \ + "extracting symlinks to a read-only dir" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "70. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac07.at:30: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +echo Prepare the directory +mkdir dir +genfile -f foo +cd dir +ln -s ../foo . +cd .. +chmod a-w dir + +echo Create the archive +tar cf archive dir || exit 1 + +chmod +w dir + +echo Extract +mkdir out +tar -C out -xvf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +echo Prepare the directory +mkdir dir +genfile -f foo +cd dir +ln -s ../foo . +cd .. +chmod a-w dir + +echo Create the archive +tar cf archive dir || exit 1 + +chmod +w dir + +echo Extract +mkdir out +tar -C out -xvf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Prepare the directory +Create the archive +Extract +dir/ +dir/foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + + # Testing one format is enough + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_70 +#AT_START_71 +at_fn_group_banner 71 'extrac08.at:33' \ + "restoring mode on existing directory" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "71. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac08.at:36: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac08.at:36: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac08.at:36: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac08.at:36: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac08.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_71 +#AT_START_72 +at_fn_group_banner 72 'extrac09.at:34' \ + "extracting even when . and .. are unreadable" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "72. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac09.at:37: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +mkdir dir +mkdir dir/sub +mkdir dir/sub/extract +genfile --file dir/sub/f +cd dir/sub + +tar -cf archive.tar f + +chmod a-r . .. +tar -xvf archive.tar -C extract f +status=\$? +chmod a+r . .. +cmp f extract/f || status=\$? +exit \$status +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac09.at:37" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +mkdir dir +mkdir dir/sub +mkdir dir/sub/extract +genfile --file dir/sub/f +cd dir/sub + +tar -cf archive.tar f + +chmod a-r . .. +tar -xvf archive.tar -C extract f +status=$? +chmod a+r . .. +cmp f extract/f || status=$? +exit $status +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "f +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac09.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_72 +#AT_START_73 +at_fn_group_banner 73 'extrac10.at:29' \ + "-C and delayed setting of metadata" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "73. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac10.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir d x x/y +echo foo >d/d1 +echo bar >e + +tar -cf archive.tar d e && +tar -xf archive.tar -C x d -C y e && +diff -r d x/d && +diff e x/y/e +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac10.at:32" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir d x x/y +echo foo >d/d1 +echo bar >e + +tar -cf archive.tar d e && +tar -xf archive.tar -C x d -C y e && +diff -r d x/d && +diff e x/y/e +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac10.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_73 +#AT_START_74 +at_fn_group_banner 74 'extrac11.at:25' \ + "scarce file descriptors" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "74. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac11.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +exec \$dir/\$file || exit + files=\"\$files \$file\" + done +done + +# Check that \"ulimit\" itself works. Close file descriptors before +# invoking ulimit, to work around a bug (or a \"feature\") in some shells, +# where they squirrel away dups of file descriptors into FD 10 and up +# before closing the originals. +( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + ulimit -n 100 && + tar -cf archive1.tar a && + tar -xf archive1.tar -C dest1 a + ) && + diff -r a dest1/a +) >/dev/null 2>&1 || + exit 77 + +# Another test that \"ulimit\" itself works: +# tar should fail when completely starved of file descriptors. +( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + ulimit -n 4 && + tar -cf archive2.tar a && + tar -xf archive2.tar -C dest2 a + ) && + diff -r a dest2/a +) >/dev/null 2>&1 && + exit 77 + +# Tar should work when there are few, but enough, file descriptors. +( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + ulimit -n 10 && + tar -cf archive3.tar a && + tar -xf archive3.tar -C dest3 a + ) && + diff -r a dest3/a >/dev/null 2>&1 +) || { diff -r a dest3/a; exit 1; } +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac11.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +exec $dir/$file || exit + files="$files $file" + done +done + +# Check that "ulimit" itself works. Close file descriptors before +# invoking ulimit, to work around a bug (or a "feature") in some shells, +# where they squirrel away dups of file descriptors into FD 10 and up +# before closing the originals. +( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + ulimit -n 100 && + tar -cf archive1.tar a && + tar -xf archive1.tar -C dest1 a + ) && + diff -r a dest1/a +) >/dev/null 2>&1 || + exit 77 + +# Another test that "ulimit" itself works: +# tar should fail when completely starved of file descriptors. +( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + ulimit -n 4 && + tar -cf archive2.tar a && + tar -xf archive2.tar -C dest2 a + ) && + diff -r a dest2/a +) >/dev/null 2>&1 && + exit 77 + +# Tar should work when there are few, but enough, file descriptors. +( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + ulimit -n 10 && + tar -cf archive3.tar a && + tar -xf archive3.tar -C dest3 a + ) && + diff -r a dest3/a >/dev/null 2>&1 +) || { diff -r a dest3/a; exit 1; } +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac11.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_74 +#AT_START_75 +at_fn_group_banner 75 'extrac12.at:25' \ + "extract dot permissions" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "75. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac12.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir src dst +echo file1 >src/file1 +echo file2 >src/file2 +chmod a-w src + +tar --no-recursion -cf archive.tar -C src . ./file1 file2 && +tar -xf archive.tar -C dst && +cmp src/file1 dst/file1 && +cmp src/file2 dst/file2 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac12.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir src dst +echo file1 >src/file1 +echo file2 >src/file2 +chmod a-w src + +tar --no-recursion -cf archive.tar -C src . ./file1 file2 && +tar -xf archive.tar -C dst && +cmp src/file1 dst/file1 && +cmp src/file2 dst/file2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac12.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_75 +#AT_START_76 +at_fn_group_banner 76 'extrac13.at:26' \ + "extract over symlinks" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "76. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac13.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir src dst1 dst2 dst3 +echo file1 >src/file1 +ln -s target1 dst1/file1 +echo target1 >dst1/target1 +echo target1 >target1 + +tar -cf archive.tar -C src . && +tar -xf archive.tar -C dst1 --warning=no-timestamp && +diff src/file1 dst1/file1 && +diff target1 dst1/target1 + +ln -s target1 dst2/file1 +echo target1 >dst2/target1 +tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp && +diff src/file1 dst2/file1 && +diff target1 dst2/target1 + +ln -s target1 dst3/file1 +echo target1 >dst3/target1 +tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp && +diff src/file1 dst3/file1 && +diff src/file1 dst3/target1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac13.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir src dst1 dst2 dst3 +echo file1 >src/file1 +ln -s target1 dst1/file1 +echo target1 >dst1/target1 +echo target1 >target1 + +tar -cf archive.tar -C src . && +tar -xf archive.tar -C dst1 --warning=no-timestamp && +diff src/file1 dst1/file1 && +diff target1 dst1/target1 + +ln -s target1 dst2/file1 +echo target1 >dst2/target1 +tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp && +diff src/file1 dst2/file1 && +diff target1 dst2/target1 + +ln -s target1 dst3/file1 +echo target1 >dst3/target1 +tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp && +diff src/file1 dst3/file1 && +diff src/file1 dst3/target1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac13.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_76 +#AT_START_77 +at_fn_group_banner 77 'extrac14.at:25' \ + "extract -C symlink" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "77. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac14.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dest +ln -s dest symlink +echo foo >foo +tar -cf archive.tar foo && +tar -xf archive.tar -C symlink --warning=no-timestamp && +cmp foo dest/foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac14.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dest +ln -s dest symlink +echo foo >foo +tar -cf archive.tar foo && +tar -xf archive.tar -C symlink --warning=no-timestamp && +cmp foo dest/foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac14.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_77 +#AT_START_78 +at_fn_group_banner 78 'extrac15.at:25' \ + "extract parent mkdir failure" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "78. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac15.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +mkdir src src/a src/a/b dest dest/a +touch src/a/b/c +chmod a-w dest/a + +tar -cf archive.tar -C src a/b/c && +if tar -xf archive.tar -C dest a/b/c +then (exit 1) +else (exit 0) +fi +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac15.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +mkdir src src/a src/a/b dest dest/a +touch src/a/b/c +chmod a-w dest/a + +tar -cf archive.tar -C src a/b/c && +if tar -xf archive.tar -C dest a/b/c +then (exit 1) +else (exit 0) +fi +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: a/b: Cannot mkdir: Permission denied +tar: a/b/c: Cannot open: No such file or directory +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac15.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_78 +#AT_START_79 +at_fn_group_banner 79 'extrac16.at:26' \ + "extract empty directory with -C" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "79. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac16.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir src src/a src/a/b dest +touch src/a/c + +tar -cf archive.tar -C src a && +tar -xf archive.tar -C dest +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac16.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir src src/a src/a/b dest +touch src/a/c + +tar -cf archive.tar -C src a && +tar -xf archive.tar -C dest +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac16.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_79 +#AT_START_80 +at_fn_group_banner 80 'extrac17.at:21' \ + "name matching/transformation ordering" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "80. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# Description: Tar 1.24 changed the ordering of name matching and +# name transformation so that the former saw already transformed +# file names (see commit 9c194c99 and exclude06.at). This reverted +# ordering made it impossible to match file names in certain cases. +# In particular, the testcase below would not extract anything. +# +# Reported-by: "Gabor Z. Papp" +# References: , <20101026175126.29028@Pirx.gnu.org.ua> +# http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html + + + + { set +x +$as_echo "$at_srcdir/extrac17.at:34: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ + dir/subdir1/ +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ + dir/subdir1/ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac17.at:34: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ + dir/subdir1/ +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ + dir/subdir1/ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac17.at:34: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ + dir/subdir1/ +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ + dir/subdir1/ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac17.at:34: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ + dir/subdir1/ +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ + dir/subdir1/ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac17.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\ + dir/subdir1/ +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir dir/subdir1 dir/subdir2 out +genfile --file dir/subdir1/file1 +genfile --file dir/subdir2/file2 + +tar cf dir.tar dir + +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ + dir/subdir1/ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/subdir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_80 +#AT_START_81 +at_fn_group_banner 81 'extrac18.at:34' \ + "keep-old-files" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "81. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac18.at:37: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=2 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac18.at:37: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=2 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac18.at:37: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=2 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac18.at:37: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=2 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac18.at:37: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x -k -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=2 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_81 +#AT_START_82 +at_fn_group_banner 82 'extrac19.at:21' \ + "skip-old-files" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "82. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/extrac19.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=0 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac19.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=0 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac19.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=0 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac19.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=0 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/extrac19.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=\$? + +cat a +)" +at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +cd dir +echo 'Old file a' > a +echo 'Old file b' > b + +tar cf ../archive . + +rm b +echo 'File a' > a + +tar -x --skip-old-files -f ../archive +echo status=$? + +cat a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "status=0 +File a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_82 +#AT_START_83 +at_fn_group_banner 83 'backup01.at:33' \ + "extracting existing dir with --backup" " " 9 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "83. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/backup01.at:36: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +)" +at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming 'dir1/file1' to 'dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/backup01.at:36: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +)" +at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming 'dir1/file1' to 'dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/backup01.at:36: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +)" +at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming 'dir1/file1' to 'dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/backup01.at:36: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +)" +at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming 'dir1/file1' to 'dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/backup01.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +)" +at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +unset VERSION_CONTROL +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming 'dir1/file1' to 'dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_83 +#AT_START_84 +at_fn_group_banner 84 'label01.at:21' \ + "single-volume label" " " 10 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "84. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/label01.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test +foo +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label01.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test +foo +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label01.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test +foo +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_84 +#AT_START_85 +at_fn_group_banner 85 'label02.at:21' \ + "multi-volume label" " " 10 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "85. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/label02.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +)" +at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test Volume 1 +foo +bar +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label02.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +)" +at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test Volume 1 +foo +bar +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label02.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +)" +at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test Volume 1 +foo +bar +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_85 +#AT_START_86 +at_fn_group_banner 86 'label03.at:27' \ + "test-label option" " " 10 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "86. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/label03.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho \"# Display label\" +tar --test-label --file=iamanarchive; echo \$? +decho \"# Display label: unlabeled\" +tar --test-label --file=unlabeled.tar; echo \$? +decho \"# Test label: success\" +tar --test-label --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label: failure\" +tar --test-label --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: unlabeled\" +tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? +decho \"# Test label, verbose: success\" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label, verbose: failure\" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: multiple arguments\" +tar --test-label --file=iamanarchive a iamalabel b; echo \$? +decho \"# Test label: wildcards\" +tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? +)" +at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Display label +# Display label: unlabeled +# Test label: success +# Test label: failure +# Test label: unlabeled +# Test label, verbose: success +# Test label, verbose: failure +tar: Archive label mismatch +# Test label: multiple arguments +# Test label: wildcards +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Display label +iamalabel +0 +# Display label: unlabeled +0 +# Test label: success +0 +# Test label: failure +1 +# Test label: unlabeled +1 +# Test label, verbose: success +iamalabel +0 +# Test label, verbose: failure +iamalabel +1 +# Test label: multiple arguments +0 +# Test label: wildcards +0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label03.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho \"# Display label\" +tar --test-label --file=iamanarchive; echo \$? +decho \"# Display label: unlabeled\" +tar --test-label --file=unlabeled.tar; echo \$? +decho \"# Test label: success\" +tar --test-label --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label: failure\" +tar --test-label --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: unlabeled\" +tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? +decho \"# Test label, verbose: success\" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label, verbose: failure\" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: multiple arguments\" +tar --test-label --file=iamanarchive a iamalabel b; echo \$? +decho \"# Test label: wildcards\" +tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? +)" +at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Display label +# Display label: unlabeled +# Test label: success +# Test label: failure +# Test label: unlabeled +# Test label, verbose: success +# Test label, verbose: failure +tar: Archive label mismatch +# Test label: multiple arguments +# Test label: wildcards +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Display label +iamalabel +0 +# Display label: unlabeled +0 +# Test label: success +0 +# Test label: failure +1 +# Test label: unlabeled +1 +# Test label, verbose: success +iamalabel +0 +# Test label, verbose: failure +iamalabel +1 +# Test label: multiple arguments +0 +# Test label: wildcards +0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label03.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho \"# Display label\" +tar --test-label --file=iamanarchive; echo \$? +decho \"# Display label: unlabeled\" +tar --test-label --file=unlabeled.tar; echo \$? +decho \"# Test label: success\" +tar --test-label --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label: failure\" +tar --test-label --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: unlabeled\" +tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? +decho \"# Test label, verbose: success\" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label, verbose: failure\" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: multiple arguments\" +tar --test-label --file=iamanarchive a iamalabel b; echo \$? +decho \"# Test label: wildcards\" +tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? +)" +at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Display label +# Display label: unlabeled +# Test label: success +# Test label: failure +# Test label: unlabeled +# Test label, verbose: success +# Test label, verbose: failure +tar: Archive label mismatch +# Test label: multiple arguments +# Test label: wildcards +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Display label +iamalabel +0 +# Display label: unlabeled +0 +# Test label: success +0 +# Test label: failure +1 +# Test label: unlabeled +1 +# Test label, verbose: success +iamalabel +0 +# Test label, verbose: failure +iamalabel +1 +# Test label: multiple arguments +0 +# Test label: wildcards +0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_86 +#AT_START_87 +at_fn_group_banner 87 'label04.at:27' \ + "label with non-create option" " " 10 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "87. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/label04.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive --label='New volume' file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive --label='New volume' file +)" +at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Volume 'New volume' does not match 'My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label04.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive --label='New volume' file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive --label='New volume' file +)" +at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Volume 'New volume' does not match 'My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label04.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive --label='New volume' file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive --label='New volume' file +)" +at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Volume 'New volume' does not match 'My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_87 +#AT_START_88 +at_fn_group_banner 88 'label05.at:24' \ + "label with non-create option" " " 10 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "88. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/label05.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive file +)" +at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Archive not labeled to match 'My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label05.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive file +)" +at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Archive not labeled to match 'My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/label05.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive file +)" +at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Archive not labeled to match 'My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_88 +#AT_START_89 +at_fn_group_banner 89 'incremental.at:23' \ + "incremental" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "89. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incremental.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created \"on or after\" the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +)" +at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created "on or after" the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ +separator +structure/ +structure/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incremental.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created \"on or after\" the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +)" +at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created "on or after" the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ +separator +structure/ +structure/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incremental.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created \"on or after\" the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +)" +at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created "on or after" the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ +separator +structure/ +structure/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_89 +#AT_START_90 +at_fn_group_banner 90 'incr01.at:27' \ + "restore broken symlinks from incremental" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "90. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incr01.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +\$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/bar +separator +directory/ +tar: Deleting 'directory/bar' +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr01.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +\$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/bar +separator +directory/ +tar: Deleting 'directory/bar' +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr01.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +\$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/bar +separator +directory/ +tar: Deleting 'directory/bar' +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_90 +#AT_START_91 +at_fn_group_banner 91 'incr02.at:32' \ + "restoring timestamps from incremental" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "91. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incr02.at:35: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, 'dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, 'dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr02.at:35: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, 'dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, 'dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr02.at:35: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, 'dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, 'dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_91 +#AT_START_92 +at_fn_group_banner 92 'listed01.at:27' \ + "--listed for individual files" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "92. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/listed01.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \\ + --file=archive.1 \\ + --listed-incremental=listing \\ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo \"separator\" +cp listing listing.old +tar --create \\ + --file=archive.2 \\ + --listed-incremental=listing \\ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \ + --file=archive.1 \ + --listed-incremental=listing \ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo "separator" +cp listing listing.old +tar --create \ + --file=archive.2 \ + --listed-incremental=listing \ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/file1 +separator +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/listed01.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \\ + --file=archive.1 \\ + --listed-incremental=listing \\ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo \"separator\" +cp listing listing.old +tar --create \\ + --file=archive.2 \\ + --listed-incremental=listing \\ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:30" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \ + --file=archive.1 \ + --listed-incremental=listing \ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo "separator" +cp listing listing.old +tar --create \ + --file=archive.2 \ + --listed-incremental=listing \ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/file1 +separator +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_92 +#AT_START_93 +at_fn_group_banner 93 'listed02.at:29' \ + "working --listed" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "93. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/listed02.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File \$file > \$file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 \"Creating main archive\" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 \"Creating incremental archive\" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 \"Extracting main archive\" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:32" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File $file > $file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 "Creating main archive" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 "Creating incremental archive" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 "Extracting main archive" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating main archive +tar: tart/c0: Directory is new +tar: tart/c1: Directory is new +tar: tart: Directory is new +Creating incremental archive +tar: tart/c2: Directory has been renamed from 'tart/c1' +Extracting main archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create directories +Creating main archive +tart/ +tart/c0/ +tart/c1/ +tart/a1 +tart/b1 +tart/c0/cq1 +tart/c0/cq2 +tart/c1/ca1 +tart/c1/ca2 +Modifying filesystem +Directory contents +tart +tart/b2 +tart/c0 +tart/c0/cq1 +tart/c0/cq2 +tart/c2 +tart/c2/ca1 +tart/c2/ca2 +tart/c2/ca3 +Creating incremental archive +tart/ +tart/c0/ +tart/c2/ +tart/b2 +tart/c2/ca3 +Extracting main archive +tart/ +tart/c0/ +tart/c1/ +tart/a1 +tart/b1 +tart/c0/cq1 +tart/c0/cq2 +tart/c1/ca1 +tart/c1/ca2 +Extracting incremental archive +tar: Deleting 'tart/a1' +tar: Deleting 'tart/b1' +tart/ +tart/b2 +tart/c0/ +tart/c2/ +tart/c2/ca3 +Final files: +tart +tart/b2 +tart/c0 +tart/c0/cq1 +tart/c0/cq2 +tart/c2 +tart/c2/ca1 +tart/c2/ca2 +tart/c2/ca3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/listed02.at:32: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File \$file > \$file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 \"Creating main archive\" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 \"Creating incremental archive\" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 \"Extracting main archive\" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:32" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File $file > $file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 "Creating main archive" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 "Creating incremental archive" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 "Extracting main archive" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating main archive +tar: tart/c0: Directory is new +tar: tart/c1: Directory is new +tar: tart: Directory is new +Creating incremental archive +tar: tart/c2: Directory has been renamed from 'tart/c1' +Extracting main archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create directories +Creating main archive +tart/ +tart/c0/ +tart/c1/ +tart/a1 +tart/b1 +tart/c0/cq1 +tart/c0/cq2 +tart/c1/ca1 +tart/c1/ca2 +Modifying filesystem +Directory contents +tart +tart/b2 +tart/c0 +tart/c0/cq1 +tart/c0/cq2 +tart/c2 +tart/c2/ca1 +tart/c2/ca2 +tart/c2/ca3 +Creating incremental archive +tart/ +tart/c0/ +tart/c2/ +tart/b2 +tart/c2/ca3 +Extracting main archive +tart/ +tart/c0/ +tart/c1/ +tart/a1 +tart/b1 +tart/c0/cq1 +tart/c0/cq2 +tart/c1/ca1 +tart/c1/ca2 +Extracting incremental archive +tar: Deleting 'tart/a1' +tar: Deleting 'tart/b1' +tart/ +tart/b2 +tart/c0/ +tart/c2/ +tart/c2/ca3 +Final files: +tart +tart/b2 +tart/c0 +tart/c0/cq1 +tart/c0/cq2 +tart/c2 +tart/c2/ca1 +tart/c2/ca2 +tart/c2/ca3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_93 +#AT_START_94 +at_fn_group_banner 94 'listed03.at:24' \ + "incremental dump when the parent directory is unreadable" "" 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "94. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/listed03.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +genfile --file dir/sub/a/file +cd dir/sub + +chmod a-r .. +tar -c -f archive.tar --listed-incremental=db.1 -v a 2>err +status=\$? +chmod a+r .. +if test \$status -eq 2; then + grep '^tar: \\.: Cannot getcwd' err >/dev/null 2>&1 && exit 77 +fi +cat err >&2 +exit \$status +)" +at_fn_check_prepare_notrace 'an embedded newline' "listed03.at:27" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +genfile --file dir/sub/a/file +cd dir/sub + +chmod a-r .. +tar -c -f archive.tar --listed-incremental=db.1 -v a 2>err +status=$? +chmod a+r .. +if test $status -eq 2; then + grep '^tar: \.: Cannot getcwd' err >/dev/null 2>&1 && exit 77 +fi +cat err >&2 +exit $status +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: a: Directory is new +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed03.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_94 +#AT_START_95 +at_fn_group_banner 95 'listed04.at:26' \ + "--listed-incremental and --one-file-system" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "95. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/listed04.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +echo a >dir/a +echo b >dir/b + +tar --one-file-system -cvf archive.tar -g archive.incr dir || exit +tar -tf archive.tar || exit +)" +at_fn_check_prepare_notrace 'an embedded newline' "listed04.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +echo a >dir/a +echo b >dir/b + +tar --one-file-system -cvf archive.tar -g archive.incr dir || exit +tar -tf archive.tar || exit +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/a +dir/b +dir/ +dir/a +dir/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed04.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_95 +#AT_START_96 +at_fn_group_banner 96 'listed05.at:33' \ + "--listed-incremental and remounted directories" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "96. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/listed05.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 + +options=\"-C tartest --create --one-file-system --verbose\" +rm -rf archive-01.snar archive-01.tar tartest subdir + +# Create initial structure +mkdir tartest +echo \"hi\" > tartest/top-level-file +mkdir tartest/subdir +echo \"hi\" > tartest/subdir/subdir-file + +echo \"# Level 0\" +tar \$options --file archive-0.tar --listed-incremental=archive-0.snar . + +echo \"# Remount\" +mv tartest/subdir . +mkdir tartest/subdir +mount -t ramfs none tartest/subdir || exit 77 +tar -C subdir -c -f - . | tar -C tartest/subdir -x -f - + +echo \"# Level 1\" +cp archive-0.snar archive-1.snar +tar \$options --file archive-1.tar --listed-incremental=archive-1.snar . + +umount tartest/subdir +)" +at_fn_check_prepare_notrace 'an embedded newline' "listed05.at:36" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 + +options="-C tartest --create --one-file-system --verbose" +rm -rf archive-01.snar archive-01.tar tartest subdir + +# Create initial structure +mkdir tartest +echo "hi" > tartest/top-level-file +mkdir tartest/subdir +echo "hi" > tartest/subdir/subdir-file + +echo "# Level 0" +tar $options --file archive-0.tar --listed-incremental=archive-0.snar . + +echo "# Remount" +mv tartest/subdir . +mkdir tartest/subdir +mount -t ramfs none tartest/subdir || exit 77 +tar -C subdir -c -f - . | tar -C tartest/subdir -x -f - + +echo "# Level 1" +cp archive-0.snar archive-1.snar +tar $options --file archive-1.tar --listed-incremental=archive-1.snar . + +umount tartest/subdir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: .: Directory is new +tar: ./subdir: Directory is new +tar: ./subdir: directory is on a different filesystem; not dumped +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Level 0 +./ +./subdir/ +./top-level-file +./subdir/subdir-file +# Remount +# Level 1 +./ +./subdir/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/listed05.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_96 +#AT_START_97 +at_fn_group_banner 97 'incr03.at:29' \ + "renamed files in incrementals" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "97. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incr03.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 +directory/ +directory/x +directory/y +Listing of archive.2 +directory/ +directory/z +Directory after first restore +directory +directory/x +directory/y +Directory after second restore +directory +directory/y +directory/z +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr03.at:32: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 +directory/ +directory/x +directory/y +Listing of archive.2 +directory/ +directory/z +Directory after first restore +directory +directory/x +directory/y +Directory after second restore +directory +directory/y +directory/z +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr03.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 +directory/ +directory/x +directory/y +Listing of archive.2 +directory/ +directory/z +Directory after first restore +directory +directory/x +directory/y +Directory after second restore +directory +directory/y +directory/z +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_97 +#AT_START_98 +at_fn_group_banner 98 'incr04.at:30' \ + "proper icontents initialization" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "98. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + + + { set +x +$as_echo "$at_srcdir/incr04.at:35: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo \"Initial dump\" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo \"Incremental dump\" +tar cvf a1.tar -g a.sna a +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: a: Directory is new +tar: a/b: Directory is new +tar: a/c: Directory has been renamed from 'a/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump +a/ +a/b/ +a/b/one_31_chars_long_file_name_001 +a/b/one_31_chars_long_file_name_002 +a/b/one_31_chars_long_file_name_003 +a/b/one_31_chars_long_file_name_004 +a/b/one_31_chars_long_file_name_005 +a/b/one_31_chars_long_file_name_006 +a/b/one_31_chars_long_file_name_007 +a/b/one_31_chars_long_file_name_008 +a/b/one_31_chars_long_file_name_009 +a/b/one_31_chars_long_file_name_010 +a/b/one_31_chars_long_file_name_011 +a/b/one_31_chars_long_file_name_012 +a/b/one_31_chars_long_file_name_013 +a/b/one_31_chars_long_file_name_014 +a/b/one_31_chars_long_file_name_015 +a/b/one_31_chars_long_file_name_016 +a/b/one_31_chars_long_file_name_017 +a/b/one_31_chars_long_file_name_018 +a/b/one_31_chars_long_file_name_019 +a/b/one_31_chars_long_file_name_020 +a/b/one_31_chars_long_file_name_021 +a/b/one_31_chars_long_file_name_022 +a/b/one_31_chars_long_file_name_023 +a/b/one_31_chars_long_file_name_024 +a/b/one_31_chars_long_file_name_025 +a/b/one_31_chars_long_file_name_026 +a/b/one_31_chars_long_file_name_027 +a/b/one_31_chars_long_file_name_028 +a/b/one_31_chars_long_file_name_029 +a/b/one_31_chars_long_file_name_030 +a/b/one_31_chars_long_file_name_031 +a/b/one_31_chars_long_file_name_032 +a/b/one_31_chars_long_file_name_033 +a/b/one_31_chars_long_file_name_034 +a/b/one_31_chars_long_file_name_035 +a/b/one_31_chars_long_file_name_036 +a/b/one_31_chars_long_file_name_037 +a/b/one_31_chars_long_file_name_038 +a/b/one_31_chars_long_file_name_039 +a/b/one_31_chars_long_file_name_040 +a/b/one_31_chars_long_file_name_041 +a/b/one_31_chars_long_file_name_042 +a/b/one_31_chars_long_file_name_043 +a/b/one_31_chars_long_file_name_044 +a/b/one_31_chars_long_file_name_045 +a/b/one_31_chars_long_file_name_046 +a/b/one_31_chars_long_file_name_047 +a/b/one_31_chars_long_file_name_048 +a/b/one_31_chars_long_file_name_049 +a/b/one_31_chars_long_file_name_050 +a/b/one_31_chars_long_file_name_051 +a/b/one_31_chars_long_file_name_052 +a/b/one_31_chars_long_file_name_053 +a/b/one_31_chars_long_file_name_054 +a/b/one_31_chars_long_file_name_055 +a/b/one_31_chars_long_file_name_056 +a/b/one_31_chars_long_file_name_057 +a/b/one_31_chars_long_file_name_058 +a/b/one_31_chars_long_file_name_059 +a/b/one_31_chars_long_file_name_060 +a/b/one_31_chars_long_file_name_061 +a/b/one_31_chars_long_file_name_062 +a/b/one_31_chars_long_file_name_063 +a/b/one_31_chars_long_file_name_064 +a/b/one_31_chars_long_file_name_065 +a/b/one_31_chars_long_file_name_066 +a/b/one_31_chars_long_file_name_067 +a/b/one_31_chars_long_file_name_068 +a/b/one_31_chars_long_file_name_069 +a/b/one_31_chars_long_file_name_070 +a/b/one_31_chars_long_file_name_071 +a/b/one_31_chars_long_file_name_072 +a/b/one_31_chars_long_file_name_073 +a/b/one_31_chars_long_file_name_074 +a/b/one_31_chars_long_file_name_075 +a/b/one_31_chars_long_file_name_076 +a/b/one_31_chars_long_file_name_077 +a/b/one_31_chars_long_file_name_078 +a/b/one_31_chars_long_file_name_079 +a/b/one_31_chars_long_file_name_080 +a/b/one_31_chars_long_file_name_081 +a/b/one_31_chars_long_file_name_082 +a/b/one_31_chars_long_file_name_083 +a/b/one_31_chars_long_file_name_084 +a/b/one_31_chars_long_file_name_085 +a/b/one_31_chars_long_file_name_086 +a/b/one_31_chars_long_file_name_087 +a/b/one_31_chars_long_file_name_088 +a/b/one_31_chars_long_file_name_089 +a/b/one_31_chars_long_file_name_090 +a/b/one_31_chars_long_file_name_091 +a/b/one_31_chars_long_file_name_092 +a/b/one_31_chars_long_file_name_093 +a/b/one_31_chars_long_file_name_094 +a/b/one_31_chars_long_file_name_095 +a/b/one_31_chars_long_file_name_096 +a/b/one_31_chars_long_file_name_097 +a/b/one_31_chars_long_file_name_098 +a/b/one_31_chars_long_file_name_099 +a/b/one_31_chars_long_file_name_100 +a/b/one_31_chars_long_file_name_101 +a/b/one_31_chars_long_file_name_102 +a/b/one_31_chars_long_file_name_103 +a/b/one_31_chars_long_file_name_104 +a/b/one_31_chars_long_file_name_105 +a/b/one_31_chars_long_file_name_106 +a/b/one_31_chars_long_file_name_107 +a/b/one_31_chars_long_file_name_108 +a/b/one_31_chars_long_file_name_109 +a/b/one_31_chars_long_file_name_110 +a/b/one_31_chars_long_file_name_111 +a/b/one_31_chars_long_file_name_112 +a/b/one_31_chars_long_file_name_113 +a/b/one_31_chars_long_file_name_114 +a/b/one_31_chars_long_file_name_115 +a/b/one_31_chars_long_file_name_116 +a/b/one_31_chars_long_file_name_117 +a/b/one_31_chars_long_file_name_118 +a/b/one_31_chars_long_file_name_119 +a/b/one_31_chars_long_file_name_120 +a/b/one_31_chars_long_file_name_121 +a/b/one_31_chars_long_file_name_122 +a/b/one_31_chars_long_file_name_123 +a/b/one_31_chars_long_file_name_124 +a/b/one_31_chars_long_file_name_125 +a/b/one_31_chars_long_file_name_126 +a/b/one_31_chars_long_file_name_127 +a/b/one_31_chars_long_file_name_128 +a/b/one_31_chars_long_file_name_129 +a/b/one_31_chars_long_file_name_130 +a/b/one_31_chars_long_file_name_131 +a/b/one_31_chars_long_file_name_132 +a/b/one_31_chars_long_file_name_133 +a/b/one_31_chars_long_file_name_134 +a/b/one_31_chars_long_file_name_135 +a/b/one_31_chars_long_file_name_136 +a/b/one_31_chars_long_file_name_137 +a/b/one_31_chars_long_file_name_138 +a/b/one_31_chars_long_file_name_139 +a/b/one_31_chars_long_file_name_140 +a/b/one_31_chars_long_file_name_141 +a/b/one_31_chars_long_file_name_142 +Incremental dump +a/ +a/c/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr04.at:35: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo \"Initial dump\" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo \"Incremental dump\" +tar cvf a1.tar -g a.sna a +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: a: Directory is new +tar: a/b: Directory is new +tar: a/c: Directory has been renamed from 'a/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump +a/ +a/b/ +a/b/one_31_chars_long_file_name_001 +a/b/one_31_chars_long_file_name_002 +a/b/one_31_chars_long_file_name_003 +a/b/one_31_chars_long_file_name_004 +a/b/one_31_chars_long_file_name_005 +a/b/one_31_chars_long_file_name_006 +a/b/one_31_chars_long_file_name_007 +a/b/one_31_chars_long_file_name_008 +a/b/one_31_chars_long_file_name_009 +a/b/one_31_chars_long_file_name_010 +a/b/one_31_chars_long_file_name_011 +a/b/one_31_chars_long_file_name_012 +a/b/one_31_chars_long_file_name_013 +a/b/one_31_chars_long_file_name_014 +a/b/one_31_chars_long_file_name_015 +a/b/one_31_chars_long_file_name_016 +a/b/one_31_chars_long_file_name_017 +a/b/one_31_chars_long_file_name_018 +a/b/one_31_chars_long_file_name_019 +a/b/one_31_chars_long_file_name_020 +a/b/one_31_chars_long_file_name_021 +a/b/one_31_chars_long_file_name_022 +a/b/one_31_chars_long_file_name_023 +a/b/one_31_chars_long_file_name_024 +a/b/one_31_chars_long_file_name_025 +a/b/one_31_chars_long_file_name_026 +a/b/one_31_chars_long_file_name_027 +a/b/one_31_chars_long_file_name_028 +a/b/one_31_chars_long_file_name_029 +a/b/one_31_chars_long_file_name_030 +a/b/one_31_chars_long_file_name_031 +a/b/one_31_chars_long_file_name_032 +a/b/one_31_chars_long_file_name_033 +a/b/one_31_chars_long_file_name_034 +a/b/one_31_chars_long_file_name_035 +a/b/one_31_chars_long_file_name_036 +a/b/one_31_chars_long_file_name_037 +a/b/one_31_chars_long_file_name_038 +a/b/one_31_chars_long_file_name_039 +a/b/one_31_chars_long_file_name_040 +a/b/one_31_chars_long_file_name_041 +a/b/one_31_chars_long_file_name_042 +a/b/one_31_chars_long_file_name_043 +a/b/one_31_chars_long_file_name_044 +a/b/one_31_chars_long_file_name_045 +a/b/one_31_chars_long_file_name_046 +a/b/one_31_chars_long_file_name_047 +a/b/one_31_chars_long_file_name_048 +a/b/one_31_chars_long_file_name_049 +a/b/one_31_chars_long_file_name_050 +a/b/one_31_chars_long_file_name_051 +a/b/one_31_chars_long_file_name_052 +a/b/one_31_chars_long_file_name_053 +a/b/one_31_chars_long_file_name_054 +a/b/one_31_chars_long_file_name_055 +a/b/one_31_chars_long_file_name_056 +a/b/one_31_chars_long_file_name_057 +a/b/one_31_chars_long_file_name_058 +a/b/one_31_chars_long_file_name_059 +a/b/one_31_chars_long_file_name_060 +a/b/one_31_chars_long_file_name_061 +a/b/one_31_chars_long_file_name_062 +a/b/one_31_chars_long_file_name_063 +a/b/one_31_chars_long_file_name_064 +a/b/one_31_chars_long_file_name_065 +a/b/one_31_chars_long_file_name_066 +a/b/one_31_chars_long_file_name_067 +a/b/one_31_chars_long_file_name_068 +a/b/one_31_chars_long_file_name_069 +a/b/one_31_chars_long_file_name_070 +a/b/one_31_chars_long_file_name_071 +a/b/one_31_chars_long_file_name_072 +a/b/one_31_chars_long_file_name_073 +a/b/one_31_chars_long_file_name_074 +a/b/one_31_chars_long_file_name_075 +a/b/one_31_chars_long_file_name_076 +a/b/one_31_chars_long_file_name_077 +a/b/one_31_chars_long_file_name_078 +a/b/one_31_chars_long_file_name_079 +a/b/one_31_chars_long_file_name_080 +a/b/one_31_chars_long_file_name_081 +a/b/one_31_chars_long_file_name_082 +a/b/one_31_chars_long_file_name_083 +a/b/one_31_chars_long_file_name_084 +a/b/one_31_chars_long_file_name_085 +a/b/one_31_chars_long_file_name_086 +a/b/one_31_chars_long_file_name_087 +a/b/one_31_chars_long_file_name_088 +a/b/one_31_chars_long_file_name_089 +a/b/one_31_chars_long_file_name_090 +a/b/one_31_chars_long_file_name_091 +a/b/one_31_chars_long_file_name_092 +a/b/one_31_chars_long_file_name_093 +a/b/one_31_chars_long_file_name_094 +a/b/one_31_chars_long_file_name_095 +a/b/one_31_chars_long_file_name_096 +a/b/one_31_chars_long_file_name_097 +a/b/one_31_chars_long_file_name_098 +a/b/one_31_chars_long_file_name_099 +a/b/one_31_chars_long_file_name_100 +a/b/one_31_chars_long_file_name_101 +a/b/one_31_chars_long_file_name_102 +a/b/one_31_chars_long_file_name_103 +a/b/one_31_chars_long_file_name_104 +a/b/one_31_chars_long_file_name_105 +a/b/one_31_chars_long_file_name_106 +a/b/one_31_chars_long_file_name_107 +a/b/one_31_chars_long_file_name_108 +a/b/one_31_chars_long_file_name_109 +a/b/one_31_chars_long_file_name_110 +a/b/one_31_chars_long_file_name_111 +a/b/one_31_chars_long_file_name_112 +a/b/one_31_chars_long_file_name_113 +a/b/one_31_chars_long_file_name_114 +a/b/one_31_chars_long_file_name_115 +a/b/one_31_chars_long_file_name_116 +a/b/one_31_chars_long_file_name_117 +a/b/one_31_chars_long_file_name_118 +a/b/one_31_chars_long_file_name_119 +a/b/one_31_chars_long_file_name_120 +a/b/one_31_chars_long_file_name_121 +a/b/one_31_chars_long_file_name_122 +a/b/one_31_chars_long_file_name_123 +a/b/one_31_chars_long_file_name_124 +a/b/one_31_chars_long_file_name_125 +a/b/one_31_chars_long_file_name_126 +a/b/one_31_chars_long_file_name_127 +a/b/one_31_chars_long_file_name_128 +a/b/one_31_chars_long_file_name_129 +a/b/one_31_chars_long_file_name_130 +a/b/one_31_chars_long_file_name_131 +a/b/one_31_chars_long_file_name_132 +a/b/one_31_chars_long_file_name_133 +a/b/one_31_chars_long_file_name_134 +a/b/one_31_chars_long_file_name_135 +a/b/one_31_chars_long_file_name_136 +a/b/one_31_chars_long_file_name_137 +a/b/one_31_chars_long_file_name_138 +a/b/one_31_chars_long_file_name_139 +a/b/one_31_chars_long_file_name_140 +a/b/one_31_chars_long_file_name_141 +a/b/one_31_chars_long_file_name_142 +Incremental dump +a/ +a/c/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr04.at:35: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo \"Initial dump\" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo \"Incremental dump\" +tar cvf a1.tar -g a.sna a +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: a: Directory is new +tar: a/b: Directory is new +tar: a/c: Directory has been renamed from 'a/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump +a/ +a/b/ +a/b/one_31_chars_long_file_name_001 +a/b/one_31_chars_long_file_name_002 +a/b/one_31_chars_long_file_name_003 +a/b/one_31_chars_long_file_name_004 +a/b/one_31_chars_long_file_name_005 +a/b/one_31_chars_long_file_name_006 +a/b/one_31_chars_long_file_name_007 +a/b/one_31_chars_long_file_name_008 +a/b/one_31_chars_long_file_name_009 +a/b/one_31_chars_long_file_name_010 +a/b/one_31_chars_long_file_name_011 +a/b/one_31_chars_long_file_name_012 +a/b/one_31_chars_long_file_name_013 +a/b/one_31_chars_long_file_name_014 +a/b/one_31_chars_long_file_name_015 +a/b/one_31_chars_long_file_name_016 +a/b/one_31_chars_long_file_name_017 +a/b/one_31_chars_long_file_name_018 +a/b/one_31_chars_long_file_name_019 +a/b/one_31_chars_long_file_name_020 +a/b/one_31_chars_long_file_name_021 +a/b/one_31_chars_long_file_name_022 +a/b/one_31_chars_long_file_name_023 +a/b/one_31_chars_long_file_name_024 +a/b/one_31_chars_long_file_name_025 +a/b/one_31_chars_long_file_name_026 +a/b/one_31_chars_long_file_name_027 +a/b/one_31_chars_long_file_name_028 +a/b/one_31_chars_long_file_name_029 +a/b/one_31_chars_long_file_name_030 +a/b/one_31_chars_long_file_name_031 +a/b/one_31_chars_long_file_name_032 +a/b/one_31_chars_long_file_name_033 +a/b/one_31_chars_long_file_name_034 +a/b/one_31_chars_long_file_name_035 +a/b/one_31_chars_long_file_name_036 +a/b/one_31_chars_long_file_name_037 +a/b/one_31_chars_long_file_name_038 +a/b/one_31_chars_long_file_name_039 +a/b/one_31_chars_long_file_name_040 +a/b/one_31_chars_long_file_name_041 +a/b/one_31_chars_long_file_name_042 +a/b/one_31_chars_long_file_name_043 +a/b/one_31_chars_long_file_name_044 +a/b/one_31_chars_long_file_name_045 +a/b/one_31_chars_long_file_name_046 +a/b/one_31_chars_long_file_name_047 +a/b/one_31_chars_long_file_name_048 +a/b/one_31_chars_long_file_name_049 +a/b/one_31_chars_long_file_name_050 +a/b/one_31_chars_long_file_name_051 +a/b/one_31_chars_long_file_name_052 +a/b/one_31_chars_long_file_name_053 +a/b/one_31_chars_long_file_name_054 +a/b/one_31_chars_long_file_name_055 +a/b/one_31_chars_long_file_name_056 +a/b/one_31_chars_long_file_name_057 +a/b/one_31_chars_long_file_name_058 +a/b/one_31_chars_long_file_name_059 +a/b/one_31_chars_long_file_name_060 +a/b/one_31_chars_long_file_name_061 +a/b/one_31_chars_long_file_name_062 +a/b/one_31_chars_long_file_name_063 +a/b/one_31_chars_long_file_name_064 +a/b/one_31_chars_long_file_name_065 +a/b/one_31_chars_long_file_name_066 +a/b/one_31_chars_long_file_name_067 +a/b/one_31_chars_long_file_name_068 +a/b/one_31_chars_long_file_name_069 +a/b/one_31_chars_long_file_name_070 +a/b/one_31_chars_long_file_name_071 +a/b/one_31_chars_long_file_name_072 +a/b/one_31_chars_long_file_name_073 +a/b/one_31_chars_long_file_name_074 +a/b/one_31_chars_long_file_name_075 +a/b/one_31_chars_long_file_name_076 +a/b/one_31_chars_long_file_name_077 +a/b/one_31_chars_long_file_name_078 +a/b/one_31_chars_long_file_name_079 +a/b/one_31_chars_long_file_name_080 +a/b/one_31_chars_long_file_name_081 +a/b/one_31_chars_long_file_name_082 +a/b/one_31_chars_long_file_name_083 +a/b/one_31_chars_long_file_name_084 +a/b/one_31_chars_long_file_name_085 +a/b/one_31_chars_long_file_name_086 +a/b/one_31_chars_long_file_name_087 +a/b/one_31_chars_long_file_name_088 +a/b/one_31_chars_long_file_name_089 +a/b/one_31_chars_long_file_name_090 +a/b/one_31_chars_long_file_name_091 +a/b/one_31_chars_long_file_name_092 +a/b/one_31_chars_long_file_name_093 +a/b/one_31_chars_long_file_name_094 +a/b/one_31_chars_long_file_name_095 +a/b/one_31_chars_long_file_name_096 +a/b/one_31_chars_long_file_name_097 +a/b/one_31_chars_long_file_name_098 +a/b/one_31_chars_long_file_name_099 +a/b/one_31_chars_long_file_name_100 +a/b/one_31_chars_long_file_name_101 +a/b/one_31_chars_long_file_name_102 +a/b/one_31_chars_long_file_name_103 +a/b/one_31_chars_long_file_name_104 +a/b/one_31_chars_long_file_name_105 +a/b/one_31_chars_long_file_name_106 +a/b/one_31_chars_long_file_name_107 +a/b/one_31_chars_long_file_name_108 +a/b/one_31_chars_long_file_name_109 +a/b/one_31_chars_long_file_name_110 +a/b/one_31_chars_long_file_name_111 +a/b/one_31_chars_long_file_name_112 +a/b/one_31_chars_long_file_name_113 +a/b/one_31_chars_long_file_name_114 +a/b/one_31_chars_long_file_name_115 +a/b/one_31_chars_long_file_name_116 +a/b/one_31_chars_long_file_name_117 +a/b/one_31_chars_long_file_name_118 +a/b/one_31_chars_long_file_name_119 +a/b/one_31_chars_long_file_name_120 +a/b/one_31_chars_long_file_name_121 +a/b/one_31_chars_long_file_name_122 +a/b/one_31_chars_long_file_name_123 +a/b/one_31_chars_long_file_name_124 +a/b/one_31_chars_long_file_name_125 +a/b/one_31_chars_long_file_name_126 +a/b/one_31_chars_long_file_name_127 +a/b/one_31_chars_long_file_name_128 +a/b/one_31_chars_long_file_name_129 +a/b/one_31_chars_long_file_name_130 +a/b/one_31_chars_long_file_name_131 +a/b/one_31_chars_long_file_name_132 +a/b/one_31_chars_long_file_name_133 +a/b/one_31_chars_long_file_name_134 +a/b/one_31_chars_long_file_name_135 +a/b/one_31_chars_long_file_name_136 +a/b/one_31_chars_long_file_name_137 +a/b/one_31_chars_long_file_name_138 +a/b/one_31_chars_long_file_name_139 +a/b/one_31_chars_long_file_name_140 +a/b/one_31_chars_long_file_name_141 +a/b/one_31_chars_long_file_name_142 +Incremental dump +a/ +a/c/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_98 +#AT_START_99 +at_fn_group_banner 99 'incr05.at:21' \ + "incremental dumps with -C" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "99. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incr05.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 +./ +./sub/ +./file1 +./sub/file2 +Level 1 +./ +./sub/ +./file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr05.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 +./ +./sub/ +./file1 +./sub/file2 +Level 1 +./ +./sub/ +./file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr05.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 +./ +./sub/ +./file1 +./sub/file2 +Level 1 +./ +./sub/ +./file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_99 +#AT_START_100 +at_fn_group_banner 100 'incr06.at:21' \ + "incremental dumps of nested directories" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "100. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incr06.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 . sub +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 0 sub . +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 1 . sub +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +Level 1 sub . +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr06.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 . sub +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 0 sub . +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 1 . sub +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +Level 1 sub . +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr06.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 . sub +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 0 sub . +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 1 . sub +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +Level 1 sub . +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_100 +#AT_START_101 +at_fn_group_banner 101 'incr07.at:18' \ + "incremental restores with -C" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "101. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# Tar 1.26 had problems extracting from incremental restores when given +# the -C option. The code in incremen.c:try_purge_directory and +# misc.c:remove_any_file was using savedir(), which ignored eventual changes +# in the current working directory and caused the malfunctioning. +# +# The problem was reported by Piotr Rotter on 2013-03-22. +# +# This testcase is based on scripts provided by Piotr Rotter and Nathan +# Stratton Treadway. +# +# References: <514C8F56.90900@active24.pl>, +# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00036.html, +# <20130326181922.GZ3732@shire.ontko.com>, +# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00042.html, +# <20130327051828.GA3732@shire.ontko.com>, +# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00043.html, +# <20130327054957.GB3732@shire.ontko.com>, +# http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00044.html + + + + { set +x +$as_echo "$at_srcdir/incr07.at:40: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b + +decho C0 +tar -g test.snar -vcf test.0.tar dirA + +echo 'a' > dirA/c +decho C1 +tar -g test.snar -vcf test.1.tar dirA + +rm -f dirA/a +decho C2 +tar -g test.snar -vcf test.2.tar dirA + +mkdir ext +rm -rf dirA + +decho E0 +tar -g test.snar -vxf test.0.tar -C ext/ +decho E1 +tar -g test.snar -vxf test.1.tar -C ext/ + +decho E2 +tar -g test.snar -vxf test.2.tar -C ext/ + +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file + +decho E3 +tar -g test.snar -vxf test.2.tar -C ext/ + +echo FIN +test -d dirA && echo >&2 \"toplevel dirA exists\" +exit 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b + +decho C0 +tar -g test.snar -vcf test.0.tar dirA + +echo 'a' > dirA/c +decho C1 +tar -g test.snar -vcf test.1.tar dirA + +rm -f dirA/a +decho C2 +tar -g test.snar -vcf test.2.tar dirA + +mkdir ext +rm -rf dirA + +decho E0 +tar -g test.snar -vxf test.0.tar -C ext/ +decho E1 +tar -g test.snar -vxf test.1.tar -C ext/ + +decho E2 +tar -g test.snar -vxf test.2.tar -C ext/ + +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file + +decho E3 +tar -g test.snar -vxf test.2.tar -C ext/ + +echo FIN +test -d dirA && echo >&2 "toplevel dirA exists" +exit 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "C0 +tar: dirA: Directory is new +C1 +C2 +E0 +E1 +E2 +E3 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "C0 +dirA/ +dirA/a +dirA/b +C1 +dirA/ +dirA/c +C2 +dirA/ +E0 +dirA/ +dirA/a +dirA/b +E1 +dirA/ +dirA/c +E2 +dirA/ +tar: Deleting 'dirA/a' +E3 +dirA/ +tar: Deleting 'dirA/dirB' +FIN +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr07.at:40: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b + +decho C0 +tar -g test.snar -vcf test.0.tar dirA + +echo 'a' > dirA/c +decho C1 +tar -g test.snar -vcf test.1.tar dirA + +rm -f dirA/a +decho C2 +tar -g test.snar -vcf test.2.tar dirA + +mkdir ext +rm -rf dirA + +decho E0 +tar -g test.snar -vxf test.0.tar -C ext/ +decho E1 +tar -g test.snar -vxf test.1.tar -C ext/ + +decho E2 +tar -g test.snar -vxf test.2.tar -C ext/ + +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file + +decho E3 +tar -g test.snar -vxf test.2.tar -C ext/ + +echo FIN +test -d dirA && echo >&2 \"toplevel dirA exists\" +exit 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b + +decho C0 +tar -g test.snar -vcf test.0.tar dirA + +echo 'a' > dirA/c +decho C1 +tar -g test.snar -vcf test.1.tar dirA + +rm -f dirA/a +decho C2 +tar -g test.snar -vcf test.2.tar dirA + +mkdir ext +rm -rf dirA + +decho E0 +tar -g test.snar -vxf test.0.tar -C ext/ +decho E1 +tar -g test.snar -vxf test.1.tar -C ext/ + +decho E2 +tar -g test.snar -vxf test.2.tar -C ext/ + +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file + +decho E3 +tar -g test.snar -vxf test.2.tar -C ext/ + +echo FIN +test -d dirA && echo >&2 "toplevel dirA exists" +exit 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "C0 +tar: dirA: Directory is new +C1 +C2 +E0 +E1 +E2 +E3 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "C0 +dirA/ +dirA/a +dirA/b +C1 +dirA/ +dirA/c +C2 +dirA/ +E0 +dirA/ +dirA/a +dirA/b +E1 +dirA/ +dirA/c +E2 +dirA/ +tar: Deleting 'dirA/a' +E3 +dirA/ +tar: Deleting 'dirA/dirB' +FIN +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/incr07.at:40: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b + +decho C0 +tar -g test.snar -vcf test.0.tar dirA + +echo 'a' > dirA/c +decho C1 +tar -g test.snar -vcf test.1.tar dirA + +rm -f dirA/a +decho C2 +tar -g test.snar -vcf test.2.tar dirA + +mkdir ext +rm -rf dirA + +decho E0 +tar -g test.snar -vxf test.0.tar -C ext/ +decho E1 +tar -g test.snar -vxf test.1.tar -C ext/ + +decho E2 +tar -g test.snar -vxf test.2.tar -C ext/ + +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file + +decho E3 +tar -g test.snar -vxf test.2.tar -C ext/ + +echo FIN +test -d dirA && echo >&2 \"toplevel dirA exists\" +exit 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b + +decho C0 +tar -g test.snar -vcf test.0.tar dirA + +echo 'a' > dirA/c +decho C1 +tar -g test.snar -vcf test.1.tar dirA + +rm -f dirA/a +decho C2 +tar -g test.snar -vcf test.2.tar dirA + +mkdir ext +rm -rf dirA + +decho E0 +tar -g test.snar -vxf test.0.tar -C ext/ +decho E1 +tar -g test.snar -vxf test.1.tar -C ext/ + +decho E2 +tar -g test.snar -vxf test.2.tar -C ext/ + +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file + +decho E3 +tar -g test.snar -vxf test.2.tar -C ext/ + +echo FIN +test -d dirA && echo >&2 "toplevel dirA exists" +exit 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "C0 +tar: dirA: Directory is new +C1 +C2 +E0 +E1 +E2 +E3 +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "C0 +dirA/ +dirA/a +dirA/b +C1 +dirA/ +dirA/c +C2 +dirA/ +E0 +dirA/ +dirA/a +dirA/b +E1 +dirA/ +dirA/c +E2 +dirA/ +tar: Deleting 'dirA/a' +E3 +dirA/ +tar: Deleting 'dirA/dirB' +FIN +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_101 +#AT_START_102 +at_fn_group_banner 102 'incr08.at:38' \ + "filename normalization" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "102. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incr08.at:41: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir tartest +cd tartest +mkdir foo +mkdir foo/subdir +mkdir foo/subdir/dir1 +mkdir subdir +mkdir subdir/dir2 +decho A +find .|sort + +decho B +DIR=\`pwd\` +tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . \$DIR 2>../err |\\ + sed \"s|\$DIR|ABSPATH|\" +sed \"s|\$DIR|ABSPATH|\" ../err >&2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "incr08.at:41" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir tartest +cd tartest +mkdir foo +mkdir foo/subdir +mkdir foo/subdir/dir1 +mkdir subdir +mkdir subdir/dir2 +decho A +find .|sort + +decho B +DIR=`pwd` +tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . $DIR 2>../err |\ + sed "s|$DIR|ABSPATH|" +sed "s|$DIR|ABSPATH|" ../err >&2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +tar: .: Directory is new +tar: ./subdir: Directory is new +tar: ./subdir/dir1: Directory is new +tar: ABSPATH: Directory is new +tar: ABSPATH/subdir: Directory is new +tar: ABSPATH/subdir/dir2: Directory is new +tar: Removing leading \`/' from member names +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +. +./foo +./foo/subdir +./foo/subdir/dir1 +./subdir +./subdir/dir2 +B +./ +./subdir/ +./subdir/dir1/ +ABSPATH/ +ABSPATH/subdir/ +ABSPATH/subdir/dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr08.at:41" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_102 +#AT_START_103 +at_fn_group_banner 103 'incr09.at:26' \ + "incremental with alternating -C" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "103. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incr09.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir foo bar middle +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +echo middle/file > middle/middle_file +decho A +tar -cvf foo.tar --incremental -C foo . -C \`pwd\` middle -C bar . + +rm foo.tar +>toplevel_file +decho B +tar -cvf foo.tar --incremental -C foo . -C \`pwd\` toplevel_file -C bar . +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "incr09.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo bar middle +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +echo middle/file > middle/middle_file +decho A +tar -cvf foo.tar --incremental -C foo . -C `pwd` middle -C bar . + +rm foo.tar +>toplevel_file +decho B +tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file -C bar . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +tar: .: Directory is new +tar: middle: Directory is new +tar: .: Directory is new +B +tar: .: Directory is new +tar: .: Directory is new +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +./ +./ +middle/ +./bar_file +./foo_file +middle/middle_file +B +./ +./ +toplevel_file +./bar_file +./foo_file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr09.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_103 +#AT_START_104 +at_fn_group_banner 104 'incr10.at:18' \ + "concatenated incremental archives (deletes)" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "104. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# Description: Extraction from concatenated incremental archives +# produced spurious error messages when trying to set file ownership +# and permissions on deleted directories. +# Reported by: Alex Efros +# References: <20150411224008.GO24600@home.power> +# http://lists.gnu.org/archive/html/bug-tar/2015-04/msg00003.html + + + + { set +x +$as_echo "$at_srcdir/incr10.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir in +mkdir in/dir +decho Level 0 +tar -cvf 1.tar -g snap -C in . +rmdir in/dir +decho Level 1 +tar -cvf 2.tar -g snap -C in . +cp 1.tar full.tar +decho Concat +tar -A 2.tar -f full.tar -g /dev/null +decho Extract +mkdir out +tar -xvf full.tar -g /dev/null -C out +)" +at_fn_check_prepare_notrace 'an embedded newline' "incr10.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 +mkdir in +mkdir in/dir +decho Level 0 +tar -cvf 1.tar -g snap -C in . +rmdir in/dir +decho Level 1 +tar -cvf 2.tar -g snap -C in . +cp 1.tar full.tar +decho Concat +tar -A 2.tar -f full.tar -g /dev/null +decho Extract +mkdir out +tar -xvf full.tar -g /dev/null -C out +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Level 0 +tar: .: Directory is new +tar: ./dir: Directory is new +Level 1 +Concat +Extract +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 +./ +./dir/ +Level 1 +./ +Concat +Extract +./ +./dir/ +./ +tar: Deleting './dir' +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr10.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_104 +#AT_START_105 +at_fn_group_banner 105 'incr11.at:25' \ + "concatenated incremental archives (renames)" " " 11 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "105. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/incr11.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +install-sh -d data/dir >/dev/null && genfile --file data/dir/file || exit 77 +decho Level 0 +tar -cvf full.tar -g snap -C data . +decho Level 1 +mv data/dir data/dir2 +tar -cvf incr.tar -g snap -C data . +decho Concat +cp full.tar full2.tar +tar -A -f full2.tar incr.tar +decho Extract +mkdir out +tar -xvf full2.tar -g /dev/null -C out +decho List +find out | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "incr11.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +ckmtime || exit 77 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d data/dir >/dev/null && genfile --file data/dir/file || exit 77 +decho Level 0 +tar -cvf full.tar -g snap -C data . +decho Level 1 +mv data/dir data/dir2 +tar -cvf incr.tar -g snap -C data . +decho Concat +cp full.tar full2.tar +tar -A -f full2.tar incr.tar +decho Extract +mkdir out +tar -xvf full2.tar -g /dev/null -C out +decho List +find out | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Level 0 +tar: .: Directory is new +tar: ./dir: Directory is new +Level 1 +tar: ./dir2: Directory has been renamed from './dir' +Concat +Extract +List +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 +./ +./dir/ +./dir/file +Level 1 +./ +./dir2/ +Concat +Extract +./ +./dir/ +./dir/file +./ +./dir2/ +List +out +out/dir2 +out/dir2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/incr11.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_105 +#AT_START_106 +at_fn_group_banner 106 'filerem01.at:36' \ + "file removed as we read it (ca. 22 seconds)" " " 12 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "106. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/filerem01.at:39: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \\ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ + --checkpoint-action='echo' -c -f archive.tar \\ + --listed-incremental db -v dir >/dev/null +)" +at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v dir >/dev/null +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new +tar: dir/sub: Directory is new +tar: dir/file1: File removed before we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/filerem01.at:39: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \\ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ + --checkpoint-action='echo' -c -f archive.tar \\ + --listed-incremental db -v dir >/dev/null +)" +at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v dir >/dev/null +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new +tar: dir/sub: Directory is new +tar: dir/file1: File removed before we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +# Timing information: +# +# For -Hgnu the above command line takes about 8 seconds to execute and +# produces: +# +# tar: dir: Directory is new +# tar: dir/sub: Directory is new +# dir/ +# tar: Write checkpoint 1 +# tar: Write checkpoint 2 +# dir/sub/ +# tar: Write checkpoint 3 +# tar: Write checkpoint 4 +# dir/file1 +# tar: Write checkpoint 5 +# dir/sub/file2 +# tar: Write checkpoint 6 +# tar: Write checkpoint 7 +# tar: Write checkpoint 8 +# +# For -Hposix the above command line takes about 14 seconds to execute and +# produces: +# +# ./tar: dir: Directory is new +# ./tar: dir/sub: Directory is new +# dir/ +# ./tar: Write checkpoint 1 +# ./tar: Write checkpoint 2 +# ./tar: Write checkpoint 3 +# dir/sub/ +# ./tar: Write checkpoint 4 +# ./tar: Write checkpoint 5 +# ./tar: Write checkpoint 6 +# dir/file1 +# ./tar: Write checkpoint 7 +# ./tar: Write checkpoint 8 +# ./tar: Write checkpoint 9 +# dir/sub/file2 +# ./tar: Write checkpoint 10 +# ./tar: Write checkpoint 11 +# ./tar: Write checkpoint 12 +# ./tar: Write checkpoint 13 +# ./tar: Write checkpoint 14 + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_106 +#AT_START_107 +at_fn_group_banner 107 'filerem02.at:26' \ + "toplevel file removed (ca. 24 seconds)" " " 12 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "107. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/filerem02.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ + --checkpoint-action='echo' -c -f archive.tar \\ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +)" +at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/filerem02.at:29: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ + --checkpoint-action='echo' -c -f archive.tar \\ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +)" +at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +# Ignore stdout and stderr because their contents depend on +# the file system implementation. + +# Timing information: see filerem01.at + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_107 +#AT_START_108 +at_fn_group_banner 108 'rename01.at:25' \ + "renamed dirs in incrementals" " " 13 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "108. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/rename01.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/baz: Directory has been renamed from 'foo/bar' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/file1 +foo/file2 +foo/bar/file +Creating incremental archive +foo/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/file +foo/file1 +foo/file2 +End directory listing 1 +Begin directory listing 2 +foo +foo/baz +foo/baz/file +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename01.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/baz: Directory has been renamed from 'foo/bar' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/file1 +foo/file2 +foo/bar/file +Creating incremental archive +foo/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/file +foo/file1 +foo/file2 +End directory listing 1 +Begin directory listing 2 +foo +foo/baz +foo/baz/file +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename01.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/baz: Directory has been renamed from 'foo/bar' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/file1 +foo/file2 +foo/bar/file +Creating incremental archive +foo/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/file +foo/file1 +foo/file2 +End directory listing 1 +Begin directory listing 2 +foo +foo/baz +foo/baz/file +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_108 +#AT_START_109 +at_fn_group_banner 109 'rename02.at:25' \ + "move between hierarchies" " " 13 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "109. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/rename02.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/bar/baz: Directory is new +tar: foo/baz: Directory has been renamed from 'foo/bar/baz' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/bar/baz/ +foo/file1 +foo/file2 +foo/bar/file.r +foo/bar/baz/file.z +Creating incremental archive +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/baz +foo/bar/baz/file.z +foo/bar/file.r +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 2 +foo +foo/bar +foo/bar/file.r +foo/baz +foo/baz/file.z +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename02.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/bar/baz: Directory is new +tar: foo/baz: Directory has been renamed from 'foo/bar/baz' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/bar/baz/ +foo/file1 +foo/file2 +foo/bar/file.r +foo/bar/baz/file.z +Creating incremental archive +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/baz +foo/bar/baz/file.z +foo/bar/file.r +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 2 +foo +foo/bar +foo/bar/file.r +foo/baz +foo/baz/file.z +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename02.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/bar/baz: Directory is new +tar: foo/baz: Directory has been renamed from 'foo/bar/baz' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/bar/baz/ +foo/file1 +foo/file2 +foo/bar/file.r +foo/bar/baz/file.z +Creating incremental archive +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/baz +foo/bar/baz/file.z +foo/bar/file.r +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 2 +foo +foo/bar +foo/bar/file.r +foo/baz +foo/baz/file.z +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_109 +#AT_START_110 +at_fn_group_banner 110 'rename03.at:24' \ + "cyclic renames" " " 13 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "110. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/rename03.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo \"First dump\" +echo \"First dump\">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a \$\$ +mv c a +mv b c +mv \$\$ b) + +echo \"Second dump\" +echo \"Second dump\" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "First dump +tar: foo/a: Directory is new +tar: foo/b: Directory is new +tar: foo/c: Directory is new +tar: foo: Directory is new +Second dump +tar: foo/a: Directory has been renamed from 'foo/c' +tar: foo/b: Directory has been renamed from 'foo/a' +tar: foo/c: Directory has been renamed from 'foo/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump +foo/ +foo/a/ +foo/b/ +foo/c/ +foo/file1 +foo/file2 +foo/a/filea +foo/b/fileb +foo/c/filec +Second dump +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 1 +foo +foo/a +foo/a/filea +foo/b +foo/b/fileb +foo/c +foo/c/filec +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 2 +foo +foo/a +foo/a/filec +foo/b +foo/b/filea +foo/c +foo/c/fileb +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename03.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo \"First dump\" +echo \"First dump\">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a \$\$ +mv c a +mv b c +mv \$\$ b) + +echo \"Second dump\" +echo \"Second dump\" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "First dump +tar: foo/a: Directory is new +tar: foo/b: Directory is new +tar: foo/c: Directory is new +tar: foo: Directory is new +Second dump +tar: foo/a: Directory has been renamed from 'foo/c' +tar: foo/b: Directory has been renamed from 'foo/a' +tar: foo/c: Directory has been renamed from 'foo/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump +foo/ +foo/a/ +foo/b/ +foo/c/ +foo/file1 +foo/file2 +foo/a/filea +foo/b/fileb +foo/c/filec +Second dump +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 1 +foo +foo/a +foo/a/filea +foo/b +foo/b/fileb +foo/c +foo/c/filec +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 2 +foo +foo/a +foo/a/filec +foo/b +foo/b/filea +foo/c +foo/c/fileb +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename03.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo \"First dump\" +echo \"First dump\">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a \$\$ +mv c a +mv b c +mv \$\$ b) + +echo \"Second dump\" +echo \"Second dump\" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "First dump +tar: foo/a: Directory is new +tar: foo/b: Directory is new +tar: foo/c: Directory is new +tar: foo: Directory is new +Second dump +tar: foo/a: Directory has been renamed from 'foo/c' +tar: foo/b: Directory has been renamed from 'foo/a' +tar: foo/c: Directory has been renamed from 'foo/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump +foo/ +foo/a/ +foo/b/ +foo/c/ +foo/file1 +foo/file2 +foo/a/filea +foo/b/fileb +foo/c/filec +Second dump +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 1 +foo +foo/a +foo/a/filea +foo/b +foo/b/fileb +foo/c +foo/c/filec +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 2 +foo +foo/a +foo/a/filec +foo/b +foo/b/filea +foo/c +foo/c/fileb +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_110 +#AT_START_111 +at_fn_group_banner 111 'rename04.at:27' \ + "renamed directory containing subdirectories" " " 13 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "111. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/rename04.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename04.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename04.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_111 +#AT_START_112 +at_fn_group_banner 112 'rename05.at:24' \ + "renamed subdirectories" " " 13 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "112. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/rename05.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir.0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename05.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir.0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/rename05.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir.0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_112 +#AT_START_113 +at_fn_group_banner 113 'chtype.at:27' \ + "changed file types in incrementals" " " 13 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "113. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/chtype.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup +Second backup +Restore archive.1 +Restore archive.2 +directory +directory/a +directory/a/a +directory/a/b +directory/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/chtype.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup +Second backup +Restore archive.1 +Restore archive.2 +directory +directory/a +directory/a/a +directory/a/b +directory/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/chtype.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup +Second backup +Restore archive.1 +Restore archive.2 +directory +directory/a +directory/a/a +directory/a/b +directory/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_113 +#AT_START_114 +at_fn_group_banner 114 'ignfail.at:24' \ + "ignfail" " " 14 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "114. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/ignfail.at:27: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/ignfail.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/ignfail.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/ignfail.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/ignfail.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_114 +#AT_START_115 +at_fn_group_banner 115 'link01.at:34' \ + "link count gt 2" " " 15 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "115. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/link01.at:37: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link01.at:37: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link01.at:37: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link01.at:37: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link01.at:37: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 + +tar cf archive directory/test1/test.txt directory/test1/test.txt + +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_115 +#AT_START_116 +at_fn_group_banner 116 'link02.at:32' \ + "preserve hard links with --remove-files" " " 15 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "116. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/link02.at:35: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link02.at:35: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link02.at:35: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link02.at:35: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link02.at:35: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_116 +#AT_START_117 +at_fn_group_banner 117 'link03.at:24' \ + "working -l with --remove-files" " " 15 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "117. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + + + { set +x +$as_echo "$at_srcdir/link03.at:34: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link03.at:34: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'. +" | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Create volume -# Update: wrong label -2 -# Update: right label +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link03.at:34: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link03.at:34: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link03.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +)" +at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_117 +#AT_START_118 +at_fn_group_banner 118 'link04.at:29' \ + "link count is 1 but multiple occurrences" " " 15 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "118. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/link04.at:32: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +)" +at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +-- +== +dir/ +dir/FOO +dir/FOO link to dir/FOO +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link04.at:32: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +)" +at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +-- +== +dir/ +dir/FOO +dir/FOO link to dir/FOO +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link04.at:32: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +)" +at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +-- +== +dir/ +dir/FOO +dir/FOO link to dir/FOO +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/link04.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +)" +at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +-- +== +dir/ +dir/FOO +dir/FOO link to dir/FOO " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label04.at:28" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/label04.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/link04.at:32: +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 * -exec <&- -genfile --file file -decho \"# Create volume\" -tar -c -f archive --label='New volume' file -decho \"# Update: wrong label\" -tar -rf archive --label='My volume' file; echo \$? -decho \"# Update: right label\" -tar -rf archive --label='New volume' file -)" -echo label04.at:28 >"$at_check_line_file" +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive --label='New volume' file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive --label='New volume' file -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +)" +at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive --label='New volume' file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive --label='New volume' file -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Create volume -# Update: wrong label -tar: Volume \`New volume' does not match \`My volume' -tar: Error is not recoverable: exiting now -# Update: right label -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Create volume -# Update: wrong label -2 -# Update: right label +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo -- + +tar cfl archive dir dir + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +-- +== +dir/ +dir/FOO +dir/FOO link to dir/FOO " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label04.at:28" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/label04.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -exec <&- -genfile --file file -decho \"# Create volume\" -tar -c -f archive --label='New volume' file -decho \"# Update: wrong label\" -tar -rf archive --label='My volume' file; echo \$? -decho \"# Update: right label\" -tar -rf archive --label='New volume' file -)" -echo label04.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_118 +#AT_START_119 +at_fn_group_banner 119 'longv7.at:25' \ + "long names in V7 archives" " " 16 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "119. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + + + + { set +x +$as_echo "$at_srcdir/longv7.at:31: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive --label='New volume' file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive --label='New volume' file -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems +touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c + +tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems +echo separator +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "longv7.at:31" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive --label='New volume' file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive --label='New volume' file -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Create volume -# Update: wrong label -tar: Volume \`New volume' does not match \`My volume' -tar: Error is not recoverable: exiting now -# Update: right label +mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems +touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c + +tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems +echo separator +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c: file name is too long (max 99); not dumped +tar: Exiting with failure status due to previous errors " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Create volume -# Update: wrong label -2 -# Update: right label +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_func_check_status 0 $at_status "$at_srcdir/label04.at:28" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/longv7.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_47 -#AT_START_48 -# 48. label05.at:22: label with non-create option -at_setup_line='label05.at:22' -at_desc="label with non-create option" -$at_quiet $as_echo_n " 48: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_119 +#AT_START_120 +at_fn_group_banner 120 'long01.at:28' \ + "long file names divisible by block size" " " 16 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "48. label05.at:22: testing ..." + $as_echo "120. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/label05.at:25: + + + + + { set +x +$as_echo "$at_srcdir/long01.at:36: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17842,40 +30592,14 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho \"# Create volume\" -tar -c -f archive file -decho \"# Update: wrong label\" -tar -rf archive --label='My volume' file; echo \$? -decho \"# Update: right label\" -tar -rf archive file -)" -echo label05.at:25 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 +echo test > endfile -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive file -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17884,38 +30608,26 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive file -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Create volume -# Update: wrong label -tar: Archive not labeled to match \`My volume' -tar: Error is not recoverable: exiting now -# Update: right label -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Create volume -# Update: wrong label -2 -# Update: right label + +install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 +echo test > endfile + +tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde +endfile " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label05.at:25" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/label05.at:25: + { set +x +$as_echo "$at_srcdir/long01.at:36: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17924,40 +30636,14 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho \"# Create volume\" -tar -c -f archive file -decho \"# Update: wrong label\" -tar -rf archive --label='My volume' file; echo \$? -decho \"# Update: right label\" -tar -rf archive file -)" -echo label05.at:25 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 +echo test > endfile -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive file -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17966,272 +30652,186 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive file -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Create volume -# Update: wrong label -tar: Archive not labeled to match \`My volume' -tar: Error is not recoverable: exiting now -# Update: right label -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Create volume -# Update: wrong label -2 -# Update: right label + +install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 +echo test > endfile + +tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde +endfile " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label05.at:25" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/label05.at:25: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -exec <&- -genfile --file file -decho \"# Create volume\" -tar -c -f archive file -decho \"# Update: wrong label\" -tar -rf archive --label='My volume' file; echo \$? -decho \"# Update: right label\" -tar -rf archive file -)" -echo label05.at:25 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_120 +#AT_START_121 +at_fn_group_banner 121 'lustar01.at:21' \ + "ustar: unsplittable file name" " " 16 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "121. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + + + { set +x +$as_echo "$at_srcdir/lustar01.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive file -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77 +tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix +)" +at_fn_check_prepare_notrace 'an embedded newline' "lustar01.at:27" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -exec <&- -genfile --file file -decho "# Create volume" -tar -c -f archive file -decho "# Update: wrong label" -tar -rf archive --label='My volume' file; echo $? -decho "# Update: right label" -tar -rf archive file -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "# Create volume -# Update: wrong label -tar: Archive not labeled to match \`My volume' -tar: Error is not recoverable: exiting now -# Update: right label +genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77 +tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix: file name is too long (cannot be split); not dumped +tar: Exiting with failure status due to previous errors " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "# Create volume -# Update: wrong label -2 -# Update: right label -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/label05.at:25" - -$at_failed && at_func_log_failure +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 + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_48 -#AT_START_49 -# 49. backup01.at:33: extracting existing dir with --backup -at_setup_line='backup01.at:33' -at_desc="extracting existing dir with --backup" -$at_quiet $as_echo_n " 49: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_121 +#AT_START_122 +at_fn_group_banner 122 'lustar02.at:21' \ + "ustar: unsplittable path name" " " 16 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "49. backup01.at:33: testing ..." + $as_echo "122. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/backup01.at:36: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -)" -echo backup01.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + + + + + { set +x +$as_echo "$at_srcdir/lustar02.at:32: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + +install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77 +tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be +)" +at_fn_check_prepare_notrace 'an embedded newline' "lustar02.at:32" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir1/ -dir1/file1 -Renaming \`dir1/file1' to \`dir1/file1~' -dir2/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" -$at_failed && at_func_log_failure +install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77 +tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/: file name is too long (cannot be split); not dumped +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/lustar02.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/backup01.at:36: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -)" -echo backup01.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir1/ -dir1/file1 -Renaming \`dir1/file1' to \`dir1/file1~' -dir2/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/backup01.at:36: + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_122 +#AT_START_123 +at_fn_group_banner 123 'lustar03.at:21' \ + "ustar: splitting long names" " " 16 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "123. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + + + + + { set +x +$as_echo "$at_srcdir/lustar03.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -18240,16 +30840,14 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -)" -echo backup01.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77 +echo \"Create archive\" +tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be +echo \"List archive\" +tar tf archive)" +at_fn_check_prepare_notrace 'an embedded newline' "lustar03.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -18258,264 +30856,311 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir1/ -dir1/file1 -Renaming \`dir1/file1' to \`dir1/file1~' -dir2/ +install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77 +echo "Create archive" +tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be +echo "List archive" +tar tf archive) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create archive +List archive +this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/ +this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/lustar03.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/backup01.at:36: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -)" -echo backup01.at:36 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir1/ -dir1/file1 -Renaming \`dir1/file1' to \`dir1/file1~' -dir2/ + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_123 +#AT_START_124 +at_fn_group_banner 124 'old.at:23' \ + "old archives" " " 16 +at_xfail=no +( + $as_echo "124. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +unset TAR_OPTIONS +{ set +x +$as_echo "$at_srcdir/old.at:27: +mkdir directory +tar cfvo archive directory || exit 1 +tar tf archive +" +at_fn_check_prepare_notrace 'an embedded newline' "old.at:27" +( $at_check_trace; +mkdir directory +tar cfvo archive directory || exit 1 +tar tf archive + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/ " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/old.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/backup01.at:36: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -)" -echo backup01.at:36 >"$at_check_line_file" + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_124 +#AT_START_125 +at_fn_group_banner 125 'time01.at:20' \ + "time: tricky time stamps" " " 16 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "125. $at_setup_line: testing $at_desc ..." + $at_traceon -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + + + + { set +x +$as_echo "$at_srcdir/time01.at:23: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +export TZ=UTC0 +mkdir dir + +# Test files with time stamps that are near common sources of error, +# typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years). +# Use GNU-style @ notation for very large time stamps, since they +# typically don't render into years correctly due to int overflow. +for s in \\ + @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \\ + 0000-01-01T00:00:00 0000-01-01T00:00:01 \\ + 0000-01-02T00:00:00 \\ + 1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \\ + 1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \\ + 1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \\ + 1901-12-14T20:45:51 \\ + 1969-12-31T23:59:58 1969-12-31T23:59:59 \\ + 1970-01-01T00:00:00 1970-01-01T00:00:01 \\ + 2038-01-18T03:14:07 \\ + 2038-01-19T03:14:07 2038-01-19T03:14:08 \\ + 2106-02-07T06:28:15 2106-02-07T06:28:16 \\ + 2242-03-16T12:56:31 2242-03-16T12:56:32 \\ + 9999-12-31T23:59:58 9999-12-31T23:59:59 \\ + @9223372036854775807 @9223372036854775808 +do + # Skip a time stamp \$s if it's out of range for this platform, + # of if it uses a notation that this platform does not recognize. + touch -d \$s dir/f\$s >/dev/null 2>&1 || continue + + # Likewise for \$s.1. If \$s is the most negative time stamp and + # time stamps are signed, then \$s.1 is out of range. + touch -d \$s.1 dir/f\$s.\$ns >/dev/null 2>&1 || continue + + for frac in 01 001 00001 000001 0000001 00000001 000000001 0000000001 \\ + 9 99 999 99999 999999 9999999 99999999 999999999 9999999999 + do + touch -d \$s.\$frac dir/f\$s.\$frac + done +done + +tar -c -f archive.tar dir +tar -d -f archive.tar dir +)" +at_fn_check_prepare_notrace 'an embedded newline' "time01.at:23" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * -mkdir dir1 dir2 -echo bla > dir1/file1 -tar cf test.tar dir1 dir2 -tar xfv test.tar --backup --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir1/ -dir1/file1 -Renaming \`dir1/file1' to \`dir1/file1~' -dir2/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" +export TZ=UTC0 +mkdir dir + +# Test files with time stamps that are near common sources of error, +# typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years). +# Use GNU-style @ notation for very large time stamps, since they +# typically don't render into years correctly due to int overflow. +for s in \ + @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \ + 0000-01-01T00:00:00 0000-01-01T00:00:01 \ + 0000-01-02T00:00:00 \ + 1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \ + 1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \ + 1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \ + 1901-12-14T20:45:51 \ + 1969-12-31T23:59:58 1969-12-31T23:59:59 \ + 1970-01-01T00:00:00 1970-01-01T00:00:01 \ + 2038-01-18T03:14:07 \ + 2038-01-19T03:14:07 2038-01-19T03:14:08 \ + 2106-02-07T06:28:15 2106-02-07T06:28:16 \ + 2242-03-16T12:56:31 2242-03-16T12:56:32 \ + 9999-12-31T23:59:58 9999-12-31T23:59:59 \ + @9223372036854775807 @9223372036854775808 +do + # Skip a time stamp $s if it's out of range for this platform, + # of if it uses a notation that this platform does not recognize. + touch -d $s dir/f$s >/dev/null 2>&1 || continue + + # Likewise for $s.1. If $s is the most negative time stamp and + # time stamps are signed, then $s.1 is out of range. + touch -d $s.1 dir/f$s.$ns >/dev/null 2>&1 || continue -$at_failed && at_func_log_failure + for frac in 01 001 00001 000001 0000001 00000001 000000001 0000000001 \ + 9 99 999 99999 999999 9999999 99999999 999999999 9999999999 + do + touch -d $s.$frac dir/f$s.$frac + done +done + +tar -c -f archive.tar dir +tar -d -f archive.tar dir +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/time01.at:23" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_49 -#AT_START_50 -# 50. gzip.at:23: gzip -at_setup_line='gzip.at:23' -at_desc="gzip" -$at_quiet $as_echo_n " 50: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_125 +#AT_START_126 +at_fn_group_banner 126 'time02.at:20' \ + "time: clamping mtime" " " 16 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + test -f $XFAILFILE && at_xfail=yes ( - $as_echo "50. gzip.at:23: testing ..." + $as_echo "126. $at_setup_line: testing $at_desc ..." $at_traceon -unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/gzip.at:28: -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + { set +x +$as_echo "$at_srcdir/time02.at:23: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H pax\" +export TAR_OPTIONS +rm -rf * -tar xfvz /dev/null 2>err -RC=\$? -sed -n '/^tar:/p' err >&2 -exit \$RC -" -echo gzip.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +export TZ=UTC0 +mkdir dir -tar xfvz /dev/null 2>err -RC=$? -sed -n '/^tar:/p' err >&2 -exit $RC - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || exit 77 +touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || exit 77 +touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || exit 77 +touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || exit 77 -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir +tar -d -f archive.tar dir|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "time02.at:23" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * -tar xfvz /dev/null 2>err -RC=$? -sed -n '/^tar:/p' err >&2 -exit $RC - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: Child returned status 1 -tar: Error is not recoverable: exiting now -" | \ - $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/gzip.at:28" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + +export TZ=UTC0 +mkdir dir + +touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || exit 77 +touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || exit 77 +touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || exit 77 +touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || exit 77 + +tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir +tar -d -f archive.tar dir|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/c: Mod time differs +dir/d: Mod time differs +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/time02.at:23" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_50 -#AT_START_51 -# 51. incremental.at:23: incremental -at_setup_line='incremental.at:23' -at_desc="incremental" -$at_quiet $as_echo_n " 51: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_126 +#AT_START_127 +at_fn_group_banner 127 'multiv01.at:24' \ + "multivolume dumps from pipes" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "51. incremental.at:23: testing ..." + $as_echo "127. $at_setup_line: testing $at_desc ..." $at_traceon +# Fixme: should be configurable +# TRUSS=truss -o /tmp/tr +# TRUSS=strace + - { $at_traceoff -$as_echo "$at_srcdir/incremental.at:26: + { set +x +$as_echo "$at_srcdir/multiv01.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18524,76 +31169,37 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null - -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created \`on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# 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 -)" -echo incremental.at:26 >"$at_check_line_file" +exec <&- +genfile --length 7168 --file file1 -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +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 -mkdir structure -echo x >structure/file +if test \$TEST_TAR_FORMAT = pax; then + TAPE_LENGTH=11 +else + TAPE_LENGTH=10 +fi -# 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 +tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ + -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 -# 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 +mkdir extract-dir-pipe +dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | +PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ + --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 -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_func_filter_trace $? -else - ( :; +cmp file1 extract-dir-pipe/file1 +cmp file2 extract-dir-pipe/file2 +)" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18602,50 +31208,46 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null +exec <&- +genfile --length 7168 --file file1 -# 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 +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 -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" +if test $TEST_TAR_FORMAT = pax; then + TAPE_LENGTH=11 +else + TAPE_LENGTH=10 fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "structure/ -separator -structure/ -structure/file -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incremental.at:26" -$at_failed && at_func_log_failure -$at_traceon; } +tar -c --multi-volume --tape-length=$TAPE_LENGTH \ + -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 - { $at_traceoff -$as_echo "$at_srcdir/incremental.at:26: +mkdir extract-dir-pipe +dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | +PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ + --tape-length=$TAPE_LENGTH --read-full-records || exit 1 + +cmp file1 extract-dir-pipe/file1 +cmp file2 extract-dir-pipe/file2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/multiv01.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -18654,76 +31256,37 @@ 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 -)" -echo incremental.at:26 >"$at_check_line_file" +exec <&- +genfile --length 7168 --file file1 -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +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 -mkdir structure -echo x >structure/file +if test \$TEST_TAR_FORMAT = pax; then + TAPE_LENGTH=11 +else + TAPE_LENGTH=10 +fi -# 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 +tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ + -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 -# 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 +mkdir extract-dir-pipe +dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | +PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ + --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 -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_func_filter_trace $? -else - ( :; +cmp file1 extract-dir-pipe/file1 +cmp file2 extract-dir-pipe/file2 +)" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -18732,204 +31295,154 @@ 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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "structure/ -separator -structure/ -structure/file -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incremental.at:26" - -$at_failed && at_func_log_failure -$at_traceon; } - - { $at_traceoff -$as_echo "$at_srcdir/incremental.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * +exec <&- +genfile --length 7168 --file file1 -mkdir structure -echo x >structure/file +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 -# 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 test $TEST_TAR_FORMAT = pax; then + TAPE_LENGTH=11 +else + TAPE_LENGTH=10 +fi -# 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 -c --multi-volume --tape-length=$TAPE_LENGTH \ + -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 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 -)" -echo incremental.at:26 >"$at_check_line_file" +mkdir extract-dir-pipe +dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | +PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ + --tape-length=$TAPE_LENGTH --read-full-records || exit 1 -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +cmp file1 extract-dir-pipe/file1 +cmp file2 extract-dir-pipe/file2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/multiv01.at:31: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H pax\" 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 +exec <&- +genfile --length 7168 --file file1 -# 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 +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 -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_func_filter_trace $? +if test \$TEST_TAR_FORMAT = pax; then + TAPE_LENGTH=11 else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + TAPE_LENGTH=10 +fi + +tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ + -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 + +mkdir extract-dir-pipe +dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | +PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ + --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 + +cmp file1 extract-dir-pipe/file1 +cmp file2 extract-dir-pipe/file2 +)" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H pax" 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 +exec <&- +genfile --length 7168 --file file1 -# 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 +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 -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" +if test $TEST_TAR_FORMAT = pax; then + TAPE_LENGTH=11 +else + TAPE_LENGTH=10 fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "structure/ -separator -structure/ -structure/file -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incremental.at:26" -$at_failed && at_func_log_failure +tar -c --multi-volume --tape-length=$TAPE_LENGTH \ + -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 + +mkdir extract-dir-pipe +dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | +PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ + --tape-length=$TAPE_LENGTH --read-full-records || exit 1 + +cmp file1 extract-dir-pipe/file1 +cmp file2 extract-dir-pipe/file2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_51 -#AT_START_52 -# 52. incr01.at:27: restore broken symlinks from incremental -at_setup_line='incr01.at:27' -at_desc="restore broken symlinks from incremental" -$at_quiet $as_echo_n " 52: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_127 +#AT_START_128 +at_fn_group_banner 128 'multiv02.at:29' \ + "skipping a straddling member" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "52. incr01.at:27: testing ..." + $as_echo "128. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/incr01.at:30: + { set +x +$as_echo "$at_srcdir/multiv02.at:32: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18938,48 +31451,19 @@ 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 +genfile --length 10240 --file en +genfile --length 20000 --file to +genfile --length 20000 --file tre +genfile --length 10240 --file fire -mv directory orig +exec <&- -tar xvfg archive.0 /dev/null --warning=no-timestamp +tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar xvfg archive.1 /dev/null --warning=no-timestamp +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 )" -echo incr01.at:30 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --warning=no-timestamp -echo separator -tar xvfg archive.1 /dev/null --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18988,37 +31472,31 @@ 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 +genfile --length 10240 --file en +genfile --length 20000 --file to +genfile --length 20000 --file tre +genfile --length 10240 --file fire -mv directory orig +exec <&- -tar xvfg archive.0 /dev/null --warning=no-timestamp +tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar xvfg archive.1 /dev/null --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/bar -separator -directory/ -tar: Deleting \`directory/bar' +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +en " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr01.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr01.at:30: + { set +x +$as_echo "$at_srcdir/multiv02.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19027,24 +31505,19 @@ 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 +genfile --length 10240 --file en +genfile --length 20000 --file to +genfile --length 20000 --file tre +genfile --length 10240 --file fire -mv directory orig +exec <&- -tar xvfg archive.0 /dev/null --warning=no-timestamp +tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar xvfg archive.1 /dev/null --warning=no-timestamp +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 )" -echo incr01.at:30 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19053,270 +31526,336 @@ 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 +genfile --length 10240 --file en +genfile --length 20000 --file to +genfile --length 20000 --file tre +genfile --length 10240 --file fire -mv directory orig +exec <&- -tar xvfg archive.0 /dev/null --warning=no-timestamp +tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar xvfg archive.1 /dev/null --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +en +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/multiv02.at:32: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * -mkdir directory -$as_ln_s foo directory/bar +genfile --length 10240 --file en +genfile --length 20000 --file to +genfile --length 20000 --file tre +genfile --length 10240 --file fire -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory +exec <&- -mv directory orig +tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 +echo separator +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * -tar xvfg archive.0 /dev/null --warning=no-timestamp +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 xvfg archive.1 /dev/null --warning=no-timestamp -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/bar -separator -directory/ -tar: Deleting \`directory/bar' +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +en " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr01.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr01.at:30: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_128 +#AT_START_129 +at_fn_group_banner 129 'multiv03.at:30' \ + "MV archive & long filenames" " " 17 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "129. $at_setup_line: testing $at_desc ..." + $at_traceon -tar xvfg archive.0 /dev/null --warning=no-timestamp -echo separator -tar xvfg archive.1 /dev/null --warning=no-timestamp -)" -echo incr01.at:30 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + + + { set +x +$as_echo "$at_srcdir/multiv03.at:33: +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 * -mkdir directory -$as_ln_s foo directory/bar +AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\` +BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\` -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory +cat > ../experr < ../expout <"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +genfile --length 15360 --file \$AFILE + +exec <&- + +tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1 +tar -tM -f arch.1 -f arch.2 || exit 1 + +echo separator-1 + +genfile --length 15360 --file \$BFILE +tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1 + +echo separator-2 +mv \$BFILE bfile +tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 +cmp \$BFILE bfile +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -$as_ln_s foo directory/bar +AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'` +BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'` -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory +cat > ../experr < ../expout <"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/bar -separator -directory/ -tar: Deleting \`directory/bar' -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr01.at:30" +genfile --length 15360 --file $AFILE + +exec <&- + +tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1 +tar -tM -f arch.1 -f arch.2 || exit 1 + +echo separator-1 -$at_failed && at_func_log_failure +genfile --length 15360 --file $BFILE +tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1 + +echo separator-2 +mv $BFILE bfile +tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 +cmp $BFILE bfile +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +$at_diff experr "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/multiv03.at:33: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * +AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\` +BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\` +cat > ../experr <"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_52 -#AT_START_53 -# 53. incr02.at:32: restoring timestamps from incremental -at_setup_line='incr02.at:32' -at_desc="restoring timestamps from incremental" -$at_quiet $as_echo_n " 53: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "53. incr02.at:32: testing ..." - $at_traceon +cat > ../expout < ../experr < ../expout <>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +$at_diff experr "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + -# 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_129 +#AT_START_130 +at_fn_group_banner 130 'multiv04.at:36' \ + "split directory members in a MV archive" " " 17 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "130. $at_setup_line: testing $at_desc ..." + $at_traceon -# Move away the directory -mv dir orig -# Wait enough time for timestamps to differ in case of failure. -sleep 5 -# Restore the directory -tar -xf archive dir -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -)" -echo incr02.at:35 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/multiv04.at:39: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts +mkdir directory +awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' "$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +echo separator + +tar -MRt -f arc.1 -f arc.2)" +at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19325,54 +31864,39 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts +mkdir directory +awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr02.at:35" +echo separator -$at_failed && at_func_log_failure +tar -MRt -f arc.1 -f arc.2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +separator +block 0: directory/ +block 35: ** Block of NULs ** +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr02.at:35: + { set +x +$as_echo "$at_srcdir/multiv04.at:39: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19381,47 +31905,25 @@ 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 +mkdir directory +awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' "$at_check_line_file" +echo separator -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; +tar -MRt -f arc.1 -f arc.2)" +at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19430,277 +31932,372 @@ 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 +mkdir directory +awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +echo separator -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file +tar -MRt -f arc.1 -f arc.2) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +separator +block 0: directory/ +block 35: ** Block of NULs ** +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39" +$at_failed && at_fn_log_failure +$at_traceon; } -# 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_130 +#AT_START_131 +at_fn_group_banner 131 'multiv05.at:26' \ + "Restoring after an out of sync volume" " " 17 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "131. $at_setup_line: testing $at_desc ..." + $at_traceon -# 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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr02.at:35" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr02.at:35: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + { set +x +$as_echo "$at_srcdir/multiv05.at:30: +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 * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file +exec <&- -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts +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 -# 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 +echo Creating archive +tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc +echo separator +mkdir bak +mv jeden dwa trzy cztery piec szesc bak +tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar +echo Diffing jeden + cmp bak/jeden jeden || exit 1 +echo Diffing dwa + cmp bak/dwa dwa || exit 1 +echo Diffing trzy + cmp bak/trzy trzy || exit 1 +echo Diffing cztery + cmp bak/cztery cztery || exit 1 +echo Diffing piec + cmp bak/piec piec || exit 1 +echo Diffing szesc + cmp bak/szesc szesc || exit 1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "multiv05.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -# Move away the directory -mv dir orig +exec <&- -# Wait enough time for timestamps to differ in case of failure. -sleep 5 +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 -# Restore the directory -tar -xf archive dir -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -)" -echo incr02.at:35 >"$at_check_line_file" +echo Creating archive +tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc +echo separator +mkdir bak +mv jeden dwa trzy cztery piec szesc bak +tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar +echo Diffing jeden + cmp bak/jeden jeden || exit 1 +echo Diffing dwa + cmp bak/dwa dwa || exit 1 +echo Diffing trzy + cmp bak/trzy trzy || exit 1 +echo Diffing cztery + cmp bak/cztery cztery || exit 1 +echo Diffing piec + cmp bak/piec piec || exit 1 +echo Diffing szesc + cmp bak/szesc szesc || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: 'trzy' is not continued on this volume +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive +separator +jeden +dwa +trzy +cztery +piec +szesc +Diffing jeden +Diffing dwa +Diffing trzy +Diffing cztery +Diffing piec +Diffing szesc +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv05.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; 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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_131 +#AT_START_132 +at_fn_group_banner 132 'multiv06.at:27' \ + "Multivolumes with L=record_size" " " 17 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "132. $at_setup_line: testing $at_desc ..." + $at_traceon -# 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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + { set +x +$as_echo "$at_srcdir/multiv06.at:30: +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 * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file +exec <&- +decho Creating file +genfile --length 20139 --file file +decho Creating archive +tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file +decho Testing archive +tar -t -M -farc.1 -farc.2 -farc.3)" +at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts +exec <&- +decho Creating file +genfile --length 20139 --file file +decho Creating archive +tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file +decho Testing archive +tar -t -M -farc.1 -farc.2 -farc.3) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating file +Creating archive +Testing archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating file +Creating archive +Testing archive +file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -# 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. + { set +x +$as_echo "$at_srcdir/multiv06.at:30: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H pax\" +export TAR_OPTIONS +rm -rf * -tar -cf archive -g db dir +exec <&- +decho Creating file +genfile --length 20139 --file file +decho Creating archive +tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file +decho Testing archive +tar -t -M -farc.1 -farc.2 -farc.3)" +at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * -# Move away the directory -mv dir orig +exec <&- +decho Creating file +genfile --length 20139 --file file +decho Creating archive +tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file +decho Testing archive +tar -t -M -farc.1 -farc.2 -farc.3) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating file +Creating archive +Testing archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating file +Creating archive +Testing archive +file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30" +$at_failed && at_fn_log_failure +$at_traceon; } -# 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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr02.at:35" -$at_failed && at_func_log_failure -$at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_132 +#AT_START_133 +at_fn_group_banner 133 'multiv07.at:28' \ + "volumes split at an extended header" " " 17 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "133. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +{ set +x +$as_echo "$at_srcdir/multiv07.at:31: + + +test -z \"\$TEST_DATA_DIR\" && exit 77 +tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77 + +test -z \"\$TEST_DATA_DIR\" && exit 77 +tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77 + +exec <&- + +cd \$TEST_DATA_DIR +tar -t -M -fxsplit-1.tar -fxsplit-2.tar +" +at_fn_check_prepare_notrace 'an embedded newline' "multiv07.at:31" +( $at_check_trace; + + +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + +exec <&- +cd $TEST_DATA_DIR +tar -t -M -fxsplit-1.tar -fxsplit-2.tar +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Archive volumes split at an extended header Volume 1 +foo +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv07.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_53 -#AT_START_54 -# 54. listed01.at:26: --listed for individual files -at_setup_line='listed01.at:26' -at_desc="--listed for individual files" -$at_quiet $as_echo_n " 54: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_133 +#AT_START_134 +at_fn_group_banner 134 'multiv08.at:25' \ + "multivolume header creation" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "54. listed01.at:26: testing ..." + $as_echo "134. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/listed01.at:29: + { set +x +$as_echo "$at_srcdir/multiv08.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19709,36 +32306,15 @@ 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\" -cp listing listing.old -tar --create \\ - --file=archive.2 \\ - --listed-incremental=listing \\ - directory/file* || exit 1 - -tar tf archive.2 || exit 1 +genfile --length 9472 --file a +genfile --length 9984 --file b +decho Creating +tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b +decho Testing +tar -tMR -f A.tar -f B.tar -f C.tar )" -echo listed01.at:29 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "multiv08.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19747,83 +32323,104 @@ 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 +genfile --length 9472 --file a +genfile --length 9984 --file b +decho Creating +tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b +decho Testing +tar -tMR -f A.tar -f B.tar -f C.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "Creating +Testing +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating +Testing +block 0: a +block 21: b +block 43: ** Block of NULs ** +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/multiv08.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_134 +#AT_START_135 +at_fn_group_banner 135 'multiv09.at:26' \ + "bad next volume" " " 17 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "135. $at_setup_line: testing $at_desc ..." + $at_traceon -echo "separator" -cp listing listing.old -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 -tar tf archive.2 || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 +# filename of length 100 characters -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 +$as_echo "$at_srcdir/multiv09.at:33: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * -echo "separator" -cp listing listing.old -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 +genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$? +echo \"created\" +tar --format=gnu -xM -f A.tar 2>/dev/null <"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/file1 -separator -directory/file2 +genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $? +echo "created" +tar --format=gnu -xM -f A.tar 2>/dev/null <>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "created " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/listed01.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/listed01.at:29: + { set +x +$as_echo "$at_srcdir/multiv09.at:33: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19832,36 +32429,16 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 - -tar --create \\ - --file=archive.1 \\ - --listed-incremental=listing \\ - directory/file* - -tar tf archive.1 || exit 1 - -sleep 2 - -genfile --length 10240 --pattern zeros --file directory/file2 - -echo \"separator\" -cp listing listing.old -tar --create \\ - --file=archive.2 \\ - --listed-incremental=listing \\ - directory/file* || exit 1 - -tar tf archive.2 || exit 1 +genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$? +echo \"created\" +tar --format=gnu -xM -f A.tar 2>/dev/null <"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19870,107 +32447,189 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 - -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* - -tar tf archive.1 || exit 1 - -sleep 2 - -genfile --length 10240 --pattern zeros --file directory/file2 +genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $? +echo "created" +tar --format=gnu -xM -f A.tar 2>/dev/null <>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "created +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "separator" -cp listing listing.old -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 + { set +x +$as_echo "$at_srcdir/multiv09.at:33: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -tar tf archive.2 || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$? +echo \"created\" +tar --format=gnu -xM -f A.tar 2>/dev/null </dev/null <>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "created +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* + { set +x +$as_echo "$at_srcdir/multiv09.at:33: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -tar tf archive.1 || exit 1 +genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$? +echo \"created\" +tar --format=gnu -xM -f A.tar 2>/dev/null </dev/null <>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "created +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } -genfile --length 10240 --pattern zeros --file directory/file2 + { set +x +$as_echo "$at_srcdir/multiv09.at:33: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -echo "separator" -cp listing listing.old -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 +genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$? +echo \"created\" +tar --format=gnu -xM -f A.tar 2>/dev/null <"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/file1 -separator -directory/file2 +genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $? +echo "created" +tar --format=gnu -xM -f A.tar 2>/dev/null <>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "created " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/listed01.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_54 -#AT_START_55 -# 55. listed02.at:28: working --listed -at_setup_line='listed02.at:28' -at_desc="working --listed" -$at_quiet $as_echo_n " 55: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_135 +#AT_START_136 +at_fn_group_banner 136 'owner.at:21' \ + "--owner and --group" " " 18 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "55. listed02.at:28: testing ..." + $as_echo "136. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/listed02.at:31: + { set +x +$as_echo "$at_srcdir/owner.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19979,70 +32638,125 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +export TZ=UTC0 -test -z "`sort < /dev/null 2>&1`" || exit 77 +genfile --file a -echo Create directories +tar --owner=\"Joe the Plumber:1234\" \\ + --group=\"Plumber's Union:5678\" \\ + --mtime='@0' \\ + --mode='u=rw,go=r' \\ + -cf arc a -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 +tar -tvf arc +tar --numeric-owner -tvf arc +)" +at_fn_check_prepare_notrace 'an embedded newline' "owner.at:24" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -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 +export TZ=UTC0 -sleep 1 -echo Creating main archive -echo >&2 \"Creating main archive\" -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 +genfile --file a -# 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 +tar --owner="Joe the Plumber:1234" \ + --group="Plumber's Union:5678" \ + --mtime='@0' \ + --mode='u=rw,go=r' \ + -cf arc a -sleep 1 -echo Modifying filesystem -rm tart/a1 +tar -tvf arc +tar --numeric-owner -tvf arc +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a +-rw-r--r-- 1234/5678 0 1970-01-01 00:00 a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/owner.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 -echo Directory contents -find tart -print | sort 2>/dev/null -sleep 1 -echo Creating incremental archive -echo >&2 \"Creating incremental archive\" -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 -sleep 1 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_136 +#AT_START_137 +at_fn_group_banner 137 'map.at:21' \ + "--owner-map and --group-map" " " 18 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "137. $at_setup_line: testing $at_desc ..." + $at_traceon -rm -rf tart/* -echo Extracting main archive -echo >&2 \"Extracting main archive\" -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null -echo Final files: -find tart -print | sort 2>/dev/null -)" -echo listed02.at:31 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + + + { set +x +$as_echo "$at_srcdir/map.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +export TZ=UTC0 + +genfile --file a +set -- \`genfile --stat=uid,gid a\` +cat > uid.map < gid.map < uid.map +> gid.map + +tar --owner-map=uid.map\\ + --group-map=gid.map\\ + --owner=\"Fallback Owner:4321\" \\ + --group=\"Fallback Group:8765\" \\ + --mtime='@0' \\ + --mode='u=rw,go=r' \\ + -cf 2.tar a + +tar -tvf 2.tar +tar --numeric-owner -tvf 2.tar +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "map.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20051,284 +32765,396 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +export TZ=UTC0 -test -z "`sort < /dev/null 2>&1`" || exit 77 +genfile --file a +set -- `genfile --stat=uid,gid a` +cat > uid.map < gid.map < $file - sleep 1 -done +> uid.map +> gid.map -sleep 1 -echo Creating main archive -echo >&2 "Creating main archive" -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 +tar --owner-map=uid.map\ + --group-map=gid.map\ + --owner="Fallback Owner:4321" \ + --group="Fallback Group:8765" \ + --mtime='@0' \ + --mode='u=rw,go=r' \ + -cf 2.tar a -# 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 +tar -tvf 2.tar +tar --numeric-owner -tvf 2.tar +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a +-rw-r--r-- 1234/5678 0 1970-01-01 00:00 a +-rw-r--r-- Fallback Owner/Fallback Group 0 1970-01-01 00:00 a +-rw-r--r-- 4321/8765 0 1970-01-01 00:00 a +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/map.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -sleep 1 -echo Modifying filesystem -rm tart/a1 -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 -echo Directory contents -find tart -print | sort 2>/dev/null -sleep 1 -echo Creating incremental archive -echo >&2 "Creating incremental archive" -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_137 +#AT_START_138 +at_fn_group_banner 138 'sparse01.at:22' \ + "sparse files" " " 19 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "138. $at_setup_line: testing $at_desc ..." + $at_traceon -sleep 1 -rm -rf tart/* -echo Extracting main archive -echo >&2 "Extracting main archive" -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null -echo Final files: -find tart -print | sort 2>/dev/null -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + + + { set +x +$as_echo "$at_srcdir/sparse01.at:25: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator + +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator + +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/sparse01.at:25: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator + +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator + +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/sparse01.at:25: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator + +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25" +$at_failed && at_fn_log_failure +$at_traceon; } -echo Create directories -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File $file > $file - sleep 1 -done -sleep 1 -echo Creating main archive -echo >&2 "Creating main archive" -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err +cat >stdout.re <<'_ATEOF' +separator +-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin +-rw-r--r-- ^ ^ * *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile +-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end +separator +sparsefile 10344448 +_ATEOF -sleep 1 -echo Modifying filesystem -rm tart/a1 +awk '{print NR " " $0}' stdout > $$.1 +awk '{print NR " " $0}' stdout.re | join - $$.1 | +while read NUM RE LINE +do + echo "$LINE" | grep -- "$RE" >/dev/null || exit 1 +done -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 -echo Directory contents -find tart -print | sort 2>/dev/null + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_138 +#AT_START_139 +at_fn_group_banner 139 'sparse02.at:22' \ + "extracting sparse file over a pipe" " " 19 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "139. $at_setup_line: testing $at_desc ..." + $at_traceon -sleep 1 -echo Creating incremental archive -echo >&2 "Creating incremental archive" -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 -sleep 1 -rm -rf tart/* -echo Extracting main archive -echo >&2 "Extracting main archive" -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null +# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe. +# References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us> +# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html -echo Final files: -find tart -print | sort 2>/dev/null -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating main archive -tar: tart/c0: Directory is new -tar: tart/c1: Directory is new -tar: tart: Directory is new -Creating incremental archive -tar: tart/c2: Directory has been renamed from \`tart/c1' -Extracting main archive -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Create directories -Creating main archive -tart/ -tart/c0/ -tart/c1/ -tart/a1 -tart/b1 -tart/c0/cq1 -tart/c0/cq2 -tart/c1/ca1 -tart/c1/ca2 -Modifying filesystem -Directory contents -tart -tart/b2 -tart/c0 -tart/c0/cq1 -tart/c0/cq2 -tart/c2 -tart/c2/ca1 -tart/c2/ca2 -tart/c2/ca3 -Creating incremental archive -tart/ -tart/c0/ -tart/c2/ -tart/b2 -tart/c2/ca3 -Extracting main archive -tart/ -tart/c0/ -tart/c1/ -tart/a1 -tart/b1 -tart/c0/cq1 -tart/c0/cq2 -tart/c1/ca1 -tart/c1/ca2 -Extracting incremental archive -tar: Deleting \`tart/a1' -tar: Deleting \`tart/b1' -tart/ -tart/b2 -tart/c0/ -tart/c2/ -tart/c2/ca3 -Final files: -tart -tart/b2 -tart/c0 -tart/c0/cq1 -tart/c0/cq2 -tart/c2 -tart/c2/ca1 -tart/c2/ca2 -tart/c2/ca3 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/listed02.at:31" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/listed02.at:31: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/sparse02.at:29: +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 * +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1 +echo separator -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 +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -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 +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1 +echo separator -sleep 1 -echo Creating main archive -echo >&2 \"Creating main archive\" -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -# 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 + { set +x +$as_echo "$at_srcdir/sparse02.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -sleep 1 -echo Modifying filesystem -rm tart/a1 +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1 +echo separator -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -echo Directory contents -find tart -print | sort 2>/dev/null +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1 +echo separator -sleep 1 -echo Creating incremental archive -echo >&2 \"Creating incremental archive\" -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -sleep 1 + { set +x +$as_echo "$at_srcdir/sparse02.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -rm -rf tart/* -echo Extracting main archive -echo >&2 \"Extracting main archive\" -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1 +echo separator -echo Final files: -find tart -print | sort 2>/dev/null +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy )" -echo listed02.at:31 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20337,606 +33163,2579 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1 +echo separator -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -echo Create directories -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File $file > $file - sleep 1 -done -sleep 1 -echo Creating main archive -echo >&2 "Creating main archive" -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_139 +#AT_START_140 +at_fn_group_banner 140 'sparse03.at:21' \ + "storing sparse files > 8G" " " 19 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "140. $at_setup_line: testing $at_desc ..." + $at_traceon -# 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 +# Tar 1.15.1 incorrectly computed sparse member size if the extended +# PAX header contained size keyword. +# References: <87vf46nb36.fsf@penguin.cs.ucla.edu> +# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html -echo Directory contents -find tart -print | sort 2>/dev/null -sleep 1 -echo Creating incremental archive -echo >&2 "Creating incremental archive" -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 -sleep 1 + { set +x +$as_echo "$at_srcdir/sparse03.at:29: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -rm -rf tart/* -echo Extracting main archive -echo >&2 "Extracting main archive" -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null +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 -echo Final files: -find tart -print | sort 2>/dev/null -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse03.at:29" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +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 -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sparse03.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + + +cat >stdout.re <<'_ATEOF' +separator +-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin +-rw-r--r-- ^ ^ * *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile +-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end +separator +sparsefile 8589935104 +_ATEOF + +awk '{print NR " " $0}' stdout > $$.1 +awk '{print NR " " $0}' stdout.re | join - $$.1 | +while read NUM RE LINE do - echo File $file > $file - sleep 1 + echo "$LINE" | grep -- "$RE" >/dev/null || exit 1 done -sleep 1 -echo Creating main archive -echo >&2 "Creating main archive" -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_140 +#AT_START_141 +at_fn_group_banner 141 'sparse04.at:21' \ + "storing long sparse file names" " " 19 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "141. $at_setup_line: testing $at_desc ..." + $at_traceon -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 +# Description: Tar versions from 1.15.92 to 1.25 would incorrectly +# store sparse file names longer than 100 characters in pax mode. +# Namely, the 'path' keyword of the produced PAX header would contain the +# crafted name of the header itself, instead of that of the file. +# Reported by: Kamil Dudka +# References: <201011250026.44908.kdudka@redhat.com>, +# http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html -sleep 1 -echo Creating incremental archive -echo >&2 "Creating incremental archive" -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 -sleep 1 -rm -rf tart/* -echo Extracting main archive -echo >&2 "Extracting main archive" -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null -echo Final files: -find tart -print | sort 2>/dev/null -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating main archive -tar: tart/c0: Directory is new -tar: tart/c1: Directory is new -tar: tart: Directory is new -Creating incremental archive -tar: tart/c2: Directory has been renamed from \`tart/c1' -Extracting main archive -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Create directories -Creating main archive -tart/ -tart/c0/ -tart/c1/ -tart/a1 -tart/b1 -tart/c0/cq1 -tart/c0/cq2 -tart/c1/ca1 -tart/c1/ca2 -Modifying filesystem -Directory contents -tart -tart/b2 -tart/c0 -tart/c0/cq1 -tart/c0/cq2 -tart/c2 -tart/c2/ca1 -tart/c2/ca2 -tart/c2/ca3 -Creating incremental archive -tart/ -tart/c0/ -tart/c2/ -tart/b2 -tart/c2/ca3 -Extracting main archive -tart/ -tart/c0/ -tart/c1/ -tart/a1 -tart/b1 -tart/c0/cq1 -tart/c0/cq2 -tart/c1/ca1 -tart/c1/ca2 -Extracting incremental archive -tar: Deleting \`tart/a1' -tar: Deleting \`tart/b1' -tart/ -tart/b2 -tart/c0/ -tart/c2/ -tart/c2/ca3 -Final files: -tart -tart/b2 -tart/c0 -tart/c0/cq1 -tart/c0/cq2 -tart/c2 -tart/c2/ca1 -tart/c2/ca2 -tart/c2/ca3 + + { set +x +$as_echo "$at_srcdir/sparse04.at:35: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H pax\" +export TAR_OPTIONS +rm -rf * + +genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77 +tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf - +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse04.at:35" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * + +genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77 +tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf - +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/listed02.at:31" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/sparse04.at:35" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_55 -#AT_START_56 -# 56. listed03.at:22: incremental dump when the parent directory is unreadable -at_setup_line='listed03.at:22' -at_desc="incremental dump when the parent directory is unreadable" -$at_quiet $as_echo_n " 56: $at_desc" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_141 +#AT_START_142 +at_fn_group_banner 142 'sparse05.at:21' \ + "listing sparse files bigger than 2^33 B" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "56. listed03.at:22: testing ..." + $as_echo "142. $at_setup_line: testing $at_desc ..." $at_traceon +# Description: If an archive in POSIX.1-2001 archive contained a sparse file +# member whose real size (excluding zero blocks) is bigger than 2^33 bytes, +# tar 1.28 would incorrectly list the real member size. +# Reported by: Pavel Raiskup +# References: <1359119879.15037.4.camel@raiskup>, +# http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html - { $at_traceoff -$as_echo "$at_srcdir/listed03.at:25: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * - - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -genfile --file dir/sub/a/file -cd dir/sub - -chmod a-r .. -tar -c -f archive.tar --listed-incremental=db.1 -v a -status=\$? -chmod a+r .. -exit \$status -)" -echo listed03.at:25 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/sparse05.at:31: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * +cat >mapfile <<'_ATEOF' +0 =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +_ATEOF -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -genfile --file dir/sub/a/file -cd dir/sub - -chmod a-r .. -tar -c -f archive.tar --listed-incremental=db.1 -v a -status=$? -chmod a+r .. -exit $status -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77 +tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print \$3, \$(NF) }' +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "sparse05.at:31" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * +cat >mapfile <<'_ATEOF' +0 =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +10M =2560 +_ATEOF -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -genfile --file dir/sub/a/file -cd dir/sub - -chmod a-r .. -tar -c -f archive.tar --listed-incremental=db.1 -v a -status=$? -chmod a+r .. -exit $status -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: a: Directory is new -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "a/ -a/file +genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77 +tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print $3, $(NF) }' +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "20961034240 BIGFILE " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/listed03.at:25" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/sparse05.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_56 -#AT_START_57 -# 57. incr03.at:28: renamed files in incrementals -at_setup_line='incr03.at:28' -at_desc="renamed files in incrementals" -$at_quiet $as_echo_n " 57: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_142 +#AT_START_143 +at_fn_group_banner 143 'sparse06.at:21' \ + "storing sparse file using seek method" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "57. incr03.at:28: testing ..." + $as_echo "143. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/incr03.at:31: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + + { set +x +$as_echo "$at_srcdir/sparse06.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +checkseekhole || exit 77 -mkdir directory -genfile --file=directory/x -genfile --file=directory/y -sleep 1 +TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=seek\" +genfile --sparse --file bigsparse 0 ABC 8G DEF +tar -cSf a bigsparse +test \$? -eq 0 || exit 1 -tar -cf archive.1 -g db directory -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 0 ABC +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -mv directory orig -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 0 ABC 10M +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -)" -echo incr03.at:31 >"$at_check_line_file" +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 0 ABC 10M DEF +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 10M +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -mkdir directory -genfile --file=directory/x -genfile --file=directory/y -sleep 1 +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 10M ABC +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -tar -cf archive.1 -g db directory -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 10M ABC 20M +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -mv directory orig -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 10M DEF 20M GHI 30M JKL 40M +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparse06.at:32" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +checkseekhole || exit 77 -mkdir directory -genfile --file=directory/x -genfile --file=directory/y -sleep 1 +TAR_OPTIONS="$TAR_OPTIONS --hole-detection=seek" +genfile --sparse --file bigsparse 0 ABC 8G DEF +tar -cSf a bigsparse +test $? -eq 0 || exit 1 -tar -cf archive.1 -g db directory -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 0 ABC +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -mv directory orig -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 0 ABC 10M +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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_func_check_status 0 $at_status "$at_srcdir/incr03.at:31" +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 0 ABC 10M DEF +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr03.at:31: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 10M +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 10M ABC +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -sleep 1 -tar -cf archive.1 -g db directory +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 10M ABC 20M +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory -mv directory orig -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +rm -rf out archive.tar smallsparse && mkdir out +genfile --sparse --quiet --file smallsparse 10M DEF 20M GHI 30M JKL 40M +tar -cSf archive.tar smallsparse +tar -xf archive.tar -C out +cmp smallsparse out/smallsparse -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -)" -echo incr03.at:31 >"$at_check_line_file" +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparse06.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --file=directory/x -genfile --file=directory/y + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_143 +#AT_START_144 +at_fn_group_banner 144 'sparsemv.at:21' \ + "sparse files in MV archives" " " 19 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "144. $at_setup_line: testing $at_desc ..." + $at_traceon -sleep 1 -tar -cf archive.1 -g db directory -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory +# Check if sparse files are correctly split between GNU multi-volume +# archives. +# There are two cases: the file can be split within an empty (null) block, +# or within a data block. Since null blocks are not archived, the first +# case means the file is split between two consecutive data blocks. +# -mv directory orig -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort + { set +x +$as_echo "$at_srcdir/sparsemv.at:31: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +exec <&- +TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo \"Test archive\" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo \"Compare archive\" +tar --record-size=512 -d -M -f arc.1 -f arc.2 + +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo \"Test archive\" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo \"Compare archive\" +tar --record-size=512 -d -M -f arc.1 -f arc.2 +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw" +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 + +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/sparsemv.at:31: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +exec <&- +TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo \"Test archive\" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo \"Compare archive\" +tar --record-size=512 -d -M -f arc.1 -f arc.2 + +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo \"Test archive\" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo \"Compare archive\" +tar --record-size=512 -d -M -f arc.1 -f arc.2 +)" +at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20945,724 +35744,558 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +exec <&- +TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw" +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 + +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_144 +#AT_START_145 +at_fn_group_banner 145 'spmvp00.at:21' \ + "sparse files in PAX MV archives, v.0.0" " " 19 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "145. $at_setup_line: testing $at_desc ..." + $at_traceon -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory -mv directory orig -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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 + + { set +x +$as_echo "$at_srcdir/spmvp00.at:24: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H pax\" +export TAR_OPTIONS +rm -rf * + +exec <&- +TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\" +genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 + +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 +)" +at_fn_check_prepare_notrace 'an embedded newline' "spmvp00.at:24" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * + +exec <&- +TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw" +genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 + +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr03.at:31" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/spmvp00.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr03.at:31: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --file=directory/x -genfile --file=directory/y + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_145 +#AT_START_146 +at_fn_group_banner 146 'spmvp01.at:21' \ + "sparse files in PAX MV archives, v.0.1" " " 19 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "146. $at_setup_line: testing $at_desc ..." + $at_traceon -sleep 1 -tar -cf archive.1 -g db directory -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory -mv directory orig -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort + { set +x +$as_echo "$at_srcdir/spmvp01.at:24: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H pax\" +export TAR_OPTIONS +rm -rf * -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -)" -echo incr03.at:31 >"$at_check_line_file" +exec <&- +TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 +)" +at_fn_check_prepare_notrace 'an embedded newline' "spmvp01.at:24" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * +exec <&- +TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw" +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/spmvp01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -mkdir directory -genfile --file=directory/x -genfile --file=directory/y -sleep 1 -tar -cf archive.1 -g db directory -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_146 +#AT_START_147 +at_fn_group_banner 147 'spmvp10.at:21' \ + "sparse files in PAX MV archives, v.1.0" " " 19 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "147. $at_setup_line: testing $at_desc ..." + $at_traceon -mv directory orig -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + + { set +x +$as_echo "$at_srcdir/spmvp10.at:24: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * +exec <&- +TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\" +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y - -sleep 1 - -tar -cf archive.1 -g db directory - -mv directory/x directory/z -cp db db.old -tar -cf archive.2 -g db directory - -mv directory orig - -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 +)" +at_fn_check_prepare_notrace 'an embedded newline' "spmvp10.at:24" +( $at_check_trace; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * -echo Directory after first restore -tar -xf archive.1 -g db --warning=no-timestamp -find directory | sort +exec <&- +TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw" +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -echo Directory after second restore -tar -xf archive.2 -g db --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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 +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr03.at:31" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/spmvp10.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_57 -#AT_START_58 -# 58. incr04.at:29: proper icontents initialization -at_setup_line='incr04.at:29' -at_desc="proper icontents initialization" -$at_quiet $as_echo_n " 58: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_147 +#AT_START_148 +at_fn_group_banner 148 'update.at:28' \ + "update unchanged directories" " " 20 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "58. incr04.at:29: testing ..." + $as_echo "148. $at_setup_line: testing $at_desc ..." $at_traceon - - - { $at_traceoff -$as_echo "$at_srcdir/incr04.at:34: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/update.at:31: +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 * -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 - +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -sleep 1 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -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 +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 )" -echo incr04.at:34 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" 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 - +test -z "`sort < /dev/null 2>&1`" || exit 77 -sleep 1 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/update.at:31: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +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_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: a: Directory is new -tar: a/b: Directory is new -tar: a/c: Directory has been renamed from \`a/b' -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Initial dump -a/ -a/b/ -a/b/one_31_chars_long_file_name_001 -a/b/one_31_chars_long_file_name_002 -a/b/one_31_chars_long_file_name_003 -a/b/one_31_chars_long_file_name_004 -a/b/one_31_chars_long_file_name_005 -a/b/one_31_chars_long_file_name_006 -a/b/one_31_chars_long_file_name_007 -a/b/one_31_chars_long_file_name_008 -a/b/one_31_chars_long_file_name_009 -a/b/one_31_chars_long_file_name_010 -a/b/one_31_chars_long_file_name_011 -a/b/one_31_chars_long_file_name_012 -a/b/one_31_chars_long_file_name_013 -a/b/one_31_chars_long_file_name_014 -a/b/one_31_chars_long_file_name_015 -a/b/one_31_chars_long_file_name_016 -a/b/one_31_chars_long_file_name_017 -a/b/one_31_chars_long_file_name_018 -a/b/one_31_chars_long_file_name_019 -a/b/one_31_chars_long_file_name_020 -a/b/one_31_chars_long_file_name_021 -a/b/one_31_chars_long_file_name_022 -a/b/one_31_chars_long_file_name_023 -a/b/one_31_chars_long_file_name_024 -a/b/one_31_chars_long_file_name_025 -a/b/one_31_chars_long_file_name_026 -a/b/one_31_chars_long_file_name_027 -a/b/one_31_chars_long_file_name_028 -a/b/one_31_chars_long_file_name_029 -a/b/one_31_chars_long_file_name_030 -a/b/one_31_chars_long_file_name_031 -a/b/one_31_chars_long_file_name_032 -a/b/one_31_chars_long_file_name_033 -a/b/one_31_chars_long_file_name_034 -a/b/one_31_chars_long_file_name_035 -a/b/one_31_chars_long_file_name_036 -a/b/one_31_chars_long_file_name_037 -a/b/one_31_chars_long_file_name_038 -a/b/one_31_chars_long_file_name_039 -a/b/one_31_chars_long_file_name_040 -a/b/one_31_chars_long_file_name_041 -a/b/one_31_chars_long_file_name_042 -a/b/one_31_chars_long_file_name_043 -a/b/one_31_chars_long_file_name_044 -a/b/one_31_chars_long_file_name_045 -a/b/one_31_chars_long_file_name_046 -a/b/one_31_chars_long_file_name_047 -a/b/one_31_chars_long_file_name_048 -a/b/one_31_chars_long_file_name_049 -a/b/one_31_chars_long_file_name_050 -a/b/one_31_chars_long_file_name_051 -a/b/one_31_chars_long_file_name_052 -a/b/one_31_chars_long_file_name_053 -a/b/one_31_chars_long_file_name_054 -a/b/one_31_chars_long_file_name_055 -a/b/one_31_chars_long_file_name_056 -a/b/one_31_chars_long_file_name_057 -a/b/one_31_chars_long_file_name_058 -a/b/one_31_chars_long_file_name_059 -a/b/one_31_chars_long_file_name_060 -a/b/one_31_chars_long_file_name_061 -a/b/one_31_chars_long_file_name_062 -a/b/one_31_chars_long_file_name_063 -a/b/one_31_chars_long_file_name_064 -a/b/one_31_chars_long_file_name_065 -a/b/one_31_chars_long_file_name_066 -a/b/one_31_chars_long_file_name_067 -a/b/one_31_chars_long_file_name_068 -a/b/one_31_chars_long_file_name_069 -a/b/one_31_chars_long_file_name_070 -a/b/one_31_chars_long_file_name_071 -a/b/one_31_chars_long_file_name_072 -a/b/one_31_chars_long_file_name_073 -a/b/one_31_chars_long_file_name_074 -a/b/one_31_chars_long_file_name_075 -a/b/one_31_chars_long_file_name_076 -a/b/one_31_chars_long_file_name_077 -a/b/one_31_chars_long_file_name_078 -a/b/one_31_chars_long_file_name_079 -a/b/one_31_chars_long_file_name_080 -a/b/one_31_chars_long_file_name_081 -a/b/one_31_chars_long_file_name_082 -a/b/one_31_chars_long_file_name_083 -a/b/one_31_chars_long_file_name_084 -a/b/one_31_chars_long_file_name_085 -a/b/one_31_chars_long_file_name_086 -a/b/one_31_chars_long_file_name_087 -a/b/one_31_chars_long_file_name_088 -a/b/one_31_chars_long_file_name_089 -a/b/one_31_chars_long_file_name_090 -a/b/one_31_chars_long_file_name_091 -a/b/one_31_chars_long_file_name_092 -a/b/one_31_chars_long_file_name_093 -a/b/one_31_chars_long_file_name_094 -a/b/one_31_chars_long_file_name_095 -a/b/one_31_chars_long_file_name_096 -a/b/one_31_chars_long_file_name_097 -a/b/one_31_chars_long_file_name_098 -a/b/one_31_chars_long_file_name_099 -a/b/one_31_chars_long_file_name_100 -a/b/one_31_chars_long_file_name_101 -a/b/one_31_chars_long_file_name_102 -a/b/one_31_chars_long_file_name_103 -a/b/one_31_chars_long_file_name_104 -a/b/one_31_chars_long_file_name_105 -a/b/one_31_chars_long_file_name_106 -a/b/one_31_chars_long_file_name_107 -a/b/one_31_chars_long_file_name_108 -a/b/one_31_chars_long_file_name_109 -a/b/one_31_chars_long_file_name_110 -a/b/one_31_chars_long_file_name_111 -a/b/one_31_chars_long_file_name_112 -a/b/one_31_chars_long_file_name_113 -a/b/one_31_chars_long_file_name_114 -a/b/one_31_chars_long_file_name_115 -a/b/one_31_chars_long_file_name_116 -a/b/one_31_chars_long_file_name_117 -a/b/one_31_chars_long_file_name_118 -a/b/one_31_chars_long_file_name_119 -a/b/one_31_chars_long_file_name_120 -a/b/one_31_chars_long_file_name_121 -a/b/one_31_chars_long_file_name_122 -a/b/one_31_chars_long_file_name_123 -a/b/one_31_chars_long_file_name_124 -a/b/one_31_chars_long_file_name_125 -a/b/one_31_chars_long_file_name_126 -a/b/one_31_chars_long_file_name_127 -a/b/one_31_chars_long_file_name_128 -a/b/one_31_chars_long_file_name_129 -a/b/one_31_chars_long_file_name_130 -a/b/one_31_chars_long_file_name_131 -a/b/one_31_chars_long_file_name_132 -a/b/one_31_chars_long_file_name_133 -a/b/one_31_chars_long_file_name_134 -a/b/one_31_chars_long_file_name_135 -a/b/one_31_chars_long_file_name_136 -a/b/one_31_chars_long_file_name_137 -a/b/one_31_chars_long_file_name_138 -a/b/one_31_chars_long_file_name_139 -a/b/one_31_chars_long_file_name_140 -a/b/one_31_chars_long_file_name_141 -a/b/one_31_chars_long_file_name_142 -Incremental dump -a/ -a/c/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr04.at:34" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -$at_failed && at_func_log_failure -$at_traceon; } +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 - { $at_traceoff -$as_echo "$at_srcdir/incr04.at:34: +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +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 - +test -z "`sort < /dev/null 2>&1`" || exit 77 -sleep 1 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -echo \"Initial dump\" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo \"Incremental dump\" -tar cvf a1.tar -g a.sna a -)" -echo incr04.at:34 >"$at_check_line_file" +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/update.at:31: +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 * -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 - +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -sleep 1 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -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_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" 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 - +test -z "`sort < /dev/null 2>&1`" || exit 77 -sleep 1 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: a: Directory is new -tar: a/b: Directory is new -tar: a/c: Directory has been renamed from \`a/b' -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Initial dump -a/ -a/b/ -a/b/one_31_chars_long_file_name_001 -a/b/one_31_chars_long_file_name_002 -a/b/one_31_chars_long_file_name_003 -a/b/one_31_chars_long_file_name_004 -a/b/one_31_chars_long_file_name_005 -a/b/one_31_chars_long_file_name_006 -a/b/one_31_chars_long_file_name_007 -a/b/one_31_chars_long_file_name_008 -a/b/one_31_chars_long_file_name_009 -a/b/one_31_chars_long_file_name_010 -a/b/one_31_chars_long_file_name_011 -a/b/one_31_chars_long_file_name_012 -a/b/one_31_chars_long_file_name_013 -a/b/one_31_chars_long_file_name_014 -a/b/one_31_chars_long_file_name_015 -a/b/one_31_chars_long_file_name_016 -a/b/one_31_chars_long_file_name_017 -a/b/one_31_chars_long_file_name_018 -a/b/one_31_chars_long_file_name_019 -a/b/one_31_chars_long_file_name_020 -a/b/one_31_chars_long_file_name_021 -a/b/one_31_chars_long_file_name_022 -a/b/one_31_chars_long_file_name_023 -a/b/one_31_chars_long_file_name_024 -a/b/one_31_chars_long_file_name_025 -a/b/one_31_chars_long_file_name_026 -a/b/one_31_chars_long_file_name_027 -a/b/one_31_chars_long_file_name_028 -a/b/one_31_chars_long_file_name_029 -a/b/one_31_chars_long_file_name_030 -a/b/one_31_chars_long_file_name_031 -a/b/one_31_chars_long_file_name_032 -a/b/one_31_chars_long_file_name_033 -a/b/one_31_chars_long_file_name_034 -a/b/one_31_chars_long_file_name_035 -a/b/one_31_chars_long_file_name_036 -a/b/one_31_chars_long_file_name_037 -a/b/one_31_chars_long_file_name_038 -a/b/one_31_chars_long_file_name_039 -a/b/one_31_chars_long_file_name_040 -a/b/one_31_chars_long_file_name_041 -a/b/one_31_chars_long_file_name_042 -a/b/one_31_chars_long_file_name_043 -a/b/one_31_chars_long_file_name_044 -a/b/one_31_chars_long_file_name_045 -a/b/one_31_chars_long_file_name_046 -a/b/one_31_chars_long_file_name_047 -a/b/one_31_chars_long_file_name_048 -a/b/one_31_chars_long_file_name_049 -a/b/one_31_chars_long_file_name_050 -a/b/one_31_chars_long_file_name_051 -a/b/one_31_chars_long_file_name_052 -a/b/one_31_chars_long_file_name_053 -a/b/one_31_chars_long_file_name_054 -a/b/one_31_chars_long_file_name_055 -a/b/one_31_chars_long_file_name_056 -a/b/one_31_chars_long_file_name_057 -a/b/one_31_chars_long_file_name_058 -a/b/one_31_chars_long_file_name_059 -a/b/one_31_chars_long_file_name_060 -a/b/one_31_chars_long_file_name_061 -a/b/one_31_chars_long_file_name_062 -a/b/one_31_chars_long_file_name_063 -a/b/one_31_chars_long_file_name_064 -a/b/one_31_chars_long_file_name_065 -a/b/one_31_chars_long_file_name_066 -a/b/one_31_chars_long_file_name_067 -a/b/one_31_chars_long_file_name_068 -a/b/one_31_chars_long_file_name_069 -a/b/one_31_chars_long_file_name_070 -a/b/one_31_chars_long_file_name_071 -a/b/one_31_chars_long_file_name_072 -a/b/one_31_chars_long_file_name_073 -a/b/one_31_chars_long_file_name_074 -a/b/one_31_chars_long_file_name_075 -a/b/one_31_chars_long_file_name_076 -a/b/one_31_chars_long_file_name_077 -a/b/one_31_chars_long_file_name_078 -a/b/one_31_chars_long_file_name_079 -a/b/one_31_chars_long_file_name_080 -a/b/one_31_chars_long_file_name_081 -a/b/one_31_chars_long_file_name_082 -a/b/one_31_chars_long_file_name_083 -a/b/one_31_chars_long_file_name_084 -a/b/one_31_chars_long_file_name_085 -a/b/one_31_chars_long_file_name_086 -a/b/one_31_chars_long_file_name_087 -a/b/one_31_chars_long_file_name_088 -a/b/one_31_chars_long_file_name_089 -a/b/one_31_chars_long_file_name_090 -a/b/one_31_chars_long_file_name_091 -a/b/one_31_chars_long_file_name_092 -a/b/one_31_chars_long_file_name_093 -a/b/one_31_chars_long_file_name_094 -a/b/one_31_chars_long_file_name_095 -a/b/one_31_chars_long_file_name_096 -a/b/one_31_chars_long_file_name_097 -a/b/one_31_chars_long_file_name_098 -a/b/one_31_chars_long_file_name_099 -a/b/one_31_chars_long_file_name_100 -a/b/one_31_chars_long_file_name_101 -a/b/one_31_chars_long_file_name_102 -a/b/one_31_chars_long_file_name_103 -a/b/one_31_chars_long_file_name_104 -a/b/one_31_chars_long_file_name_105 -a/b/one_31_chars_long_file_name_106 -a/b/one_31_chars_long_file_name_107 -a/b/one_31_chars_long_file_name_108 -a/b/one_31_chars_long_file_name_109 -a/b/one_31_chars_long_file_name_110 -a/b/one_31_chars_long_file_name_111 -a/b/one_31_chars_long_file_name_112 -a/b/one_31_chars_long_file_name_113 -a/b/one_31_chars_long_file_name_114 -a/b/one_31_chars_long_file_name_115 -a/b/one_31_chars_long_file_name_116 -a/b/one_31_chars_long_file_name_117 -a/b/one_31_chars_long_file_name_118 -a/b/one_31_chars_long_file_name_119 -a/b/one_31_chars_long_file_name_120 -a/b/one_31_chars_long_file_name_121 -a/b/one_31_chars_long_file_name_122 -a/b/one_31_chars_long_file_name_123 -a/b/one_31_chars_long_file_name_124 -a/b/one_31_chars_long_file_name_125 -a/b/one_31_chars_long_file_name_126 -a/b/one_31_chars_long_file_name_127 -a/b/one_31_chars_long_file_name_128 -a/b/one_31_chars_long_file_name_129 -a/b/one_31_chars_long_file_name_130 -a/b/one_31_chars_long_file_name_131 -a/b/one_31_chars_long_file_name_132 -a/b/one_31_chars_long_file_name_133 -a/b/one_31_chars_long_file_name_134 -a/b/one_31_chars_long_file_name_135 -a/b/one_31_chars_long_file_name_136 -a/b/one_31_chars_long_file_name_137 -a/b/one_31_chars_long_file_name_138 -a/b/one_31_chars_long_file_name_139 -a/b/one_31_chars_long_file_name_140 -a/b/one_31_chars_long_file_name_141 -a/b/one_31_chars_long_file_name_142 -Incremental dump -a/ -a/c/ +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr04.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/update.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr04.at:34: + { set +x +$as_echo "$at_srcdir/update.at:31: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -21672,25 +36305,20 @@ 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 - +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -sleep 1 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -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 +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 )" -echo incr04.at:34 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -21700,325 +36328,187 @@ 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 - +test -z "`sort < /dev/null 2>&1`" || exit 77 -sleep 1 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/update.at:31: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +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 - +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -sleep 1 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: a: Directory is new -tar: a/b: Directory is new -tar: a/c: Directory has been renamed from \`a/b' -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Initial dump -a/ -a/b/ -a/b/one_31_chars_long_file_name_001 -a/b/one_31_chars_long_file_name_002 -a/b/one_31_chars_long_file_name_003 -a/b/one_31_chars_long_file_name_004 -a/b/one_31_chars_long_file_name_005 -a/b/one_31_chars_long_file_name_006 -a/b/one_31_chars_long_file_name_007 -a/b/one_31_chars_long_file_name_008 -a/b/one_31_chars_long_file_name_009 -a/b/one_31_chars_long_file_name_010 -a/b/one_31_chars_long_file_name_011 -a/b/one_31_chars_long_file_name_012 -a/b/one_31_chars_long_file_name_013 -a/b/one_31_chars_long_file_name_014 -a/b/one_31_chars_long_file_name_015 -a/b/one_31_chars_long_file_name_016 -a/b/one_31_chars_long_file_name_017 -a/b/one_31_chars_long_file_name_018 -a/b/one_31_chars_long_file_name_019 -a/b/one_31_chars_long_file_name_020 -a/b/one_31_chars_long_file_name_021 -a/b/one_31_chars_long_file_name_022 -a/b/one_31_chars_long_file_name_023 -a/b/one_31_chars_long_file_name_024 -a/b/one_31_chars_long_file_name_025 -a/b/one_31_chars_long_file_name_026 -a/b/one_31_chars_long_file_name_027 -a/b/one_31_chars_long_file_name_028 -a/b/one_31_chars_long_file_name_029 -a/b/one_31_chars_long_file_name_030 -a/b/one_31_chars_long_file_name_031 -a/b/one_31_chars_long_file_name_032 -a/b/one_31_chars_long_file_name_033 -a/b/one_31_chars_long_file_name_034 -a/b/one_31_chars_long_file_name_035 -a/b/one_31_chars_long_file_name_036 -a/b/one_31_chars_long_file_name_037 -a/b/one_31_chars_long_file_name_038 -a/b/one_31_chars_long_file_name_039 -a/b/one_31_chars_long_file_name_040 -a/b/one_31_chars_long_file_name_041 -a/b/one_31_chars_long_file_name_042 -a/b/one_31_chars_long_file_name_043 -a/b/one_31_chars_long_file_name_044 -a/b/one_31_chars_long_file_name_045 -a/b/one_31_chars_long_file_name_046 -a/b/one_31_chars_long_file_name_047 -a/b/one_31_chars_long_file_name_048 -a/b/one_31_chars_long_file_name_049 -a/b/one_31_chars_long_file_name_050 -a/b/one_31_chars_long_file_name_051 -a/b/one_31_chars_long_file_name_052 -a/b/one_31_chars_long_file_name_053 -a/b/one_31_chars_long_file_name_054 -a/b/one_31_chars_long_file_name_055 -a/b/one_31_chars_long_file_name_056 -a/b/one_31_chars_long_file_name_057 -a/b/one_31_chars_long_file_name_058 -a/b/one_31_chars_long_file_name_059 -a/b/one_31_chars_long_file_name_060 -a/b/one_31_chars_long_file_name_061 -a/b/one_31_chars_long_file_name_062 -a/b/one_31_chars_long_file_name_063 -a/b/one_31_chars_long_file_name_064 -a/b/one_31_chars_long_file_name_065 -a/b/one_31_chars_long_file_name_066 -a/b/one_31_chars_long_file_name_067 -a/b/one_31_chars_long_file_name_068 -a/b/one_31_chars_long_file_name_069 -a/b/one_31_chars_long_file_name_070 -a/b/one_31_chars_long_file_name_071 -a/b/one_31_chars_long_file_name_072 -a/b/one_31_chars_long_file_name_073 -a/b/one_31_chars_long_file_name_074 -a/b/one_31_chars_long_file_name_075 -a/b/one_31_chars_long_file_name_076 -a/b/one_31_chars_long_file_name_077 -a/b/one_31_chars_long_file_name_078 -a/b/one_31_chars_long_file_name_079 -a/b/one_31_chars_long_file_name_080 -a/b/one_31_chars_long_file_name_081 -a/b/one_31_chars_long_file_name_082 -a/b/one_31_chars_long_file_name_083 -a/b/one_31_chars_long_file_name_084 -a/b/one_31_chars_long_file_name_085 -a/b/one_31_chars_long_file_name_086 -a/b/one_31_chars_long_file_name_087 -a/b/one_31_chars_long_file_name_088 -a/b/one_31_chars_long_file_name_089 -a/b/one_31_chars_long_file_name_090 -a/b/one_31_chars_long_file_name_091 -a/b/one_31_chars_long_file_name_092 -a/b/one_31_chars_long_file_name_093 -a/b/one_31_chars_long_file_name_094 -a/b/one_31_chars_long_file_name_095 -a/b/one_31_chars_long_file_name_096 -a/b/one_31_chars_long_file_name_097 -a/b/one_31_chars_long_file_name_098 -a/b/one_31_chars_long_file_name_099 -a/b/one_31_chars_long_file_name_100 -a/b/one_31_chars_long_file_name_101 -a/b/one_31_chars_long_file_name_102 -a/b/one_31_chars_long_file_name_103 -a/b/one_31_chars_long_file_name_104 -a/b/one_31_chars_long_file_name_105 -a/b/one_31_chars_long_file_name_106 -a/b/one_31_chars_long_file_name_107 -a/b/one_31_chars_long_file_name_108 -a/b/one_31_chars_long_file_name_109 -a/b/one_31_chars_long_file_name_110 -a/b/one_31_chars_long_file_name_111 -a/b/one_31_chars_long_file_name_112 -a/b/one_31_chars_long_file_name_113 -a/b/one_31_chars_long_file_name_114 -a/b/one_31_chars_long_file_name_115 -a/b/one_31_chars_long_file_name_116 -a/b/one_31_chars_long_file_name_117 -a/b/one_31_chars_long_file_name_118 -a/b/one_31_chars_long_file_name_119 -a/b/one_31_chars_long_file_name_120 -a/b/one_31_chars_long_file_name_121 -a/b/one_31_chars_long_file_name_122 -a/b/one_31_chars_long_file_name_123 -a/b/one_31_chars_long_file_name_124 -a/b/one_31_chars_long_file_name_125 -a/b/one_31_chars_long_file_name_126 -a/b/one_31_chars_long_file_name_127 -a/b/one_31_chars_long_file_name_128 -a/b/one_31_chars_long_file_name_129 -a/b/one_31_chars_long_file_name_130 -a/b/one_31_chars_long_file_name_131 -a/b/one_31_chars_long_file_name_132 -a/b/one_31_chars_long_file_name_133 -a/b/one_31_chars_long_file_name_134 -a/b/one_31_chars_long_file_name_135 -a/b/one_31_chars_long_file_name_136 -a/b/one_31_chars_long_file_name_137 -a/b/one_31_chars_long_file_name_138 -a/b/one_31_chars_long_file_name_139 -a/b/one_31_chars_long_file_name_140 -a/b/one_31_chars_long_file_name_141 -a/b/one_31_chars_long_file_name_142 -Incremental dump -a/ -a/c/ +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr04.at:34" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/update.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_58 -#AT_START_59 -# 59. incr05.at:19: incremental dumps with -C -at_setup_line='incr05.at:19' -at_desc="incremental dumps with -C" -$at_quiet $as_echo_n " 59: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_148 +#AT_START_149 +at_fn_group_banner 149 'update01.at:29' \ + "update directories" " " 20 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "59. incr05.at:19: testing ..." + $as_echo "149. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/incr05.at:22: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/update01.at:32: +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 dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -)" -echo incr05.at:22 >"$at_check_line_file" +mkdir a +genfile --file a/b + +tar cf arc a + +echo \"separator\" + +sleep 2 +genfile --file a/c -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +mkdir a +genfile --file a/b -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 +tar cf arc a -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +echo "separator" -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Level 0 -./ -./sub/ -./file1 -./sub/file2 -Level 1 -./ -./sub/ -./file3 +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr05.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr05.at:22: + { set +x +$as_echo "$at_srcdir/update01.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22027,23 +36517,25 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -)" -echo incr05.at:22 >"$at_check_line_file" +mkdir a +genfile --file a/b + +tar cf arc a + +echo \"separator\" + +sleep 2 +genfile --file a/c -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22052,63 +36544,111 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir a +genfile --file a/b + +tar cf arc a + +echo "separator" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/update01.at:32: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Level 0 -./ -./sub/ -./file1 -./sub/file2 -Level 1 -./ -./sub/ -./file3 +mkdir a +genfile --file a/b + +tar cf arc a + +echo \"separator\" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b + +tar cf arc a + +echo "separator" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr05.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr05.at:22: + { set +x +$as_echo "$at_srcdir/update01.at:32: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22117,23 +36657,25 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -)" -echo incr05.at:22 >"$at_check_line_file" +mkdir a +genfile --file a/b + +tar cf arc a + +echo \"separator\" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +sleep 2 +genfile --file a/c + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22142,363 +36684,342 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir a +genfile --file a/b + +tar cf arc a + +echo "separator" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/update01.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -echo Level 0 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file dir/file3 -echo Level 1 -tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Level 0 -./ -./sub/ -./file1 -./sub/file2 -Level 1 -./ -./sub/ -./file3 +mkdir a +genfile --file a/b + +tar cf arc a + +echo \"separator\" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b + +tar cf arc a + +echo "separator" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr05.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_59 -#AT_START_60 -# 60. incr06.at:19: incremental dumps of nested directories -at_setup_line='incr06.at:19' -at_desc="incremental dumps of nested directories" -$at_quiet $as_echo_n " 60: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_149 +#AT_START_150 +at_fn_group_banner 150 'update02.at:26' \ + "update changed files" " " 20 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "60. incr06.at:19: testing ..." + $as_echo "150. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/incr06.at:22: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/update02.at:29: +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 dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -mkdir dir/c -genfile --file dir/sub/b/file4 +mkdir a +genfile --file a/b -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +tar cf arc a + +echo \"separator\" + +sleep 2 +touch a/b + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 )" -echo incr06.at:22 >"$at_check_line_file" +at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b + +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/update02.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -mkdir dir/c -genfile --file dir/sub/b/file4 +mkdir a +genfile --file a/b -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +tar cf arc a + +echo \"separator\" + +sleep 2 +touch a/b + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir dir/c -genfile --file dir/sub/b/file4 +mkdir a +genfile --file a/b -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Level 0 . sub -./ -sub/ -sub/a/ -sub/b/ -./file1 -sub/file2 -sub/a/file3 -Level 0 sub . -./ -sub/ -sub/a/ -sub/b/ -./file1 -sub/file2 -sub/a/file3 -Level 1 . sub -./ -./c/ -sub/ -sub/a/ -sub/b/ -sub/b/file4 -Level 1 sub . -./ -./c/ -sub/ -sub/a/ -sub/b/ -sub/b/file4 +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr06.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr06.at:22: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/update02.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 * -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -mkdir dir/c -genfile --file dir/sub/b/file4 +mkdir a +genfile --file a/b -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -)" -echo incr06.at:22 >"$at_check_line_file" +tar cf arc a -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +echo \"separator\" + +sleep 2 +touch a/b + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 - -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -mkdir dir/c -genfile --file dir/sub/b/file4 +test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +mkdir a +genfile --file a/b -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 +tar cf arc a -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +echo "separator" -mkdir dir/c -genfile --file dir/sub/b/file4 +sleep 2 +touch a/b -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Level 0 . sub -./ -sub/ -sub/a/ -sub/b/ -./file1 -sub/file2 -sub/a/file3 -Level 0 sub . -./ -sub/ -sub/a/ -sub/b/ -./file1 -sub/file2 -sub/a/file3 -Level 1 . sub -./ -./c/ -sub/ -sub/a/ -sub/b/ -sub/b/file4 -Level 1 sub . -./ -./c/ -sub/ -sub/a/ -sub/b/ -sub/b/file4 +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr06.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/incr06.at:22: + { set +x +$as_echo "$at_srcdir/update02.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22507,32 +37028,25 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -mkdir dir/c -genfile --file dir/sub/b/file4 +mkdir a +genfile --file a/b -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -)" -echo incr06.at:22 >"$at_check_line_file" +tar cf arc a + +echo \"separator\" + +sleep 2 +touch a/b -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22541,248 +37055,259 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir dir/c -genfile --file dir/sub/b/file4 +mkdir a +genfile --file a/b -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/update02.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -mkdir dir/sub/a -mkdir dir/sub/b -genfile --file dir/file1 -genfile --file dir/sub/file2 -genfile --file dir/sub/a/file3 -echo Level 0 . sub -tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 0 sub . -tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -mkdir dir/c -genfile --file dir/sub/b/file4 +mkdir a +genfile --file a/b -echo Level 1 . sub -tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub -echo Level 1 sub . -tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Level 0 . sub -./ -sub/ -sub/a/ -sub/b/ -./file1 -sub/file2 -sub/a/file3 -Level 0 sub . -./ -sub/ -sub/a/ -sub/b/ -./file1 -sub/file2 -sub/a/file3 -Level 1 . sub -./ -./c/ -sub/ -sub/a/ -sub/b/ -sub/b/file4 -Level 1 sub . -./ -./c/ -sub/ -sub/a/ -sub/b/ -sub/b/file4 +tar cf arc a + +echo \"separator\" + +sleep 2 +touch a/b + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b + +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/incr06.at:22" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_60 -#AT_START_61 -# 61. filerem01.at:34: file removed as we read it (ca. 22 seconds) -at_setup_line='filerem01.at:34' -at_desc="file removed as we read it (ca. 22 seconds)" -$at_quiet $as_echo_n " 61: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_150 +#AT_START_151 +at_fn_group_banner 151 'verify.at:25' \ + "verify" " " 21 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "61. filerem01.at:34: testing ..." + $as_echo "151. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/filerem01.at:37: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/verify.at:28: +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 dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 - -genfile --run --checkpoint=3 --unlink dir/file1 -- \\ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ - --checkpoint-action='echo' -c -f archive.tar \\ - --listed-incremental db -v dir >/dev/null +touch foo +tar -cvf archive.tar --verify foo )" -echo filerem01.at:37 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 +touch foo +tar -cvf archive.tar --verify foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +Verify foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -genfile --run --checkpoint=3 --unlink dir/file1 -- \ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ - --checkpoint-action='echo' -c -f archive.tar \ - --listed-incremental db -v dir >/dev/null -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/verify.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 * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 +touch foo +tar -cvf archive.tar --verify foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -genfile --run --checkpoint=3 --unlink dir/file1 -- \ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ - --checkpoint-action='echo' -c -f archive.tar \ - --listed-incremental db -v dir >/dev/null -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new -tar: dir/sub: Directory is new -tar: dir/file1: File removed before we read it +touch foo +tar -cvf archive.tar --verify foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +Verify foo " | \ - $at_diff - "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_func_check_status 1 $at_status "$at_srcdir/filerem01.at:37" - -$at_failed && at_func_log_failure + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/filerem01.at:37: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { set +x +$as_echo "$at_srcdir/verify.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 - -genfile --run --checkpoint=3 --unlink dir/file1 -- \\ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ - --checkpoint-action='echo' -c -f archive.tar \\ - --listed-incremental db -v dir >/dev/null +touch foo +tar -cvf archive.tar --verify foo )" -echo filerem01.at:37 >"$at_check_line_file" +at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +touch foo +tar -cvf archive.tar --verify foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +Verify foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/verify.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 - -genfile --run --checkpoint=3 --unlink dir/file1 -- \ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ - --checkpoint-action='echo' -c -f archive.tar \ - --listed-incremental db -v dir >/dev/null -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +touch foo +tar -cvf archive.tar --verify foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22791,101 +37316,82 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 - -genfile --run --checkpoint=3 --unlink dir/file1 -- \ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ - --checkpoint-action='echo' -c -f archive.tar \ - --listed-incremental db -v dir >/dev/null -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new -tar: dir/sub: Directory is new -tar: dir/file1: File removed before we read it +touch foo +tar -cvf archive.tar --verify foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +Verify foo " | \ - $at_diff - "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_func_check_status 1 $at_status "$at_srcdir/filerem01.at:37" - -$at_failed && at_func_log_failure + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/verify.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +touch foo +tar -cvf archive.tar --verify foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +touch foo +tar -cvf archive.tar --verify foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +Verify foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -# Timing information: -# -# For -Hgnu the above command line takes about 8 seconds to execute and -# produces: -# -# tar: dir: Directory is new -# tar: dir/sub: Directory is new -# dir/ -# tar: Write checkpoint 1 -# tar: Write checkpoint 2 -# dir/sub/ -# tar: Write checkpoint 3 -# tar: Write checkpoint 4 -# dir/file1 -# tar: Write checkpoint 5 -# dir/sub/file2 -# tar: Write checkpoint 6 -# tar: Write checkpoint 7 -# tar: Write checkpoint 8 -# -# For -Hposix the above command line takes about 14 seconds to execute and -# produces: -# -# ./tar: dir: Directory is new -# ./tar: dir/sub: Directory is new -# dir/ -# ./tar: Write checkpoint 1 -# ./tar: Write checkpoint 2 -# ./tar: Write checkpoint 3 -# dir/sub/ -# ./tar: Write checkpoint 4 -# ./tar: Write checkpoint 5 -# ./tar: Write checkpoint 6 -# dir/file1 -# ./tar: Write checkpoint 7 -# ./tar: Write checkpoint 8 -# ./tar: Write checkpoint 9 -# dir/sub/file2 -# ./tar: Write checkpoint 10 -# ./tar: Write checkpoint 11 -# ./tar: Write checkpoint 12 -# ./tar: Write checkpoint 13 -# ./tar: Write checkpoint 14 - - - $at_traceoff + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_61 -#AT_START_62 -# 62. filerem02.at:24: toplevel file removed (ca. 24 seconds) -at_setup_line='filerem02.at:24' -at_desc="toplevel file removed (ca. 24 seconds)" -$at_quiet $as_echo_n " 62: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_151 +#AT_START_152 +at_fn_group_banner 152 'volume.at:24' \ + "volume" " " 22 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "62. filerem02.at:24: testing ..." + $as_echo "152. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/filerem02.at:27: + { set +x +$as_echo "$at_srcdir/volume.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22894,23 +37400,24 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -mkdir dir2 -genfile --file dir2/file1 +tar -cf archive -V label -T /dev/null || exit 1 -genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ - --checkpoint-action='echo' -c -f archive.tar \\ - --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null -)" -echo filerem02.at:27 >"$at_check_line_file" +tar xfV archive label || exit 1 +tar xfV archive 'la?el' || exit 1 +tar xfV archive 'l*l' || exit 1 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +echo 1>&2 ----- +tar xfV archive lab +test \$? = 2 || exit 1 +echo 1>&2 ----- +tar xfV archive bel +test \$? = 2 || exit 1 +echo 1>&2 ----- +tar xfV archive babel +test \$? = 2 +)" +at_fn_check_prepare_notrace 'an embedded newline' "volume.at:27" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22919,167 +37426,303 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -mkdir dir2 -genfile --file dir2/file1 +tar -cf archive -V label -T /dev/null || exit 1 -genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ - --checkpoint-action='echo' -c -f archive.tar \ - --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +tar xfV archive label || exit 1 +tar xfV archive 'la?el' || exit 1 +tar xfV archive 'l*l' || exit 1 + +echo 1>&2 ----- +tar xfV archive lab +test $? = 2 || exit 1 +echo 1>&2 ----- +tar xfV archive bel +test $? = 2 || exit 1 +echo 1>&2 ----- +tar xfV archive babel +test $? = 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: Volume 'label' does not match 'lab' +tar: Error is not recoverable: exiting now +----- +tar: Volume 'label' does not match 'bel' +tar: Error is not recoverable: exiting now +----- +tar: Volume 'label' does not match 'babel' +tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volume.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/volume.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -mkdir dir2 -genfile --file dir2/file1 +tar -cf archive -V label -T /dev/null || exit 1 -genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ - --checkpoint-action='echo' -c -f archive.tar \ - --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_func_check_status 2 $at_status "$at_srcdir/filerem02.at:27" +tar xfV archive label || exit 1 +tar xfV archive 'la?el' || exit 1 +tar xfV archive 'l*l' || exit 1 + +echo 1>&2 ----- +tar xfV archive lab +test \$? = 2 || exit 1 +echo 1>&2 ----- +tar xfV archive bel +test \$? = 2 || exit 1 +echo 1>&2 ----- +tar xfV archive babel +test \$? = 2 +)" +at_fn_check_prepare_notrace 'an embedded newline' "volume.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +tar -cf archive -V label -T /dev/null || exit 1 + +tar xfV archive label || exit 1 +tar xfV archive 'la?el' || exit 1 +tar xfV archive 'l*l' || exit 1 -$at_failed && at_func_log_failure +echo 1>&2 ----- +tar xfV archive lab +test $? = 2 || exit 1 +echo 1>&2 ----- +tar xfV archive bel +test $? = 2 || exit 1 +echo 1>&2 ----- +tar xfV archive babel +test $? = 2 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "----- +tar: Volume 'label' does not match 'lab' +tar: Error is not recoverable: exiting now +----- +tar: Volume 'label' does not match 'bel' +tar: Error is not recoverable: exiting now +----- +tar: Volume 'label' does not match 'babel' +tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volume.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/filerem02.at:27: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_152 +#AT_START_153 +at_fn_group_banner 153 'volsize.at:29' \ + "volume header size" " " 22 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "153. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/volsize.at:32: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -mkdir dir2 -genfile --file dir2/file1 -genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ - --checkpoint-action='echo' -c -f archive.tar \\ - --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null -)" -echo filerem02.at:27 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + +test -z \"\$TEST_DATA_DIR\" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77 + +echo Short Listing +tar tf \$TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf \$TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf \$TEST_DATA_DIR/abc.tar +find abc|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -mkdir dir2 -genfile --file dir2/file1 -genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ - --checkpoint-action='echo' -c -f archive.tar \ - --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + +echo Short Listing +tar tf $TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf $TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf $TEST_DATA_DIR/abc.tar +find abc|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing +abc/not-a-file.gif +abc/CCC +Verbose Listing +V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- +-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC +Extracted directory +abc +abc/CCC +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/volsize.at:32: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir dir -mkdir dir/sub -genfile --file dir/file1 -genfile --file dir/sub/file2 -mkdir dir2 -genfile --file dir2/file1 -genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ - tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ - --checkpoint-action='echo' -c -f archive.tar \ - --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_func_check_status 2 $at_status "$at_srcdir/filerem02.at:27" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -$at_failed && at_func_log_failure -$at_traceon; } +test -z \"\$TEST_DATA_DIR\" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77 +echo Short Listing +tar tf \$TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf \$TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf \$TEST_DATA_DIR/abc.tar +find abc|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -# Ignore stdout and stderr because their contents depend on -# the file system implementation. +test -z "`sort < /dev/null 2>&1`" || exit 77 -# Timing information: see filerem01.at - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_62 -#AT_START_63 -# 63. rename01.at:24: renamed dirs in incrementals -at_setup_line='rename01.at:24' -at_desc="renamed dirs in incrementals" -$at_quiet $as_echo_n " 63: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "63. rename01.at:24: testing ..." - $at_traceon +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + +echo Short Listing +tar tf $TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf $TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf $TEST_DATA_DIR/abc.tar +find abc|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing +abc/not-a-file.gif +abc/CCC +Verbose Listing +V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- +-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC +Extracted directory +abc +abc/CCC +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } + { set +x +$as_echo "$at_srcdir/volsize.at:32: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - { $at_traceoff -$as_echo "$at_srcdir/rename01.at:27: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +test -z \"\$TEST_DATA_DIR\" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77 + +echo Short Listing +tar tf \$TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf \$TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf \$TEST_DATA_DIR/abc.tar +find abc|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * @@ -23087,43 +37730,68 @@ 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 +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo +echo Short Listing +tar tf $TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf $TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf $TEST_DATA_DIR/abc.tar +find abc|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing +abc/not-a-file.gif +abc/CCC +Verbose Listing +V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- +-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC +Extracted directory +abc +abc/CCC +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -mv foo/bar foo/baz + { set +x +$as_echo "$at_srcdir/volsize.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo -mv foo old +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -tar xfg arch.1 /dev/null -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" +test -z \"\$TEST_DATA_DIR\" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77 -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +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 )" -echo rename01.at:27 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * @@ -23131,36 +37799,63 @@ 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 +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo +echo Short Listing +tar tf $TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf $TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf $TEST_DATA_DIR/abc.tar +find abc|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing +abc/not-a-file.gif +abc/CCC +Verbose Listing +V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- +-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC +Extracted directory +abc +abc/CCC +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -mv foo/bar foo/baz + { set +x +$as_echo "$at_srcdir/volsize.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo -mv foo old +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +test -z \"\$TEST_DATA_DIR\" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77 -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_func_filter_trace $? -else - ( :; +echo Short Listing +tar tf \$TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf \$TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf \$TEST_DATA_DIR/abc.tar +find abc|sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -23173,159 +37868,136 @@ 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" +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new -tar: foo/bar: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar' -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating base archive -foo/ -foo/bar/ -foo/file1 -foo/file2 -foo/bar/file -Creating incremental archive -foo/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/file -foo/file1 -foo/file2 -End directory listing 1 -Begin directory listing 2 -foo -foo/baz -foo/baz/file -foo/file1 -foo/file2 -End directory listing 2 +echo Short Listing +tar tf $TEST_DATA_DIR/abc.tar +echo Verbose Listing +tar --utc -tvf $TEST_DATA_DIR/abc.tar +echo Extracted directory +tar xf $TEST_DATA_DIR/abc.tar +find abc|sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing +abc/not-a-file.gif +abc/CCC +Verbose Listing +V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- +-rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC +Extracted directory +abc +abc/CCC " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename01.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename01.at:27: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo -mv foo/bar foo/baz + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_153 +#AT_START_154 +at_fn_group_banner 154 'comprec.at:22' \ + "compressed format recognition" " " 23 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "154. $at_setup_line: testing $at_desc ..." + $at_traceon -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo -mv foo old -tar xfg arch.1 /dev/null -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename01.at:27 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { set +x +$as_echo "$at_srcdir/comprec.at:26: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file +genfile --length 10240 --file file1 +echo \"separator\" +tar cfz archive file1 +echo \"separator\" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo -mv foo/bar foo/baz +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo +genfile --length 10240 --file file1 +echo "separator" +tar cfz archive file1 +echo "separator" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -mv foo old + { set +x +$as_echo "$at_srcdir/comprec.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -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_func_filter_trace $? -else - ( :; +genfile --length 10240 --file file1 +echo \"separator\" +tar cfz archive file1 +echo \"separator\" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23335,76 +38007,86 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file +genfile --length 10240 --file file1 +echo "separator" +tar cfz archive file1 +echo "separator" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo + { set +x +$as_echo "$at_srcdir/comprec.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -mv foo/bar foo/baz -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -mv foo old +genfile --length 10240 --file file1 +echo \"separator\" +tar cfz archive file1 +echo \"separator\" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new -tar: foo/bar: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar' -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating base archive -foo/ -foo/bar/ -foo/file1 -foo/file2 -foo/bar/file -Creating incremental archive -foo/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/file -foo/file1 -foo/file2 -End directory listing 1 -Begin directory listing 2 -foo -foo/baz -foo/baz/file -foo/file1 -foo/file2 -End directory listing 2 +genfile --length 10240 --file file1 +echo "separator" +tar cfz archive file1 +echo "separator" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +file1 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename01.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename01.at:27: + { set +x +$as_echo "$at_srcdir/comprec.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23414,41 +38096,18 @@ 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\" +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +genfile --length 10240 --file file1 +echo \"separator\" +tar cfz archive file1 +echo \"separator\" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 )" -echo rename01.at:27 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23458,236 +38117,319 @@ 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 +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo +genfile --length 10240 --file file1 +echo "separator" +tar cfz archive file1 +echo "separator" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -mv foo old + { set +x +$as_echo "$at_srcdir/comprec.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +genfile --length 10240 --file file1 +echo \"separator\" +tar cfz archive file1 +echo \"separator\" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +)" +at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +genfile --length 10240 --file file1 +echo "separator" +tar cfz archive file1 +echo "separator" +mv file1 orig +tar xfv archive --warning=no-timestamp +cmp orig file1 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_154 +#AT_START_155 +at_fn_group_banner 155 'shortfile.at:26' \ + "short input files" " " 23 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "155. $at_setup_line: testing $at_desc ..." + $at_traceon -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" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new -tar: foo/bar: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar' + + { set +x +$as_echo "$at_srcdir/shortfile.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +genfile --length 511 --file foo || exit 5 +tar tf foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortfile.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile --length 511 --file foo || exit 5 +tar tf foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: This does not look like a tar archive +tar: Exiting with failure status due to previous errors " | \ $at_diff - "$at_stderr" || at_failed=: -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_func_check_status 0 $at_status "$at_srcdir/rename01.at:27" - -$at_failed && at_func_log_failure +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 + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_63 -#AT_START_64 -# 64. rename02.at:24: move between hierarchies -at_setup_line='rename02.at:24' -at_desc="move between hierarchies" -$at_quiet $as_echo_n " 64: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_155 +#AT_START_156 +at_fn_group_banner 156 'shortupd.at:31' \ + "updating short archives" " " 23 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "64. rename02.at:24: testing ..." + $as_echo "156. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/rename02.at:27: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/shortupd.at:34: +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 * +touch foo +tar uf archive foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -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 +touch foo +tar uf archive foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/shortupd.at:34: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -mv foo/bar/baz foo +touch foo +tar uf archive foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo +touch foo +tar uf archive foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/shortupd.at:34: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -mv foo old +touch foo +tar uf archive foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 +touch foo +tar uf archive foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/shortupd.at:34: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" +touch foo +tar uf archive foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename02.at:27 >"$at_check_line_file" +touch foo +tar uf archive foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/shortupd.at:34: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z - -sleep 1 - -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo - -mv foo/bar/baz foo - -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo - -mv foo old - -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 - -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" - -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +touch foo +tar uf archive foo +)" +at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -23696,92 +38438,94 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +touch foo +tar uf archive foo +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_156 +#AT_START_157 +at_fn_group_banner 157 'truncate.at:29' \ + "truncate" " " 23 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "157. $at_setup_line: testing $at_desc ..." + $at_traceon -mv foo/bar/baz foo -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo -mv foo old -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" + { set +x +$as_echo "$at_srcdir/truncate.at:32: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new -tar: foo/bar: Directory is new -tar: foo/bar/baz: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar/baz' +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: \$? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar)" +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: $? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating base archive -foo/ -foo/bar/ -foo/bar/baz/ -foo/file1 -foo/file2 -foo/bar/file.r -foo/bar/baz/file.z -Creating incremental archive -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/baz -foo/bar/baz/file.z -foo/bar/file.r -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 2 +echo >>"$at_stdout"; $as_echo "foo +baz +Exit status: 1 +separator foo -foo/bar -foo/bar/file.r -foo/baz -foo/baz/file.z -foo/file1 -foo/file2 -End directory listing 2 +foo: Mod time differs +baz " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename02.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename02.at:27: + { set +x +$as_echo "$at_srcdir/truncate.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23790,46 +38534,15 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z - -sleep 1 - -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo - -mv foo/bar/baz foo - -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo - -mv foo old - -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 - -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" - -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename02.at:27 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: \$? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar)" +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23838,186 +38551,354 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: $? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +Exit status: 1 +separator +foo +foo: Mod time differs +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + { set +x +$as_echo "$at_srcdir/truncate.at:32: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: \$? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar)" +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -mv foo/bar/baz foo +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: $? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +Exit status: 1 +separator +foo +foo: Mod time differs +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo + { set +x +$as_echo "$at_srcdir/truncate.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -mv foo old +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: \$? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar)" +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: $? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +Exit status: 1 +separator +foo +foo: Mod time differs +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" + { set +x +$as_echo "$at_srcdir/truncate.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: \$? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar)" +at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +genfile --file foo --length 200k +genfile --file baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz +echo Exit status: $? +echo separator +genfile --file foo --seek 195k --length 5k --pattern=zeros +tar dvf bar) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +Exit status: 1 +separator +foo +foo: Mod time differs +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_157 +#AT_START_158 +at_fn_group_banner 158 'grow.at:24' \ + "grow" " " 23 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "158. $at_setup_line: testing $at_desc ..." + $at_traceon -mv foo/bar/baz foo -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo -mv foo old -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" + { set +x +$as_echo "$at_srcdir/grow.at:27: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new -tar: foo/bar: Directory is new -tar: foo/bar/baz: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar/baz' +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +)" +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating base archive -foo/ -foo/bar/ -foo/bar/baz/ -foo/file1 -foo/file2 -foo/bar/file.r -foo/bar/baz/file.z -Creating incremental archive -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/baz -foo/bar/baz/file.z -foo/bar/file.r -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 2 -foo -foo/bar -foo/bar/file.r -foo/baz -foo/baz/file.z -foo/file1 -foo/file2 -End directory listing 2 +echo >>"$at_stdout"; $as_echo "foo +baz " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename02.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename02.at:27: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { set +x +$as_echo "$at_srcdir/grow.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +)" +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -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 +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo + { set +x +$as_echo "$at_srcdir/grow.at:27: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -mv foo old +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +)" +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" + { set +x +$as_echo "$at_srcdir/grow.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz )" -echo rename02.at:27 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -24026,222 +38907,340 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -test -z "`sort < /dev/null 2>&1`" || exit 77 + { set +x +$as_echo "$at_srcdir/grow.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -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 +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +)" +at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -sleep 1 +genfile --file foo --length 50000k +genfile --file baz +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_158 +#AT_START_159 +at_fn_group_banner 159 'sigpipe.at:21' \ + "sigpipe handling" " " 23 +at_xfail=no +( + $as_echo "159. $at_setup_line: testing $at_desc ..." + $at_traceon -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * +# Description: Tar 1.23 ignored sigpipe which lead to spurious "write +# error" diagnostics when piping output to another programs. +# Reported-by: "Dmitry V. Levin" +# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html +# <20100319184141.GC30047@wo.int.altlinux.org> +{ set +x +$as_echo "$at_srcdir/sigpipe.at:30: -test -z "`sort < /dev/null 2>&1`" || exit 77 +case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #( +?*) exit 77;; +esac -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 +genfile --length 2048 --file first +genfile --length 2048 --file second +genfile --length 2049 --file third -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo +tar cf archive first second third -mv foo/bar/baz foo +# Discard diagnostics that some shells generate about broken pipes. +(tar tf archive 2>&3 | :) 3>&2 2>/dev/null +" +at_fn_check_prepare_notrace 'a `...` command substitution' "sigpipe.at:30" +( $at_check_trace; -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo +case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #( +?*) exit 77;; +esac -mv foo old -tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr -sort tmperr >&2 +genfile --length 2048 --file first +genfile --length 2048 --file second +genfile --length 2049 --file third -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +tar cf archive first second third -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new -tar: foo/bar: Directory is new -tar: foo/bar/baz: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar/baz' -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating base archive -foo/ -foo/bar/ -foo/bar/baz/ -foo/file1 -foo/file2 -foo/bar/file.r -foo/bar/baz/file.z -Creating incremental archive -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/baz -foo/bar/baz/file.z -foo/bar/file.r -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 2 -foo -foo/bar -foo/bar/file.r -foo/baz -foo/baz/file.z -foo/file1 -foo/file2 -End directory listing 2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename02.at:27" +# Discard diagnostics that some shells generate about broken pipes. +(tar tf archive 2>&3 | :) 3>&2 2>/dev/null -$at_failed && at_func_log_failure +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sigpipe.at:30" +$at_failed && at_fn_log_failure $at_traceon; } - - - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_64 -#AT_START_65 -# 65. rename03.at:23: cyclic renames -at_setup_line='rename03.at:23' -at_desc="cyclic renames" -$at_quiet $as_echo_n " 65: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_159 +#AT_START_160 +at_fn_group_banner 160 'comperr.at:18' \ + "compressor program failure" " " 23 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "65. rename03.at:23: testing ..." + $as_echo "160. $at_setup_line: testing $at_desc ..." $at_traceon +# Description: If the --use-compress-program fails, then it is unsafe +# to assume that the created archive is OK. Tar should fail with a +# prominent error message. +# Reported by: Ole Tange +# References: , +# http://lists.gnu.org/archive/html/bug-tar/2015-03/msg00002.html - { $at_traceoff -$as_echo "$at_srcdir/rename03.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + { set +x +$as_echo "$at_srcdir/comperr.at:28: +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 * +tar --use-compress-program false -cf a.tar . 2>err +rc=\$? +sed -n '\$p' err +exit \$rc +)" +at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - +tar --use-compress-program false -cf a.tar . 2>err +rc=$? +sed -n '$p' err +exit $rc +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 + { set +x +$as_echo "$at_srcdir/comperr.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -mkdir foo/a -genfile --file foo/a/filea +tar --use-compress-program false -cf a.tar . 2>err +rc=\$? +sed -n '\$p' err +exit \$rc +)" +at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -mkdir foo/b -genfile --file foo/b/fileb +tar --use-compress-program false -cf a.tar . 2>err +rc=$? +sed -n '$p' err +exit $rc +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -mkdir foo/c -genfile --file foo/c/filec + { set +x +$as_echo "$at_srcdir/comperr.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -sleep 1 +tar --use-compress-program false -cf a.tar . 2>err +rc=\$? +sed -n '\$p' err +exit \$rc +)" +at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -echo \"First dump\" -echo \"First dump\">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 +tar --use-compress-program false -cf a.tar . 2>err +rc=$? +sed -n '$p' err +exit $rc +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -# Shuffle directories: -(cd foo -mv a \$\$ -mv c a -mv b c -mv \$\$ b) + { set +x +$as_echo "$at_srcdir/comperr.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -echo \"Second dump\" -echo \"Second dump\" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 +tar --use-compress-program false -cf a.tar . 2>err +rc=\$? +sed -n '\$p' err +exit \$rc +)" +at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null --warning=no-timestamp +tar --use-compress-program false -cf a.tar . 2>err +rc=$? +sed -n '$p' err +exit $rc +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" + { set +x +$as_echo "$at_srcdir/comperr.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +tar --use-compress-program false -cf a.tar . 2>err +rc=\$? +sed -n '\$p' err +exit \$rc )" -echo rename03.at:26 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24250,673 +39249,710 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +tar --use-compress-program false -cf a.tar . 2>err +rc=$? +sed -n '$p' err +exit $rc +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_160 +#AT_START_161 +at_fn_group_banner 161 'remfiles01.at:28' \ + "remove-files with compression" " " 24 +at_xfail=no +( + $as_echo "161. $at_setup_line: testing $at_desc ..." + $at_traceon -mkdir foo/b -genfile --file foo/b/fileb -mkdir foo/c -genfile --file foo/c/filec -sleep 1 +unset TAR_OPTIONS +{ set +x +$as_echo "$at_srcdir/remfiles01.at:32: -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 && exit 77 -# 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 +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -tar xfg arch.1 /dev/null --warning=no-timestamp -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #( +?*) exit 77;; +esac -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir dir +cd dir +genfile --file a --length 0 +chmod 0 a +genfile --file b +mkdir c -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 +# Depending on when the SIGPIPE gets delivered, the invocation below +# may finish with either +# tar: a: Cannot write: Broken pipe +# or +# tar: Child returned status 2 -mkdir foo/a -genfile --file foo/a/filea +# Discard diagnostics that some shells generate about broken pipes, +# and discard all of tar's diagnostics except for the ones saying \"(child)\". +# Gzip's exit code is propagated to the shell. Usually it is 141. +# Convert all non-zero exits to 2 to make it predictable. +(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null +EC=\$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +exit \$EC +" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles01.at:32" +( $at_check_trace; -mkdir foo/b -genfile --file foo/b/fileb +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -mkdir foo/c -genfile --file foo/c/filec -sleep 1 +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -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) +case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #( +?*) exit 77;; +esac -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null --warning=no-timestamp +test -z "`sort < /dev/null 2>&1`" || exit 77 -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "First dump -tar: foo/a: Directory is new -tar: foo/b: Directory is new -tar: foo/c: Directory is new -tar: foo: Directory is new -Second dump -tar: foo/a: Directory has been renamed from \`foo/c' -tar: foo/b: Directory has been renamed from \`foo/a' -tar: foo/c: Directory has been renamed from \`foo/b' +mkdir dir +cd dir +genfile --file a --length 0 +chmod 0 a +genfile --file b +mkdir c + +# Depending on when the SIGPIPE gets delivered, the invocation below +# may finish with either +# tar: a: Cannot write: Broken pipe +# or +# tar: Child returned status 2 + +# Discard diagnostics that some shells generate about broken pipes, +# and discard all of tar's diagnostics except for the ones saying "(child)". +# Gzip's exit code is propagated to the shell. Usually it is 141. +# Convert all non-zero exits to 2 to make it predictable. +(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null +EC=$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +exit $EC + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Permission denied +tar (child): Error is not recoverable: exiting now " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "First dump -foo/ -foo/a/ -foo/b/ -foo/c/ -foo/file1 -foo/file2 -foo/a/filea -foo/b/fileb -foo/c/filec -Second dump -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 1 -foo -foo/a -foo/a/filea -foo/b -foo/b/fileb -foo/c -foo/c/filec -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 2 -foo -foo/a -foo/a/filec -foo/b -foo/b/filea -foo/c -foo/c/fileb -foo/file1 -foo/file2 -End directory listing 2 +echo >>"$at_stdout"; $as_echo ". +./a +./b +./c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 2 $at_status "$at_srcdir/remfiles01.at:32" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename03.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_161 +#AT_START_162 +at_fn_group_banner 162 'remfiles02.at:28' \ + "remove-files with compression: grand-child" " " 24 +at_xfail=no +( + $as_echo "162. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +unset TAR_OPTIONS +{ set +x +$as_echo "$at_srcdir/remfiles02.at:32: + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -test -z "`sort < /dev/null 2>&1`" || exit 77 +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 dir +cd dir +mkdir a +genfile --file b +mkdir c -mkdir foo/b -genfile --file foo/b/fileb +tar -c -f a -z --remove-files b c 2>err +EC=\$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +exit \$EC +" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles02.at:32" +( $at_check_trace; -mkdir foo/c -genfile --file foo/c/filec +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -sleep 1 -echo \"First dump\" -echo \"First dump\">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 +test -z "`sort < /dev/null 2>&1`" || exit 77 -# 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 +mkdir dir +cd dir +mkdir a +genfile --file b +mkdir c -tar xfg arch.1 /dev/null --warning=no-timestamp +tar -c -f a -z --remove-files b c 2>err +EC=$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +exit $EC -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Is a directory +tar (child): Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./b +./c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/remfiles02.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename03.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_162 +#AT_START_163 +at_fn_group_banner 163 'remfiles03.at:28' \ + "remove-files with symbolic links" " " 24 +at_xfail=no +( + $as_echo "163. $at_setup_line: testing $at_desc ..." + $at_traceon -test -z "`sort < /dev/null 2>&1`" || exit 77 +{ set +x +$as_echo "$at_srcdir/remfiles03.at:31: +mkdir a +mkdir a/b +ln -s b a/c || exit 77 +tar --remove-files -cf a.tar a +genfile --stat a +" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles03.at:31" +( $at_check_trace; +mkdir a +mkdir a/b +ln -s b a/c || exit 77 +tar --remove-files -cf a.tar a +genfile --stat a -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "genfile: stat(a) failed: No such file or directory +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles03.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -mkdir foo/a -genfile --file foo/a/filea -mkdir foo/b -genfile --file foo/b/fileb + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_163 +#AT_START_164 +at_fn_group_banner 164 'remfiles04a.at:25' \ + "remove-files with -C:rel in -c/non-incr. mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "164. $at_setup_line: testing $at_desc ..." + $at_traceon -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 + { set +x +$as_echo "$at_srcdir/remfiles04a.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null --warning=no-timestamp -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir foo +echo bar > bar +echo foobar > foo/bar +tar -cf foo.tar --remove-files -C foo bar +echo A +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04a.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +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 +echo bar > bar +echo foobar > foo/bar +tar -cf foo.tar --remove-files -C foo bar +echo A +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +. +./bar +./foo +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles04a.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_164 +#AT_START_165 +at_fn_group_banner 165 'remfiles04b.at:33' \ + "remove-files with -C:rel in -c/incr. mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "165. $at_setup_line: testing $at_desc ..." + $at_traceon -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null --warning=no-timestamp -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" + { set +x +$as_echo "$at_srcdir/remfiles04b.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "First dump -tar: foo/a: Directory is new -tar: foo/b: Directory is new -tar: foo/c: Directory is new -tar: foo: Directory is new -Second dump -tar: foo/a: Directory has been renamed from \`foo/c' -tar: foo/b: Directory has been renamed from \`foo/a' -tar: foo/c: Directory has been renamed from \`foo/b' -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "First dump -foo/ -foo/a/ -foo/b/ -foo/c/ -foo/file1 -foo/file2 -foo/a/filea -foo/b/fileb -foo/c/filec -Second dump -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 1 -foo -foo/a -foo/a/filea -foo/b -foo/b/fileb -foo/c -foo/c/filec -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 2 -foo -foo/a -foo/a/filec -foo/b -foo/b/filea -foo/c -foo/c/fileb -foo/file1 -foo/file2 -End directory listing 2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename03.at:26" -$at_failed && at_func_log_failure -$at_traceon; } +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - { $at_traceoff -$as_echo "$at_srcdir/rename03.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir foo +echo bar > bar +echo foobar > foo/bar +tar -cf foo.tar --incremental --remove-files -C foo bar +echo A +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04b.at:36" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +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 +echo bar > bar +echo foobar > foo/bar +tar -cf foo.tar --incremental --remove-files -C foo bar +echo A +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +. +./bar +./foo +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles04b.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_165 +#AT_START_166 +at_fn_group_banner 166 'remfiles04c.at:33' \ + "remove-files with -C:rel in -r mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "166. $at_setup_line: testing $at_desc ..." + $at_traceon -echo \"First dump\" -echo \"First dump\">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 -# Shuffle directories: -(cd foo -mv a \$\$ -mv c a -mv b c -mv \$\$ b) -echo \"Second dump\" -echo \"Second dump\" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null --warning=no-timestamp -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" + { set +x +$as_echo "$at_srcdir/remfiles04c.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename03.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir foo +echo bar > bar +echo foobar > foo/bar +tar -cf foo.tar -C foo bar +echo A +find . | sort +tar -rf foo.tar --remove-files -C foo bar +echo B +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04c.at:36" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +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 +echo bar > bar +echo foobar > foo/bar +tar -cf foo.tar -C foo bar +echo A +find . | sort +tar -rf foo.tar --remove-files -C foo bar +echo B +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +. +./bar +./foo +./foo.tar +./foo/bar +B +. +./bar +./foo +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles04c.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_166 +#AT_START_167 +at_fn_group_banner 167 'remfiles05a.at:34' \ + "remove-files with -C:rel,rel in -c/non-incr. mode" "" 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "167. $at_setup_line: testing $at_desc ..." + $at_traceon -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null --warning=no-timestamp -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" + { set +x +$as_echo "$at_srcdir/remfiles05a.at:37: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +decho A +tar -cvf foo.tar --remove-files -C foo file -C ../bar file +decho B +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05a.at:37" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +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 bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +decho A +tar -cvf foo.tar --remove-files -C foo file -C ../bar file +decho B +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +file +file +B +. +./bar +./file +./foo +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles05a.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_167 +#AT_START_168 +at_fn_group_banner 168 'remfiles05b.at:25' \ + "remove-files with -C:rel,rel in -c/incr. mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "168. $at_setup_line: testing $at_desc ..." + $at_traceon -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null --warning=no-timestamp -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" + { set +x +$as_echo "$at_srcdir/remfiles05b.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null --warning=no-timestamp -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "First dump -tar: foo/a: Directory is new -tar: foo/b: Directory is new -tar: foo/c: Directory is new -tar: foo: Directory is new -Second dump -tar: foo/a: Directory has been renamed from \`foo/c' -tar: foo/b: Directory has been renamed from \`foo/a' -tar: foo/c: Directory has been renamed from \`foo/b' + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +decho A +tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file +decho B +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05b.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +decho A +tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file +decho B +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "First dump -foo/ -foo/a/ -foo/b/ -foo/c/ -foo/file1 -foo/file2 -foo/a/filea -foo/b/fileb -foo/c/filec -Second dump -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 1 -foo -foo/a -foo/a/filea -foo/b -foo/b/fileb -foo/c -foo/c/filec -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 2 -foo -foo/a -foo/a/filec -foo/b -foo/b/filea -foo/c -foo/c/fileb -foo/file1 -foo/file2 -End directory listing 2 +echo >>"$at_stdout"; $as_echo "A +file +file +B +. +./bar +./file +./foo +./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename03.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/remfiles05b.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_65 -#AT_START_66 -# 66. rename04.at:27: renamed directory containing subdirectories -at_setup_line='rename04.at:27' -at_desc="renamed directory containing subdirectories" -$at_quiet $as_echo_n " 66: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_168 +#AT_START_169 +at_fn_group_banner 169 'remfiles05c.at:25' \ + "remove-files with -C:rel,rel in -r mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "66. rename04.at:27: testing ..." + $as_echo "169. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/rename04.at:30: + { set +x +$as_echo "$at_srcdir/remfiles05c.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24926,39 +39962,23 @@ 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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +tar -cf foo.tar -C foo file -C ../bar file +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files -C foo file -C ../bar file +decho C +find . | sort )" -echo rename04.at:30 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05c.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24970,427 +39990,543 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +tar -cf foo.tar -C foo file -C ../bar file +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files -C foo file -C ../bar file +decho C +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +C +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +. +./bar +./bar/file +./file +./foo +./foo.tar +./foo/file +B +file +file +C +. +./bar +./file +./foo +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles05c.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_169 +#AT_START_170 +at_fn_group_banner 170 'remfiles06a.at:25' \ + "remove-files with -C:rel,abs in -c/non-incr. mode" "" 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "170. $at_setup_line: testing $at_desc ..." + $at_traceon -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_func_filter_trace $? -else - ( :; + + + { set +x +$as_echo "$at_srcdir/remfiles06a.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=\`pwd\` +decho A +tar -cvf foo.tar --remove-files -C foo file -C \$DIR/bar file +decho B +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06a.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +test -z "`sort < /dev/null 2>&1`" || exit 77 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=`pwd` +decho A +tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file +decho B +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir +echo >>"$at_stdout"; $as_echo "A +file +file +B +. +./bar +./file +./foo +./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename04.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/remfiles06a.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename04.at:30: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_170 +#AT_START_171 +at_fn_group_banner 171 'remfiles06b.at:25' \ + "remove-files with -C:rel,abs in -c/incr. mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "171. $at_setup_line: testing $at_desc ..." + $at_traceon -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 + { set +x +$as_echo "$at_srcdir/remfiles06b.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -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 rename04.at:30 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=\`pwd\` +decho A +tar -cvf foo.tar --incremental --remove-files -C foo file -C \$DIR/bar file +decho B +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06b.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=`pwd` +decho A +tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file +decho B +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +file +file +B +. +./bar +./file +./foo +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles06b.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_171 +#AT_START_172 +at_fn_group_banner 172 'remfiles06c.at:25' \ + "remove-files with -C:rel,abs in -r mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "172. $at_setup_line: testing $at_desc ..." + $at_traceon -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_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + + { set +x +$as_echo "$at_srcdir/remfiles06c.at:28: +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 * -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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=\`pwd\` +tar -cf foo.tar -C foo file -C \$DIR/bar file +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files -C foo file -C \$DIR/bar file +decho C +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06c.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +test -z "`sort < /dev/null 2>&1`" || exit 77 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=`pwd` +tar -cf foo.tar -C foo file -C $DIR/bar file +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file +decho C +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +C " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir +echo >>"$at_stdout"; $as_echo "A +. +./bar +./bar/file +./file +./foo +./foo.tar +./foo/file +B +file +file +C +. +./bar +./file +./foo +./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename04.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/remfiles06c.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename04.at:30: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_172 +#AT_START_173 +at_fn_group_banner 173 'remfiles07a.at:25' \ + "remove-files with -C:abs,rel in -c/non-incr. mode" "" 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "173. $at_setup_line: testing $at_desc ..." + $at_traceon -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 + { set +x +$as_echo "$at_srcdir/remfiles07a.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -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 rename04.at:30 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=\`pwd\` +decho A +tar -cvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file +decho B +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07a.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=`pwd` +decho A +tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file +decho B +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +file +file +B +. +./bar +./file +./foo +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles07a.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_173 +#AT_START_174 +at_fn_group_banner 174 'remfiles07b.at:25' \ + "remove-files with -C:abs,rel in -c/incr. mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "174. $at_setup_line: testing $at_desc ..." + $at_traceon -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + + + { set +x +$as_echo "$at_srcdir/remfiles07b.at:28: +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 * -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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=\`pwd\` +decho A +tar -cvf foo.tar --incremental --remove-files -C \$DIR/foo file -C ../bar file +decho B +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07b.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +test -z "`sort < /dev/null 2>&1`" || exit 77 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=`pwd` +decho A +tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file +decho B +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir +echo >>"$at_stdout"; $as_echo "A +file +file +B +. +./bar +./file +./foo +./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename04.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/remfiles07b.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_66 -#AT_START_67 -# 67. rename05.at:24: renamed subdirectories -at_setup_line='rename05.at:24' -at_desc="renamed subdirectories" -$at_quiet $as_echo_n " 67: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_174 +#AT_START_175 +at_fn_group_banner 175 'remfiles07c.at:25' \ + "remove-files with -C:abs,rel in -r mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "67. rename05.at:24: testing ..." + $as_echo "175. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/rename05.at:27: + { set +x +$as_echo "$at_srcdir/remfiles07c.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -25400,40 +40536,24 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=\`pwd\` +tar -cf foo.tar -C \$DIR/foo file -C ../bar file +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file +decho C +find . | sort )" -echo rename05.at:27 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07c.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -25445,36 +40565,93 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir foo +mkdir bar +echo file > file +echo foo/file > foo/file +echo bar/file > bar/file +DIR=`pwd` +tar -cf foo.tar -C $DIR/foo file -C ../bar file +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file +decho C +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +C +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +. +./bar +./bar/file +./file +./foo +./foo.tar +./foo/file +B +file +file +C +. +./bar +./file +./foo +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles07c.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_175 +#AT_START_176 +at_fn_group_banner 176 'remfiles08a.at:28' \ + "remove-files deleting two subdirs in -c/non-incr. mode" "" 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "176. $at_setup_line: testing $at_desc ..." + $at_traceon -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + + + { set +x +$as_echo "$at_srcdir/remfiles08a.at:31: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir foo +mkdir bar +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +decho A +tar -cvf foo.tar --remove-files -C foo . -C ../bar . +decho B +find . +)" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles08a.at:31" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -25483,397 +40660,482 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir foo +mkdir bar +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +decho A +tar -cvf foo.tar --remove-files -C foo . -C ../bar . +decho B +find . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +./ +./foo_file +./ +./bar_file +B +. +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles08a.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_176 +#AT_START_177 +at_fn_group_banner 177 'remfiles08b.at:31' \ + "remove-files deleting two subdirs in -c/incr. mode" "" 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "177. $at_setup_line: testing $at_desc ..." + $at_traceon -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore + { set +x +$as_echo "$at_srcdir/remfiles08b.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir foo +mkdir bar +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +decho A +tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar . +decho B +find . +)" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles08b.at:34" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir foo +mkdir bar +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +decho A +tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar . +decho B +find . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +tar: .: Directory is new +tar: .: Directory is new +B " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir.0 +echo >>"$at_stdout"; $as_echo "A +./ +./ +./foo_file +./bar_file +B +. +./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename05.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/remfiles08b.at:34" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename05.at:27: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_177 +#AT_START_178 +at_fn_group_banner 178 'remfiles08c.at:28' \ + "remove-files deleting two subdirs in -r mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "178. $at_setup_line: testing $at_desc ..." + $at_traceon -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 + { set +x +$as_echo "$at_srcdir/remfiles08c.at:31: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort -)" -echo rename05.at:27 >"$at_check_line_file" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +mkdir foo +mkdir bar +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +tar -cf foo.tar -C foo . -C ../bar . +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files -C foo . -C ../bar . +decho C +find . +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:31" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir foo +mkdir bar +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +tar -cf foo.tar -C foo . -C ../bar . +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files -C foo . -C ../bar . +decho C +find . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +C +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +. +./bar +./bar/bar_file +./foo +./foo.tar +./foo/foo_file +B +./ +./foo_file +./ +./bar_file +C +. +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles08c.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_178 +#AT_START_179 +at_fn_group_banner 179 'remfiles09a.at:25' \ + "remove-files on full directory in -c/non-incr. mode" "" 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "179. $at_setup_line: testing $at_desc ..." + $at_traceon -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + + { set +x +$as_echo "$at_srcdir/remfiles09a.at:28: +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 * +mkdir foo +echo foo/file > foo/file +decho A +tar -cvf foo.tar --remove-files foo +decho B +find . +)" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles09a.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort - -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore +mkdir foo +echo foo/file > foo/file +decho A +tar -cvf foo.tar --remove-files foo +decho B +find . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir.0 +echo >>"$at_stdout"; $as_echo "A +foo/ +foo/file +B +. +./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename05.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/remfiles09a.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/rename05.at:27: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_179 +#AT_START_180 +at_fn_group_banner 180 'remfiles09b.at:29' \ + "remove-files on full directory in -c/incr. mode" "" 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "180. $at_setup_line: testing $at_desc ..." + $at_traceon -decho Creating initial archive -tar -cf archive.1 -g db.1 directory -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort + { set +x +$as_echo "$at_srcdir/remfiles09b.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort +mkdir foo +echo foo/file > foo/file +decho A +tar -cvf foo.tar --incremental --remove-files foo +decho B +find . )" -echo rename05.at:27 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +at_fn_check_prepare_notrace 'an embedded newline' "remfiles09b.at:32" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir foo +echo foo/file > foo/file +decho A +tar -cvf foo.tar --incremental --remove-files foo +decho B +find . +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +tar: foo: Directory is new +B +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +foo/ +foo/file +B +. +./foo.tar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/remfiles09b.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_180 +#AT_START_181 +at_fn_group_banner 181 'remfiles09c.at:25' \ + "remove-files on full directory in -r mode" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "181. $at_setup_line: testing $at_desc ..." + $at_traceon -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { set +x +$as_echo "$at_srcdir/remfiles09c.at:28: +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 * -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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +mkdir foo +echo foo/file > foo/file +tar -cf foo.tar foo +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files foo +decho C +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles09c.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 --warning=no-timestamp -find directory | sort +test -z "`sort < /dev/null 2>&1`" || exit 77 -decho Second restore -tar -xf archive.2 -g db.2 --warning=no-timestamp -find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore +mkdir foo +echo foo/file > foo/file +tar -cf foo.tar foo +decho A +find . | sort +decho B +tar -rvf foo.tar --remove-files foo +decho C +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +B +C " | \ $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir.0 +echo >>"$at_stdout"; $as_echo "A +. +./foo +./foo.tar +./foo/file +B +foo/ +foo/file +C +. +./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/rename05.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/remfiles09c.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_67 -#AT_START_68 -# 68. chtype.at:27: changed file types in incrementals -at_setup_line='chtype.at:27' -at_desc="changed file types in incrementals" -$at_quiet $as_echo_n " 68: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_181 +#AT_START_182 +at_fn_group_banner 182 'remfiles10.at:20' \ + "remove-files" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "68. chtype.at:27: testing ..." + $as_echo "182. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/chtype.at:30: + { set +x +$as_echo "$at_srcdir/remfiles10.at:23: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -25882,145 +41144,185 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +mkdir foo +echo foo/file > foo/file +decho A +(cd foo && tar -cvf ../foo.tar --remove-files .) +tar_status=\$? +decho B +find foo +exit \$tar_status +)" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles10.at:23" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir foo +echo foo/file > foo/file +decho A +(cd foo && tar -cvf ../foo.tar --remove-files .) +tar_status=$? +decho B +find foo +exit $tar_status +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +tar: .: Cannot rmdir: Invalid argument +tar: Exiting with failure status due to previous errors +B +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +./ +./file +B +foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/remfiles10.at:23" +$at_failed && at_fn_log_failure +$at_traceon; } -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 + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_182 +#AT_START_183 +at_fn_group_banner 183 'xattr01.at:25' \ + "xattrs: basic functionality" " " 25 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "183. $at_setup_line: testing $at_desc ..." + $at_traceon -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory -# Delete a -rm -r directory -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -)" -echo chtype.at:30 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/xattr01.at:28: +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 * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory -sleep 2 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -# 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -# Delete a -rm -r directory +mkdir dir +genfile --file dir/file -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^\$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" 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 + file=$(TMPDIR=. mktemp fiXXXXXX) -sleep 2 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -# 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 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -# Delete a -rm -r directory -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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 + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + +mkdir dir +genfile --file dir/file + +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\" +user.test=\"OurFileValue\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/chtype.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/chtype.at:30: + { set +x +$as_echo "$at_srcdir/xattr01.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26030,41 +41332,45 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory -sleep 2 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -# 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -# Delete a -rm -r directory +mkdir dir +genfile --file dir/file -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -)" -echo chtype.at:30 >"$at_check_line_file" +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^\$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26074,100 +41380,165 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory -sleep 2 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -# 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 + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -# Delete a -rm -r directory +mkdir dir +genfile --file dir/file -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\" +user.test=\"OurFileValue\" +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/xattr01.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory -sleep 2 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -# 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -# Delete a -rm -r directory +mkdir dir +genfile --file dir/file -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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 +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^\$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + +mkdir dir +genfile --file dir/file + +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\" +user.test=\"OurFileValue\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/chtype.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/chtype.at:30: + { set +x +$as_echo "$at_srcdir/xattr01.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26177,41 +41548,45 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory -sleep 2 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -# 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -# Delete a -rm -r directory +mkdir dir +genfile --file dir/file -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -)" -echo chtype.at:30 >"$at_check_line_file" +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +getfattr -h -d dir | grep -v -e '^#' -e ^\$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26221,124 +41596,186 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory -sleep 2 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -# 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 + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -# Delete a -rm -r directory +mkdir dir +genfile --file dir/file -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\" +user.test=\"OurFileValue\" +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/xattr01.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory -sleep 2 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -# 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -# Delete a -rm -r directory +mkdir dir +genfile --file dir/file -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp -find directory | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_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 +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^\$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + +mkdir dir +genfile --file dir/file + +setfattr -n user.test -v OurDirValue dir +setfattr -n user.test -v OurFileValue dir/file + +tar --xattrs -cf archive.tar dir + +rm -rf dir +tar --xattrs -xf archive.tar + +getfattr -h -d dir | grep -v -e '^#' -e ^$ +getfattr -h -d dir/file | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\" +user.test=\"OurFileValue\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/chtype.at:30" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_68 -#AT_START_69 -# 69. ignfail.at:23: ignfail -at_setup_line='ignfail.at:23' -at_desc="ignfail" -$at_quiet $as_echo_n " 69: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_183 +#AT_START_184 +at_fn_group_banner 184 'xattr02.at:25' \ + "xattrs: change directory with -C option" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "69. ignfail.at:23: testing ..." + $as_echo "184. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/ignfail.at:26: + { set +x +$as_echo "$at_srcdir/xattr02.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -26347,53 +41784,53 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -touch file -mkdir directory -touch directory/file + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 -)" -echo ignfail.at:26 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +rm -rf dir + +tar --xattrs -xf archive.tar + +getfattr -h -d file1 | grep -v -e '^#' -e ^\$ +getfattr -h -d file2 | grep -v -e '^#' -e ^\$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -26402,124 +41839,66 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 -touch file -mkdir directory -touch directory/file + file=$(TMPDIR=. mktemp fiXXXXXX) -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * -# The test is meaningless for super-user. + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 -touch file -mkdir directory -touch directory/file +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +rm -rf dir -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +tar --xattrs -xf archive.tar -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" -fi -at_status=$? -at_failed=false -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 +getfattr -h -d file1 | grep -v -e '^#' -e ^$ +getfattr -h -d file2 | grep -v -e '^#' -e ^$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\" +user.test=\"OurFile2Value\" +user.test=\"OurDirValue\" " | \ - $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" - -$at_failed && at_func_log_failure + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/ignfail.at:26: + { set +x +$as_echo "$at_srcdir/xattr02.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26528,106 +41907,53 @@ 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=\$? -chmod 600 file -test \$status = 0 || exit 1 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 -)" -echo ignfail.at:26 >"$at_check_line_file" + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -# The test is meaningless for super-user. + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 -touch file -mkdir directory -touch directory/file +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +rm -rf dir -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +tar --xattrs -xf archive.tar -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_func_filter_trace $? -else - ( :; +getfattr -h -d file1 | grep -v -e '^#' -e ^\$ +getfattr -h -d file2 | grep -v -e '^#' -e ^\$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26636,71 +41962,66 @@ 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 + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -touch file -mkdir directory -touch directory/file + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -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 +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir -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" -fi -at_status=$? -at_failed=false -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_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir -$at_failed && at_func_log_failure +rm -rf dir + +tar --xattrs -xf archive.tar + +getfattr -h -d file1 | grep -v -e '^#' -e ^$ +getfattr -h -d file2 | grep -v -e '^#' -e ^$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\" +user.test=\"OurFile2Value\" +user.test=\"OurDirValue\" +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/ignfail.at:26: + { set +x +$as_echo "$at_srcdir/xattr02.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -26709,53 +42030,53 @@ 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) -touch file -mkdir directory -touch directory/file + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 -)" -echo ignfail.at:26 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +rm -rf dir + +tar --xattrs -xf archive.tar + +getfattr -h -d file1 | grep -v -e '^#' -e ^\$ +getfattr -h -d file2 | grep -v -e '^#' -e ^\$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -26764,124 +42085,66 @@ 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 + file=$(TMPDIR=. mktemp fiXXXXXX) -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -# The test is meaningless for super-user. + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 -touch file -mkdir directory -touch directory/file +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +rm -rf dir -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +tar --xattrs -xf archive.tar -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" -fi -at_status=$? -at_failed=false -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 +getfattr -h -d file1 | grep -v -e '^#' -e ^$ +getfattr -h -d file2 | grep -v -e '^#' -e ^$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\" +user.test=\"OurFile2Value\" +user.test=\"OurDirValue\" " | \ - $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" - -$at_failed && at_func_log_failure + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/ignfail.at:26: + { set +x +$as_echo "$at_srcdir/xattr02.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26890,53 +42153,53 @@ 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) -touch file -mkdir directory -touch directory/file + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 -)" -echo ignfail.at:26 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +tar --xattrs -xf archive.tar + +getfattr -h -d file1 | grep -v -e '^#' -e ^\$ +getfattr -h -d file2 | grep -v -e '^#' -e ^\$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26945,124 +42208,66 @@ 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 + file=$(TMPDIR=. mktemp fiXXXXXX) -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -# The test is meaningless for super-user. + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 -touch file -mkdir directory -touch directory/file +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +rm -rf dir -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +tar --xattrs -xf archive.tar -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" -fi -at_status=$? -at_failed=false -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 +getfattr -h -d file1 | grep -v -e '^#' -e ^$ +getfattr -h -d file2 | grep -v -e '^#' -e ^$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\" +user.test=\"OurFile2Value\" +user.test=\"OurDirValue\" " | \ - $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" - -$at_failed && at_func_log_failure + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/ignfail.at:26: + { set +x +$as_echo "$at_srcdir/xattr02.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27071,53 +42276,53 @@ 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) -touch file -mkdir directory -touch directory/file + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 -)" -echo ignfail.at:26 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs -xf archive.tar + +getfattr -h -d file1 | grep -v -e '^#' -e ^\$ +getfattr -h -d file2 | grep -v -e '^#' -e ^\$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27126,236 +42331,226 @@ 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 + file=$(TMPDIR=. mktemp fiXXXXXX) -touch file -mkdir directory -touch directory/file + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n user.test -v OurFile1Value dir/file1 +setfattr -n user.test -v OurFile2Value dir/subdir/file2 +setfattr -n user.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs -xf archive.tar + +getfattr -h -d file1 | grep -v -e '^#' -e ^$ +getfattr -h -d file2 | grep -v -e '^#' -e ^$ +getfattr -h -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\" +user.test=\"OurFile2Value\" +user.test=\"OurDirValue\" +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_184 +#AT_START_185 +at_fn_group_banner 185 'xattr03.at:25' \ + "xattrs: trusted.* attributes" " " 25 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "185. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/xattr03.at:28: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +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 + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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" -fi -at_status=$? -at_failed=false -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_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" -$at_failed && at_func_log_failure -$at_traceon; } + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_69 -#AT_START_70 -# 70. link01.at:33: link count gt 2 -at_setup_line='link01.at:33' -at_desc="link count gt 2" -$at_quiet $as_echo_n " 70: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "70. link01.at:33: testing ..." - $at_traceon +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir +rm -rf dir +tar --xattrs --xattrs-include=trusted* -xf archive.tar - { $at_traceoff -$as_echo "$at_srcdir/link01.at:36: +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -)" -echo link01.at:36 >"$at_check_line_file" + file=$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir -tar cf archive directory/test1/test.txt directory/test1/test.txt +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir -rm -r directory -tar xf archive --warning=no-timestamp +rm -rf dir -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "test.txt +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\" +trusted.test=\"OurFile2Value\" +trusted.test=\"OurDirValue\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link01.at:36: + { set +x +$as_echo "$at_srcdir/xattr03.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27364,50 +42559,61 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -)" -echo link01.at:36 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27416,34 +42622,74 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "test.txt + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\" +trusted.test=\"OurFile2Value\" +trusted.test=\"OurDirValue\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link01.at:36: + { set +x +$as_echo "$at_srcdir/xattr03.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27452,50 +42698,61 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -)" -echo link01.at:36 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27504,34 +42761,74 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "test.txt + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\" +trusted.test=\"OurFile2Value\" +trusted.test=\"OurDirValue\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link01.at:36: + { set +x +$as_echo "$at_srcdir/xattr03.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27540,50 +42837,61 @@ 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 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -)" -echo link01.at:36 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27592,34 +42900,74 @@ 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 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "test.txt + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\" +trusted.test=\"OurFile2Value\" +trusted.test=\"OurDirValue\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link01.at:36: + { set +x +$as_echo "$at_srcdir/xattr03.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27628,50 +42976,61 @@ 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 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -)" -echo link01.at:36 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^\$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^\$ +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27680,58 +43039,95 @@ 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 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -tar cf archive directory/test1/test.txt directory/test1/test.txt -rm -r directory -tar xf archive --warning=no-timestamp -ls directory/test1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "test.txt + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +mkdir dir/subdir/subsubdir +genfile --file dir/file1 +genfile --file dir/subdir/file2 + +setfattr -n trusted.test -v OurFile1Value dir/file1 +setfattr -n trusted.test -v OurFile2Value dir/subdir/file2 +setfattr -n trusted.test -v OurDirValue dir/subdir/subsubdir + +tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir + +rm -rf dir + +tar --xattrs --xattrs-include=trusted* -xf archive.tar + +getfattr -mtrusted. -d file1 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d file2 | grep -v -e '^#' -e ^$ +getfattr -mtrusted. -d subsubdir | grep -v -e '^#' -e ^$ +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\" +trusted.test=\"OurFile2Value\" +trusted.test=\"OurDirValue\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_70 -#AT_START_71 -# 71. link02.at:32: preserve hard links with --remove-files -at_setup_line='link02.at:32' -at_desc="preserve hard links with --remove-files" -$at_quiet $as_echo_n " 71: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_185 +#AT_START_186 +at_fn_group_banner 186 'xattr04.at:26' \ + "xattrs: s/open/openat/ regression" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "71. link02.at:32: testing ..." + $as_echo "186. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/link02.at:35: + { set +x +$as_echo "$at_srcdir/xattr04.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27740,36 +43136,47 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -)" -echo link02.at:35 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=\$? +getfattr -h -d output/file | grep -v -e '^#' -e ^\$ +exit \$ret +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27778,29 +43185,58 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file1 -file1 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=$? +getfattr -h -d output/file | grep -v -e '^#' -e ^$ +exit $ret +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"value\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link02.at:35: + { set +x +$as_echo "$at_srcdir/xattr04.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27809,36 +43245,47 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -)" -echo link02.at:35 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=\$? +getfattr -h -d output/file | grep -v -e '^#' -e ^\$ +exit \$ret +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27847,29 +43294,58 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file1 -file1 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=$? +getfattr -h -d output/file | grep -v -e '^#' -e ^$ +exit $ret +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"value\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link02.at:35: + { set +x +$as_echo "$at_srcdir/xattr04.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27878,36 +43354,47 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -)" -echo link02.at:35 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=\$? +getfattr -h -d output/file | grep -v -e '^#' -e ^\$ +exit \$ret +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27916,29 +43403,58 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file1 -file1 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=$? +getfattr -h -d output/file | grep -v -e '^#' -e ^$ +exit $ret +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"value\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link02.at:35: + { set +x +$as_echo "$at_srcdir/xattr04.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27947,36 +43463,47 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -)" -echo link02.at:35 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=\$? +getfattr -h -d output/file | grep -v -e '^#' -e ^\$ +exit \$ret +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27985,29 +43512,58 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file1 -file1 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=$? +getfattr -h -d output/file | grep -v -e '^#' -e ^$ +exit $ret +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"value\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link02.at:35: + { set +x +$as_echo "$at_srcdir/xattr04.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28016,36 +43572,47 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -)" -echo link02.at:35 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=\$? +getfattr -h -d output/file | grep -v -e '^#' -e ^\$ +exit \$ret +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28054,55 +43621,79 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -tar -c -f archive --remove-files file1 file2 file3 file4 -tar tfv archive | sed -n 's/.*file[2-4] link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file1 -file1 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.test -v value dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +ret=$? +getfattr -h -d output/file | grep -v -e '^#' -e ^$ +exit $ret +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "user.test=\"value\" " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_71 -#AT_START_72 -# 72. link03.at:24: working -l with --remove-files -at_setup_line='link03.at:24' -at_desc="working -l with --remove-files" -$at_quiet $as_echo_n " 72: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_186 +#AT_START_187 +at_fn_group_banner 187 'xattr05.at:28' \ + "xattrs: keywords with '=' and '%'" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "72. link03.at:24: testing ..." + $as_echo "187. $at_setup_line: testing $at_desc ..." $at_traceon - - - { $at_traceoff -$as_echo "$at_srcdir/link03.at:34: + { set +x +$as_echo "$at_srcdir/xattr05.at:31: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28112,59 +43703,46 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 link03.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 +mkdir dir +mkdir output +genfile --file dir/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_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28174,44 +43752,55 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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" -fi -at_status=$? -at_failed=false -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_func_check_status 0 $at_status "$at_srcdir/link03.at:34" -$at_failed && at_func_log_failure -$at_traceon; } + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/link03.at:34: + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/xattr05.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28221,59 +43810,46 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 link03.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 +mkdir dir +mkdir output +genfile --file dir/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_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28283,44 +43859,55 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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" -fi -at_status=$? -at_failed=false -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_func_check_status 0 $at_status "$at_srcdir/link03.at:34" -$at_failed && at_func_log_failure -$at_traceon; } + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/link03.at:34: + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/xattr05.at:31: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28330,59 +43917,46 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 link03.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 +mkdir dir +mkdir output +genfile --file dir/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_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28392,44 +43966,55 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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" -fi -at_status=$? -at_failed=false -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_func_check_status 0 $at_status "$at_srcdir/link03.at:34" -$at_failed && at_func_log_failure -$at_traceon; } + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/link03.at:34: + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/xattr05.at:31: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28439,59 +44024,46 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 link03.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 +mkdir dir +mkdir output +genfile --file dir/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_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28501,44 +44073,55 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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" -fi -at_status=$? -at_failed=false -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_func_check_status 0 $at_status "$at_srcdir/link03.at:34" -$at_failed && at_func_log_failure + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link03.at:34: + { set +x +$as_echo "$at_srcdir/xattr05.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28548,29 +44131,46 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=\$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 link03.at:34 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28580,98 +44180,76 @@ export TAR_OPTIONS rm -rf * -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=$(TMPDIR=. mktemp fiXXXXXX) -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.1 -tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -genfile -l 64 -f file1 -ln file1 file2 -ln file2 file3 -ln file3 file4 -echo archive.2 -tar -c -f archive.2 -l --remove-files file1 file2 file3 -echo testing archive.2 -tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_func_check_status 0 $at_status "$at_srcdir/link03.at:34" +mkdir dir +mkdir output +genfile --file dir/file + +setfattr -n user.=NAME%3D= -v value dir/file +getfattr -d dir/file | grep -v '# ' > before -$at_failed && at_func_log_failure +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar -C dir . + +tar --xattrs -xf archive.tar -C output +getfattr -d output/file | grep -v '# ' > after +diff before after +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_72 -#AT_START_73 -# 73. link04.at:29: link count is 1 but multiple occurrences -at_setup_line='link04.at:29' -at_desc="link count is 1 but multiple occurrences" -$at_quiet $as_echo_n " 73: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_187 +#AT_START_188 +at_fn_group_banner 188 'acls01.at:25' \ + "acls: basic functionality" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "73. link04.at:29: testing ..." + $as_echo "188. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/link04.at:32: + { set +x +$as_echo "$at_srcdir/acls01.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28680,58 +44258,68 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo == + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -)" -echo link04.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 +genfile --file dir/file -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort +MYNAME=\$( id -un ) -echo == +setfacl -m u:\$MYNAME:--x dir/file +setfacl -m u:\$MYNAME:--x dir -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +getfattr -h -m. -d dir dir/file > before + +tar --acls -cf archive.tar dir +rm -rf dir + +tar --acls -xf archive.tar + +getfattr -h -m. -d dir dir/file > after + +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28740,47 +44328,77 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 +genfile --file dir/file -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort +MYNAME=$( id -un ) -echo == +setfacl -m u:$MYNAME:--x dir/file +setfacl -m u:$MYNAME:--x dir -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/ -dir/file -dir/file link to dir/file -dir/symlink -> file -dir/symlink link to dir/symlink -== -dir/ -dir/FOO -dir/FOO link to dir/FOO -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" +getfattr -h -m. -d dir dir/file > before -$at_failed && at_func_log_failure +tar --acls -cf archive.tar dir +rm -rf dir + +tar --acls -xf archive.tar + +getfattr -h -m. -d dir dir/file > after + +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link04.at:32: + { set +x +$as_echo "$at_srcdir/acls01.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28789,58 +44407,68 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo == + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -)" -echo link04.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 +genfile --file dir/file -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort +MYNAME=\$( id -un ) -echo == +setfacl -m u:\$MYNAME:--x dir/file +setfacl -m u:\$MYNAME:--x dir -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +getfattr -h -m. -d dir dir/file > before + +tar --acls -cf archive.tar dir +rm -rf dir + +tar --acls -xf archive.tar + +getfattr -h -m. -d dir dir/file > after + +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28849,1055 +44477,706 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort + file=$(TMPDIR=. mktemp fiXXXXXX) -echo == + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/ -dir/file -dir/file link to dir/file -dir/symlink -> file -dir/symlink link to dir/symlink -== -dir/ -dir/FOO -dir/FOO link to dir/FOO -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" -$at_failed && at_func_log_failure -$at_traceon; } + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/link04.at:32: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort -echo == + file=$(TMPDIR=. mktemp fiXXXXXX) -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -)" -echo link04.at:32 >"$at_check_line_file" + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort + rm -rf $file -echo == + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 +genfile --file dir/file -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort +MYNAME=$( id -un ) -echo == +setfacl -m u:$MYNAME:--x dir/file +setfacl -m u:$MYNAME:--x dir -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/ -dir/file -dir/file link to dir/file -dir/symlink -> file -dir/symlink link to dir/symlink -== -dir/ -dir/FOO -dir/FOO link to dir/FOO -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" +getfattr -h -m. -d dir dir/file > before + +tar --acls -cf archive.tar dir +rm -rf dir -$at_failed && at_func_log_failure +tar --acls -xf archive.tar + +getfattr -h -m. -d dir dir/file > after + +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/link04.at:32: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { set +x +$as_echo "$at_srcdir/acls01.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo == + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -)" -echo link04.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort -echo == -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort -echo == + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/ -dir/file -dir/file link to dir/file -dir/symlink -> file -dir/symlink link to dir/symlink -== -dir/ -dir/FOO -dir/FOO link to dir/FOO -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" + rm -rf \$file -$at_failed && at_func_log_failure -$at_traceon; } + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/link04.at:32: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 +genfile --file dir/file -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort +MYNAME=\$( id -un ) -echo == +setfacl -m u:\$MYNAME:--x dir/file +setfacl -m u:\$MYNAME:--x dir -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -)" -echo link04.at:32 >"$at_check_line_file" +getfattr -h -m. -d dir dir/file > before -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +tar --acls -cf archive.tar dir +rm -rf dir + +tar --acls -xf archive.tar + +getfattr -h -m. -d dir dir/file > after + +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort + file=$(TMPDIR=. mktemp fiXXXXXX) -echo == + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -mkdir dir -echo TEST > dir/file -ln -s file dir/symlink || exit 77 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf archive dir dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, -' | sort -echo == -tar chf archive dir -tar tvf archive | sed ' - s,.*[0-9] dir/,dir/, - s,file,FOO,g - s,symlink,FOO,g -' | sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/ -dir/ -dir/file -dir/file link to dir/file -dir/symlink -> file -dir/symlink link to dir/symlink -== -dir/ -dir/FOO -dir/FOO link to dir/FOO -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" -$at_failed && at_func_log_failure -$at_traceon; } + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_73 -#AT_START_74 -# 74. longv7.at:24: long names in V7 archives -at_setup_line='longv7.at:24' -at_desc="long names in V7 archives" -$at_quiet $as_echo_n " 74: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "74. longv7.at:24: testing ..." - $at_traceon +mkdir dir +genfile --file dir/file +MYNAME=$( id -un ) +setfacl -m u:$MYNAME:--x dir/file +setfacl -m u:$MYNAME:--x dir +getfattr -h -m. -d dir dir/file > before +tar --acls -cf archive.tar dir +rm -rf dir +tar --acls -xf archive.tar +getfattr -h -m. -d dir dir/file > after +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/longv7.at:30: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + { set +x +$as_echo "$at_srcdir/acls01.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems -touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c -tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems -echo separator -tar tf archive -)" -echo longv7.at:30 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + 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 -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_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + 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 -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" -fi -at_status=$? -at_failed=false -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_func_check_status 0 $at_status "$at_srcdir/longv7.at:30" -$at_failed && at_func_log_failure -$at_traceon; } + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_74 -#AT_START_75 -# 75. 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 $as_echo_n " 75: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "75. long01.at:28: testing ..." - $at_traceon + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi +mkdir dir +genfile --file dir/file +MYNAME=\$( id -un ) +setfacl -m u:\$MYNAME:--x dir/file +setfacl -m u:\$MYNAME:--x dir +getfattr -h -m. -d dir dir/file > before +tar --acls -cf archive.tar dir +rm -rf dir - { $at_traceoff -$as_echo "$at_srcdir/long01.at:36: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +tar --acls -xf archive.tar + +getfattr -h -m. -d dir dir/file > after + +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 -echo test > endfile + file=$(TMPDIR=. mktemp fiXXXXXX) -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" + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 -echo test > endfile + file=$(TMPDIR=. mktemp fiXXXXXX) -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" -fi -at_status=$? -at_failed=false -at_func_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_func_check_status 0 $at_status "$at_srcdir/long01.at:36" + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/long01.at:36: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + rm -rf $file -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 + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -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" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 dir +genfile --file dir/file +MYNAME=$( id -un ) -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 +setfacl -m u:$MYNAME:--x dir/file +setfacl -m u:$MYNAME:--x dir -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_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +getfattr -h -m. -d dir dir/file > before + +tar --acls -cf archive.tar dir +rm -rf dir + +tar --acls -xf archive.tar + +getfattr -h -m. -d dir dir/file > after + +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/acls01.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77 -echo test > endfile + file=\$(TMPDIR=. mktemp fiXXXXXX) -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" -fi -at_status=$? -at_failed=false -at_func_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_func_check_status 0 $at_status "$at_srcdir/long01.at:36" + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_75 -#AT_START_76 -# 76. lustar01.at:21: ustar: unsplittable file name -at_setup_line='lustar01.at:21' -at_desc="ustar: unsplittable file name" -$at_quiet $as_echo_n " 76: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "76. lustar01.at:21: testing ..." - $at_traceon + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/lustar01.at:27: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * -genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77 -tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix -)" -echo lustar01.at:27 >"$at_check_line_file" +mkdir dir +genfile --file dir/file -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * +MYNAME=\$( id -un ) -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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +setfacl -m u:\$MYNAME:--x dir/file +setfacl -m u:\$MYNAME:--x dir + +getfattr -h -m. -d dir dir/file > before + +tar --acls -cf archive.tar dir +rm -rf dir + +tar --acls -xf archive.tar + +getfattr -h -m. -d dir dir/file > after + +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77 -tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/lustar01.at:27" - -$at_failed && at_func_log_failure -$at_traceon; } - + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_76 -#AT_START_77 -# 77. lustar02.at:21: ustar: unsplittable path name -at_setup_line='lustar02.at:21' -at_desc="ustar: unsplittable path name" -$at_quiet $as_echo_n " 77: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "77. lustar02.at:21: testing ..." - $at_traceon + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + rm -rf $file + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/lustar02.at:32: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * +mkdir dir +genfile --file dir/file -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" +MYNAME=$( id -un ) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * +setfacl -m u:$MYNAME:--x dir/file +setfacl -m u:$MYNAME:--x dir +getfattr -h -m. -d dir dir/file > before -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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * +tar --acls -cf archive.tar dir +rm -rf dir +tar --acls -xf archive.tar -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" -fi -at_status=$? -at_failed=false -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_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/lustar02.at:32" +getfattr -h -m. -d dir dir/file > after -$at_failed && at_func_log_failure +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_77 -#AT_START_78 -# 78. lustar03.at:21: ustar: splitting long names -at_setup_line='lustar03.at:21' -at_desc="ustar: splitting long names" -$at_quiet $as_echo_n " 78: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_188 +#AT_START_189 +at_fn_group_banner 189 'acls02.at:25' \ + "acls: work with -C" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "78. lustar03.at:21: testing ..." + $as_echo "189. $at_setup_line: testing $at_desc ..." $at_traceon + { set +x +$as_echo "$at_srcdir/acls02.at:28: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/lustar03.at:29: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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)" -echo lustar03.at:29 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77 -echo "Create archive" -tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be -echo "List archive" -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Create archive -List archive -this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/ -this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/lustar03.at:29" -$at_failed && at_func_log_failure -$at_traceon; } + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_78 -#AT_START_79 -# 79. multiv01.at:23: multivolume dumps from pipes -at_setup_line='multiv01.at:23' -at_desc="multivolume dumps from pipes" -$at_quiet $as_echo_n " 79: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "79. multiv01.at:23: testing ..." - $at_traceon +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file +MYNAME=\$( id -un ) +setfacl -m u:\$MYNAME:--x dir/subdir +setfacl -m u:\$MYNAME:--x dir/subdir/file -# Fixme: should be configurable -# TRUSS=truss -o /tmp/tr -# TRUSS=strace +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. + +tar --acls -cf archive.tar -C dir subdir +rm -rf dir +mkdir dir +tar --acls -xf archive.tar -C dir +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. - { $at_traceoff -$as_echo "$at_srcdir/multiv01.at:30: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H v7" 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 + file=$(TMPDIR=. mktemp fiXXXXXX) -if test \$TEST_TAR_FORMAT = pax; then - TAPE_LENGTH=11 -else - TAPE_LENGTH=10 -fi + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 -mkdir extract-dir-pipe -dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ - --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -)" -echo multiv01.at:30 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -exec <&- -genfile --length 7168 --file file1 -for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \ - " 9" "10" "11" "12" "13" "14" "15" "16" ; do \ - echo "file2 block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla" - for count in 2 3 4 5 6 7 8 ; do - echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla" - done -done >file2 + file=$(TMPDIR=. mktemp fiXXXXXX) -if test $TEST_TAR_FORMAT = pax; then - TAPE_LENGTH=11 -else - TAPE_LENGTH=10 -fi + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 -mkdir extract-dir-pipe -dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ - --tape-length=$TAPE_LENGTH --read-full-records || exit 1 + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + rm -rf $file -exec <&- -genfile --length 7168 --file file1 + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -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 +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file -tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 +MYNAME=$( id -un ) -mkdir extract-dir-pipe -dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ - --tape-length=$TAPE_LENGTH --read-full-records || exit 1 +setfacl -m u:$MYNAME:--x dir/subdir +setfacl -m u:$MYNAME:--x dir/subdir/file -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv01.at:30" +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. + +tar --acls -cf archive.tar -C dir subdir +rm -rf dir + +mkdir dir +tar --acls -xf archive.tar -C dir + +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. -$at_failed && at_func_log_failure +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/multiv01.at:30: + { set +x +$as_echo "$at_srcdir/acls02.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -29906,80 +45185,74 @@ 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) -if test \$TEST_TAR_FORMAT = pax; then - TAPE_LENGTH=11 -else - TAPE_LENGTH=10 -fi + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 -mkdir extract-dir-pipe -dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ - --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -)" -echo multiv01.at:30 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' - false; }; 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file + +MYNAME=\$( id -un ) + +setfacl -m u:\$MYNAME:--x dir/subdir +setfacl -m u:\$MYNAME:--x dir/subdir/file + +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. -if test $TEST_TAR_FORMAT = pax; then - TAPE_LENGTH=11 -else - TAPE_LENGTH=10 -fi +tar --acls -cf archive.tar -C dir subdir +rm -rf dir -tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 +mkdir dir +tar --acls -xf archive.tar -C dir -mkdir extract-dir-pipe -dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ - --tape-length=$TAPE_LENGTH --read-full-records || exit 1 +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -29988,2072 +45261,1481 @@ 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 + file=$(TMPDIR=. mktemp fiXXXXXX) -if test $TEST_TAR_FORMAT = pax; then - TAPE_LENGTH=11 -else - TAPE_LENGTH=10 -fi + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 -mkdir extract-dir-pipe -dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ - --tape-length=$TAPE_LENGTH --read-full-records || exit 1 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv01.at:30" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/multiv01.at:30: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" -export TAR_OPTIONS -rm -rf * -exec <&- -genfile --length 7168 --file file1 + file=$(TMPDIR=. mktemp fiXXXXXX) -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 + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -if test \$TEST_TAR_FORMAT = pax; then - TAPE_LENGTH=11 -else - TAPE_LENGTH=10 -fi -tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -mkdir extract-dir-pipe -dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ - --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 + rm -rf $file -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -)" -echo multiv01.at:30 >"$at_check_line_file" + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' - false; }; 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 +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file -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 +MYNAME=$( id -un ) -if test $TEST_TAR_FORMAT = pax; then - TAPE_LENGTH=11 -else - TAPE_LENGTH=10 -fi +setfacl -m u:$MYNAME:--x dir/subdir +setfacl -m u:$MYNAME:--x dir/subdir/file -tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. -mkdir extract-dir-pipe -dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ - --tape-length=$TAPE_LENGTH --read-full-records || exit 1 +tar --acls -cf archive.tar -C dir subdir +rm -rf dir -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax +mkdir dir +tar --acls -xf archive.tar -C dir + +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. + +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/acls02.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" +TAR_OPTIONS=\"-H ustar\" 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) -if test $TEST_TAR_FORMAT = pax; then - TAPE_LENGTH=11 -else - TAPE_LENGTH=10 -fi + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 -mkdir extract-dir-pipe -dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | -PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ - --tape-length=$TAPE_LENGTH --read-full-records || exit 1 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -cmp file1 extract-dir-pipe/file1 -cmp file2 extract-dir-pipe/file2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv01.at:30" -$at_failed && at_func_log_failure -$at_traceon; } + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_79 -#AT_START_80 -# 80. multiv02.at:28: skipping a straddling member -at_setup_line='multiv02.at:28' -at_desc="skipping a straddling member" -$at_quiet $as_echo_n " 80: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "80. multiv02.at:28: testing ..." - $at_traceon + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/multiv02.at:31: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file -genfile --length 10240 --file en -genfile --length 20000 --file to -genfile --length 20000 --file tre -genfile --length 10240 --file fire +MYNAME=\$( id -un ) -exec <&- +setfacl -m u:\$MYNAME:--x dir/subdir +setfacl -m u:\$MYNAME:--x dir/subdir/file -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -)" -echo multiv02.at:31 >"$at_check_line_file" +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +tar --acls -cf archive.tar -C dir subdir +rm -rf dir -genfile --length 10240 --file en -genfile --length 20000 --file to -genfile --length 20000 --file tre -genfile --length 10240 --file fire +mkdir dir +tar --acls -xf archive.tar -C dir -exec <&- +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" 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 <&- + file=$(TMPDIR=. mktemp fiXXXXXX) -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -en -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv02.at:31" + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/multiv02.at:31: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -genfile --length 10240 --file en -genfile --length 20000 --file to -genfile --length 20000 --file tre -genfile --length 10240 --file fire -exec <&- -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -)" -echo multiv02.at:31 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + file=$(TMPDIR=. mktemp fiXXXXXX) -genfile --length 10240 --file en -genfile --length 20000 --file to -genfile --length 20000 --file tre -genfile --length 10240 --file fire + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -exec <&- -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -genfile --length 10240 --file en -genfile --length 20000 --file to -genfile --length 20000 --file tre -genfile --length 10240 --file fire + rm -rf $file -exec <&- + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -en -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv02.at:31" -$at_failed && at_func_log_failure +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file + +MYNAME=$( id -un ) + +setfacl -m u:$MYNAME:--x dir/subdir +setfacl -m u:$MYNAME:--x dir/subdir/file + +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. + +tar --acls -cf archive.tar -C dir subdir +rm -rf dir + +mkdir dir +tar --acls -xf archive.tar -C dir + +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. + +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/multiv02.at:31: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax + { set +x +$as_echo "$at_srcdir/acls02.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" +TAR_OPTIONS=\"-H posix\" 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 <&- + file=\$(TMPDIR=. mktemp fiXXXXXX) -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -)" -echo multiv02.at:31 >"$at_check_line_file" + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -exec <&- -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * -genfile --length 10240 --file en -genfile --length 20000 --file to -genfile --length 20000 --file tre -genfile --length 10240 --file fire -exec <&- + file=\$(TMPDIR=. mktemp fiXXXXXX) -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -en -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv02.at:31" + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_80 -#AT_START_81 -# 81. multiv03.at:30: MV archive & long filenames -at_setup_line='multiv03.at:30' -at_desc="MV archive & long filenames" -$at_quiet $as_echo_n " 81: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "81. multiv03.at:30: testing ..." - $at_traceon +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file + +MYNAME=\$( id -un ) + +setfacl -m u:\$MYNAME:--x dir/subdir +setfacl -m u:\$MYNAME:--x dir/subdir/file +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. +tar --acls -cf archive.tar -C dir subdir +rm -rf dir +mkdir dir +tar --acls -xf archive.tar -C dir - { $at_traceoff -$as_echo "$at_srcdir/multiv03.at:33: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. + +diff before after +test \"\$?\" = 0 +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H posix" 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 < /dev/null + if test "$?" != 0; then + exit 77 + fi -genfile --length 15360 --file \$AFILE -exec <&- + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1 -tar -tM -f arch.1 -f arch.2 || exit 1 -echo separator-1 -genfile --length 15360 --file \$BFILE -tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1 -echo separator-2 -mv \$BFILE bfile -tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 -cmp \$BFILE bfile -)" -echo multiv03.at:33 >"$at_check_line_file" + file=$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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 < /dev/null + if test "$?" != 0; then + exit 77 + fi -cat > ../expout <&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -exec <&- -tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1 -tar -tM -f arch.1 -f arch.2 || exit 1 +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file -echo separator-1 +MYNAME=$( id -un ) -genfile --length 15360 --file $BFILE -tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1 +setfacl -m u:$MYNAME:--x dir/subdir +setfacl -m u:$MYNAME:--x dir/subdir/file -echo separator-2 -mv $BFILE bfile -tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 -cmp $BFILE bfile -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. + +tar --acls -cf archive.tar -C dir subdir +rm -rf dir + +mkdir dir +tar --acls -xf archive.tar -C dir + +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. + +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/acls02.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +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 < /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -genfile --length 15360 --file $AFILE -exec <&- + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1 -tar -tM -f arch.1 -f arch.2 || exit 1 -echo separator-1 -genfile --length 15360 --file $BFILE -tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1 -echo separator-2 -mv $BFILE bfile -tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 -cmp $BFILE bfile -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv03.at:33" + file=\$(TMPDIR=. mktemp fiXXXXXX) -$at_failed && at_func_log_failure -$at_traceon; } + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/multiv03.at:33: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\` -BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\` + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -cat > ../experr < ../expout <&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -genfile --length 15360 --file \$AFILE -exec <&- +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file -tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1 -tar -tM -f arch.1 -f arch.2 || exit 1 +MYNAME=\$( id -un ) + +setfacl -m u:\$MYNAME:--x dir/subdir +setfacl -m u:\$MYNAME:--x dir/subdir/file + +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. + +tar --acls -cf archive.tar -C dir subdir +rm -rf dir -echo separator-1 +mkdir dir +tar --acls -xf archive.tar -C dir -genfile --length 15360 --file \$BFILE -tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1 +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. -echo separator-2 -mv \$BFILE bfile -tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 -cmp \$BFILE bfile +diff before after +test \"\$?\" = 0 )" -echo multiv03.at:33 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +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 < /dev/null + if test "$?" != 0; then + exit 77 + fi -genfile --length 15360 --file $AFILE -exec <&- + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1 -tar -tM -f arch.1 -f arch.2 || exit 1 -echo separator-1 -genfile --length 15360 --file $BFILE -tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1 -echo separator-2 -mv $BFILE bfile -tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 -cmp $BFILE bfile -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + file=$(TMPDIR=. mktemp fiXXXXXX) -AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'` -BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'` + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -cat > ../experr < ../expout < /dev/null + if test "$?" != 0; then + exit 77 + fi -genfile --length 15360 --file $AFILE + rm -rf $file -exec <&- + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1 -tar -tM -f arch.1 -f arch.2 || exit 1 -echo separator-1 +mkdir dir +mkdir dir/subdir +genfile --file dir/subdir/file -genfile --length 15360 --file $BFILE -tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1 +MYNAME=$( id -un ) -echo separator-2 -mv $BFILE bfile -tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 -cmp $BFILE bfile -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv03.at:33" +setfacl -m u:$MYNAME:--x dir/subdir +setfacl -m u:$MYNAME:--x dir/subdir/file + +cd dir +getfattr -h -m. -d subdir subdir/file > ../before +cd .. + +tar --acls -cf archive.tar -C dir subdir +rm -rf dir + +mkdir dir +tar --acls -xf archive.tar -C dir -$at_failed && at_func_log_failure +cd dir +getfattr -h -m. -d subdir subdir/file > ../after +cd .. + +diff before after +test "$?" = 0 +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_81 -#AT_START_82 -# 82. 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 $as_echo_n " 82: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_189 +#AT_START_190 +at_fn_group_banner 190 'acls03.at:30' \ + "acls: default ACLs" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "82. multiv04.at:36: testing ..." + $as_echo "190. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/multiv04.at:39: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + + + + { set +x +$as_echo "$at_srcdir/acls03.at:47: +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 directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -tar --listed-incremental=list -c -f archive.a directory + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory -echo separator -tar -MRt -f arc.1 -f arc.2)" -echo multiv04.at:39 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -exec <&- + rm -rf \$file -sleep 2 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -tar --listed-incremental=list -c -f archive.a directory -sleep 2 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory -echo separator +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) -tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -separator -block 0: directory/ -block 35: ** Block of NULs ** -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv04.at:39" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/multiv04.at:39: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' "$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi -echo separator -tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi + + + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi + + + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi + + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -tar --listed-incremental=list -c -f archive.a directory + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory -echo separator -tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -separator -block 0: directory/ -block 35: ** Block of NULs ** -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv04.at:39" + file=$(TMPDIR=. mktemp fiXXXXXX) -$at_failed && at_func_log_failure -$at_traceon; } + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + rm -rf $file - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_82 -#AT_START_83 -# 83. 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 $as_echo_n " 83: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "83. multiv05.at:26: testing ..." - $at_traceon + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi +test -z "`sort < /dev/null 2>&1`" || exit 77 +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a - { $at_traceoff -$as_echo "$at_srcdir/multiv05.at:30: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -exec <&- +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -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 +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -echo Creating archive -tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc -echo separator -mkdir bak -mv jeden dwa trzy cztery piec szesc bak -tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar -echo Diffing jeden - cmp bak/jeden jeden || exit 1 -echo Diffing dwa - cmp bak/dwa dwa || exit 1 -echo Diffing trzy - cmp bak/trzy trzy || exit 1 -echo Diffing cztery - cmp bak/cztery cztery || exit 1 -echo Diffing piec - cmp bak/piec piec || exit 1 -echo Diffing szesc - cmp bak/szesc szesc || exit 1 -)" -echo multiv05.at:30 >"$at_check_line_file" +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -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 + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -exec <&- + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -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 + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -echo Creating archive -tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc -echo separator -mkdir bak -mv jeden dwa trzy cztery piec szesc bak -tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar -echo Diffing jeden - cmp bak/jeden jeden || exit 1 -echo Diffing dwa - cmp bak/dwa dwa || exit 1 -echo Diffing trzy - cmp bak/trzy trzy || exit 1 -echo Diffing cztery - cmp bak/cztery cztery || exit 1 -echo Diffing piec - cmp bak/piec piec || exit 1 -echo Diffing szesc - cmp bak/szesc szesc || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar: \`trzy' is not continued on this volume -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating archive -separator -jeden -dwa -trzy -cztery -piec -szesc -Diffing jeden -Diffing dwa -Diffing trzy -Diffing cztery -Diffing piec -Diffing szesc -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv05.at:30" -$at_failed && at_func_log_failure -$at_traceon; } + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_83 -#AT_START_84 -# 84. multiv06.at:27: Multivolumes with L=record_size -at_setup_line='multiv06.at:27' -at_desc="Multivolumes with L=record_size" -$at_quiet $as_echo_n " 84: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "84. multiv06.at:27: testing ..." - $at_traceon + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - { $at_traceoff -$as_echo "$at_srcdir/multiv06.at:30: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3)" -echo multiv06.at:30 >"$at_check_line_file" + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 <&- -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_func_check_status 0 $at_status "$at_srcdir/multiv06.at:30" + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/multiv06.at:30: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" -export TAR_OPTIONS -rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3)" -echo multiv06.at:30 >"$at_check_line_file" + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi -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" -fi -at_status=$? -at_failed=false -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_func_check_status 0 $at_status "$at_srcdir/multiv06.at:30" -$at_failed && at_func_log_failure -$at_traceon; } + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/acls03.at:47: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_84 -#AT_START_85 -# 85. multiv07.at:26: volumes split at an extended header -at_setup_line='multiv07.at:26' -at_desc="volumes split at an extended header" -$at_quiet $as_echo_n " 85: $at_desc " -at_xfail=no - test -f \$XFAILFILE && at_xfail=yes - test -f $XFAILFILE && at_xfail=yes - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "85. multiv07.at:26: testing ..." - $at_traceon + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -{ $at_traceoff -$as_echo "$at_srcdir/multiv07.at:29: + file=\$(TMPDIR=. mktemp fiXXXXXX) -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 -exec <&- + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -cd \$TEST_DATA_DIR -tar -t -M -fxsplit-1.tar -fxsplit-2.tar -" -echo multiv07.at:29 >"$at_check_line_file" + rm -rf \$file -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 -exec <&- +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) -cd $TEST_DATA_DIR -tar -t -M -fxsplit-1.tar -fxsplit-2.tar - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option -exec <&- +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -cd $TEST_DATA_DIR -tar -t -M -fxsplit-1.tar -fxsplit-2.tar - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Archive volumes split at an extended header Volume 1 -foo -bar -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv07.at:29" +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -$at_failed && at_func_log_failure -$at_traceon; } +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_85 -#AT_START_86 -# 86. multiv08.at:23: multivolume header creation -at_setup_line='multiv08.at:23' -at_desc="multivolume header creation" -$at_quiet $as_echo_n " 86: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "86. multiv08.at:23: testing ..." - $at_traceon + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - { $at_traceoff -$as_echo "$at_srcdir/multiv08.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -genfile --length 9472 --file a -genfile --length 9984 --file b -decho Creating -tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b -decho Testing -tar -tMR -f A.tar -f B.tar -f C.tar -)" -echo multiv08.at:26 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -genfile --length 9472 --file a -genfile --length 9984 --file b -decho Creating -tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b -decho Testing -tar -tMR -f A.tar -f B.tar -f C.tar -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -genfile --length 9472 --file a -genfile --length 9984 --file b -decho Creating -tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b -decho Testing -tar -tMR -f A.tar -f B.tar -f C.tar -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "Creating -Testing -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Creating -Testing -block 0: a -block 21: b -block 43: ** Block of NULs ** -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multiv08.at:26" + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -$at_failed && at_func_log_failure -$at_traceon; } + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_86 -#AT_START_87 -# 87. old.at:23: old archives -at_setup_line='old.at:23' -at_desc="old archives" -$at_quiet $as_echo_n " 87: $at_desc " -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "87. old.at:23: testing ..." - $at_traceon + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -unset TAR_OPTIONS -{ $at_traceoff -$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" + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir directory -tar cfvo archive directory || exit 1 -tar tf archive - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir directory -tar cfvo archive directory || exit 1 -tar tf archive - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -directory/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/old.at:27" -$at_failed && at_func_log_failure -$at_traceon; } + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_87 -#AT_START_88 -# 88. recurse.at:21: recurse -at_setup_line='recurse.at:21' -at_desc="recurse" -$at_quiet $as_echo_n " 88: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "88. recurse.at:21: testing ..." - $at_traceon + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi - { $at_traceoff -$as_echo "$at_srcdir/recurse.at:24: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" -$at_failed && at_func_log_failure -$at_traceon; } + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi - { $at_traceoff -$as_echo "$at_srcdir/recurse.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/recurse.at:24: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive )" -echo recurse.at:24 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" + file=$(TMPDIR=. mktemp fiXXXXXX) -$at_failed && at_func_log_failure -$at_traceon; } + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/recurse.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" -$at_failed && at_func_log_failure -$at_traceon; } + file=$(TMPDIR=. mktemp fiXXXXXX) - { $at_traceoff -$as_echo "$at_srcdir/recurse.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + rm -rf $file -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "directory/ -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } +test -z "`sort < /dev/null 2>&1`" || exit 77 +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_88 -#AT_START_89 -# 89. 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 $as_echo_n " 89: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "89. same-order01.at:26: testing ..." - $at_traceon +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl - { $at_traceoff -$as_echo "$at_srcdir/same-order01.at:29: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -test -z "`sort < /dev/null 2>&1`" || exit 77 + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -test -z "`sort < /dev/null 2>&1`" || exit 77 + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -ls directory|sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -test -z "`sort < /dev/null 2>&1`" || exit 77 + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -ls directory|sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" -$at_failed && at_func_log_failure -$at_traceon; } + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - { $at_traceoff -$as_echo "$at_srcdir/same-order01.at:29: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -ls directory|sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi -ls directory|sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" -$at_failed && at_func_log_failure + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/same-order01.at:29: + { set +x +$as_echo "$at_srcdir/acls03.at:47: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -32063,1038 +46745,660 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 + + +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) + +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a + +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -ls directory|sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -test -z "`sort < /dev/null 2>&1`" || exit 77 + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -ls directory|sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/same-order01.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -test -z "`sort < /dev/null 2>&1`" || exit 77 + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -test -z "`sort < /dev/null 2>&1`" || exit 77 + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -ls directory|sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -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 + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi -ls directory|sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" -$at_failed && at_func_log_failure -$at_traceon; } + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi - { $at_traceoff -$as_echo "$at_srcdir/same-order01.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -ls directory|sort -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -ls directory|sort -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" -$at_failed && at_func_log_failure -$at_traceon; } + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_89 -#AT_START_90 -# 90. same-order02.at:25: multiple -C options -at_setup_line='same-order02.at:25' -at_desc="multiple -C options" -$at_quiet $as_echo_n " 90: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "90. same-order02.at:25: testing ..." - $at_traceon + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + rm -rf $file + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/same-order02.at:28: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * +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 en -mkdir to +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) -HERE=\`pwd\` -tar -xf archive --same-order --warning=no-timestamp \\ - -C \$HERE/en file1 \\ - -C \$HERE/to file2 || exit 1 +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a -ls en -echo separator -ls to -)" -echo same-order02.at:28 >"$at_check_line_file" +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option -mkdir en -mkdir to +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir en -mkdir to + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -separator -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" -$at_failed && at_func_log_failure -$at_traceon; } + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - { $at_traceoff -$as_echo "$at_srcdir/same-order02.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -mkdir en -mkdir to -HERE=\`pwd\` -tar -xf archive --same-order --warning=no-timestamp \\ - -C \$HERE/en file1 \\ - -C \$HERE/to file2 || exit 1 + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -ls en -echo separator -ls to -)" -echo same-order02.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir en -mkdir to + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir en -mkdir to + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -separator -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/same-order02.at:28: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi -mkdir en -mkdir to -HERE=\`pwd\` -tar -xf archive --same-order --warning=no-timestamp \\ - -C \$HERE/en file1 \\ - -C \$HERE/to file2 || exit 1 -ls en -echo separator -ls to -)" -echo same-order02.at:28 >"$at_check_line_file" + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi -mkdir en -mkdir to -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi -mkdir en -mkdir to -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -separator -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_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 * + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir en -mkdir to + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi -HERE=\`pwd\` -tar -xf archive --same-order --warning=no-timestamp \\ - -C \$HERE/en file1 \\ - -C \$HERE/to file2 || exit 1 -ls en -echo separator -ls to -)" -echo same-order02.at:28 >"$at_check_line_file" + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" +$at_failed && at_fn_log_failure +$at_traceon; } -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; then - ( $at_traceon; + { set +x +$as_echo "$at_srcdir/acls03.at:47: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +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 + file=\$(TMPDIR=. mktemp fiXXXXXX) -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -mkdir en -mkdir to -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -separator -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" -$at_failed && at_func_log_failure -$at_traceon; } + file=\$(TMPDIR=. mktemp fiXXXXXX) - { $at_traceoff -$as_echo "$at_srcdir/same-order02.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 -mkdir en -mkdir to + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -HERE=\`pwd\` -tar -xf archive --same-order --warning=no-timestamp \\ - -C \$HERE/en file1 \\ - -C \$HERE/to file2 || exit 1 + rm -rf \$file -ls en -echo separator -ls to -)" -echo same-order02.at:28 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' - false; }; 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 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -mkdir en -mkdir to -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -mkdir en -mkdir to +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -HERE=`pwd` -tar -xf archive --same-order --warning=no-timestamp \ - -C $HERE/en file1 \ - -C $HERE/to file2 || exit 1 +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option -ls en -echo separator -ls to -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "file1 -separator -file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -$at_failed && at_func_log_failure -$at_traceon; } +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_90 -#AT_START_91 -# 91. shortrec.at:25: short records -at_setup_line='shortrec.at:25' -at_desc="short records" -$at_quiet $as_echo_n " 91: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "91. shortrec.at:25: testing ..." - $at_traceon + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - { $at_traceoff -$as_echo "$at_srcdir/shortrec.at:28: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -rm -r directory -)" -echo shortrec.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/shortrec.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -)" -echo shortrec.at:28 >"$at_check_line_file" + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" -$at_failed && at_func_log_failure -$at_traceon; } + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi - { $at_traceoff -$as_echo "$at_srcdir/shortrec.at:28: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi -rm -r directory -)" -echo shortrec.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/shortrec.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi -rm -r directory -)" -echo shortrec.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -33103,484 +47407,225 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null - -rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" - -$at_failed && at_func_log_failure -$at_traceon; } - - { $at_traceoff -$as_echo "$at_srcdir/shortrec.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null + file=$(TMPDIR=. mktemp fiXXXXXX) -rm -r directory -)" -echo shortrec.at:28 >"$at_check_line_file" + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -rm -r directory -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - > /dev/null -tar -c -b 1 -f archive directory -tar -t -f archive > /dev/null -tar -t -f - < archive > /dev/null -rm -r directory -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" -$at_failed && at_func_log_failure -$at_traceon; } + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_91 -#AT_START_92 -# 92. sparse01.at:21: sparse files -at_setup_line='sparse01.at:21' -at_desc="sparse files" -$at_quiet $as_echo_n " 92: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "92. sparse01.at:21: testing ..." - $at_traceon + rm -rf $file + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi +test -z "`sort < /dev/null 2>&1`" || exit 77 - { $at_traceoff -$as_echo "$at_srcdir/sparse01.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) -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 +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -)" -echo sparse01.at:24 >"$at_check_line_file" +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -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 +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -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 +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_func_check_status 0 $at_status "$at_srcdir/sparse01.at:24" +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/sparse01.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -)" -echo sparse01.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_func_check_status 0 $at_status "$at_srcdir/sparse01.at:24" + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/sparse01.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -)" -echo sparse01.at:24 >"$at_check_line_file" + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive --warning=no-timestamp -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_func_check_status 0 $at_status "$at_srcdir/sparse01.at:24" -$at_failed && at_func_log_failure -$at_traceon; } + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi -cat >stdout.re <<'_ATEOF' -separator --rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin --rw-r--r-- ^ ^ * *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile --rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end -separator -sparsefile 10344448 -_ATEOF -awk '{print NR " " $0}' stdout > $$.1 -awk '{print NR " " $0}' stdout.re | join - $$.1 | -while read NUM RE LINE -do - echo "$LINE" | grep -- "$RE" >/dev/null || exit 1 -done + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_92 -#AT_START_93 -# 93. 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 $as_echo_n " 93: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "93. sparse02.at:21: testing ..." - $at_traceon + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe. -# References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us> -# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi - { $at_traceoff -$as_echo "$at_srcdir/sparse02.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy -)" -echo sparse02.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi -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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/sparse02.at:28" + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -$at_failed && at_func_log_failure +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/sparse02.at:28: + { set +x +$as_echo "$at_srcdir/acls03.at:47: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -33589,952 +47634,464 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy -)" -echo sparse02.at:28 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/sparse02.at:28" -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/sparse02.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) -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 + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy -)" -echo sparse02.at:28 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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 + rm -rf \$file -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -genfile --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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/sparse02.at:28" +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -$at_failed && at_func_log_failure -$at_traceon; } +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_93 -#AT_START_94 -# 94. sparse03.at:21: storing sparse files > 8G -at_setup_line='sparse03.at:21' -at_desc="storing sparse files > 8G" -$at_quiet $as_echo_n " 94: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "94. sparse03.at:21: testing ..." - $at_traceon +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -# Tar 1.15.1 incorrectly computed sparse member size if the extended -# PAX header contained size keyword. -# References: <87vf46nb36.fsf@penguin.cs.ucla.edu> -# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl - { $at_traceoff -$as_echo "$at_srcdir/sparse03.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -genfile --length 1000 --file begin -genfile --length 1000 --file end -genfile --sparse --file sparsefile --block-size 512 8G A || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -)" -echo sparse03.at:29 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -genfile --length 1000 --file begin -genfile --length 1000 --file end -genfile --sparse --file sparsefile --block-size 512 8G A || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_func_check_status 0 $at_status "$at_srcdir/sparse03.at:29" + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -$at_failed && at_func_log_failure -$at_traceon; } + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -cat >stdout.re <<'_ATEOF' -separator --rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin --rw-r--r-- ^ ^ * *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile --rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end -separator -sparsefile 8589935104 -_ATEOF + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -awk '{print NR " " $0}' stdout > $$.1 -awk '{print NR " " $0}' stdout.re | join - $$.1 | -while read NUM RE LINE -do - echo "$LINE" | grep -- "$RE" >/dev/null || exit 1 -done + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_94 -#AT_START_95 -# 95. sparsemv.at:21: sparse files in MV archives -at_setup_line='sparsemv.at:21' -at_desc="sparse files in MV archives" -$at_quiet $as_echo_n " 95: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "95. sparsemv.at:21: testing ..." - $at_traceon + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -# Check if sparse files are correctly split between GNU multi-volume -# archives. -# There are two cases: the file can be split within an empty (null) block, -# or within a data block. Since null blocks are not archived, the first -# case means the file is split between two consecutive data blocks. -# + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi - { $at_traceoff -$as_echo "$at_srcdir/sparsemv.at:31: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * -exec <&- -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 \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi -echo \"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 -)" -echo sparsemv.at:31 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -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_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/sparsemv.at:31" + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/sparsemv.at:31: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi -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 -)" -echo sparsemv.at:31 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi -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_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi + +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +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_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/sparsemv.at:31" + file=$(TMPDIR=. mktemp fiXXXXXX) -$at_failed && at_func_log_failure -$at_traceon; } + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_95 -#AT_START_96 -# 96. 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 $as_echo_n " 96: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "96. spmvp00.at:21: testing ..." - $at_traceon + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/spmvp00.at:24: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" -export TAR_OPTIONS -rm -rf * + rm -rf $file -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 + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -echo \"Pass 2: Split within a data block\" -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo \"Create archive\" -tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -)" -echo spmvp00.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * +test -z "`sort < /dev/null 2>&1`" || exit 77 -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_func_filter_trace $? -else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) -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 +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/spmvp00.at:24" +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -$at_failed && at_func_log_failure -$at_traceon; } +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_96 -#AT_START_97 -# 97. 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 $as_echo_n " 97: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "97. spmvp01.at:21: testing ..." - $at_traceon +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - { $at_traceoff -$as_echo "$at_srcdir/spmvp01.at:24: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" -export TAR_OPTIONS -rm -rf * -exec <&- -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 + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -echo \"Pass 2: Split within a data block\" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo \"Create archive\" -tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -)" -echo spmvp01.at:24 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -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_func_filter_trace $? -else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + -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 + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/spmvp01.at:24" -$at_failed && at_func_log_failure -$at_traceon; } + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_97 -#AT_START_98 -# 98. 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 $as_echo_n " 98: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "98. spmvp10.at:21: testing ..." - $at_traceon + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi - { $at_traceoff -$as_echo "$at_srcdir/spmvp10.at:24: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" -export TAR_OPTIONS -rm -rf * + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo \"Pass 1: Split between data blocks\" -echo \"Create archive\" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -echo \"Pass 2: Split within a data block\" -genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 -echo \"Create archive\" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -)" -echo spmvp10.at:24 >"$at_check_line_file" + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi -echo "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_func_filter_trace $? -else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/spmvp10.at:24" -$at_failed && at_func_log_failure + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_98 -#AT_START_99 -# 99. update.at:28: update unchanged directories -at_setup_line='update.at:28' -at_desc="update unchanged directories" -$at_quiet $as_echo_n " 99: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_190 +#AT_START_191 +at_fn_group_banner 191 'selnx01.at:25' \ + "selinux: basic store/restore" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "99. update.at:28: testing ..." + $as_echo "191. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/update.at:31: + { set +x +$as_echo "$at_srcdir/selnx01.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -34544,47 +48101,106 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:31 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi + +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -34594,36 +48210,119 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -directory/ -directory/file1 -directory/file2 + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update.at:31" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/update.at:31: + { set +x +$as_echo "$at_srcdir/selnx01.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -34633,47 +48332,106 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:31 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi + +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -34683,36 +48441,119 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -directory/ -directory/file1 -directory/file2 + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update.at:31" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/update.at:31: + { set +x +$as_echo "$at_srcdir/selnx01.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -34722,23 +48563,106 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:31 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi + +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -34748,86 +48672,228 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/selnx01.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -directory/ -directory/file1 -directory/file2 -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update.at:31" -$at_failed && at_func_log_failure -$at_traceon; } +# ================================================================= +# check if selinux is not archived when --selinux option is missing - { $at_traceoff -$as_echo "$at_srcdir/update.at:31: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * +tar -cf archive.tar dir +# clear the directory +rm -rf dir -test -z "`sort < /dev/null 2>&1`" || exit 77 +# restore (with --selinux) +tar --selinux -xf archive.tar dir -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 )" -echo update.at:31 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -34837,60 +48903,119 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -directory/ -directory/file1 -directory/file2 + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update.at:31" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/update.at:31: + { set +x +$as_echo "$at_srcdir/selnx01.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -34900,47 +49025,106 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:31 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi + +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -34950,60 +49134,140 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -directory/ -directory/file1 -directory/file2 + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update.at:31" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_99 -#AT_START_100 -# 100. update01.at:29: update directories -at_setup_line='update01.at:29' -at_desc="update directories" -$at_quiet $as_echo_n "100: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_191 +#AT_START_192 +at_fn_group_banner 192 'selacl01.at:25' \ + "acls/selinux: special files & fifos" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "100. update01.at:29: testing ..." + $as_echo "192. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/update01.at:32: + { set +x +$as_echo "$at_srcdir/selacl01.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -35013,55 +49277,106 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo \"separator\" + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update01.at:32 >"$at_check_line_file" + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 a -genfile --file a/b + file=\$(TMPDIR=. mktemp fiXXXXXX) -tar cf arc a + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo "separator" -sleep 2 -genfile --file a/c + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -35071,881 +49386,804 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=$(TMPDIR=. mktemp fiXXXXXX) -echo "separator" + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -a/c -separator -a/ -a/b -a/c -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/update01.at:32: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir a -genfile --file a/b + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf arc a -echo \"separator\" + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c + rm -rf $file -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update01.at:32 >"$at_check_line_file" + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir a -genfile --file a/b + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf arc a -echo "separator" + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c + rm -rf $file -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR -mkdir a -genfile --file a/b +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype -tar cf arc a +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before -echo "separator" +tar --xattrs --selinux --acls -cf archive.tar dir -sleep 2 -genfile --file a/c +mv dir olddir -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "separator -a/c -separator -a/ -a/b -a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/update01.at:32: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { set +x +$as_echo "$at_srcdir/selacl01.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo \"separator\" + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update01.at:32 >"$at_check_line_file" + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 a -genfile --file a/b + file=\$(TMPDIR=. mktemp fiXXXXXX) -tar cf arc a + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo "separator" -sleep 2 -genfile --file a/c + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * + rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo "separator" + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -a/c -separator -a/ -a/b -a/c -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } + rm -rf \$file - { $at_traceoff -$as_echo "$at_srcdir/update01.at:32: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR -mkdir a -genfile --file a/b +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype -tar cf arc a +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before -echo \"separator\" +tar --xattrs --selinux --acls -cf archive.tar dir -sleep 2 -genfile --file a/c +mv dir olddir -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update01.at:32 >"$at_check_line_file" +tar --xattrs --selinux --acls -xf archive.tar -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=$(TMPDIR=. mktemp fiXXXXXX) -echo "separator" + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir a -genfile --file a/b +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR -tar cf arc a +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype -echo "separator" +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before -sleep 2 -genfile --file a/c +tar --xattrs --selinux --acls -cf archive.tar dir -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "separator -a/c -separator -a/ -a/b -a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/update01.at:32: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/selacl01.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo \"separator\" + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update01.at:32 >"$at_check_line_file" + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 a -genfile --file a/b + file=\$(TMPDIR=. mktemp fiXXXXXX) -tar cf arc a + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo "separator" -sleep 2 -genfile --file a/c + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo "separator" + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -genfile --file a/c -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -a/c -separator -a/ -a/b -a/c -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_100 -#AT_START_101 -# 101. update02.at:26: update changed files -at_setup_line='update02.at:26' -at_desc="update changed files" -$at_quiet $as_echo_n "101: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "101. update02.at:26: testing ..." - $at_traceon +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before +tar --xattrs --selinux --acls -cf archive.tar dir +mv dir olddir +tar --xattrs --selinux --acls -xf archive.tar +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after - { $at_traceoff -$as_echo "$at_srcdir/update02.at:29: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=$(TMPDIR=. mktemp fiXXXXXX) -echo \"separator\" + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -touch a/b -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update02.at:29 >"$at_check_line_file" + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 a -genfile --file a/b + file=$(TMPDIR=. mktemp fiXXXXXX) -tar cf arc a + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -echo "separator" -sleep 2 -touch a/b + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + rm -rf $file + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=$(TMPDIR=. mktemp fiXXXXXX) -echo "separator" + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -touch a/b -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -a/b -separator -a/ -a/b -a/b -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } + rm -rf $file - { $at_traceoff -$as_echo "$at_srcdir/update02.at:29: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR -mkdir a -genfile --file a/b +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype -tar cf arc a +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before -echo \"separator\" +tar --xattrs --selinux --acls -cf archive.tar dir -sleep 2 -touch a/b +mv dir olddir -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update02.at:29 >"$at_check_line_file" +tar --xattrs --selinux --acls -xf archive.tar -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/selacl01.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo "separator" + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -touch a/b -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=\$(TMPDIR=. mktemp fiXXXXXX) -echo "separator" + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -sleep 2 -touch a/b -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -a/b -separator -a/ -a/b -a/b -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } + rm -rf \$file - { $at_traceoff -$as_echo "$at_srcdir/update02.at:29: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir a -genfile --file a/b + file=\$(TMPDIR=. mktemp fiXXXXXX) -tar cf arc a + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -echo \"separator\" -sleep 2 -touch a/b + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update02.at:29 >"$at_check_line_file" + rm -rf \$file -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR -mkdir a -genfile --file a/b +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype -tar cf arc a +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before -echo "separator" +tar --xattrs --selinux --acls -cf archive.tar dir -sleep 2 -touch a/b +mv dir olddir -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -mkdir a -genfile --file a/b -tar cf arc a + file=$(TMPDIR=. mktemp fiXXXXXX) -echo "separator" + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -touch a/b -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -a/b -separator -a/ -a/b -a/b -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -$at_failed && at_func_log_failure -$at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/update02.at:29: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir a -genfile --file a/b + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf arc a -echo \"separator\" + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -touch a/b + rm -rf $file -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update02.at:29 >"$at_check_line_file" + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 + file=$(TMPDIR=. mktemp fiXXXXXX) -mkdir a -genfile --file a/b + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -tar cf arc a -echo "separator" + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -sleep 2 -touch a/b + rm -rf $file -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR -mkdir a -genfile --file a/b +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype -tar cf arc a +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before -echo "separator" +tar --xattrs --selinux --acls -cf archive.tar dir -sleep 2 -touch a/b +mv dir olddir -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "separator -a/b -separator -a/ -a/b -a/b " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/update02.at:29: + { set +x +$as_echo "$at_srcdir/selacl01.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -35955,152 +50193,106 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir a -genfile --file a/b - -tar cf arc a - -echo \"separator\" - -sleep 2 -touch a/b +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 -tar ufv arc a -echo \"separator\" -tar tf arc | sort || exit 1 -)" -echo update02.at:29 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir a -genfile --file a/b + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf arc a -echo "separator" -sleep 2 -touch a/b -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + file=\$(TMPDIR=. mktemp fiXXXXXX) + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir a -genfile --file a/b + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -tar cf arc a + rm -rf \$file -echo "separator" + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -sleep 2 -touch a/b -tar ufv arc a -echo "separator" -tar tf arc | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -a/b -separator -a/ -a/b -a/b -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" -$at_failed && at_func_log_failure -$at_traceon; } + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_101 -#AT_START_102 -# 102. volume.at:23: volume -at_setup_line='volume.at:23' -at_desc="volume" -$at_quiet $as_echo_n "102: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "102. volume.at:23: testing ..." - $at_traceon + rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype - { $at_traceoff -$as_echo "$at_srcdir/volume.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before -tar -cf archive -V label -T /dev/null || exit 1 +tar --xattrs --selinux --acls -cf archive.tar dir -tar xfV archive label || exit 1 -tar xfV archive 'la?el' || exit 1 -tar xfV archive 'l*l' || exit 1 +mv dir olddir -echo 1>&2 ----- -tar xfV archive lab -test \$? = 2 || exit 1 -echo 1>&2 ----- -tar xfV archive bel -test \$? = 2 || exit 1 -echo 1>&2 ----- -tar xfV archive babel -test \$? = 2 -)" -echo volume.at:26 >"$at_check_line_file" +tar --xattrs --selinux --acls -xf archive.tar -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -36109,197 +50301,139 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -tar -cf archive -V label -T /dev/null || exit 1 -tar xfV archive label || exit 1 -tar xfV archive 'la?el' || exit 1 -tar xfV archive 'l*l' || exit 1 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 -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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * -tar -cf archive -V label -T /dev/null || exit 1 + file=$(TMPDIR=. mktemp fiXXXXXX) -tar xfV archive label || exit 1 -tar xfV archive 'la?el' || exit 1 -tar xfV archive 'l*l' || exit 1 + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -echo 1>&2 ----- -tar xfV archive lab -test $? = 2 || exit 1 -echo 1>&2 ----- -tar xfV archive bel -test $? = 2 || exit 1 -echo 1>&2 ----- -tar xfV archive babel -test $? = 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/volume.at:26" -$at_failed && at_func_log_failure -$at_traceon; } + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi - { $at_traceoff -$as_echo "$at_srcdir/volume.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -tar -cf archive -V label -T /dev/null || exit 1 -tar xfV archive label || exit 1 -tar xfV archive 'la?el' || exit 1 -tar xfV archive 'l*l' || exit 1 -echo 1>&2 ----- -tar xfV archive lab -test \$? = 2 || exit 1 -echo 1>&2 ----- -tar xfV archive bel -test \$? = 2 || exit 1 -echo 1>&2 ----- -tar xfV archive babel -test \$? = 2 -)" -echo volume.at:26 >"$at_check_line_file" + file=$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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 + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + rm -rf $file -tar -cf archive -V label -T /dev/null || exit 1 + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -tar xfV archive label || exit 1 -tar xfV archive 'la?el' || exit 1 -tar xfV archive 'l*l' || exit 1 -echo 1>&2 ----- -tar xfV archive lab -test $? = 2 || exit 1 -echo 1>&2 ----- -tar xfV archive bel -test $? = 2 || exit 1 -echo 1>&2 ----- -tar xfV archive babel -test $? = 2 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/volume.at:26" -$at_failed && at_func_log_failure + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_102 -#AT_START_103 -# 103. volsize.at:29: volume header size -at_setup_line='volsize.at:29' -at_desc="volume header size" -$at_quiet $as_echo_n "103: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_192 +#AT_START_193 +at_fn_group_banner 193 'capabs_raw01.at:25' \ + "capabilities: binary store/restore" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "103. volsize.at:29: testing ..." + $as_echo "193. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -36309,51 +50443,72 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || 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 -)" -echo volsize.at:32 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -36363,42 +50518,83 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || 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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Short Listing -abc/not-a-file.gif -abc/CCC -Verbose Listing -V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- --rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC -Extracted directory -abc -abc/CCC + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -36408,51 +50604,72 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || 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 -)" -echo volsize.at:32 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -36462,42 +50679,83 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || 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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Short Listing -abc/not-a-file.gif -abc/CCC -Verbose Listing -V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- --rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC -Extracted directory -abc -abc/CCC + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -36507,51 +50765,72 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || 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 -)" -echo volsize.at:32 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -36561,42 +50840,83 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || 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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Short Listing -abc/not-a-file.gif -abc/CCC -Verbose Listing -V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- --rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC -Extracted directory -abc -abc/CCC + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -36606,51 +50926,72 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || 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 -)" -echo volsize.at:32 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -36660,42 +51001,83 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + file=$(TMPDIR=. mktemp fiXXXXXX) -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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Short Listing -abc/not-a-file.gif -abc/CCC -Verbose Listing -V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- --rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC -Extracted directory -abc -abc/CCC + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/volsize.at:32: + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -36705,51 +51087,72 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || 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 -)" -echo volsize.at:32 >"$at_check_line_file" + file=\$(TMPDIR=. mktemp fiXXXXXX) -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "`sort < /dev/null 2>&1`" || exit 77 + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi -test -z "$TEST_DATA_DIR" && exit 77 -tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi -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_func_filter_trace $? -else - ( :; + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -36759,67 +51162,104 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || 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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Short Listing -abc/not-a-file.gif -abc/CCC -Verbose Listing -V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header-- --rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC -Extracted directory -abc -abc/CCC + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_103 -#AT_START_104 -# 104. comprec.at:21: compressed format recognition -at_setup_line='comprec.at:21' -at_desc="compressed format recognition" -$at_quiet $as_echo_n "104: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_193 +#AT_START_194 +at_fn_group_banner 194 'onetop01.at:21' \ + "tar --one-top-level" " " 26 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "104. comprec.at:21: testing ..." + $as_echo "194. $at_setup_line: testing $at_desc ..." $at_traceon - - { $at_traceoff -$as_echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/onetop01.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -36829,43 +51269,19 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --length 10240 --file file1 -echo \"separator\" -tar cfz archive file1 -echo \"separator\" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort )" -echo comprec.at:25 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -36875,32 +51291,33 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --length 10240 --file file1 -echo "separator" -tar cfz archive file1 -echo "separator" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/onetop01.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -36910,43 +51327,19 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --length 10240 --file file1 -echo \"separator\" -tar cfz archive file1 -echo \"separator\" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort )" -echo comprec.at:25 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -36956,32 +51349,33 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --length 10240 --file file1 -echo "separator" -tar cfz archive file1 -echo "separator" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/onetop01.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -36991,43 +51385,19 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --length 10240 --file file1 -echo \"separator\" -tar cfz archive file1 -echo \"separator\" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort )" -echo comprec.at:25 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -37037,32 +51407,33 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --length 10240 --file file1 -echo "separator" -tar cfz archive file1 -echo "separator" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/onetop01.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -37072,43 +51443,19 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --length 10240 --file file1 -echo \"separator\" -tar cfz archive file1 -echo \"separator\" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort )" -echo comprec.at:25 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -37118,32 +51465,33 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --length 10240 --file file1 -echo "separator" -tar cfz archive file1 -echo "separator" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/comprec.at:25: + { set +x +$as_echo "$at_srcdir/onetop01.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -37153,43 +51501,19 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --length 10240 --file file1 -echo \"separator\" -tar cfz archive file1 -echo \"separator\" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort )" -echo comprec.at:25 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -37199,136 +51523,54 @@ export TAR_OPTIONS rm -rf * -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --length 10240 --file file1 -echo "separator" -tar cfz archive file1 -echo "separator" -mv file1 orig -tar xfv archive --warning=no-timestamp -cmp orig file1 -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -separator -file1 +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" - -$at_failed && at_func_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"` -#AT_STOP_104 -#AT_START_105 -# 105. shortfile.at:26: short input files -at_setup_line='shortfile.at:26' -at_desc="short input files" -$at_quiet $as_echo_n "105: $at_desc " -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "105. shortfile.at:26: testing ..." - $at_traceon - - - - - - { $at_traceoff -$as_echo "$at_srcdir/shortfile.at:29: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * - -genfile --length 511 --file foo || exit 5 -tar tf foo -)" -echo shortfile.at:29 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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_func_filter_trace $? -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * - -genfile --length 511 --file foo || exit 5 -tar tf foo -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/shortfile.at:29" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_105 -#AT_START_106 -# 106. shortupd.at:29: updating short archives -at_setup_line='shortupd.at:29' -at_desc="updating short archives" -$at_quiet $as_echo_n "106: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_194 +#AT_START_195 +at_fn_group_banner 195 'onetop02.at:21' \ + "tar --one-top-level --show-transformed" " " 26 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "106. shortupd.at:29: testing ..." + $as_echo "195. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/onetop02.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -37337,28 +51579,20 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -)" -echo shortupd.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -37367,21 +51601,37 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/onetop02.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -37390,28 +51640,20 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -)" -echo shortupd.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -37420,21 +51662,37 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" - -$at_failed && at_func_log_failure + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/onetop02.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -37443,28 +51701,20 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -)" -echo shortupd.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -37473,21 +51723,37 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/onetop02.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -37496,28 +51762,20 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -)" -echo shortupd.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -37526,21 +51784,37 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/shortupd.at:32: + { set +x +$as_echo "$at_srcdir/onetop02.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -37549,28 +51823,20 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -)" -echo shortupd.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -37579,45 +51845,58 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -touch foo -tar uf archive foo -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" -$at_failed && at_func_log_failure +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_106 -#AT_START_107 -# 107. truncate.at:29: truncate -at_setup_line='truncate.at:29' -at_desc="truncate" -$at_quiet $as_echo_n "107: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_195 +#AT_START_196 +at_fn_group_banner 196 'onetop03.at:21' \ + "tar --one-top-level --transform" " " 26 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "107. truncate.at:29: testing ..." + $as_echo "196. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/onetop03.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -37626,38 +51905,20 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: \$? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar)" -echo truncate.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -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_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -37666,36 +51927,34 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: $? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/onetop03.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -37704,38 +51963,20 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: \$? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar)" -echo truncate.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -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_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -37744,36 +51985,34 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: $? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/onetop03.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -37782,38 +52021,20 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: \$? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar)" -echo truncate.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -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_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -37822,36 +52043,34 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: $? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/onetop03.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -37860,38 +52079,20 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: \$? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar)" -echo truncate.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -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_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -37900,36 +52101,34 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: $? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/truncate.at:32: + { set +x +$as_echo "$at_srcdir/onetop03.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -37938,38 +52137,20 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: \$? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar)" -echo truncate.at:32 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -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_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -37978,60 +52159,55 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz -echo Exit status: $? -echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros -tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_107 -#AT_START_108 -# 108. grow.at:24: grow -at_setup_line='grow.at:24' -at_desc="grow" -$at_quiet $as_echo_n "108: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_196 +#AT_START_197 +at_fn_group_banner 197 'onetop04.at:21' \ + "tar --one-top-level --transform" " " 26 at_xfail=no test -f $XFAILFILE && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "108. grow.at:24: testing ..." + $as_echo "197. $at_setup_line: testing $at_desc ..." $at_traceon - { $at_traceoff -$as_echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/onetop04.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -38040,30 +52216,17 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -)" -echo grow.at:27 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" +( $at_check_trace; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -38072,27 +52235,30 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/onetop04.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -38101,30 +52267,17 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -)" -echo grow.at:27 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" +( $at_check_trace; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -38133,27 +52286,30 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/onetop04.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -38162,30 +52318,17 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -)" -echo grow.at:27 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" +( $at_check_trace; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -38194,27 +52337,30 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/onetop04.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -38223,59 +52369,49 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -)" -echo grow.at:27 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" +( $at_check_trace; mkdir posix (cd posix TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - { $at_traceoff -$as_echo "$at_srcdir/grow.at:27: + { set +x +$as_echo "$at_srcdir/onetop04.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -38284,30 +52420,17 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -)" -echo grow.at:27 >"$at_check_line_file" -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; 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 --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" +( $at_check_trace; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -38316,487 +52439,640 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --file foo --length 50000k -genfile --file baz -genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz -) ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -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 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_108 -#AT_START_109 -# 109. remfiles01.at:28: remove-files with compression -at_setup_line='remfiles01.at:28' -at_desc="remove-files with compression" -$at_quiet $as_echo_n "109: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_197 +#AT_START_198 +at_fn_group_banner 198 'onetop05.at:21' \ + "tar --one-top-level restoring permissions" " " 26 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + test -f $XFAILFILE && at_xfail=yes ( - $as_echo "109. remfiles01.at:28: testing ..." + $as_echo "198. $at_setup_line: testing $at_desc ..." $at_traceon -unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/remfiles01.at:32: - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +# When extracting an archive that contains ./ with the --one-top-level option, +# the mode and ownership of ./ would be incorrectly applied to the current +# working directory, instead of the requested top-level directory. -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + { set +x +$as_echo "$at_srcdir/onetop05.at:28: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +orig_mode=3702 +mkdir d +chmod \$orig_mode d +mode=\$(genfile --stat=mode.7777 d) +test \$mode = \$orig_mode || exit 77 -mkdir dir -cd dir -genfile --file a --length 0 -chmod 0 a -genfile --file b -mkdir c +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -# Depending on when the SIGPIPE gets delivered, the invocation below -# may finish with either -# tar: a: Cannot write: Broken pipe -# or -# tar: Child returned status 2 +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=\$(genfile --stat=mode.777 d1) +if test 700 = \$mode; then + echo \"CWD: OK\" +else + echo \"CWD: mode changed: 700 != \$mode\" +fi -# Discard diagnostics that some shells generate about broken pipes, -# and discard all of tar's diagnostics except for the ones saying \"(child)\". -# Gzip's exit code is propagated to the shell. Usually it is 141. -# Convert all non-zero exits to 2 to make it predictable. -(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null -EC=\$? -sed -n '/(child)/p' err >&2 -rm err -find . | sort -exit \$EC -" -echo remfiles01.at:32 >"$at_check_line_file" +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=\$(genfile --stat=mode.777 d2) +if test 700 = \$mode; then + echo \"DIR: OK\" +else + echo \"DIR: mode changed: 700 != \$mode\" +fi +mode=\$(genfile --stat=mode.7777 d2/top) +if test \$mode = \$orig_mode; then + echo \"TOP: OK\" +else + echo \"TOP: mode changed: \$orig_mode != \$mode\" +fi +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +orig_mode=3702 +mkdir d +chmod $orig_mode d -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +mode=$(genfile --stat=mode.7777 d) +test $mode = $orig_mode || exit 77 +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=$(genfile --stat=mode.777 d1) +if test 700 = $mode; then + echo "CWD: OK" +else + echo "CWD: mode changed: 700 != $mode" +fi +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=$(genfile --stat=mode.777 d2) +if test 700 = $mode; then + echo "DIR: OK" +else + echo "DIR: mode changed: 700 != $mode" +fi +mode=$(genfile --stat=mode.7777 d2/top) +if test $mode = $orig_mode; then + echo "TOP: OK" +else + echo "TOP: mode changed: $orig_mode != $mode" +fi +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "CWD: OK +DIR: OK +TOP: OK +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } -test -z "`sort < /dev/null 2>&1`" || exit 77 + { set +x +$as_echo "$at_srcdir/onetop05.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * +orig_mode=3702 +mkdir d +chmod \$orig_mode d -mkdir dir -cd dir -genfile --file a --length 0 -chmod 0 a -genfile --file b -mkdir c +mode=\$(genfile --stat=mode.7777 d) +test \$mode = \$orig_mode || exit 77 -# Depending on when the SIGPIPE gets delivered, the invocation below -# may finish with either -# tar: a: Cannot write: Broken pipe -# or -# tar: Child returned status 2 +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -# Discard diagnostics that some shells generate about broken pipes, -# and discard all of tar's diagnostics except for the ones saying "(child)". -# Gzip's exit code is propagated to the shell. Usually it is 141. -# Convert all non-zero exits to 2 to make it predictable. -(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null -EC=$? -sed -n '/(child)/p' err >&2 -rm err -find . | sort -exit $EC - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=\$(genfile --stat=mode.777 d1) +if test 700 = \$mode; then + echo \"CWD: OK\" else - ( :; - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + echo \"CWD: mode changed: 700 != \$mode\" +fi +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=\$(genfile --stat=mode.777 d2) +if test 700 = \$mode; then + echo \"DIR: OK\" +else + echo \"DIR: mode changed: 700 != \$mode\" +fi +mode=\$(genfile --stat=mode.7777 d2/top) +if test \$mode = \$orig_mode; then + echo \"TOP: OK\" +else + echo \"TOP: mode changed: \$orig_mode != \$mode\" +fi +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +orig_mode=3702 +mkdir d +chmod $orig_mode d +mode=$(genfile --stat=mode.7777 d) +test $mode = $orig_mode || exit 77 -mkdir dir -cd dir -genfile --file a --length 0 -chmod 0 a -genfile --file b -mkdir c +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -# Depending on when the SIGPIPE gets delivered, the invocation below -# may finish with either -# tar: a: Cannot write: Broken pipe -# or -# tar: Child returned status 2 +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=$(genfile --stat=mode.777 d1) +if test 700 = $mode; then + echo "CWD: OK" +else + echo "CWD: mode changed: 700 != $mode" +fi -# Discard diagnostics that some shells generate about broken pipes, -# and discard all of tar's diagnostics except for the ones saying "(child)". -# Gzip's exit code is propagated to the shell. Usually it is 141. -# Convert all non-zero exits to 2 to make it predictable. -(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null -EC=$? -sed -n '/(child)/p' err >&2 -rm err -find . | sort -exit $EC - ) >"$at_stdout" 2>"$at_stderr" +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=$(genfile --stat=mode.777 d2) +if test 700 = $mode; then + echo "DIR: OK" +else + echo "DIR: mode changed: 700 != $mode" fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Permission denied -tar (child): Error is not recoverable: exiting now -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo ". -./a -./b -./c +mode=$(genfile --stat=mode.7777 d2/top) +if test $mode = $orig_mode; then + echo "TOP: OK" +else + echo "TOP: mode changed: $orig_mode != $mode" +fi +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "CWD: OK +DIR: OK +TOP: OK " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/remfiles01.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/onetop05.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_109 -#AT_START_110 -# 110. remfiles02.at:28: remove-files with compression: grand-child -at_setup_line='remfiles02.at:28' -at_desc="remove-files with compression: grand-child" -$at_quiet $as_echo_n "110: $at_desc " -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "110. remfiles02.at:28: testing ..." - $at_traceon - - +orig_mode=3702 +mkdir d +chmod \$orig_mode d -unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/remfiles02.at:32: +mode=\$(genfile --stat=mode.7777 d) +test \$mode = \$orig_mode || exit 77 -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=\$(genfile --stat=mode.777 d1) +if test 700 = \$mode; then + echo \"CWD: OK\" +else + echo \"CWD: mode changed: 700 != \$mode\" +fi -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=\$(genfile --stat=mode.777 d2) +if test 700 = \$mode; then + echo \"DIR: OK\" +else + echo \"DIR: mode changed: 700 != \$mode\" +fi +mode=\$(genfile --stat=mode.7777 d2/top) +if test \$mode = \$orig_mode; then + echo \"TOP: OK\" +else + echo \"TOP: mode changed: \$orig_mode != \$mode\" +fi +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +orig_mode=3702 +mkdir d +chmod $orig_mode d -mkdir dir -cd dir -mkdir a -genfile --file b -mkdir c +mode=$(genfile --stat=mode.7777 d) +test $mode = $orig_mode || exit 77 -tar -c -f a -z --remove-files b c 2>err -EC=\$? -sed -n '/(child)/p' err >&2 -rm err -find . | sort -exit \$EC -" -echo remfiles02.at:32 >"$at_check_line_file" +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=$(genfile --stat=mode.777 d1) +if test 700 = $mode; then + echo "CWD: OK" +else + echo "CWD: mode changed: 700 != $mode" +fi -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=$(genfile --stat=mode.777 d2) +if test 700 = $mode; then + echo "DIR: OK" +else + echo "DIR: mode changed: 700 != $mode" +fi +mode=$(genfile --stat=mode.7777 d2/top) +if test $mode = $orig_mode; then + echo "TOP: OK" +else + echo "TOP: mode changed: $orig_mode != $mode" +fi +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "CWD: OK +DIR: OK +TOP: OK +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + { set +x +$as_echo "$at_srcdir/onetop05.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +orig_mode=3702 +mkdir d +chmod \$orig_mode d +mode=\$(genfile --stat=mode.7777 d) +test \$mode = \$orig_mode || exit 77 -mkdir dir -cd dir -mkdir a -genfile --file b -mkdir c +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -tar -c -f a -z --remove-files b c 2>err -EC=$? -sed -n '/(child)/p' err >&2 -rm err -find . | sort -exit $EC - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=\$(genfile --stat=mode.777 d1) +if test 700 = \$mode; then + echo \"CWD: OK\" else - ( :; + echo \"CWD: mode changed: 700 != \$mode\" +fi -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=\$(genfile --stat=mode.777 d2) +if test 700 = \$mode; then + echo \"DIR: OK\" +else + echo \"DIR: mode changed: 700 != \$mode\" +fi +mode=\$(genfile --stat=mode.7777 d2/top) +if test \$mode = \$orig_mode; then + echo \"TOP: OK\" +else + echo \"TOP: mode changed: \$orig_mode != \$mode\" +fi +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * +orig_mode=3702 +mkdir d +chmod $orig_mode d -test -z "`sort < /dev/null 2>&1`" || exit 77 +mode=$(genfile --stat=mode.7777 d) +test $mode = $orig_mode || exit 77 +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -mkdir dir -cd dir -mkdir a -genfile --file b -mkdir c +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=$(genfile --stat=mode.777 d1) +if test 700 = $mode; then + echo "CWD: OK" +else + echo "CWD: mode changed: 700 != $mode" +fi -tar -c -f a -z --remove-files b c 2>err -EC=$? -sed -n '/(child)/p' err >&2 -rm err -find . | sort -exit $EC - ) >"$at_stdout" 2>"$at_stderr" +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=$(genfile --stat=mode.777 d2) +if test 700 = $mode; then + echo "DIR: OK" +else + echo "DIR: mode changed: 700 != $mode" fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Is a directory -tar (child): Error is not recoverable: exiting now -" | \ - $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo ". -./a -./b -./c +mode=$(genfile --stat=mode.7777 d2/top) +if test $mode = $orig_mode; then + echo "TOP: OK" +else + echo "TOP: mode changed: $orig_mode != $mode" +fi +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "CWD: OK +DIR: OK +TOP: OK " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/remfiles02.at:32" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28" +$at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/onetop05.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_110 -#AT_START_111 -# 111. remfiles03.at:28: remove-files with symbolic links -at_setup_line='remfiles03.at:28' -at_desc="remove-files with symbolic links" -$at_quiet $as_echo_n "111: $at_desc " -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "111. remfiles03.at:28: testing ..." - $at_traceon - +orig_mode=3702 +mkdir d +chmod \$orig_mode d +mode=\$(genfile --stat=mode.7777 d) +test \$mode = \$orig_mode || exit 77 -{ $at_traceoff -$as_echo "$at_srcdir/remfiles03.at:31: -mkdir a -mkdir a/b -ln -s b a/c || exit 77 -tar --remove-files -cf a.tar a -genfile --stat a -" -echo remfiles03.at:31 >"$at_check_line_file" +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -mkdir a -mkdir a/b -ln -s b a/c || exit 77 -tar --remove-files -cf a.tar a -genfile --stat a - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=\$(genfile --stat=mode.777 d1) +if test 700 = \$mode; then + echo \"CWD: OK\" else - ( :; -mkdir a -mkdir a/b -ln -s b a/c || exit 77 -tar --remove-files -cf a.tar a -genfile --stat a - ) >"$at_stdout" 2>"$at_stderr" + echo \"CWD: mode changed: 700 != \$mode\" fi -at_status=$? -at_failed=false -echo >>"$at_stderr"; $as_echo "genfile: stat(a) failed: No such file or directory -" | \ - $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/remfiles03.at:31" - -$at_failed && at_func_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"` -#AT_STOP_111 -#AT_START_112 -# 112. sigpipe.at:19: sigpipe handling -at_setup_line='sigpipe.at:19' -at_desc="sigpipe handling" -$at_quiet $as_echo_n "112: $at_desc " -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "112. sigpipe.at:19: testing ..." - $at_traceon +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=\$(genfile --stat=mode.777 d2) +if test 700 = \$mode; then + echo \"DIR: OK\" +else + echo \"DIR: mode changed: 700 != \$mode\" +fi +mode=\$(genfile --stat=mode.7777 d2/top) +if test \$mode = \$orig_mode; then + echo \"TOP: OK\" +else + echo \"TOP: mode changed: \$orig_mode != \$mode\" +fi +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * +orig_mode=3702 +mkdir d +chmod $orig_mode d -# Description: Tar 1.23 ignored sigpipe which lead to spurious "write -# error" diagnostics when piping output to another programs. -# Reported-by: "Dmitry V. Levin" -# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html -# <20100319184141.GC30047@wo.int.altlinux.org> - -{ $at_traceoff -$as_echo "$at_srcdir/sigpipe.at:28: -genfile --length 2048 --file first -genfile --length 2048 --file second -genfile --length 2049 --file third - -tar cf archive first second third - -# Discard diagnostics that some shells generate about broken pipes. -(tar tf archive 2>&3 | :) 3>&2 2>/dev/null -" -echo sigpipe.at:28 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -genfile --length 2048 --file first -genfile --length 2048 --file second -genfile --length 2049 --file third +mode=$(genfile --stat=mode.7777 d) +test $mode = $orig_mode || exit 77 -tar cf archive first second third +genfile --file d/file +tar -cf d.tar -C d . +rm -rf d -# Discard diagnostics that some shells generate about broken pipes. -(tar tf archive 2>&3 | :) 3>&2 2>/dev/null - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? +(mkdir d1 +chmod 700 d1 +cd d1 +tar --one-top-level=top -xpf ../d.tar) +mode=$(genfile --stat=mode.777 d1) +if test 700 = $mode; then + echo "CWD: OK" else - ( :; -genfile --length 2048 --file first -genfile --length 2048 --file second -genfile --length 2049 --file third - -tar cf archive first second third - -# Discard diagnostics that some shells generate about broken pipes. -(tar tf archive 2>&3 | :) 3>&2 2>/dev/null - ) >"$at_stdout" 2>"$at_stderr" + echo "CWD: mode changed: 700 != $mode" fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/sigpipe.at:28" -$at_failed && at_func_log_failure +mkdir d2 +chmod 700 d2 +tar -C d2 --one-top-level=top -xpf d.tar +mode=$(genfile --stat=mode.777 d2) +if test 700 = $mode; then + echo "DIR: OK" +else + echo "DIR: mode changed: 700 != $mode" +fi +mode=$(genfile --stat=mode.7777 d2/top) +if test $mode = $orig_mode; then + echo "TOP: OK" +else + echo "TOP: mode changed: $orig_mode != $mode" +fi +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "CWD: OK +DIR: OK +TOP: OK +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_112 -#AT_START_113 -# 113. gtarfail.at:21: gtarfail -at_setup_line='gtarfail.at:21' -at_desc="gtarfail" -$at_quiet $as_echo_n "113: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_198 +#AT_START_199 +at_fn_group_banner 199 'gtarfail.at:22' \ + "gtarfail" " " 27 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "113. gtarfail.at:21: testing ..." + $as_echo "199. $at_setup_line: testing $at_desc ..." $at_traceon unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/gtarfail.at:26: +{ set +x +$as_echo "$at_srcdir/gtarfail.at:27: -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 +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" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "gtarfail.at:27" +( $at_check_trace; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 - - -tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone 518 2001-05-25 14:41 vedpowered.gif -rw-r--r-- jes/glone 6825 1997-04-29 00:19 cd.gif -rw-r--r-- jes/glone 33354 1999-06-22 12:17 DSCN0049c.JPG @@ -38805,64 +53081,48 @@ echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone 518 2001-05-25 14:41 v -rw-rw-rw- jes/glone 148753 1998-09-15 13:08 billyboy.jpg " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/gtarfail.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/gtarfail.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_113 -#AT_START_114 -# 114. gtarfail2.at:21: gtarfail2 -at_setup_line='gtarfail2.at:21' -at_desc="gtarfail2" -$at_quiet $as_echo_n "114: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_199 +#AT_START_200 +at_fn_group_banner 200 'gtarfail2.at:22' \ + "gtarfail2" " " 27 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "114. gtarfail2.at:21: testing ..." + $as_echo "200. $at_setup_line: testing $at_desc ..." $at_traceon unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/gtarfail2.at:26: +{ set +x +$as_echo "$at_srcdir/gtarfail2.at:27: -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 +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" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "gtarfail2.at:27" +( $at_check_trace; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -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" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "-rwxr-xr-x jes/glone 214 2001-09-21 14:08 .clean lrwxrwxrwx jes/cats 0 1998-05-07 12:39 RULES -> makefiles/RULES drwxr-sr-x jes/glone 0 2001-12-10 00:00 build/ @@ -38875,51 +53135,44 @@ lrwxrwxrwx jes/glone 0 2001-08-29 10:53 build/psmake/archconf.c -> ../ar lrwxrwxrwx jes/glone 0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/gtarfail2.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/gtarfail2.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_114 -#AT_START_115 -# 115. multi-fail.at:21: multi-fail -at_setup_line='multi-fail.at:21' -at_desc="multi-fail" -$at_quiet $as_echo_n "115: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_200 +#AT_START_201 +at_fn_group_banner 201 'multi-fail.at:22' \ + "multi-fail" " " 27 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "115. multi-fail.at:21: testing ..." + $as_echo "201. $at_setup_line: testing $at_desc ..." $at_traceon unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/multi-fail.at:26: +{ set +x +$as_echo "$at_srcdir/multi-fail.at:27: -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 +test -z \"\$STAR_TESTSCRIPTS\" && exit 77 +tarball_prereq gnu-multi-fail-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" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "multi-fail.at:27" +( $at_check_trace; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -38931,26 +53184,11 @@ tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STA 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_func_filter_trace $? -else - ( :; - -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 - - -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 - -tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \ - -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&- - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs 0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/ -rw-r--r-- joerg/bs 1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull -rw-r--r-- joerg/bs 1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d @@ -39005,49 +53243,42 @@ echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs 0 2003-10-11 14:32 O -rw-r--r-- joerg/bs 2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/multi-fail.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/multi-fail.at:27" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_115 -#AT_START_116 -# 116. ustar-big-2g.at:21: ustar-big-2g -at_setup_line='ustar-big-2g.at:21' -at_desc="ustar-big-2g" -$at_quiet $as_echo_n "116: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_201 +#AT_START_202 +at_fn_group_banner 202 'ustar-big-2g.at:22' \ + "ustar-big-2g" " " 27 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "116. ustar-big-2g.at:21: testing ..." + $as_echo "202. $at_setup_line: testing $at_desc ..." $at_traceon unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/ustar-big-2g.at:26: +{ set +x +$as_echo "$at_srcdir/ustar-big-2g.at:27: cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 +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" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-2g.at:27" +( $at_check_trace; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -39057,31 +53288,17 @@ tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTS tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 - -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 - - -tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big -rw-r--r-- jes/glone 0 2002-06-15 14:53 file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:27" +$at_failed && at_fn_log_failure $at_traceon; } @@ -39098,43 +53315,37 @@ do done - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_116 -#AT_START_117 -# 117. ustar-big-8g.at:21: ustar-big-8g -at_setup_line='ustar-big-8g.at:21' -at_desc="ustar-big-8g" -$at_quiet $as_echo_n "117: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_202 +#AT_START_203 +at_fn_group_banner 203 'ustar-big-8g.at:22' \ + "ustar-big-8g" " " 27 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "117. ustar-big-8g.at:21: testing ..." + $as_echo "203. $at_setup_line: testing $at_desc ..." $at_traceon unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/ustar-big-8g.at:26: +{ set +x +$as_echo "$at_srcdir/ustar-big-8g.at:27: cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 +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" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-8g.at:27" +( $at_check_trace; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -39144,31 +53355,17 @@ tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTS tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 - -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 - - -tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1 -rw-r--r-- jes/glone 0 2002-06-15 14:53 file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:27" +$at_failed && at_fn_log_failure $at_traceon; } @@ -39185,43 +53382,37 @@ do done - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_117 -#AT_START_118 -# 118. pax-big-10g.at:21: pax-big-10g -at_setup_line='pax-big-10g.at:21' -at_desc="pax-big-10g" -$at_quiet $as_echo_n "118: $at_desc " +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_203 +#AT_START_204 +at_fn_group_banner 204 'pax-big-10g.at:22' \ + "pax-big-10g" " " 27 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "118. pax-big-10g.at:21: testing ..." + $as_echo "204. $at_setup_line: testing $at_desc ..." $at_traceon unset TAR_OPTIONS -{ $at_traceoff -$as_echo "$at_srcdir/pax-big-10g.at:26: +{ set +x +$as_echo "$at_srcdir/pax-big-10g.at:27: cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 -test -z "$STAR_TESTSCRIPTS" && exit 77 -tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 +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" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "pax-big-10g.at:27" +( $at_check_trace; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -39231,31 +53422,17 @@ tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSC tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -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" -fi -at_status=$? -at_failed=false +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter echo stderr:; tee stderr <"$at_stderr" echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g -rw-r--r-- jes/glone 0 2002-06-15 14:53 file " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:26" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:27" +$at_failed && at_fn_log_failure $at_traceon; } @@ -39272,8 +53449,8 @@ do done - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` -#AT_STOP_118 +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_204